Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
error Response
var ErrInvalidHeader *ErrorResponse = &ErrorResponse{ Response: Response{ ResponseCode: "00003", ResponseDesc: ResponseDesc{ ID: "Header tidak valid atau tidak lengkap", EN: "Invalid/incomplete header", }, }, HttpStatus: http.StatusBadRequest, }
var ErrInvalidHeaderSignature *ErrorResponse = &ErrorResponse{ Response: Response{ ResponseCode: "00004", ResponseDesc: ResponseDesc{ ID: "Header signature tidak valid", EN: "Invalid header signature", }, }, HttpStatus: http.StatusBadRequest, }
Response{ ResponseCode: "00002", ResponseDesc: ResponseDesc{ ID: "Anda tidak diijinkan", EN: "You are not authorized", }, }, HttpStatus: http.StatusUnauthorized, }Response:
var ErrUnknown *ErrorResponse = &ErrorResponse{ Response: Response{ ResponseCode: "00001", ResponseDesc: ResponseDesc{ ID: "Ups ada kesalahan, silahkan coba beberapa saat lagi", EN: "Unknown error", }, }, HttpStatus: http.StatusInternalServerError, }
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type Meta ¶
type Meta struct { Version string `json:"version"` Status string `json:"api_status"` APIEnv string `json:"api_env"` }
Meta defines meta format format for api format
type Response ¶
type Response struct { ResponseCode string `json:"response_code"` ResponseDesc ResponseDesc `json:"response_desc"` Meta Meta `json:"meta"` }
type ResponseDesc ¶ added in v2.6.0
ResponseDesc defines details data response
type SuccessResponse ¶
Click to show internal directories.
Click to hide internal directories.