Documentation
¶
Index ¶
- func AuthHeadersFromContext(ctx context.Context) map[string]string
- func CopySourceToFile(fileName string, source io.Reader) error
- func FileTypeAllowed(fileHeader *multipart.FileHeader, allowed map[string]bool) (bool, string, error)
- func FinalizeTransaction(opt FinalizeTransactionOpt)
- func GenerateDeviceHash(ctx context.Context, accountId int64) string
- func HashSHA512(str string) string
- func HealthOK(ctx *gin.Context)
- func InjectValues(ctx context.Context, values map[appconstant.ContextKey]any) context.Context
- func LooksLikeCSV(b []byte) bool
- func MultipartFromFilePath(fieldName, filePath string) (*multipart.FileHeader, multipart.File, error)
- func NewCSVReader(file multipart.File) (*csv.Reader, error)
- func NewHashHelper(config HashConfig) *hashHelperImpl
- func NewJWTHelper(config JwtConfig, method jwt.SigningMethod) *jwtHelperImpl
- func NewLogrus() *logrus.Logger
- func ReadCSVFromUpload(file multipart.File) ([]string, [][]string, error)
- func ResponseOK(ctx *gin.Context, res any)
- func SetupLogrus(logLevel string, dir string) error
- type FinalizeTransactionOpt
- type HashConfig
- type HashHelper
- type JWTHelper
- type JwtConfig
- type SmtpHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthHeadersFromContext ¶ added in v1.8.0
func CopySourceToFile ¶ added in v1.1.1
func FileTypeAllowed ¶ added in v1.1.0
func FinalizeTransaction ¶ added in v1.3.3
func FinalizeTransaction(opt FinalizeTransactionOpt)
func GenerateDeviceHash ¶ added in v1.5.0
func HashSHA512 ¶ added in v1.5.0
func InjectValues ¶ added in v0.0.4
func InjectValues(ctx context.Context, values map[appconstant.ContextKey]any) context.Context
func LooksLikeCSV ¶ added in v1.8.4
func MultipartFromFilePath ¶ added in v1.8.8
func NewHashHelper ¶
func NewHashHelper(config HashConfig) *hashHelperImpl
func NewJWTHelper ¶ added in v0.0.2
func NewJWTHelper(config JwtConfig, method jwt.SigningMethod) *jwtHelperImpl
func ReadCSVFromUpload ¶ added in v1.8.6
func ResponseOK ¶
func SetupLogrus ¶ added in v1.9.5
Types ¶
type FinalizeTransactionOpt ¶ added in v1.3.3
type HashConfig ¶
type HashConfig struct {
HashCost int `json:"hash_cost"`
}
type HashHelper ¶
type SmtpHelper ¶ added in v1.4.1
type SmtpHelper struct {
// contains filtered or unexported fields
}
func NewSmptpHelper ¶ added in v1.4.0
func NewSmptpHelper(config entity.SmtpHelperConfig) *SmtpHelper
func (*SmtpHelper) NewRequest ¶ added in v1.4.1
func (h *SmtpHelper) NewRequest(to []string, subject string) *smtpRequest