Documentation ¶
Index ¶
- Constants
- func IsEmpty(str string) bool
- func MakeResp(payload interface{}, code string, err error) []byte
- func ToString(value url.Values) string
- func Validate(entity interface{}) (bool, error)
- func ValidateID(fctx *FlowContext, id string) ([]string, bool)
- func ValidatePaginationParams(fctx *FlowContext, limit string, offset string) ([]string, bool)
- type APIError
- type FlowContext
- type Response
Constants ¶
View Source
const ( Empty = "" EnvVariable = "ENVIRONMENT" Ok = "ok" TrackingID = "TrackingID" )
View Source
const ( Dev = "Dev" Qa = "Qa" Prod = "Prod" DevConfigPath = "config_dev" QaConfigPath = "config_qa" ProdConfigPath = "config" ConfigDir = "./config" )
Config Viper
View Source
const ( GreenStatus = "green" AmberStatus = "amber" RedStatus = "red" )
Heartbeat Status
View Source
const ( CandidateColl = "candidates" CandidateDb = "core_db" )
Mongo
View Source
const InvalidRequestBody = "InvalidRequestBody"
View Source
const InvalidRequestParameter = "InvalidRequestParameter"
Variables ¶
This section is empty.
Functions ¶
func ValidateID ¶
func ValidateID(fctx *FlowContext, id string) ([]string, bool)
ValidateID to validates id
func ValidatePaginationParams ¶
func ValidatePaginationParams(fctx *FlowContext, limit string, offset string) ([]string, bool)
ValidatePaginationParams to validates pagination parameters
Types ¶
type FlowContext ¶
type FlowContext struct {
TrackingID string
}
Click to show internal directories.
Click to hide internal directories.