 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func CloneRequestBody(c *gin.Context) []byte
- func DropDuplicated(raw []string) []string
- func GetContainer() *dig.Container
- func GetFullUrl(c *gin.Context) string
- func GetbaseUrl() string
- func NewErrorReport(replyCode int, logger *zap.Logger) gin.HandlerFunc
- func Provide(constructor interface{}, opts ...dig.ProvideOption) error
- func ProvideController(constructor interface{}) error
- func RegisterComponent(comp Component)
- func ReportBadrequest(c *gin.Context, err error)
- func RequestLocker(params ...string) gin.HandlerFunc
- func Start() error
- type Component
- type Components
- type CorsComponent
- type DefaultComponent
- type DiController
- type ErrorCode
- type GeneralResp
- type ParamComponents
- type Params
- type Prom
- type ReportError
- type Tlssettings
Constants ¶
      View Source
      
  
const ( KeyAddress = "address" KeyShutdown = "shutdown" KeyInitDB = "database.initDB" )
Variables ¶
      View Source
      
  
    var ComponentsOptions = dig.Group("components")
    
      View Source
      
  
    var ControllerOptions = dig.Group("controllers")
    
      View Source
      
  
    
  
var MD5 = core.MD5
    Functions ¶
func CloneRequestBody ¶ added in v0.1.14
func DropDuplicated ¶ added in v0.1.10
func GetContainer ¶
func GetFullUrl ¶ added in v0.10.4
func GetbaseUrl ¶ added in v0.10.14
func GetbaseUrl() string
func NewErrorReport ¶ added in v0.1.1
func NewErrorReport(replyCode int, logger *zap.Logger) gin.HandlerFunc
deprecated
func Provide ¶ added in v0.2.0
func Provide(constructor interface{}, opts ...dig.ProvideOption) error
    func ProvideController ¶ added in v0.2.0
func ProvideController(constructor interface{}) error
    func RegisterComponent ¶ added in v0.6.0
func RegisterComponent(comp Component)
func ReportBadrequest ¶ added in v0.1.2
func RequestLocker ¶ added in v0.5.0
func RequestLocker(params ...string) gin.HandlerFunc
Types ¶
type Components ¶ added in v0.6.0
type Components struct {
	Components []Component
}
    func (*Components) InitAll ¶ added in v0.6.0
func (cs *Components) InitAll(r *gin.Engine)
type CorsComponent ¶ added in v0.5.3
type CorsComponent struct {
	DefaultComponent
	Enabled bool
}
    func (CorsComponent) OnEngineInited ¶ added in v0.5.3
func (c CorsComponent) OnEngineInited(r *gin.Engine) error
type DefaultComponent ¶ added in v0.6.0
type DefaultComponent struct{}
    func (*DefaultComponent) Priority ¶ added in v0.6.0
func (dc *DefaultComponent) Priority() int
type DiController ¶
type DiController interface{}
    type GeneralResp ¶ added in v0.1.1
type ParamComponents ¶ added in v0.6.0
type Prom ¶ added in v0.6.2
type Prom struct {
	DefaultComponent
}
    type ReportError ¶ added in v0.1.1
type ReportError struct {
	ReplyCode int
}
    func (*ReportError) Middleware ¶ added in v0.1.1
func (handle *ReportError) Middleware(c *gin.Context)
func (*ReportError) OnEngineInited ¶ added in v0.10.12
func (h *ReportError) OnEngineInited(r *gin.Engine) error
func (*ReportError) Priority ¶ added in v0.10.12
func (h *ReportError) Priority() int
func (*ReportError) RespErrorToClient ¶ added in v0.1.1
func (handle *ReportError) RespErrorToClient(c *gin.Context, err interface{})
type Tlssettings ¶ added in v0.4.4
func CheckAndSetupTLS ¶ added in v0.4.4
func CheckAndSetupTLS(logger *zap.Logger) (tls *Tlssettings)
func (*Tlssettings) Middleware ¶ added in v0.4.4
func (s *Tlssettings) Middleware() gin.HandlerFunc
 Click to show internal directories. 
   Click to hide internal directories.