Documentation
¶
Index ¶
- Variables
- func Bind(form interface{}, structs interface{}) interface{}
- func ClientIP(c echo.Context) string
- func DateNil(dt interface{}) interface{}
- func DateParse(d interface{}, format string) *time.Time
- func ErrorContext(message interface{}, c echo.Context) (err error)
- func InArray(val interface{}, arrays interface{}) bool
- func InitSentry(Dsn, Environment, Release string, Debug bool) *sentry.Client
- func JsonDecode(data interface{}) (maps map[string]interface{}, err error)
- func JsonEncode(data interface{}) string
- func JsonEncodeBeautify(data interface{}) string
- func LoggerDebug(msg interface{})
- func LoggerError(err error)
- func LoggerInfo(message interface{})
- func LoggerSuccess(message interface{})
- func LoggerWarning(message interface{})
- func NotFoundContext(message interface{}, data interface{}, c echo.Context) (err error)
- func RPCJSONResponse(status string, message interface{}, data interface{}) string
- func RandStringBytes(n int) string
- func ResponseContext(code int, message interface{}, data interface{}, c echo.Context) error
- func SendSentryError(err error, service, module, function string)
- func SendSentryEvent(event *sentry.Event, service, module, function string)
- func SendSentryMessage(message string, service, module, function string)
- func Success(message string, data interface{}, c echo.Context) map[string]interface{}
- func SuccessContext(message interface{}, data interface{}, c echo.Context) (err error)
- func TimeoutContext(message interface{}, c echo.Context) (err error)
- func UUID() string
- func V2ErrorContext(message interface{}, c echo.Context) (err error)
- func V2NotFoundContext(message interface{}, data interface{}, c echo.Context) (err error)
- func V2RPCJSONResponse(status string, message interface{}, data interface{}) string
- func V2ResponseContext(code int, message interface{}, data interface{}, c echo.Context) error
- func V2Success(message string, data interface{}, c echo.Context) map[string]interface{}
- func V2SuccessContext(message interface{}, data interface{}, c echo.Context) (err error)
- func V2TimeoutContext(message interface{}, c echo.Context) (err error)
- func V2ValidationContext(message interface{}, data interface{}, c echo.Context) (err error)
- func V2ValidationResp(message interface{}, data interface{}) map[string]interface{}
- func Validate(c echo.Context, i interface{}) (interface{}, error)
- func ValidateRPC(i interface{}) (interface{}, error)
- func ValidationContext(message interface{}, data interface{}, c echo.Context) (err error)
- func ValidationResp(message interface{}, data interface{}) map[string]interface{}
- type JSONResponse
- type Response
- type SentryData
- type V2JSONResponse
- type V2Response
Constants ¶
This section is empty.
Variables ¶
View Source
var Validates *validator.Validate
Functions ¶
func ErrorContext ¶
func ErrorContext(message interface{}, c echo.Context) (err error)
func InitSentry ¶
func JsonDecode ¶
func JsonEncode ¶
func JsonEncode(data interface{}) string
func JsonEncodeBeautify ¶
func JsonEncodeBeautify(data interface{}) string
func LoggerSuccess ¶
func LoggerSuccess(message interface{})
LoggerSuccess this is for logger success level
func LoggerWarning ¶
func LoggerWarning(message interface{})
LoggerWarning this is for logger warning level
func NotFoundContext ¶
func NotFoundContext(message interface{}, data interface{}, c echo.Context) (err error)
func RPCJSONResponse ¶
func RandStringBytes ¶
func ResponseContext ¶
func SendSentryError ¶
func SendSentryEvent ¶
func SendSentryEvent(event *sentry.Event, service, module, function string)
func SendSentryMessage ¶
func SuccessContext ¶
func SuccessContext(message interface{}, data interface{}, c echo.Context) (err error)
V1 Version 1 snake_case
func TimeoutContext ¶
func TimeoutContext(message interface{}, c echo.Context) (err error)
func V2ErrorContext ¶
func V2ErrorContext(message interface{}, c echo.Context) (err error)
func V2NotFoundContext ¶
func V2NotFoundContext(message interface{}, data interface{}, c echo.Context) (err error)
func V2RPCJSONResponse ¶
func V2ResponseContext ¶
func V2SuccessContext ¶
func V2SuccessContext(message interface{}, data interface{}, c echo.Context) (err error)
V2 Version 2 CamlCase
func V2TimeoutContext ¶
func V2TimeoutContext(message interface{}, c echo.Context) (err error)
func V2ValidationContext ¶
func V2ValidationContext(message interface{}, data interface{}, c echo.Context) (err error)
func V2ValidationResp ¶
func V2ValidationResp(message interface{}, data interface{}) map[string]interface{}
func ValidateRPC ¶
func ValidateRPC(i interface{}) (interface{}, error)
func ValidationContext ¶
func ValidationContext(message interface{}, data interface{}, c echo.Context) (err error)
func ValidationResp ¶
func ValidationResp(message interface{}, data interface{}) map[string]interface{}
Types ¶
type JSONResponse ¶
type JSONResponse struct { Code int `json:"status_code"` Status string `json:"status"` Message interface{} `json:"message"` Data interface{} `json:"data"` }
func (*JSONResponse) Error ¶
func (response *JSONResponse) Error(message interface{}, data interface{})
func (*JSONResponse) Success ¶
func (response *JSONResponse) Success(message interface{}, data interface{})
func (*JSONResponse) Validation ¶
func (response *JSONResponse) Validation(message interface{}, data interface{})
type Response ¶
type Response struct { Code int `json:"status_code"` Status string `json:"status"` Message interface{} `json:"message"` Data interface{} `json:"data"` }
type SentryData ¶
type SentryData struct { Dsn string Environment string Release string Debug bool TraceSampleRate float64 Event *sentry.Event }
var ( Sentries *SentryData SentryClient *sentry.Client )
func NewSentryData ¶
func NewSentryData() *SentryData
type V2JSONResponse ¶
type V2JSONResponse struct { Code int `json:"StatusCode"` Status string `json:"Status"` Message interface{} `json:"Message"` Data interface{} `json:"Data"` }
func (*V2JSONResponse) V2Error ¶
func (response *V2JSONResponse) V2Error(message interface{}, data interface{})
func (*V2JSONResponse) V2Success ¶
func (response *V2JSONResponse) V2Success(message interface{}, data interface{})
func (*V2JSONResponse) V2Validation ¶
func (response *V2JSONResponse) V2Validation(message interface{}, data interface{})
type V2Response ¶
type V2Response struct { Code int `json:"StatusCode"` Status string `json:"Status"` Message interface{} `json:"Message"` Data interface{} `json:"Data"` }
func (*V2Response) V2Error ¶
func (response *V2Response) V2Error(code int, message string, data interface{})
func (*V2Response) V2Success ¶
func (response *V2Response) V2Success(code int, message string, data interface{})
Click to show internal directories.
Click to hide internal directories.