Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidProviders = []string{
"postgres",
}
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { Name string `yaml:"name"` Host string `yaml:"host"` Scopes []string `yaml:"scopes"` Headers map[string]string `yaml:"headers"` Routes []Route `yaml:"routes"` }
func (Backend) APIGatekeeperBackend ¶
func (*Backend) ValidateAndNormalize ¶
type Config ¶
type Config struct { API API `yaml:"api"` Database Database `yaml:"database"` Backends []Backend `yaml:"backends"` }
func LoadConfigFromYamlFile ¶
func (Config) ValidateAndNormalize ¶
type Route ¶
type Route struct { Method string `yaml:"method"` BackendPath string `yaml:"backendPath"` GatekeeperPath string `yaml:"gatekeeperPath"` TimeoutSeconds int `yaml:"timeoutSeconds"` IsPublic bool `yaml:"isPublic"` Scopes []string `yaml:"scopes"` Headers map[string]string `yaml:"headers"` HandlerFunc http.HandlerFunc }
func (*Route) PatternVariables ¶
func (r *Route) PatternVariables() []RouteVariable
func (*Route) ValidateAndNormalize ¶
type RouteVariable ¶
type RouteVariable string
func NewRouteVariable ¶
func NewRouteVariable(routeVariable string) RouteVariable
func (RouteVariable) Name ¶
func (r RouteVariable) Name() string
func (RouteVariable) ReplaceFromPattern ¶
func (r RouteVariable) ReplaceFromPattern(url string, value string) string
Click to show internal directories.
Click to hide internal directories.