Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct {
Required bool `json:"required" yaml:"Required"`
// if required is true, then Excepted path and methods does not require authentication
// if required is false, then Excepted path and methods require authentication
Except []struct {
Path string `json:"path" yaml:"Path"`
Methods []string `json:"methods" yaml:"Methods"`
} `json:"except" yaml:"Except"`
}
func (*Authentication) IsAuthenticationRequired ¶
func (auth *Authentication) IsAuthenticationRequired(path, method string) bool
type PingResponse ¶
type PingResponse struct {
Message string `json:"message"`
}
type ServiceRoute ¶
type ServiceRoute struct {
Name string `json:"name" yaml:"Name"`
PathPrefix string `json:"pathPrefix" yaml:"PathPrefix"`
TargetURL string `json:"targetURL" yaml:"TargetURL"`
StripPrefix bool `json:"stripPrefix" yaml:"StripPrefix"`
Authentication *Authentication `json:"authentication" yaml:"Authentication"`
Middleware []string `json:"middleware" yaml:"Middleware"`
Timeout time.Duration `json:"timeout" yaml:"Timeout"`
UpdatedAt int64 `json:"-" yaml:"-"` // Unix timestamp of last update
}
ServiceRoute represents a service route configuration
Click to show internal directories.
Click to hide internal directories.