Documentation ¶
Overview ¶
Copyright The RAI Inc. The RAI Authors
Copyright The RAI Inc. The RAI Authors
Copyright The RAI Inc. The RAI Authors
Copyright The RAI Inc. The RAI Authors
Copyright The RAI Inc. The RAI Authors
Copyright The RAI Inc. The RAI Authors
Index ¶
- func CurrFuncName() string
- func CurrVersion() string
- func DecodeJWT(c echo.Context, claims jwt.Claims, secret string) error
- func EncodeJWT(claims jwt.Claims, secret string) (string, error)
- func ExtractJWTFromHeader(c echo.Context) string
- func FloatInRange(i, min, max float64) float64
- func GetRandomNumberFromRange(min, max int) int
- func InterfaceStripTags(data interface{}, trimSpace bool) interface{}
- func IsFilesExistInDirectory(path string, filesToCheck []string) (bool, error)
- func ParseBeanSystemFilesAndDirectorires()
- func PostDataStripTags(c echo.Context, trimSpace bool) (map[string]interface{}, error)
- func StructStripTags(data interface{}, trimSpace bool) error
- type CopyableMap
- type CopyableSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrVersion ¶
func CurrVersion() string
Returns the current version, only support module mode binaries.
func DecodeJWT ¶
ExtractUserInfoFromJWT extracts user info from JWT. It is faster than calling redis to get those info.
func ExtractJWTFromHeader ¶
func ExtractJWTFromHeader(c echo.Context) string
ExtractJWTFromHeader returns the JWT token string from authorization header.
func FloatInRange ¶
TODO: Change to generic after go1.18 release
func InterfaceStripTags ¶
func InterfaceStripTags(data interface{}, trimSpace bool) interface{}
func IsFilesExistInDirectory ¶
`IsFilesExistInDirectory` function will check the files (filesToCheck) exist in a specific diretory or not.
func ParseBeanSystemFilesAndDirectorires ¶
func ParseBeanSystemFilesAndDirectorires()
func PostDataStripTags ¶
func StructStripTags ¶
c.Logger().Info(test.Lastname)
Types ¶
type CopyableMap ¶
type CopyableMap map[string]interface{}
func (CopyableMap) DeepCopy ¶
func (m CopyableMap) DeepCopy() map[string]interface{}
DeepCopy will create a deep copy of this map. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy. Keep in mind that the slices in the resulting map will be of type []interface{}, so when using them, you will need to use type assertion to retrieve the value in the expected type. Reference: https://stackoverflow.com/questions/23057785/how-to-copy-a-map/23058707
type CopyableSlice ¶
type CopyableSlice []interface{}
func (CopyableSlice) DeepCopy ¶
func (s CopyableSlice) DeepCopy() []interface{}
DeepCopy will create a deep copy of this slice. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy. Reference: https://stackoverflow.com/questions/23057785/how-to-copy-a-map/23058707