Documentation ¶
Index ¶
- Constants
- func CheckFolder(folderPath string)
- func ConstructColNameAndValue(ctx context.Context, structName interface{}, isNullStruct ...bool) ([]string, []interface{})
- func ConstructColNameAndValueBulk(ctx context.Context, arrayOfData interface{}, ...) (*database.CUDConstructData, error)
- func ConstructColNameAndValueForUpdate(_ context.Context, structName interface{}, anotherValues ...interface{}) *database.CUDConstructData
- func ConvertStructToMap(structSource interface{}) map[string]interface{}
- func GenerateJWTToken(data interface{}, expireTime ...time.Duration) (string, error)
- func GenerateRandomString(length int) string
- func GenerateRandomStringWithCharset(length int, charset string) string
- func GenerateSelectCols(ctx context.Context, source interface{}, opts ...GenSelectColsOptions) []string
- func GenerateUUID() string
- func GenerateUUIDV4() string
- func GetColorUniform(hexColor string) *image.Uniform
- func GetFilePath() string
- func GetFolderAndFileName(path string) (folderPath string, fileName string)
- func GetFolderNameWithoutTmp(path string) (folderName string)
- func GetTemplate(file string, args, destStruct interface{}) error
- func GetTemplateFS(embedFS embed.FS, file string, args, destStruct interface{}) error
- func GetTmpFolderPath() (string, error)
- func ParseFileTemplate(filePath string, args interface{}, additionalBodyContent ...string) (bytes.Buffer, error)
- func ParseHexColor(s string) (c color.RGBA, err error)
- func ParseTemplate(embedFS embed.FS, file string, args interface{}, ...) (bytes.Buffer, error)
- func Remove(slice []interface{}, s int) []interface{}
- func SendSlackNotification(ctx context.Context, options ...SentNotifParamOptions) error
- func SliceContains(s []string, str string) bool
- func ToCamelCase(str string) string
- func ToLowerCamelCase(str string) string
- func ToSnakeCase(s string) string
- func TrimDuplicatedSpace(str string) string
- func UploadToTmp(ctx context.Context, path *string, file multipart.File, ...) error
- type CloudStorageTmpUpload
- type GenSelectColsOptionalParams
- type GenSelectColsOptions
- type SentNotifParamOptions
Constants ¶
View Source
const ( NotifInfoType = "info" NotifWarnType = "warn" NotifErrorType = "error" )
Variables ¶
This section is empty.
Functions ¶
func CheckFolder ¶
func CheckFolder(folderPath string)
func ConstructColNameAndValueForUpdate ¶
func ConstructColNameAndValueForUpdate(_ context.Context, structName interface{}, anotherValues ...interface{}) *database.CUDConstructData
func ConvertStructToMap ¶ added in v2.16.0
func ConvertStructToMap(structSource interface{}) map[string]interface{}
func GenerateJWTToken ¶
func GenerateRandomString ¶
func GenerateSelectCols ¶
func GenerateSelectCols(ctx context.Context, source interface{}, opts ...GenSelectColsOptions) []string
func GenerateUUID ¶
func GenerateUUID() string
func GenerateUUIDV4 ¶
func GenerateUUIDV4() string
func GetColorUniform ¶
func GetFilePath ¶
func GetFilePath() string
func GetFolderAndFileName ¶
func GetFolderNameWithoutTmp ¶
func GetTemplate ¶
func GetTemplateFS ¶
func GetTmpFolderPath ¶
func ParseFileTemplate ¶
func ParseTemplate ¶
func SendSlackNotification ¶ added in v2.7.0
func SendSlackNotification(ctx context.Context, options ...SentNotifParamOptions) error
func SliceContains ¶ added in v2.3.12
func ToCamelCase ¶
ToCamelCase - will be convert string to camel case format
example:"AnyKind of_string" result:"AnyKindOfString"
func ToLowerCamelCase ¶
ToLowerCamelCase - will be convert string to camel case format with lower case at first letter
example:"AnyKind of_string" result:"anyKindOfString"
func ToSnakeCase ¶
ToSnakeCase - will be convert string to snake case format
example:"AnyKind of_string" result:"any_kind_of_string"
func TrimDuplicatedSpace ¶
func UploadToTmp ¶
Types ¶
type CloudStorageTmpUpload ¶
type GenSelectColsOptionalParams ¶ added in v2.5.3
type GenSelectColsOptionalParams struct {
// contains filtered or unexported fields
}
type GenSelectColsOptions ¶ added in v2.5.3
type GenSelectColsOptions func(*GenSelectColsOptionalParams)
func WithExcludedCols ¶ added in v2.5.3
func WithExcludedCols(excludedCols string) GenSelectColsOptions
func WithIncludedCols ¶ added in v2.5.3
func WithIncludedCols(includedCols string) GenSelectColsOptions
func WithIsNullStruct ¶ added in v2.5.3
func WithIsNullStruct(isNullStruct bool) GenSelectColsOptions
type SentNotifParamOptions ¶ added in v2.7.0
type SentNotifParamOptions func(param *sentNotifParam)
func NotifChannel ¶ added in v2.7.0
func NotifChannel(channel string) SentNotifParamOptions
func NotifData ¶ added in v2.7.0
func NotifData(data map[string]string) SentNotifParamOptions
func NotifMsgType ¶ added in v2.7.0
func NotifMsgType(msgType string) SentNotifParamOptions
func NotifTitle ¶ added in v2.7.0
func NotifTitle(title string) SentNotifParamOptions
Click to show internal directories.
Click to hide internal directories.