Documentation ¶
Index ¶
- Variables
- func AcceptEmptyStringPtr(str *string) string
- func BToU(b bool) uint8
- func BsonId() string
- func DeleteElemFromSlice[T string | int | primitive.ObjectID](a []T, elem T) []T
- func GenID() (id string, err error)
- func GetImageBase64(logoPath string, bytes []byte) *string
- func GetMachineId() (string, error)
- func GetProtectedMachineId() (string, error)
- func GetRequestScheme(c *gin.Context) string
- func GetUserAgent(c *gin.Context) string
- func InterfaceToFloat64(t1 any) float64
- func InterfaceToInt(t1 any) int
- func InterfaceToInt64(t1 any) int64
- func InterfaceToString(t1 any) string
- func InterfaceToStruct[T any](a any) (*T, error)
- func InterfaceToUInt64(t1 any) uint64
- func IsHttp(c *gin.Context) bool
- func IsHttps(c *gin.Context) bool
- func IsSSL(c *gin.Context) bool
- func IsStringEmpty(str *string) bool
- func LCFirst(str string) string
- func NanoId() (id string, err error)
- func RandString(n uint8) string
- func RandStringUpper(n uint8) string
- func RejectEmptyString(str string) *string
- func RejectEmptyStringPtr(str *string) *string
- func SetDefault[T interface{}](obj *T)
- func SetIfNotEmpty(target *string, source *string)
- func SetIfNotEq[...](d *T, s *T)
- func SetIfNotNil[T interface{}](d *T, s *T)
- func SetIfSourceNotEmpty(target *string, source *string)
- func SetIfSourceNotEmptyInt(target *int, source *int)
- func SliceRemoveDuplicate[T int | string | primitive.ObjectID](slc []T) []T
- func String(s string) *string
- func StringTrim(str *string) *string
- func ToLowerFirst(s string) string
- func UUID() string
- type BitMap
Constants ¶
This section is empty.
Variables ¶
View Source
var (
APP_NAME string = "console-core-go"
)
Functions ¶
func AcceptEmptyStringPtr ¶
func DeleteElemFromSlice ¶
func GetImageBase64 ¶
func GetMachineId ¶ added in v0.0.4
func GetProtectedMachineId ¶ added in v0.0.4
func GetRequestScheme ¶
websocket TODO Upgrade: websocket Connection: ...Upgrade...
func GetUserAgent ¶
func InterfaceToString ¶
func InterfaceToStruct ¶
func IsStringEmpty ¶
func RandString ¶
func RejectEmptyString ¶
func RejectEmptyStringPtr ¶
func SetDefault ¶
func SetDefault[T interface{}](obj *T)
load default value from struct tag "default"
func SetIfNotEmpty ¶
func SetIfNotEq ¶
func SetIfNotEq[T string | bool | int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](d *T, s *T)
byte = uint8
func SetIfNotNil ¶
func SetIfNotNil[T interface{}](d *T, s *T)
func SetIfSourceNotEmpty ¶
func SetIfSourceNotEmptyInt ¶
func SliceRemoveDuplicate ¶
func StringTrim ¶
func ToLowerFirst ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.