Documentation
¶
Index ¶
- func Atoi(s string) int32
- func BasicStringDecrypt(data string, masterKey []byte, code []byte) (string, error)
- func BasicStringEncrypt(plaintext string, masterKey []byte, code []byte) (string, error)
- func CheckValidApp(app string) bool
- func CheckValidBrief(brief string) bool
- func CheckValidHex(hex1 string) bool
- func CheckValidUUID(uuidCode string) bool
- func Decrypt(masterKey []byte, userKey []byte, data []byte) ([]byte, error)
- func Encrypt(masterKey []byte, userKey []byte, plaintext []byte) ([]byte, error)
- func GenerateMasterKey() ([]byte, error)
- func GenerateRecordKey() ([]byte, error)
- func GetArgEnvFileVariable(vname string, masterKeyPtr *string) string
- func GetExpirationNum(val interface{}) int32
- func GetIndexString(val interface{}) string
- func GetInt64Value(records map[string]interface{}, key string) int64
- func GetIntValue(r interface{}) int
- func GetJSONPostData(r *http.Request) ([]byte, error)
- func GetJSONPostMap(r *http.Request) (map[string]interface{}, error)
- func GetStringValue(r interface{}) string
- func GetUuidString(u interface{}) string
- func HashString(salt []byte, src string) string
- func LockMemory() error
- func NormalizeBrief(brief string) string
- func NormalizeConsentValue(status string) string
- func NormalizeEmail(email0 string) string
- func NormalizeLegalBasisType(status string) string
- func NormalizePhone(phone string, defaultCountry string) string
- func ParseExpiration(expiration interface{}) (int32, error)
- func ParseExpiration0(expiration string) (int32, error)
- func ParseFields(fields string) []string
- func RandNum(n int) int32
- func RandSeq(n int) string
- func ReturnUUID(w http.ResponseWriter, code string)
- func SetExpiration(maxExpiration interface{}, userExpiration interface{}) int32
- func SliceContains(slice []string, item string) bool
- func StringPatternMatch(pattern string, value string) bool
- func ValidateMode(index string) bool
- type UserJSONStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicStringDecrypt ¶
func BasicStringEncrypt ¶
func CheckValidApp ¶
func CheckValidBrief ¶
func CheckValidHex ¶
func CheckValidUUID ¶
func GenerateMasterKey ¶
generate master key - 24 bytes length
func GenerateRecordKey ¶
func GetArgEnvFileVariable ¶
func GetExpirationNum ¶
func GetExpirationNum(val interface{}) int32
func GetIndexString ¶
func GetIndexString(val interface{}) string
func GetInt64Value ¶
func GetIntValue ¶
func GetIntValue(r interface{}) int
func GetStringValue ¶
func GetStringValue(r interface{}) string
func GetUuidString ¶
func GetUuidString(u interface{}) string
func HashString ¶
func LockMemory ¶
func LockMemory() error
func NormalizeBrief ¶
func NormalizeConsentValue ¶
func NormalizeEmail ¶
func NormalizeLegalBasisType ¶
func NormalizePhone ¶
func ParseExpiration ¶
func ParseExpiration0 ¶
func ParseFields ¶
func ReturnUUID ¶
func ReturnUUID(w http.ResponseWriter, code string)
func SetExpiration ¶
func SetExpiration(maxExpiration interface{}, userExpiration interface{}) int32
func SliceContains ¶
func StringPatternMatch ¶
StringPatternMatch looks for basic human patterns like "*", "*abc*", etc...
func ValidateMode ¶
Types ¶
type UserJSONStruct ¶
type UserJSONStruct struct {
JsonData []byte
LoginIdx string
EmailIdx string
PhoneIdx string
CustomIdx string
Token string
}
UserJSON used to parse user POST
func GetUserJSONStruct ¶
func GetUserJSONStruct(r *http.Request, defaultCountry string) (UserJSONStruct, error)
Click to show internal directories.
Click to hide internal directories.