Documentation
¶
Index ¶
- type App
- type AuthMethod
- type AuthMethods
- type Authentication
- type BasicAuthData
- type BasicAuthDataItems
- type CircuitBreaker
- type Configs
- type DSN
- type Endpoint
- type KeyBasedAuthData
- type KeyBasedAuthDataItems
- type OAuthAccessData
- type OAuthAccessDataItems
- type OAuthData
- type OAuthDataItems
- type Option
- type Options
- type Proxy
- type RateLimit
- type Targets
- type Upstreams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Endpoint []Endpoint `yaml:"endpoint" json:"endpoint"`
}
App type
func (*App) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*App) LoadFromJSON ¶
LoadFromJSON update object from json
type AuthMethod ¶
type AuthMethod struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Endpoints string `json:"endpoints"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
AuthMethod struct
func (*AuthMethod) ConvertToJSON ¶
func (a *AuthMethod) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*AuthMethod) GetEndpoints ¶
func (a *AuthMethod) GetEndpoints() ([]string, error)
GetEndpoints gets a list of endpoints names
func (*AuthMethod) LoadFromJSON ¶
func (a *AuthMethod) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
func (*AuthMethod) Validate ¶
func (a *AuthMethod) Validate() error
Validate validates a request payload
type AuthMethods ¶
type AuthMethods struct {
AuthMethods []AuthMethod `json:"authMethods"`
}
AuthMethods struct
func (*AuthMethods) ConvertToJSON ¶
func (a *AuthMethods) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*AuthMethods) LoadFromJSON ¶
func (a *AuthMethods) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type Authentication ¶
type Authentication struct {
Status bool `yaml:"status" json:"status"`
}
Authentication type
type BasicAuthData ¶
type BasicAuthData struct {
ID int `json:"id"`
Name string `json:"name"`
Username string `json:"username"`
Password string `json:"password"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
BasicAuthData struct
func (*BasicAuthData) ConvertToJSON ¶
func (b *BasicAuthData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BasicAuthData) LoadFromJSON ¶
func (b *BasicAuthData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
func (*BasicAuthData) Validate ¶
func (b *BasicAuthData) Validate() error
Validate validates a request payload
type BasicAuthDataItems ¶
type BasicAuthDataItems struct {
BasicAuthDataItems []BasicAuthData `json:"items"`
}
BasicAuthDataItems struct
func (*BasicAuthDataItems) ConvertToJSON ¶
func (b *BasicAuthDataItems) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BasicAuthDataItems) LoadFromJSON ¶
func (b *BasicAuthDataItems) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type CircuitBreaker ¶
type CircuitBreaker struct {
Status bool `yaml:"status" json:"status"`
}
CircuitBreaker type
type Configs ¶
type Configs struct {
App App `yaml:"app" json:"app"`
}
Configs type
func (*Configs) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Configs) LoadFromJSON ¶
LoadFromJSON update object from json
func (*Configs) LoadFromYAML ¶
LoadFromYAML update instance from YAML
type DSN ¶
type DSN struct {
Driver string `json:"driver"`
Username string `json:"username"`
Password string `json:"password"`
Hostname string `json:"hostname"`
Port int `json:"port"`
Name string `json:"name"`
}
DSN struct
func (*DSN) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*DSN) LoadFromJSON ¶
LoadFromJSON update object from json
type Endpoint ¶
type Endpoint struct {
Name string `yaml:"name" json:"name"`
Active bool `yaml:"active" json:"active"`
Proxy Proxy `yaml:"proxy" json:"proxy"`
}
Endpoint type
type KeyBasedAuthData ¶
type KeyBasedAuthData struct {
ID int `json:"id"`
Name string `json:"name"`
APIKey string `json:"apiKey"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
KeyBasedAuthData struct
func (*KeyBasedAuthData) ConvertToJSON ¶
func (k *KeyBasedAuthData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*KeyBasedAuthData) LoadFromJSON ¶
func (k *KeyBasedAuthData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
func (*KeyBasedAuthData) Validate ¶
func (k *KeyBasedAuthData) Validate() error
Validate validates a request payload
type KeyBasedAuthDataItems ¶
type KeyBasedAuthDataItems struct {
KeyBasedAuthDataItems []KeyBasedAuthData `json:"items"`
}
KeyBasedAuthDataItems struct
func (*KeyBasedAuthDataItems) ConvertToJSON ¶
func (k *KeyBasedAuthDataItems) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*KeyBasedAuthDataItems) LoadFromJSON ¶
func (k *KeyBasedAuthDataItems) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type OAuthAccessData ¶
type OAuthAccessData struct {
ID int `json:"id"`
AccessToken string `json:"accessToken"`
Meta string `json:"meta"`
OAuthDataID int `json:"oauthDataID"`
ExpireAt time.Time `json:"expireAt"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
OAuthAccessData struct
func (*OAuthAccessData) ConvertToJSON ¶
func (o *OAuthAccessData) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*OAuthAccessData) LoadFromJSON ¶
func (o *OAuthAccessData) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
func (*OAuthAccessData) Validate ¶
func (o *OAuthAccessData) Validate() error
Validate validates a request payload
type OAuthAccessDataItems ¶
type OAuthAccessDataItems struct {
OAuthAccessDataItems []OAuthAccessData `json:"items"`
}
OAuthAccessDataItems struct
func (*OAuthAccessDataItems) ConvertToJSON ¶
func (o *OAuthAccessDataItems) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*OAuthAccessDataItems) LoadFromJSON ¶
func (o *OAuthAccessDataItems) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type OAuthData ¶
type OAuthData struct {
ID int `json:"id"`
Name string `json:"name"`
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
Meta string `json:"meta"`
AuthMethodID int `json:"authMethodID"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
OAuthData struct
func (*OAuthData) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*OAuthData) LoadFromJSON ¶
LoadFromJSON update object from json
type OAuthDataItems ¶
type OAuthDataItems struct {
OAuthDataItems []OAuthData `json:"items"`
}
OAuthDataItems struct
func (*OAuthDataItems) ConvertToJSON ¶
func (o *OAuthDataItems) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*OAuthDataItems) LoadFromJSON ¶
func (o *OAuthDataItems) LoadFromJSON(data []byte) error
LoadFromJSON update object from json
type Option ¶
type Option struct {
ID int `json:"id"`
Key string `json:"key"`
Value string `json:"value"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
Option struct
func (*Option) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Option) LoadFromJSON ¶
LoadFromJSON update object from json
type Options ¶
type Options struct {
Options []Option `json:"options"`
}
Options struct
func (*Options) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Options) LoadFromJSON ¶
LoadFromJSON update object from json
type Proxy ¶
type Proxy struct {
Upstreams Upstreams `yaml:"upstreams" json:"upstreams"`
HTTPMethods []string `yaml:"http_methods" json:"httpMethods"`
Authentication Authentication `yaml:"authentication" json:"authentication"`
RateLimit RateLimit `yaml:"rate_limit" json:"rateLimit"`
CircuitBreaker CircuitBreaker `yaml:"circuit_breaker" json:"circuitBreaker"`
ListenPath string `yaml:"listen_path" json:"listenPath"`
}
Proxy type