Documentation ¶
Index ¶
Constants ¶
View Source
const (
CTXHandlerKey = "_CTX_Handler"
)
View Source
const (
CodeOk = 20000
)
View Source
const (
CtxResponseKey = "_CTX_RESPONSE"
)
View Source
const (
HTTPHeaderFrom = "X-SP-METADATA-HTTP-FROM"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Errors []SubError `json:"errors,omitempty"` }
func NewBadRequestError ¶
func NewInternalError ¶
func NewNotFoundError ¶
type Handler ¶
func (Handler) MethodName ¶
type Response ¶
type Response struct { Error *Error `json:"error,omitempty"` Data interface{} `json:"data,omitempty"` }
https://google.github.io/styleguide/jsoncstyleguide.xml#JSON_Structure_&_Reserved_Property_Names
type RouterGroup ¶
type RouterGroup struct {
// contains filtered or unexported fields
}
func NewRouterGroup ¶
func NewRouterGroup(ginGR *gin.RouterGroup) *RouterGroup
func (*RouterGroup) GET ¶
func (rg *RouterGroup) GET(relativePath string, handler IHandler)
func (*RouterGroup) Group ¶
func (rg *RouterGroup) Group(relativePath string, handlers ...gin.HandlerFunc) *RouterGroup
Click to show internal directories.
Click to hide internal directories.