Documentation ¶
Index ¶
- Variables
- func AnyToString(value interface{}) string
- func Calculator(expression string) (float64, error)
- func CompareBcrypt(dbPass, pass string) bool
- func DateDiffMidnight(now time.Time) time.Duration
- func DateDiffMonth(startDate string, endDate string) (month float64, err error)
- func Decrypt(cipherText, secretKey string) (string, error)
- func Decrypt64(encryptedString string, keyString string) (decryptedString string, err error)
- func Encrypt(plainText, secretKey string) (string, error)
- func Encrypt64(stringToEncrypt string) (encryptedString string)
- func Evaluate(operators *[]string, operands *[]float64) error
- func ExportToCSV(outputFile string, headers []string, record [][]string) (err error)
- func GetDataFromContext(ctx context.Context, key string) string
- func GetStatusCode(err error) int
- func HasDuplicateIntArray(nums []int) bool
- func HashBcrypt(pass *string)
- func InArray(str string, list []string) bool
- func IsEmailDomainEqual(companyEmail, newUserEmail string) bool
- func IsEmailValid(email string) error
- func IsNumber(token string) bool
- func LoggerDebug(msg interface{})
- func LoggerError(err error)
- func LoggerErrorCustom(message interface{})
- func LoggerFatal(msg interface{})
- func LoggerInfo(message interface{})
- func LoggerMiddL(message interface{})
- func LoggerSuccess(message interface{})
- func LoggerWarning(message interface{})
- func ObjectToString(kks interface{}) string
- func OnlyOneRemove(str string, remove string) string
- func PadKey(secretKey string) []byte
- func PerformOperation(operand1, operand2 float64, operator string) (float64, error)
- func RandStringBytesMaskImprSrcUnsafe(n int) string
- func RemoveDuplicates(input []int) []int
- func ReverseSlice[T any](s []T) []T
- func Tokenize(expression string) []string
- func UcFirst(str string) string
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("Invalid authorization token") ErrInvalidTokenType = errors.New("Authorization token type does not match") ErrNotMatchTokenCredentials = errors.New("Authorization token credentials do not match") ErrInvalidTokenCredentials = errors.New("Invalid authorization token credentials") ErrInvalidTokenExpired = errors.New("Authorization token has expired") ErrUsername = errors.New("Please Check again your Username") ErrPassword = errors.New("Please Check again your Password") LoginFailedMessage = errors.New("please check username and password") )
authValidation
View Source
var ( ErrInternalServerError = errors.New("Internal Server Error") ErrNotFound = errors.New("Your requested Item is not found") ErrUnAuthorize = errors.New("Unauthorize") ErrBadParamInput = errors.New("Bad Request") ErrPublicKey = errors.New("invalid Public Key") ErrInvalidDataType = errors.New("invalid data type") ErrIsRequired = errors.New("is required") ErrInvalidValue = errors.New("invalid value") ErrForbidden = errors.New("you don't have permission to access this resource") )
View Source
var ( GeneralSuccess = "Success" ErrGeneralMessage = errors.New("something wrong") ErrMessageCaptcha = errors.New("Incorrect captcha. Please try again.") )
Functions ¶
func AnyToString ¶ added in v1.0.24
func AnyToString(value interface{}) string
func Calculator ¶ added in v1.0.15
func CompareBcrypt ¶ added in v1.0.31
func DateDiffMonth ¶ added in v1.0.20
func ExportToCSV ¶ added in v1.0.18
func GetDataFromContext ¶ added in v1.0.25
func GetStatusCode ¶ added in v1.0.9
func HasDuplicateIntArray ¶ added in v1.0.27
func HashBcrypt ¶ added in v1.0.31
func HashBcrypt(pass *string)
func IsEmailDomainEqual ¶ added in v1.0.30
func IsEmailValid ¶ added in v1.0.16
func LoggerErrorCustom ¶ added in v1.0.8
func LoggerErrorCustom(message interface{})
this is for logger error level
func LoggerMiddL ¶ added in v1.0.7
func LoggerMiddL(message interface{})
this is for logger info level
func ObjectToString ¶ added in v1.0.13
func ObjectToString(kks interface{}) string
func OnlyOneRemove ¶ added in v1.0.32
func PerformOperation ¶ added in v1.0.15
func RandStringBytesMaskImprSrcUnsafe ¶ added in v1.0.10
func RemoveDuplicates ¶ added in v1.0.33
func ReverseSlice ¶ added in v1.0.34
func ReverseSlice[T any](s []T) []T
Types ¶
type Response ¶ added in v1.0.3
type Response struct { StatusCode int `json:"status_code"` Status string `json:"status_desc"` Msg string `json:"message"` Data interface{} `json:"data"` Errors interface{} `json:"errors"` }
func (*Response) MappingResponseError ¶ added in v1.0.3
func (*Response) MappingResponseSuccess ¶ added in v1.0.3
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
dto
|
|
Package network client negotiator @author Arditya Kekasi
|
Package network client negotiator @author Arditya Kekasi |
Click to show internal directories.
Click to hide internal directories.