apps

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ChannelB2BClient = "B2BCLIENT"
View Source
const ChannelEBizKezbek = "EBIZKEZBEK"
View Source
const DefaultTrxId = "11111"
View Source
const ErrCodeBadPayload = "9008"
View Source
const ErrCodeBussClientAddTransaction = "BR-04"
View Source
const ErrCodeBussH2HCashbackFailed = "BR-05"
View Source
const ErrCodeBussMerchantCodeInvalid = "BR-04"
View Source
const ErrCodeBussNoCashback = "BR-07"
View Source
const ErrCodeBussPartnerExists = "BR-01"
View Source
const ErrCodeBussPartnerOTPInvalid = "BR-02"
View Source
const ErrCodeBussRewardFailed = "BR-06"
View Source
const ErrCodeESBUnavailable = "9003"
View Source
const ErrCodeInvalidChannel = "9009"
View Source
const ErrCodeNotFound = "9002"
View Source
const ErrCodeSomethingWrong = "9001"
View Source
const ErrCodeSubmitted = "9006"
View Source
const ErrCodeTokenExpired = "9007"
View Source
const ErrCodeUnauthorized = "9005"
View Source
const ErrMsgBadPayload = "Please check again the given input"
View Source
const ErrMsgBussClientAddTransaction = "Failed to add transaction based on client request"
View Source
const ErrMsgBussH2HCashbackFailed = "Failed to contact H2H Provider"
View Source
const ErrMsgBussMerchantCodeInvalid = "Merchant code is invalid"
View Source
const ErrMsgBussNoCashback = "No cashback available for the given value"
View Source
const ErrMsgBussPartnerExists = "The given partner data is exists on system"
View Source
const ErrMsgBussPartnerOTPInvalid = "The given OTP and Transaction ID is invalid"
View Source
const ErrMsgBussRewardFailed = "Failed to add reward"
View Source
const ErrMsgESBUnavailable = "The core engines are out of service"
View Source
const ErrMsgInvalidChannel = "The given channel is invalid, try another channel"
View Source
const ErrMsgNotFound = "Data is not found"
View Source
const ErrMsgSomethingWrong = "Something went wrong, please contact administrator"
View Source
const ErrMsgSubmitted = "Failed to submit the data"
View Source
const ErrMsgTokenExpired = "The session has been expired"
View Source
const ErrMsgUnauthorized = "Unauthorized access, please try again"
View Source
const H2HGpaid = "GOPAIDH2H"
View Source
const H2HJosvo = "JOSVOH2H"
View Source
const H2HLinksaja = "LSAJAH2H"
View Source
const H2HMidtrans = "MTRANS"
View Source
const H2HXenit = "XENIT"
View Source
const HeaderApiKey = "x-api-key"
View Source
const HeaderClientChannel = "x-client-channel"
View Source
const HeaderClientDeviceId = "x-client-device"
View Source
const HeaderClientOs = "x-client-os"
View Source
const HeaderClientRefToken = "x-client-refresh-token"
View Source
const HeaderClientSignature = "x-client-signature"
View Source
const HeaderClientTimestamp = "x-client-timestamp"
View Source
const HeaderClientTrxId = "x-client-trxid"
View Source
const HeaderClientVersion = "x-client-version"
View Source
const HeaderSessionEmail = "x-session-email"
View Source
const HeaderSessionFullname = "x-session-fullname"
View Source
const HeaderSessionId = "x-session-id"
View Source
const HeaderSessionMsisdn = "x-session-msisdn"
View Source
const HeaderSessionRole = "x-session-role"
View Source
const HeaderSessionUsername = "x-session-username"
View Source
const StatusActive = 1
View Source
const StatusInactive = 0
View Source
const SuccessCode = "8000"
View Source
const SuccessMsgDataFound = "Here is your data"
View Source
const SuccessMsgSubmit = "Data submitted successfully"

Variables

This section is empty.

Functions

func BusinessErrorResponse

func BusinessErrorResponse(e *model.BusinessError) *model.Response

func Decrypt

func Decrypt(data []byte, hash string, logger *zap.Logger) (res string, ex *model.TechnicalError)

func DefaultSuccessResponse

func DefaultSuccessResponse(m string, data interface{}) *model.Response

func Encrypt

func Encrypt(d string, h string, logger *zap.Logger) (res []byte, ex *model.TechnicalError)

func Exception

func Exception(msg string, err error, d zap.Field, logger *zap.Logger) *model.TechnicalError

func HMAC

func HMAC(d string, s string) string

func Hash

func Hash(key string) string

func NewEnv

func NewEnv(logger *zap.Logger) (*viper.Viper, *model.TechnicalError)

func NewLog

func NewLog(prod bool) (z *zap.Logger, fh fiber.Handler)

func RandomOtp

func RandomOtp(d int) (string, error)

func RandomPassword

func RandomPassword(len int, d int, sym int, logger *zap.Logger) (res string, e *model.TechnicalError)

func StringExists

func StringExists(key string, strs []string) bool

func Transaction

func Transaction(identifier string) model.TransactionResponse

func TransactionId

func TransactionId(identifier string) string

func ValidateStruct

func ValidateStruct(err error) []*model.BadPayloadResponse

Types

This section is empty.

Jump to

Keyboard shortcuts

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