admin

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const GroupName = "konghq.com"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

Functions

func IsPluginNotConfiguredError

func IsPluginNotConfiguredError(err error) bool

IsPluginNotConfiguredError checks if the type of the error is PluginNotConfiguredError

func Kind

func Kind(kind string) schema.GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Types

type APIInterface

type APIInterface interface {
	Get(string, interface{}) *APIResponse
	Create(interface{}, interface{}) *APIResponse
	Patch(string, interface{}, interface{}) *APIResponse
	Delete(string) error

	RestClient() rest.Interface
}

type APIResponse

type APIResponse struct {
	StatusCode int
	Raw        []byte
	// contains filtered or unexported fields
}

APIResponse contains a response returned from the Kong admin API +k8s:deepcopy-gen=false

func (*APIResponse) Error

func (r *APIResponse) Error() error

Error returns the error from the admin API response

func (*APIResponse) String

func (r *APIResponse) String() string

type CertificateGetter

type CertificateGetter interface {
	Certificate() CertificateInterface
}

type ConsumerGetter

type ConsumerGetter interface {
	Consumers() ConsumerInterface
}

type ConsumerInterface

type ConsumerInterface interface {
	List(url.Values) (*adminv1.ConsumerList, error)
	Get(string) (*adminv1.Consumer, *APIResponse)
	Create(*adminv1.Consumer) (*adminv1.Consumer, *APIResponse)
	Patch(string, *adminv1.Consumer) (*adminv1.Consumer, *APIResponse)
	Delete(string) error
}

type CredentialGetter

type CredentialGetter interface {
	Credentials() CredentialInterface
}

type CredentialInterface

type CredentialInterface interface {
	List(string, url.Values) (*adminv1.CredentialList, error)
	GetByType(string, string, string) (*adminv1.Credential, *APIResponse)
	CreateByType(map[string]interface{}, string, string) *APIResponse
}

type PluginGetter

type PluginGetter interface {
	Plugins() PluginInterface
}

type PluginInterface

type PluginInterface interface {
	List(url.Values) (*adminv1.PluginList, error)
	Get(string) (*adminv1.Plugin, *APIResponse)
	CreateInRoute(string, *adminv1.Plugin) (*adminv1.Plugin, *APIResponse)
	CreateInService(string, *adminv1.Plugin) (*adminv1.Plugin, *APIResponse)
	Patch(string, *adminv1.Plugin) (*adminv1.Plugin, *APIResponse)
	Delete(string) error

	GetByID(string) (*adminv1.Plugin, error)

	GetAllByRoute(string) ([]adminv1.Plugin, error)
	GetByRoute(string, string) (*adminv1.Plugin, error)

	GetAllByService(serviceID string) ([]adminv1.Plugin, error)
	GetByService(name, serviceID string) (*adminv1.Plugin, error)
	GetAllByServiceWitConsumer(serviceID string) ([]*adminv1.Plugin, error)
}

type PluginNotConfiguredError

type PluginNotConfiguredError struct {
	Message string
}

PluginNotConfiguredError defines an

func (PluginNotConfiguredError) Error

func (e PluginNotConfiguredError) Error() string

Error implements the Error interface.

type RestClient

type RestClient struct {
	// contains filtered or unexported fields
}

func NewRESTClient

func NewRESTClient(c *rest.Config) (*RestClient, error)

func (*RestClient) Certificates

func (c *RestClient) Certificates() CertificateInterface

func (*RestClient) Consumers

func (c *RestClient) Consumers() ConsumerInterface

func (*RestClient) Credentials

func (c *RestClient) Credentials() CredentialInterface

func (*RestClient) GetVersion

func (c *RestClient) GetVersion() (semver.Version, error)

func (*RestClient) Plugins

func (c *RestClient) Plugins() PluginInterface

func (*RestClient) RESTClient

func (c *RestClient) RESTClient() rest.Interface

func (*RestClient) Routes

func (c *RestClient) Routes() RouteInterface

func (*RestClient) SNIs

func (c *RestClient) SNIs() SNIInterface

func (*RestClient) Services

func (c *RestClient) Services() ServiceInterface

func (*RestClient) Targets

func (c *RestClient) Targets() TargetInterface

func (*RestClient) Upstreams

func (c *RestClient) Upstreams() UpstreamInterface

type RouteGetter

type RouteGetter interface {
	Route() RouteInterface
}

type RouteInterface

type RouteInterface interface {
	List(url.Values) (*adminv1.RouteList, error)
	Get(string) (*adminv1.Route, *APIResponse)
	Create(*adminv1.Route) (*adminv1.Route, *APIResponse)
	Patch(string, *adminv1.Route) (*adminv1.Route, *APIResponse)
	Delete(string) error
}

type SNIGetter

type SNIGetter interface {
	SNI() SNIInterface
}

type SNIInterface

type SNIInterface interface {
	List(url.Values) (*adminv1.SNIList, error)
	Get(string) (*adminv1.SNI, *APIResponse)
	Create(*adminv1.SNI) (*adminv1.SNI, *APIResponse)
	Delete(string) error
}

type ServiceGetter

type ServiceGetter interface {
	Service() ServiceInterface
}

type ServiceInterface

type ServiceInterface interface {
	List(url.Values) (*adminv1.ServiceList, error)
	Get(string) (*adminv1.Service, *APIResponse)
	Create(*adminv1.Service) (*adminv1.Service, *APIResponse)
	Delete(string) error
}

type TargetGetter

type TargetGetter interface {
	Target() TargetInterface
}

type TargetInterface

type TargetInterface interface {
	List(url.Values, string) (*adminv1.TargetList, error)
	Get(string) (*adminv1.Target, *APIResponse)
	Create(*adminv1.Target, string) (*adminv1.Target, *APIResponse)
	Delete(string, string) error
}

type UpstreamGetter

type UpstreamGetter interface {
	Upstreams() UpstreamInterface
}

type UpstreamInterface

type UpstreamInterface interface {
	List(url.Values) (*adminv1.UpstreamList, error)
	Get(string) (*adminv1.Upstream, *APIResponse)
	Create(*adminv1.Upstream) (*adminv1.Upstream, *APIResponse)
	Delete(string) error
}

Directories

Path Synopsis
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package

Jump to

Keyboard shortcuts

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