Documentation ¶
Index ¶
- Constants
- Variables
- func NewList(typ model.Type) model.ObjectList
- func SetValidator(v plugin.Validator)
- type CACertificate
- func (r CACertificate) ID() string
- func (r CACertificate) Indexes() []model.Index
- func (r CACertificate) ProcessDefaults(ctx context.Context) error
- func (r CACertificate) Resource() model.Resource
- func (r CACertificate) SetResource(pr model.Resource) error
- func (r CACertificate) Type() model.Type
- func (r CACertificate) Validate(ctx context.Context) error
- type Certificate
- func (r Certificate) ID() string
- func (r Certificate) Indexes() []model.Index
- func (r Certificate) ProcessDefaults(ctx context.Context) error
- func (r Certificate) Resource() model.Resource
- func (r Certificate) SetResource(pr model.Resource) error
- func (r Certificate) Type() model.Type
- func (r Certificate) Validate(ctx context.Context) error
- type Consumer
- func (c Consumer) ID() string
- func (c Consumer) Indexes() []model.Index
- func (c Consumer) ProcessDefaults(ctx context.Context) error
- func (c Consumer) Resource() model.Resource
- func (c Consumer) SetResource(r model.Resource) error
- func (c Consumer) Type() model.Type
- func (c Consumer) Validate(ctx context.Context) error
- type Hash
- type Installation
- func (r Installation) ID() string
- func (r Installation) Indexes() []model.Index
- func (r Installation) ProcessDefaults(ctx context.Context) error
- func (r Installation) Resource() model.Resource
- func (r Installation) SetResource(ir model.Resource) error
- func (r Installation) Type() model.Type
- func (r Installation) Validate(ctx context.Context) error
- type List
- type Node
- type NodeStatus
- func (r NodeStatus) ID() string
- func (r NodeStatus) Indexes() []model.Index
- func (r NodeStatus) ProcessDefaults(_ context.Context) error
- func (r NodeStatus) Resource() model.Resource
- func (r NodeStatus) SetResource(pr model.Resource) error
- func (r NodeStatus) Type() model.Type
- func (r NodeStatus) Validate(_ context.Context) error
- type Plugin
- func (r Plugin) ID() string
- func (r Plugin) Indexes() []model.Index
- func (r Plugin) ProcessDefaults(ctx context.Context) error
- func (r Plugin) Resource() model.Resource
- func (r Plugin) SetResource(pr model.Resource) error
- func (r Plugin) Type() model.Type
- func (r Plugin) Validate(ctx context.Context) error
- type PluginSchema
- func (r PluginSchema) ID() string
- func (r PluginSchema) Indexes() []model.Index
- func (r PluginSchema) ProcessDefaults(ctx context.Context) error
- func (r PluginSchema) Resource() model.Resource
- func (r PluginSchema) SetResource(pr model.Resource) error
- func (r PluginSchema) Type() model.Type
- func (r PluginSchema) Validate(ctx context.Context) error
- type Route
- func (r Route) ID() string
- func (r Route) Indexes() []model.Index
- func (r Route) ProcessDefaults(ctx context.Context) error
- func (r Route) Resource() model.Resource
- func (r Route) SetResource(pr model.Resource) error
- func (r Route) Type() model.Type
- func (r Route) Validate(ctx context.Context) error
- type SNI
- type Service
- func (r Service) ID() string
- func (r Service) Indexes() []model.Index
- func (r Service) ProcessDefaults(ctx context.Context) error
- func (r Service) Resource() model.Resource
- func (r Service) SetResource(pr model.Resource) error
- func (r Service) Type() model.Type
- func (r Service) Validate(ctx context.Context) error
- type Target
- func (t Target) ID() string
- func (t Target) Indexes() []model.Index
- func (t Target) ProcessDefaults(ctx context.Context) error
- func (t Target) Resource() model.Resource
- func (t Target) SetResource(r model.Resource) error
- func (t Target) Type() model.Type
- func (t Target) Validate(ctx context.Context) error
- type Upstream
- func (r Upstream) ID() string
- func (r Upstream) Indexes() []model.Index
- func (r Upstream) ProcessDefaults(ctx context.Context) error
- func (r Upstream) Resource() model.Resource
- func (r Upstream) SetResource(pr model.Resource) error
- func (r Upstream) Type() model.Type
- func (r Upstream) Validate(ctx context.Context) error
Constants ¶
const ( TypeNode = model.Type("node") NodeTypeKongProxy = "kong-proxy" )
const ( TypePlugin = model.Type("plugin") // OrderingRuleTitle denotes the title of the ordering-related rule. OrderingRuleTitle = "ordering" )
const ( // TypeRoute denotes the Route type. TypeRoute model.Type = "route" // RouteSNIRuleTitle denotes the name of the schema rule to apply // when using SNIs. RouteSNIRuleTitle = "sni_rule" // WSProtocolsRuleTitle denotes the name of the schema rule to apply // to ws protocols. WSProtocolsRuleTitle = "ws_protocols_rule" )
const ( // TypeService denotes the Service type. TypeService = model.Type("service") // ClientCertificateRuleTitle denotes the name of the schema rule to apply // when using client_certificates. ClientCertificateRuleTitle = "client_certificate_rule" // TLSVerifyRuleTitle denotes the name of the schema rule to apply // when using tls_verify. TLSVerifyRuleTitle = "tls_verify_rule" )
const (
ID = "installation_id"
)
const (
TypeCACertificate model.Type = "ca_certificate"
)
const (
TypeCertificate model.Type = "certificate"
)
const (
TypeConsumer = model.Type("consumer")
)
const (
TypeNodeStatus = model.Type("node-status")
)
const ( // TypePluginSchema denotes the Plugin Schema type. TypePluginSchema = model.Type("plugin_schema") )
const (
TypeSNI model.Type = "sni"
)
const ( // TypeTarget denotes the Target type. TypeTarget model.Type = "target" )
const (
TypeUpstream model.Type = "upstream"
)
Variables ¶
var ( IPv4LikePattern = regexp.MustCompile(`^[0-9.]+(/\d+)?$`) HostnamePattern = regexp.MustCompile(typedefs.HostnamePattern) IPv6HasPortPattern = regexp.MustCompile(`\]\:\d+$`) IPv6HasBracketPattern = regexp.MustCompile(`\[\S+\]$`) )
var PluginName = &generator.Schema{
Type: "string",
Pattern: `^[0-9a-zA-Z\-]*$`,
MinLength: 1,
MaxLength: maxPluginNameLength,
}
var TypeHash = model.Type("hash")
var TypeInstallation = model.Type("installation")
Functions ¶
func SetValidator ¶
Types ¶
type CACertificate ¶
type CACertificate struct {
CACertificate *v1.CACertificate
}
func NewCACertificate ¶
func NewCACertificate() CACertificate
func (CACertificate) ID ¶
func (r CACertificate) ID() string
func (CACertificate) Indexes ¶
func (r CACertificate) Indexes() []model.Index
func (CACertificate) ProcessDefaults ¶
func (r CACertificate) ProcessDefaults(ctx context.Context) error
func (CACertificate) Resource ¶
func (r CACertificate) Resource() model.Resource
func (CACertificate) SetResource ¶
func (r CACertificate) SetResource(pr model.Resource) error
SetResource implements the Object.SetResource interface.
func (CACertificate) Type ¶
func (r CACertificate) Type() model.Type
type Certificate ¶
type Certificate struct {
Certificate *v1.Certificate
}
func NewCertificate ¶
func NewCertificate() Certificate
func (Certificate) ID ¶
func (r Certificate) ID() string
func (Certificate) Indexes ¶
func (r Certificate) Indexes() []model.Index
func (Certificate) ProcessDefaults ¶
func (r Certificate) ProcessDefaults(ctx context.Context) error
func (Certificate) Resource ¶
func (r Certificate) Resource() model.Resource
func (Certificate) SetResource ¶
func (r Certificate) SetResource(pr model.Resource) error
SetResource implements the Object.SetResource interface.
func (Certificate) Type ¶
func (r Certificate) Type() model.Type
type Consumer ¶
func NewConsumer ¶
func NewConsumer() Consumer
func (Consumer) SetResource ¶
SetResource implements the Object.SetResource interface.
type Hash ¶
type Hash struct {
Hash *v1.ConfigHash
}
func (Hash) SetResource ¶
SetResource implements the Object.SetResource interface.
type Installation ¶
type Installation struct {
Installation *v1.Installation
}
Installation represents an installation of koko.
func NewInstallation ¶
func NewInstallation() Installation
NewInstallation returns a new Installation resource with the default Id value. The installationID is generated once in the lifetime of a koko cluster and must be unique. This unique value is generated at runtime and stored in Installation.Value.
func (Installation) ID ¶
func (r Installation) ID() string
ID returns the resource ID. This is always "installation_id" for resources of type Installation to avoid a race condition encountered when using a dynamic value for the ID.
func (Installation) Indexes ¶
func (r Installation) Indexes() []model.Index
func (Installation) ProcessDefaults ¶
func (r Installation) ProcessDefaults(ctx context.Context) error
ProcessDefaults sets the default values for the resource. This is a no-op for Installation.
func (Installation) Resource ¶
func (r Installation) Resource() model.Resource
Resource returns the underlying Installation resource.
func (Installation) SetResource ¶
func (r Installation) SetResource(ir model.Resource) error
SetResource implements the Object.SetResource interface.
func (Installation) Type ¶
func (r Installation) Type() model.Type
Type returns the type of this resource.
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) GetNextPage ¶
func (*List) GetTotalCount ¶
func (*List) SetNextPage ¶
func (*List) SetTotalCount ¶
type Node ¶
func (Node) SetResource ¶
SetResource implements the Object.SetResource interface.
type NodeStatus ¶
type NodeStatus struct {
NodeStatus *nonPublic.NodeStatus
}
func NewNodeStatus ¶
func NewNodeStatus() NodeStatus
func (NodeStatus) ID ¶
func (r NodeStatus) ID() string
func (NodeStatus) Indexes ¶
func (r NodeStatus) Indexes() []model.Index
func (NodeStatus) ProcessDefaults ¶
func (r NodeStatus) ProcessDefaults(_ context.Context) error
func (NodeStatus) Resource ¶
func (r NodeStatus) Resource() model.Resource
func (NodeStatus) SetResource ¶
func (r NodeStatus) SetResource(pr model.Resource) error
SetResource implements the Object.SetResource interface.
func (NodeStatus) Type ¶
func (r NodeStatus) Type() model.Type
type Plugin ¶
func (Plugin) SetResource ¶
SetResource implements the Object.SetResource interface.
type PluginSchema ¶
type PluginSchema struct {
PluginSchema *v1.PluginSchema
}
PluginSchema represents the schema attributes for a plugin.
func NewPluginSchema ¶
func NewPluginSchema() PluginSchema
NewPluginSchema defines a new PluginSchema instance.
func (PluginSchema) Indexes ¶
func (r PluginSchema) Indexes() []model.Index
func (PluginSchema) ProcessDefaults ¶
func (r PluginSchema) ProcessDefaults(ctx context.Context) error
func (PluginSchema) Resource ¶
func (r PluginSchema) Resource() model.Resource
func (PluginSchema) SetResource ¶
func (r PluginSchema) SetResource(pr model.Resource) error
SetResource implements the Object.SetResource interface.
func (PluginSchema) Type ¶
func (r PluginSchema) Type() model.Type
type Route ¶
func (Route) SetResource ¶
SetResource implements the Object.SetResource interface.
type SNI ¶
func (SNI) SetResource ¶
SetResource implements the Object.SetResource interface.
type Service ¶
func NewService ¶
func NewService() Service
func (Service) SetResource ¶
SetResource implements the Object.SetResource interface.
type Target ¶
func (Target) SetResource ¶
SetResource implements the Object.SetResource interface.
type Upstream ¶
func NewUpstream ¶
func NewUpstream() Upstream
func (Upstream) SetResource ¶
SetResource implements the Object.SetResource interface.