Documentation ¶
Index ¶
- type FeatureOpts
- type HostOverride
- type HostOverrideConfig
- type MethodOverride
- type MethodOverrideConfig
- type MethodOverrideElement
- type MethodOverrideMapping
- func (m *MethodOverrideMapping) Delete(key string)
- func (m *MethodOverrideMapping) Get(key string) (MethodOverrideElement, bool)
- func (h *MethodOverrideMapping) GetOrCreate(key string, value MethodOverrideElement) MethodOverrideElement
- func (m *MethodOverrideMapping) Set(key string, value MethodOverrideElement)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureOpts ¶
type FeatureOpts struct {
EnableMetrics bool `json:"enableMetrics,omitempty" yaml:"enableMetrics,omitempty"` // 开启 metrics 记录
}
func NewDefaultFeatureOpts ¶
func NewDefaultFeatureOpts() *FeatureOpts
type HostOverride ¶
type HostOverride struct {
// contains filtered or unexported fields
}
func NewHostOverride ¶
func NewHostOverride(overrideConf *HostOverrideConfig, featureOpts *FeatureOpts) *HostOverride
func (*HostOverride) OverrideHandler ¶
func (h *HostOverride) OverrideHandler() gin.HandlerFunc
func (*HostOverride) Stop ¶
func (h *HostOverride) Stop()
type HostOverrideConfig ¶
type HostOverrideConfig struct { HostOverrideFunc func(header *http.Request) (string, error) `json:"-" yaml:"-"` Logger *zap.SugaredLogger `json:"-" yaml:"-"` }
func NewDefaultHostOverrideConfig ¶
func NewDefaultHostOverrideConfig() *HostOverrideConfig
type MethodOverride ¶
type MethodOverride struct {
// contains filtered or unexported fields
}
func NewMethodOverride ¶
func NewMethodOverride(overrideConf *MethodOverrideConfig, featureOpts *FeatureOpts) *MethodOverride
func (*MethodOverride) OverrideHandler ¶
func (m *MethodOverride) OverrideHandler() gin.HandlerFunc
func (*MethodOverride) Stop ¶
func (m *MethodOverride) Stop()
type MethodOverrideConfig ¶
type MethodOverrideConfig struct { Mapping *MethodOverrideMapping `json:"mapping,omitempty" yaml:"mapping,omitempty"` // 方法重写映射 Logger *zap.SugaredLogger `json:"-" yaml:"-"` }
func NewDefaultMethodOverrideConfig ¶
func NewDefaultMethodOverrideConfig() *MethodOverrideConfig
type MethodOverrideElement ¶
type MethodOverrideMapping ¶
type MethodOverrideMapping struct { Elements map[string]MethodOverrideElement `json:"elements,omitempty" yaml:"elements,omitempty"` // contains filtered or unexported fields }
func (*MethodOverrideMapping) Delete ¶
func (m *MethodOverrideMapping) Delete(key string)
func (*MethodOverrideMapping) Get ¶
func (m *MethodOverrideMapping) Get(key string) (MethodOverrideElement, bool)
func (*MethodOverrideMapping) GetOrCreate ¶
func (h *MethodOverrideMapping) GetOrCreate(key string, value MethodOverrideElement) MethodOverrideElement
func (*MethodOverrideMapping) Set ¶
func (m *MethodOverrideMapping) Set(key string, value MethodOverrideElement)
Click to show internal directories.
Click to hide internal directories.