kekasigohelper

package module
v1.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 13 Imported by: 7

Documentation

Index

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 Calculator added in v1.0.15

func Calculator(expression string) (float64, error)

func Decrypt64 added in v1.0.12

func Decrypt64(encryptedString string, keyString string) (decryptedString string, err error)

func Encrypt64 added in v1.0.12

func Encrypt64(stringToEncrypt string) (encryptedString string)

func Evaluate added in v1.0.15

func Evaluate(operators *[]string, operands *[]float64) error

func GetStatusCode added in v1.0.9

func GetStatusCode(err error) int

func InArray added in v1.0.4

func InArray(str string, list []string) bool

func IsEmailValid added in v1.0.16

func IsEmailValid(email string) error

func IsNumber added in v1.0.15

func IsNumber(token string) bool

func LoggerDebug

func LoggerDebug(msg interface{})

this is for logger debug level

func LoggerError

func LoggerError(err error)

this is for logger error level

func LoggerErrorCustom added in v1.0.8

func LoggerErrorCustom(message interface{})

this is for logger error level

func LoggerFatal added in v1.0.1

func LoggerFatal(msg interface{})

this is for logger fatal level

func LoggerInfo

func LoggerInfo(message interface{})

this is for logger info level

func LoggerMiddL added in v1.0.7

func LoggerMiddL(message interface{})

this is for logger info level

func LoggerSuccess

func LoggerSuccess(message interface{})

this is for logger success level

func LoggerWarning

func LoggerWarning(message interface{})

this is for logger warning level

func ObjectToString added in v1.0.13

func ObjectToString(kks interface{}) string

func PerformOperation added in v1.0.15

func PerformOperation(operand1, operand2 float64, operator string) (float64, error)

func RandStringBytesMaskImprSrcUnsafe added in v1.0.10

func RandStringBytesMaskImprSrcUnsafe(n int) string

func Tokenize added in v1.0.15

func Tokenize(expression string) []string

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 (r *Response) MappingResponseError(statusCode int, message string, error interface{})

func (*Response) MappingResponseSuccess added in v1.0.3

func (r *Response) MappingResponseSuccess(message string, data interface{})

Directories

Path Synopsis
Package network client negotiator @author Arditya Kekasi
Package network client negotiator @author Arditya Kekasi

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL