Documentation
¶
Index ¶
- type API
- type APIService
- func (s *APIService) Create(params *API) (*API, *http.Response, error)
- func (s *APIService) Delete(apiID string) (string, *http.Response, error)
- func (s *APIService) Get(params string) (*API, *http.Response, error)
- func (s *APIService) List() (*APIs, *http.Response, error)
- func (s *APIService) Update(params *API) (*API, *http.Response, error)
- type APIs
- type BasicAuthCredential
- type BasicAuthCredentials
- type BasicAuthService
- func (s *BasicAuthService) Create(consumerID string, params *BasicAuthCredential) (*BasicAuthCredential, *http.Response, error)
- func (s *BasicAuthService) Delete(consumerID, credentialID string) (string, *http.Response, error)
- func (s *BasicAuthService) Get(consumerID, credentialID string) (*BasicAuthCredential, *http.Response, error)
- func (s *BasicAuthService) List(consumerID string) (*BasicAuthCredentials, *http.Response, error)
- func (s *BasicAuthService) Update(consumerID string, params *BasicAuthCredential) (*BasicAuthCredential, *http.Response, error)
- type Client
- type Consumer
- type ConsumerService
- func (s *ConsumerService) Create(params *Consumer) (*Consumer, *http.Response, error)
- func (s *ConsumerService) Delete(consumerID string) (string, *http.Response, error)
- func (s *ConsumerService) Get(params string) (*Consumer, *http.Response, error)
- func (s *ConsumerService) List() (*Consumers, *http.Response, error)
- func (s *ConsumerService) Update(params *Consumer) (*Consumer, *http.Response, error)
- type Consumers
- type CorrelationIDPluginConfig
- type EnabledPlugin
- type GeneratePluginParams
- type JWTCredential
- type JWTCredentials
- type JWTService
- func (s *JWTService) Create(consumerID string, params *JWTCredential) (*JWTCredential, *http.Response, error)
- func (s *JWTService) Delete(consumerID, credentialID string) (string, *http.Response, error)
- func (s *JWTService) Get(consumerID, credentialID string) (*JWTCredential, *http.Response, error)
- func (s *JWTService) List(consumerID string) (*JWTCredentials, *http.Response, error)
- func (s *JWTService) Update(consumerID string, params *JWTCredential) (*JWTCredential, *http.Response, error)
- type OAuth2PluginConfig
- type Plugin
- type PluginSchema
- type PluginSchemaField
- type PluginService
- func (s *PluginService) Create(params *Plugin, apiName string) (*Plugin, *http.Response, error)
- func (s *PluginService) Delete(pluginID string, apiName string) (string, *http.Response, error)
- func (s *PluginService) Get(pluginID string, apiName string) (*Plugin, *http.Response, error)
- func (s *PluginService) GetEnabledPlugins() (*EnabledPlugin, *http.Response, error)
- func (s *PluginService) GetPluginSchema(name string) (*PluginSchema, *http.Response, error)
- func (s *PluginService) List(apiName string) (*Plugins, *http.Response, error)
- func (s *PluginService) Update(params *Plugin, apiName string) (*Plugin, *http.Response, error)
- type Plugins
- type RequestTransformerPluginConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
CreatedAt int `json:"created_at,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PreserveHost bool `json:"preserve_host,omitempty"`
RequestPath string `json:"request_path,omitempty"`
StripRequestPath bool `json:"strip_request_path,omitempty"`
UpstreamURL string `json:"upstream_url,omitempty"`
RequestHost string `json:"request_host,omitempty"`
}
API init api struct
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
APIService provides methods for creating and reading issues.
func NewAPIService ¶
func NewAPIService(httpClient *http.Client, config *config.KongConfiguration) *APIService
NewAPIService returns a new APIService.
type BasicAuthCredential ¶
type BasicAuthCredentials ¶
type BasicAuthCredentials struct {
Data []BasicAuthCredential `json:"data,omitempty"`
Total int `json:"total,omitempty"`
}
type BasicAuthService ¶
type BasicAuthService struct {
// contains filtered or unexported fields
}
func NewBasicAuthService ¶
func NewBasicAuthService(httpClient *http.Client, config *config.KongConfiguration) *BasicAuthService
func (*BasicAuthService) Create ¶
func (s *BasicAuthService) Create(consumerID string, params *BasicAuthCredential) (*BasicAuthCredential, *http.Response, error)
func (*BasicAuthService) Get ¶
func (s *BasicAuthService) Get(consumerID, credentialID string) (*BasicAuthCredential, *http.Response, error)
func (*BasicAuthService) List ¶
func (s *BasicAuthService) List(consumerID string) (*BasicAuthCredentials, *http.Response, error)
func (*BasicAuthService) Update ¶
func (s *BasicAuthService) Update(consumerID string, params *BasicAuthCredential) (*BasicAuthCredential, *http.Response, error)
type Client ¶
type Client struct {
APIService *APIService
ConsumerService *ConsumerService
PluginService *PluginService
JWTService *JWTService
}
type ConsumerService ¶
type ConsumerService struct {
// contains filtered or unexported fields
}
ConsumerService provides methods for creating and reading issues.
func NewConsumerService ¶
func NewConsumerService(httpClient *http.Client, config *config.KongConfiguration) *ConsumerService
NewConsumerService returns a new ConsumerService.
type EnabledPlugin ¶
type EnabledPlugin struct {
// EnabledPlugins map[string]bool `json:"enabled_plugins"`
EnabledPlugins []string `json:"enabled_plugins"`
}
type GeneratePluginParams ¶
type JWTCredential ¶
type JWTCredentials ¶
type JWTCredentials struct {
Data []JWTCredential `json:"data,omitempty"`
Total int `json:"total,omitempty"`
}
type JWTService ¶
type JWTService struct {
// contains filtered or unexported fields
}
func NewJWTService ¶
func NewJWTService(httpClient *http.Client, config *config.KongConfiguration) *JWTService
func (*JWTService) Create ¶
func (s *JWTService) Create(consumerID string, params *JWTCredential) (*JWTCredential, *http.Response, error)
func (*JWTService) Get ¶
func (s *JWTService) Get(consumerID, credentialID string) (*JWTCredential, *http.Response, error)
func (*JWTService) List ¶
func (s *JWTService) List(consumerID string) (*JWTCredentials, *http.Response, error)
func (*JWTService) Update ¶
func (s *JWTService) Update(consumerID string, params *JWTCredential) (*JWTCredential, *http.Response, error)
type OAuth2PluginConfig ¶
type OAuth2PluginConfig struct {
AcceptHTTPIfAlreadyTerminated bool `form:"accept_http_if_already_terminated" json:"accept_http_if_already_terminated,omitempty"`
EnableAuthorizationCode bool `form:"enable_authorization_code" json:"enable_authorization_code,omitempty"`
EnableClientCredentials bool `form:"enable_client_credentials" json:"enable_client_credentials,omitempty"`
EnableImplicitGrant bool `form:"enable_implicit_grant" json:"enable_implicit_grant,omitempty"`
EnablePasswordGrant bool `form:"enable_password_grant" json:"enable_password_grant,omitempty"`
HideCredentials bool `form:"hide_credentials" json:"hide_credentials,omitempty"`
MandatoryScope bool `form:"mandatory_scope" json:"mandatory_scope,omitempty"`
ProvisionKey string `form:"provision_key" json:"provision_key,omitempty"`
TokenExpiration int `form:"token_expiration" json:"token_expiration,omitempty"`
Scopes string `form:"scopes" json:"scopes,omitempty"`
}
type PluginSchema ¶
type PluginSchema struct {
Fields map[string]*PluginSchemaField `json:"fields"`
NoConsumer bool `json:"no_consumer,omitempty"`
}
type PluginSchemaField ¶
type PluginSchemaField struct {
Type string `json:"type"`
Required bool `json:"required,omitempty"`
Func string `json:"func,omitempty"`
Default interface{} `json:"default,omitempty"`
Schema PluginSchema `json:"schema,omitempty"`
Name string `json:"name"`
}
type PluginService ¶
type PluginService struct {
// contains filtered or unexported fields
}
PluginService provides methods for creating and reading issues.
func NewPluginService ¶
func NewPluginService(httpClient *http.Client, config *config.KongConfiguration) *PluginService
NewPluginService returns a new PluginService.
func (*PluginService) GetEnabledPlugins ¶
func (s *PluginService) GetEnabledPlugins() (*EnabledPlugin, *http.Response, error)
func (*PluginService) GetPluginSchema ¶
func (s *PluginService) GetPluginSchema(name string) (*PluginSchema, *http.Response, error)
Click to show internal directories.
Click to hide internal directories.