kong

package
v0.0.0-...-abf4b4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorFromResponse

func ErrorFromResponse(response *http.Response, errorResponse map[string]interface{}) error

func ImportConsumerACL

func ImportConsumerACL(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error)

func ImportConsumerCredential

func ImportConsumerCredential(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error)

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

Types

type APICreateError

type APICreateError struct {
}

type APIRequest

type APIRequest struct {
	ID                     string `json:"id,omitempty"`
	Name                   string `json:"name"`
	Hosts                  string `json:"hosts,omitempty"`
	Uris                   string `json:"uris,omitempty"`
	Methods                string `json:"methods,omitempty"`
	UpstreamURL            string `json:"upstream_url"`
	StripURI               bool   `json:"strip_uri"`
	PreserveHost           bool   `json:"preserve_host"`
	Retries                int    `json:"retries,omitempty"`
	UpstreamConnectTimeout int    `json:"upstream_connect_timeout,omitempty"`
	UpstreamSendTimeout    int    `json:"upstream_send_timeout,omitempty"`
	UpstreamReadTimeout    int    `json:"upstream_read_timeout,omitempty"`
	HTTPSOnly              bool   `json:"https_only"`
	HTTPIfTerminated       bool   `json:"http_if_terminated"`
}

APIRequest : Kong API request object structure

type APIResponse

type APIResponse struct {
	ID                     string `json:"id,omitempty"`
	Name                   string `json:"name"`
	UpstreamURL            string `json:"upstream_url"`
	StripURI               bool   `json:"strip_uri"`
	PreserveHost           bool   `json:"preserve_host"`
	Retries                int    `json:"retries,omitempty"`
	UpstreamConnectTimeout int    `json:"upstream_connect_timeout,omitempty"`
	UpstreamSendTimeout    int    `json:"upstream_send_timeout,omitempty"`
	UpstreamReadTimeout    int    `json:"upstream_read_timeout,omitempty"`
	HTTPSOnly              bool   `json:"https_only"`
	HTTPIfTerminated       bool   `json:"http_if_terminated"`

	// These will be set in our UnmarshalJSON function.
	Hosts   []string `json:"-"`
	Methods []string `json:"-"`
	Uris    []string `json:"-"`
}

APIResponse : Kong API response object structure

func (*APIResponse) UnmarshalJSON

func (r *APIResponse) UnmarshalJSON(data []byte) error

type BasicAuthCredential

type BasicAuthCredential struct {
	ID       string `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Consumer string `json:"-"`
}

type Config

type Config struct {
	Address  string
	Username string
	Password string
	Headers  map[string]interface{}
}

func (*Config) Client

func (c *Config) Client() (*sling.Sling, error)

type Consumer

type Consumer struct {
	ID       string `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
	CustomID string `json:"custom_id,omitempty"`
}

type ConsumerACL

type ConsumerACL struct {
	ID       string `json:"id,omitempty"`
	Consumer string `json:"consumer_id"`
	Group    string `json:"group"`
}

type JWTCredential

type JWTCredential struct {
	ID           string `json:"id,omitempty"`
	Key          string `json:"key,omitempty"`
	Algorithm    string `json:"algorithm,omitempty"`
	RSAPublicKey string `json:"rsa_public_key,omitempty"`
	Secret       string `json:"secret,omitempty"`
	Consumer     string `json:"-"`
}

type KeyAuthCredential

type KeyAuthCredential struct {
	ID       string `json:"id,omitempty"`
	Key      string `json:"key,omitempty"`
	Consumer string `json:"-"`
}

type KeyAuthPlugin

type KeyAuthPlugin struct {
	ID              string `json:"id,omitempty"`
	Name            string `json:"name,omitempty"`
	KeyNames        string `json:"config.key_names,omitempty"`
	HideCredentials bool   `json:"config.hide_credentials,omitempty"`
	Anonymous       string `json:"config.anonymous,omitempty"`
	API             string `json:"api_id,omitempty"`
}

type Plugin

type Plugin struct {
	ID            string                 `json:"id,omitempty"`
	Name          string                 `json:"name,omitempty"`
	Configuration map[string]interface{} `json:"config,omitempty"`
	API           string                 `json:"api_id,omitempty"`
	Consumer      string                 `json:"consumer_id,omitempty"`
	Enabled       bool                   `json:"enabled,omitempty"`
}

Plugin : Kong API plugin request object structure

type UpdateAclRequest

type UpdateAclRequest struct {
	Group string `json:"group"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL