Documentation ¶
Index ¶
- Variables
- type ACLGroup
- type ACLGroupsCollection
- func (k *ACLGroupsCollection) Add(aclGroup ACLGroup) error
- func (k *ACLGroupsCollection) Delete(id string) error
- func (k *ACLGroupsCollection) Get(consumerID, groupOrID string) (*ACLGroup, error)
- func (k *ACLGroupsCollection) GetAll() ([]*ACLGroup, error)
- func (k *ACLGroupsCollection) GetAllByConsumerID(id string) ([]*ACLGroup, error)
- func (k *ACLGroupsCollection) GetByID(id string) (*ACLGroup, error)
- func (k *ACLGroupsCollection) Update(aclGroup ACLGroup) error
- type BasicAuth
- func (b1 *BasicAuth) Console() string
- func (b1 *BasicAuth) Equal(b2 *BasicAuth) bool
- func (b1 *BasicAuth) EqualWithOpts(b2 *BasicAuth, ignoreID, ignoreTS, ignorePassword, ignoreForeign bool) bool
- func (b1 *BasicAuth) GetConsumer() string
- func (b1 *BasicAuth) GetID() string
- func (b1 *BasicAuth) GetID2() string
- type BasicAuthsCollection
- func (k *BasicAuthsCollection) Add(basicAuth BasicAuth) error
- func (k *BasicAuthsCollection) Delete(keyOrID string) error
- func (k *BasicAuthsCollection) Get(keyOrID string) (*BasicAuth, error)
- func (k *BasicAuthsCollection) GetAll() ([]*BasicAuth, error)
- func (k *BasicAuthsCollection) GetAllByConsumerID(id string) ([]*BasicAuth, error)
- func (k *BasicAuthsCollection) Schema() *memdb.TableSchema
- func (k *BasicAuthsCollection) TableName() string
- func (k *BasicAuthsCollection) Update(basicAuth BasicAuth) error
- type CACertificate
- type CACertificatesCollection
- func (k *CACertificatesCollection) Add(caCert CACertificate) error
- func (k *CACertificatesCollection) Delete(certOrID string) error
- func (k *CACertificatesCollection) Get(certOrID string) (*CACertificate, error)
- func (k *CACertificatesCollection) GetAll() ([]*CACertificate, error)
- func (k *CACertificatesCollection) Update(caCert CACertificate) error
- type Certificate
- type CertificatesCollection
- func (k *CertificatesCollection) Add(certificate Certificate) error
- func (k *CertificatesCollection) Delete(id string) error
- func (k *CertificatesCollection) DeleteByCertKey(cert, key string) error
- func (k *CertificatesCollection) Get(id string) (*Certificate, error)
- func (k *CertificatesCollection) GetAll() ([]*Certificate, error)
- func (k *CertificatesCollection) GetByCertKey(cert, key string) (*Certificate, error)
- func (k *CertificatesCollection) Update(certificate Certificate) error
- type ConsoleString
- type Consumer
- type ConsumerGroup
- type ConsumerGroupConsumer
- type ConsumerGroupConsumersCollection
- func (k *ConsumerGroupConsumersCollection) Add(consumer ConsumerGroupConsumer) error
- func (k *ConsumerGroupConsumersCollection) Delete(nameOrID, consumerGroupID string) error
- func (k *ConsumerGroupConsumersCollection) Get(nameOrID, consumerGroupID string) (*ConsumerGroupConsumer, error)
- func (k *ConsumerGroupConsumersCollection) GetAll() ([]*ConsumerGroupConsumer, error)
- func (k *ConsumerGroupConsumersCollection) Update(consumer ConsumerGroupConsumer) error
- type ConsumerGroupObject
- type ConsumerGroupPlugin
- type ConsumerGroupPluginsCollection
- func (k *ConsumerGroupPluginsCollection) Add(plugin ConsumerGroupPlugin) error
- func (k *ConsumerGroupPluginsCollection) Delete(nameOrID, consumerGroupID string) error
- func (k *ConsumerGroupPluginsCollection) Get(nameOrID, consumerGroupID string) (*ConsumerGroupPlugin, error)
- func (k *ConsumerGroupPluginsCollection) GetAll() ([]*ConsumerGroupPlugin, error)
- func (k *ConsumerGroupPluginsCollection) Update(plugin ConsumerGroupPlugin) error
- type ConsumerGroupsCollection
- func (k *ConsumerGroupsCollection) Add(consumerGroup ConsumerGroup) error
- func (k *ConsumerGroupsCollection) Delete(nameOrID string) error
- func (k *ConsumerGroupsCollection) Get(nameOrID string) (*ConsumerGroup, error)
- func (k *ConsumerGroupsCollection) GetAll() ([]*ConsumerGroup, error)
- func (k *ConsumerGroupsCollection) Update(consumerGroup ConsumerGroup) error
- type ConsumersCollection
- func (k *ConsumersCollection) Add(consumer Consumer) error
- func (k *ConsumersCollection) Delete(userNameOrID string) error
- func (k *ConsumersCollection) GetAll() ([]*Consumer, error)
- func (k *ConsumersCollection) GetByCustomID(customID string) (*Consumer, error)
- func (k *ConsumersCollection) GetByIDOrUsername(userNameOrID string) (*Consumer, error)
- func (k *ConsumersCollection) Update(consumer Consumer) error
- type Document
- type DocumentsCollection
- func (k *DocumentsCollection) Add(document Document) error
- func (k *DocumentsCollection) DeleteByParent(parent konnect.ParentInfoer, pathOrID string) error
- func (k *DocumentsCollection) GetAll() ([]*Document, error)
- func (k *DocumentsCollection) GetAllByParent(parent konnect.ParentInfoer) ([]*Document, error)
- func (k *DocumentsCollection) GetByParent(parent konnect.ParentInfoer, pathOrID string) (*Document, error)
- func (k *DocumentsCollection) Update(document Document) error
- type EmptyInterfaceUsingUnderlyingType
- type FilterChain
- type FilterChainsCollection
- func (k *FilterChainsCollection) Add(filterChain FilterChain) error
- func (k *FilterChainsCollection) Delete(id string) error
- func (k *FilterChainsCollection) Get(id string) (*FilterChain, error)
- func (k *FilterChainsCollection) GetAll() ([]*FilterChain, error)
- func (k *FilterChainsCollection) GetAllByRouteID(id string) ([]*FilterChain, error)
- func (k *FilterChainsCollection) GetAllByServiceID(id string) ([]*FilterChain, error)
- func (k *FilterChainsCollection) GetByProp(serviceID, routeID string) (*FilterChain, error)
- func (k *FilterChainsCollection) Update(filterChain FilterChain) error
- type HMACAuth
- type HMACAuthsCollection
- func (k *HMACAuthsCollection) Add(hmacAuth HMACAuth) error
- func (k *HMACAuthsCollection) Delete(keyOrID string) error
- func (k *HMACAuthsCollection) Get(keyOrID string) (*HMACAuth, error)
- func (k *HMACAuthsCollection) GetAll() ([]*HMACAuth, error)
- func (k *HMACAuthsCollection) GetAllByConsumerID(id string) ([]*HMACAuth, error)
- func (k *HMACAuthsCollection) Schema() *memdb.TableSchema
- func (k *HMACAuthsCollection) TableName() string
- func (k *HMACAuthsCollection) Update(hmacAuth HMACAuth) error
- type JWTAuth
- type JWTAuthsCollection
- func (k *JWTAuthsCollection) Add(jwtAuth JWTAuth) error
- func (k *JWTAuthsCollection) Delete(keyOrID string) error
- func (k *JWTAuthsCollection) Get(keyOrID string) (*JWTAuth, error)
- func (k *JWTAuthsCollection) GetAll() ([]*JWTAuth, error)
- func (k *JWTAuthsCollection) GetAllByConsumerID(id string) ([]*JWTAuth, error)
- func (k *JWTAuthsCollection) Schema() *memdb.TableSchema
- func (k *JWTAuthsCollection) TableName() string
- func (k *JWTAuthsCollection) Update(jwtAuth JWTAuth) error
- type KeyAuth
- type KeyAuthsCollection
- func (k *KeyAuthsCollection) Add(keyAuth KeyAuth) error
- func (k *KeyAuthsCollection) Delete(keyOrID string) error
- func (k *KeyAuthsCollection) Get(keyOrID string) (*KeyAuth, error)
- func (k *KeyAuthsCollection) GetAll() ([]*KeyAuth, error)
- func (k *KeyAuthsCollection) GetAllByConsumerID(id string) ([]*KeyAuth, error)
- func (k *KeyAuthsCollection) Schema() *memdb.TableSchema
- func (k *KeyAuthsCollection) TableName() string
- func (k *KeyAuthsCollection) Update(keyAuth KeyAuth) error
- type KongState
- type License
- type LicensesCollection
- type MTLSAuth
- type MTLSAuthsCollection
- func (k *MTLSAuthsCollection) Add(mtlsAuth MTLSAuth) error
- func (k *MTLSAuthsCollection) Delete(ID string) error
- func (k *MTLSAuthsCollection) Get(ID string) (*MTLSAuth, error)
- func (k *MTLSAuthsCollection) GetAll() ([]*MTLSAuth, error)
- func (k *MTLSAuthsCollection) GetAllByConsumerID(id string) ([]*MTLSAuth, error)
- func (k *MTLSAuthsCollection) Schema() *memdb.TableSchema
- func (k *MTLSAuthsCollection) TableName() string
- func (k *MTLSAuthsCollection) Update(mtlsAuth MTLSAuth) error
- type Meta
- type Oauth2Credential
- func (k1 *Oauth2Credential) Console() string
- func (k1 *Oauth2Credential) Equal(k2 *Oauth2Credential) bool
- func (k1 *Oauth2Credential) EqualWithOpts(k2 *Oauth2Credential, ignoreID, ignoreTS, ignoreForeign bool) bool
- func (k1 *Oauth2Credential) GetConsumer() string
- func (k1 *Oauth2Credential) GetID() string
- func (k1 *Oauth2Credential) GetID2() string
- type Oauth2CredsCollection
- func (k *Oauth2CredsCollection) Add(keyAuth Oauth2Credential) error
- func (k *Oauth2CredsCollection) Delete(keyOrID string) error
- func (k *Oauth2CredsCollection) Get(keyOrID string) (*Oauth2Credential, error)
- func (k *Oauth2CredsCollection) GetAll() ([]*Oauth2Credential, error)
- func (k *Oauth2CredsCollection) GetAllByConsumerID(id string) ([]*Oauth2Credential, error)
- func (k *Oauth2CredsCollection) Schema() *memdb.TableSchema
- func (k *Oauth2CredsCollection) TableName() string
- func (k *Oauth2CredsCollection) Update(keyAuth Oauth2Credential) error
- type Plugin
- type PluginsCollection
- func (k *PluginsCollection) Add(plugin Plugin) error
- func (k *PluginsCollection) Delete(id string) error
- func (k *PluginsCollection) Get(id string) (*Plugin, error)
- func (k *PluginsCollection) GetAll() ([]*Plugin, error)
- func (k *PluginsCollection) GetAllByConsumerGroupID(id string) ([]*Plugin, error)
- func (k *PluginsCollection) GetAllByConsumerID(id string) ([]*Plugin, error)
- func (k *PluginsCollection) GetAllByName(name string) ([]*Plugin, error)
- func (k *PluginsCollection) GetAllByRouteID(id string) ([]*Plugin, error)
- func (k *PluginsCollection) GetAllByServiceID(id string) ([]*Plugin, error)
- func (k *PluginsCollection) GetByProp(name, serviceID, routeID, consumerID, consumerGroupID string) (*Plugin, error)
- func (k *PluginsCollection) Update(plugin Plugin) error
- type RBACEndpointPermission
- type RBACEndpointPermissionsCollection
- func (k *RBACEndpointPermissionsCollection) Add(rbacEndpointPermission RBACEndpointPermission) error
- func (k *RBACEndpointPermissionsCollection) Delete(endpointIdentifier string) error
- func (k *RBACEndpointPermissionsCollection) Get(nameOrID string) (*RBACEndpointPermission, error)
- func (k *RBACEndpointPermissionsCollection) GetAll() ([]*RBACEndpointPermission, error)
- func (k *RBACEndpointPermissionsCollection) GetAllByRoleID(id string) ([]*RBACEndpointPermission, error)
- func (k *RBACEndpointPermissionsCollection) Update(rbacEndpointPermission RBACEndpointPermission) error
- type RBACRole
- type RBACRolesCollection
- func (k *RBACRolesCollection) Add(rbacRole RBACRole) error
- func (k *RBACRolesCollection) Delete(nameOrID string) error
- func (k *RBACRolesCollection) Get(nameOrID string) (*RBACRole, error)
- func (k *RBACRolesCollection) GetAll() ([]*RBACRole, error)
- func (k *RBACRolesCollection) Update(rbacRole RBACRole) error
- type Route
- type RoutesCollection
- func (k *RoutesCollection) Add(route Route) error
- func (k *RoutesCollection) Delete(nameOrID string) error
- func (k *RoutesCollection) Get(nameOrID string) (*Route, error)
- func (k *RoutesCollection) GetAll() ([]*Route, error)
- func (k *RoutesCollection) GetAllByServiceID(id string) ([]*Route, error)
- func (k *RoutesCollection) Update(route Route) error
- type SNI
- type SNIsCollection
- func (k *SNIsCollection) Add(sni SNI) error
- func (k *SNIsCollection) Delete(nameOrID string) error
- func (k *SNIsCollection) Get(nameOrID string) (*SNI, error)
- func (k *SNIsCollection) GetAll() ([]*SNI, error)
- func (k *SNIsCollection) GetAllByCertID(id string) ([]*SNI, error)
- func (k *SNIsCollection) Update(sni SNI) error
- type Service
- type ServicePackage
- type ServicePackagesCollection
- func (k *ServicePackagesCollection) Add(servicePackage ServicePackage) error
- func (k *ServicePackagesCollection) Delete(nameOrID string) error
- func (k *ServicePackagesCollection) Get(nameOrID string) (*ServicePackage, error)
- func (k *ServicePackagesCollection) GetAll() ([]*ServicePackage, error)
- func (k *ServicePackagesCollection) Update(servicePackage ServicePackage) error
- type ServiceVersion
- type ServiceVersionsCollection
- func (k *ServiceVersionsCollection) Add(serviceVersion ServiceVersion) error
- func (k *ServiceVersionsCollection) Delete(packageID, nameOrID string) error
- func (k *ServiceVersionsCollection) Get(packageID, nameOrID string) (*ServiceVersion, error)
- func (k *ServiceVersionsCollection) GetAll() ([]*ServiceVersion, error)
- func (k *ServiceVersionsCollection) GetAllByServicePackageID(id string) ([]*ServiceVersion, error)
- func (k *ServiceVersionsCollection) Update(serviceVersion ServiceVersion) error
- type ServicesCollection
- type Target
- type TargetsCollection
- func (k *TargetsCollection) Add(target Target) error
- func (k *TargetsCollection) Delete(upstreamID, targetOrID string) error
- func (k *TargetsCollection) Get(upstreamID, targetOrID string) (*Target, error)
- func (k *TargetsCollection) GetAll() ([]*Target, error)
- func (k *TargetsCollection) GetAllByUpstreamID(id string) ([]*Target, error)
- func (k *TargetsCollection) Update(target Target) error
- type Upstream
- type UpstreamsCollection
- func (k *UpstreamsCollection) Add(upstream Upstream) error
- func (k *UpstreamsCollection) Delete(nameOrID string) error
- func (k *UpstreamsCollection) Get(nameOrID string) (*Upstream, error)
- func (k *UpstreamsCollection) GetAll() ([]*Upstream, error)
- func (k *UpstreamsCollection) Update(upstream Upstream) error
- type Vault
- type VaultsCollection
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyExists = fmt.Errorf("entity already exists")
ErrAlreadyExists represents an entity is already present in the state.
var ErrNotFound = fmt.Errorf("entity not found")
ErrNotFound is an error type that is returned when an entity is not found in the state.
Functions ¶
This section is empty.
Types ¶
type ACLGroup ¶
ACLGroup represents an ACL group for a consumer in Kong. It adds some helper methods along with Meta to the original ACLGroup object.
func (*ACLGroup) EqualWithOpts ¶
EqualWithOpts returns true if j1 and j2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
type ACLGroupsCollection ¶
type ACLGroupsCollection collection
ACLGroupsCollection stores and indexes acl-group credentials.
func (*ACLGroupsCollection) Add ¶
func (k *ACLGroupsCollection) Add(aclGroup ACLGroup) error
Add adds aclGroup to ACLGroupsCollection
func (*ACLGroupsCollection) Delete ¶
func (k *ACLGroupsCollection) Delete(id string) error
Delete deletes an acl-group by id.
func (*ACLGroupsCollection) Get ¶
func (k *ACLGroupsCollection) Get(consumerID, groupOrID string, ) (*ACLGroup, error)
Get gets a acl-group for a consumer by group or ID.
func (*ACLGroupsCollection) GetAll ¶
func (k *ACLGroupsCollection) GetAll() ([]*ACLGroup, error)
GetAll gets all acl-groups.
func (*ACLGroupsCollection) GetAllByConsumerID ¶
func (k *ACLGroupsCollection) GetAllByConsumerID(id string) ([]*ACLGroup, error, )
GetAllByConsumerID returns all acl-group credentials belong to a Consumer with id.
func (*ACLGroupsCollection) GetByID ¶
func (k *ACLGroupsCollection) GetByID(id string) (*ACLGroup, error)
GetByID gets an acl-group with id.
func (*ACLGroupsCollection) Update ¶
func (k *ACLGroupsCollection) Update(aclGroup ACLGroup) error
Update updates an existing acl-group credential.
type BasicAuth ¶
BasicAuth represents a basic-auth credential in Kong. It adds some helper methods along with Meta to the original BasicAuth object.
func (*BasicAuth) EqualWithOpts ¶
func (b1 *BasicAuth) EqualWithOpts(b2 *BasicAuth, ignoreID, ignoreTS, ignorePassword, ignoreForeign bool, ) bool
EqualWithOpts returns true if j1 and j2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*BasicAuth) GetConsumer ¶
GetConsumer returns the credential's Consumer's ID. If Consumer's ID is empty, it returns an empty string.
type BasicAuthsCollection ¶
type BasicAuthsCollection struct {
// contains filtered or unexported fields
}
BasicAuthsCollection stores and indexes basic-auth credentials.
func (*BasicAuthsCollection) Add ¶
func (k *BasicAuthsCollection) Add(basicAuth BasicAuth) error
Add adds a basic-auth credential to BasicAuthsCollection
func (*BasicAuthsCollection) Delete ¶
func (k *BasicAuthsCollection) Delete(keyOrID string) error
Delete deletes a basic-auth credential by key or ID.
func (*BasicAuthsCollection) Get ¶
func (k *BasicAuthsCollection) Get(keyOrID string) (*BasicAuth, error)
Get gets a basic-auth credential by key or ID.
func (*BasicAuthsCollection) GetAll ¶
func (k *BasicAuthsCollection) GetAll() ([]*BasicAuth, error)
GetAll gets all basic-auth credentials.
func (*BasicAuthsCollection) GetAllByConsumerID ¶
func (k *BasicAuthsCollection) GetAllByConsumerID(id string) ([]*BasicAuth, error, )
GetAllByConsumerID returns all basic-auth credentials belong to a Consumer with id.
func (*BasicAuthsCollection) Schema ¶
func (k *BasicAuthsCollection) Schema() *memdb.TableSchema
func (*BasicAuthsCollection) Update ¶
func (k *BasicAuthsCollection) Update(basicAuth BasicAuth) error
Update updates an existing basic-auth credential.
type CACertificate ¶
type CACertificate struct { kong.CACertificate `yaml:",inline"` Meta }
CACertificate represents a CACertificate in Kong. It adds some helper methods along with Meta to the original CACertificate object.
func (*CACertificate) Console ¶
func (c1 *CACertificate) Console() string
Console returns an entity's identity in a human readable string.
func (*CACertificate) Equal ¶
func (c1 *CACertificate) Equal(c2 *CACertificate) bool
Equal returns true if c1 and c2 are equal.
func (*CACertificate) EqualWithOpts ¶
func (c1 *CACertificate) EqualWithOpts(c2 *CACertificate, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*CACertificate) Identifier ¶
func (c1 *CACertificate) Identifier() string
Identifier returns the endpoint key name or ID.
type CACertificatesCollection ¶
type CACertificatesCollection collection
CACertificatesCollection stores and indexes Kong CACertificates.
func (*CACertificatesCollection) Add ¶
func (k *CACertificatesCollection) Add(caCert CACertificate) error
Add adds a caCert to the collection
func (*CACertificatesCollection) Delete ¶
func (k *CACertificatesCollection) Delete(certOrID string) error
Delete deletes a caCertificate by looking up it's cert and key.
func (*CACertificatesCollection) Get ¶
func (k *CACertificatesCollection) Get(certOrID string) (*CACertificate, error)
Get gets a caCertificate by cert or ID.
func (*CACertificatesCollection) GetAll ¶
func (k *CACertificatesCollection) GetAll() ([]*CACertificate, error)
GetAll gets a caCertificate by name or ID.
func (*CACertificatesCollection) Update ¶
func (k *CACertificatesCollection) Update(caCert CACertificate) error
Update udpates an existing caCert. It returns an error if the caCert is not already present.
type Certificate ¶
type Certificate struct { kong.Certificate `yaml:",inline"` Meta }
Certificate represents a upstream in Kong. It adds some helper methods along with Meta to the original Certificate object.
func (*Certificate) Console ¶
func (c1 *Certificate) Console() string
Console returns an entity's identity in a human readable string.
func (*Certificate) Equal ¶
func (c1 *Certificate) Equal(c2 *Certificate) bool
Equal returns true if c1 and c2 are equal.
func (*Certificate) EqualWithOpts ¶
func (c1 *Certificate) EqualWithOpts(c2 *Certificate, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Certificate) Identifier ¶
func (c1 *Certificate) Identifier() string
Identifier returns the endpoint key name or ID.
type CertificatesCollection ¶
type CertificatesCollection collection
CertificatesCollection stores and indexes Kong Certificates.
func (*CertificatesCollection) Add ¶
func (k *CertificatesCollection) Add(certificate Certificate) error
Add adds a certificate to the collection
func (*CertificatesCollection) Delete ¶
func (k *CertificatesCollection) Delete(id string) error
Delete deletes a certificate by ID.
func (*CertificatesCollection) DeleteByCertKey ¶
func (k *CertificatesCollection) DeleteByCertKey(cert, key string) error
DeleteByCertKey deletes a certificate by looking up it's cert and key.
func (*CertificatesCollection) Get ¶
func (k *CertificatesCollection) Get(id string) (*Certificate, error)
Get gets a certificate by ID.
func (*CertificatesCollection) GetAll ¶
func (k *CertificatesCollection) GetAll() ([]*Certificate, error)
GetAll gets a certificate by name or ID.
func (*CertificatesCollection) GetByCertKey ¶
func (k *CertificatesCollection) GetByCertKey(cert, key string, ) (*Certificate, error)
GetByCertKey gets a certificate with the same key and cert from the collection.
func (*CertificatesCollection) Update ¶
func (k *CertificatesCollection) Update(certificate Certificate) error
Update udpates an existing certificate. It returns an error if the certificate is not already present.
type ConsoleString ¶
type ConsoleString interface { // Console returns a string to uniquely identify an // entity in human-readable form. // It should have the ID or endpoint key along-with // foreign references if they exist. // It will be used to communicate to the human user // that this entity is undergoing some change. Console() string }
ConsoleString contains methods to be used to print entity to console.
type Consumer ¶
Consumer represents a consumer in Kong. It adds some helper methods along with Meta to the original Consumer object.
func (*Consumer) EqualWithOpts ¶
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Consumer) Identifier ¶
Identifier returns the endpoint key name or ID.
type ConsumerGroup ¶
type ConsumerGroup struct { kong.ConsumerGroup `yaml:",inline"` Meta }
ConsumerGroup represents a ConsumerGroup in Kong. It adds some helper methods along with Meta to the original ConsumerGroup object.
func (*ConsumerGroup) Console ¶
func (c1 *ConsumerGroup) Console() string
Console returns an entity's identity in a human readable string.
func (*ConsumerGroup) Equal ¶
func (c1 *ConsumerGroup) Equal(c2 *ConsumerGroup) bool
Equal returns true if c1 and c2 are equal.
func (*ConsumerGroup) EqualWithOpts ¶
func (c1 *ConsumerGroup) EqualWithOpts(c2 *ConsumerGroup, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ConsumerGroup) Identifier ¶
func (c1 *ConsumerGroup) Identifier() string
Identifier returns the endpoint key name or ID.
type ConsumerGroupConsumer ¶
type ConsumerGroupConsumer struct { kong.ConsumerGroupConsumer `yaml:",inline"` Meta }
ConsumerGroupConsumer represents a ConsumerGroupConsumer in Kong. It adds some helper methods along with Meta to the original ConsumerGroupConsumer object.
func (*ConsumerGroupConsumer) Console ¶
func (c1 *ConsumerGroupConsumer) Console() string
Console returns an entity's identity in a human readable string.
func (*ConsumerGroupConsumer) Equal ¶
func (c1 *ConsumerGroupConsumer) Equal(c2 *ConsumerGroupConsumer) bool
Equal returns true if c1 and c2 are equal.
func (*ConsumerGroupConsumer) EqualWithOpts ¶
func (c1 *ConsumerGroupConsumer) EqualWithOpts(c2 *ConsumerGroupConsumer, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ConsumerGroupConsumer) Identifier ¶
func (c1 *ConsumerGroupConsumer) Identifier() string
Identifier returns the endpoint key Ursername or ID.
type ConsumerGroupConsumersCollection ¶
type ConsumerGroupConsumersCollection collection
ConsumerGroupConsumersCollection stores and indexes Kong consumerGroupConsumers.
func (*ConsumerGroupConsumersCollection) Add ¶
func (k *ConsumerGroupConsumersCollection) Add(consumer ConsumerGroupConsumer) error
Add adds a consumerGroupConsumer to the collection.
func (*ConsumerGroupConsumersCollection) Delete ¶
func (k *ConsumerGroupConsumersCollection) Delete(nameOrID, consumerGroupID string) error
Delete deletes a consumerGroupConsumer by its username or ID.
func (*ConsumerGroupConsumersCollection) Get ¶
func (k *ConsumerGroupConsumersCollection) Get( nameOrID, consumerGroupID string, ) (*ConsumerGroupConsumer, error)
Get gets a consumerGroupConsumer.
func (*ConsumerGroupConsumersCollection) GetAll ¶
func (k *ConsumerGroupConsumersCollection) GetAll() ([]*ConsumerGroupConsumer, error)
GetAll gets all consumerGroupConsumers in the state.
func (*ConsumerGroupConsumersCollection) Update ¶
func (k *ConsumerGroupConsumersCollection) Update(consumer ConsumerGroupConsumer) error
Update udpates an existing consumerGroupConsumer.
type ConsumerGroupObject ¶
type ConsumerGroupObject struct { kong.ConsumerGroupObject `yaml:",inline"` Meta }
ConsumerGroupObject represents a ConsumerGroupObject in Kong. It adds some helper methods along with Meta to the original Upstream object.
func (*ConsumerGroupObject) Console ¶
func (c1 *ConsumerGroupObject) Console() string
Console returns an entity's identity in a human readable string.
func (*ConsumerGroupObject) Equal ¶
func (c1 *ConsumerGroupObject) Equal(c2 *ConsumerGroupObject) bool
Equal returns true if u1 and u2 are equal.
func (*ConsumerGroupObject) EqualWithOpts ¶
func (c1 *ConsumerGroupObject) EqualWithOpts(c2 *ConsumerGroupObject, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ConsumerGroupObject) Identifier ¶
func (c1 *ConsumerGroupObject) Identifier() string
Identifier returns the endpoint key name or ID.
type ConsumerGroupPlugin ¶
type ConsumerGroupPlugin struct { kong.ConsumerGroupPlugin `yaml:",inline"` Meta }
ConsumerGroupPlugin represents a ConsumerGroupConsumer in Kong. It adds some helper methods along with Meta to the original ConsumerGroupConsumer object.
func (*ConsumerGroupPlugin) Console ¶
func (c1 *ConsumerGroupPlugin) Console() string
Console returns an entity's identity in a human readable string.
func (*ConsumerGroupPlugin) Equal ¶
func (c1 *ConsumerGroupPlugin) Equal(c2 *ConsumerGroupPlugin) bool
Equal returns true if c1 and c2 are equal.
func (*ConsumerGroupPlugin) EqualWithOpts ¶
func (c1 *ConsumerGroupPlugin) EqualWithOpts(c2 *ConsumerGroupPlugin, ignoreID bool, ignoreTS bool, ) bool
EqualWithOpts returns true if c1 and c2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ConsumerGroupPlugin) Identifier ¶
func (c1 *ConsumerGroupPlugin) Identifier() string
Identifier returns the endpoint key name or ID.
type ConsumerGroupPluginsCollection ¶
type ConsumerGroupPluginsCollection collection
ConsumerGroupPluginsCollection stores and indexes Kong consumerGroupPlugins.
func (*ConsumerGroupPluginsCollection) Add ¶
func (k *ConsumerGroupPluginsCollection) Add(plugin ConsumerGroupPlugin) error
Add adds a consumerGroupPlugin to the collection.
func (*ConsumerGroupPluginsCollection) Delete ¶
func (k *ConsumerGroupPluginsCollection) Delete(nameOrID, consumerGroupID string) error
Delete deletes a consumerGroupPlugin by its username or ID.
func (*ConsumerGroupPluginsCollection) Get ¶
func (k *ConsumerGroupPluginsCollection) Get( nameOrID, consumerGroupID string, ) (*ConsumerGroupPlugin, error)
Get gets a consumerGroupPlugin.
func (*ConsumerGroupPluginsCollection) GetAll ¶
func (k *ConsumerGroupPluginsCollection) GetAll() ([]*ConsumerGroupPlugin, error)
GetAll gets all consumerGroupPlugins in the state.
func (*ConsumerGroupPluginsCollection) Update ¶
func (k *ConsumerGroupPluginsCollection) Update(plugin ConsumerGroupPlugin) error
Update udpates an existing consumerGroupPlugin.
type ConsumerGroupsCollection ¶
type ConsumerGroupsCollection collection
consumerGroupsCollection stores and indexes Kong consumerGroups.
func (*ConsumerGroupsCollection) Add ¶
func (k *ConsumerGroupsCollection) Add(consumerGroup ConsumerGroup) error
Add adds an consumerGroup to the collection. consumerGroup.ID should not be nil else an error is thrown.
func (*ConsumerGroupsCollection) Delete ¶
func (k *ConsumerGroupsCollection) Delete(nameOrID string) error
Delete deletes an consumerGroup by its name or ID.
func (*ConsumerGroupsCollection) Get ¶
func (k *ConsumerGroupsCollection) Get(nameOrID string) (*ConsumerGroup, error)
Get gets an consumerGroup by name or ID.
func (*ConsumerGroupsCollection) GetAll ¶
func (k *ConsumerGroupsCollection) GetAll() ([]*ConsumerGroup, error)
GetAll gets all consumerGroups in the state.
func (*ConsumerGroupsCollection) Update ¶
func (k *ConsumerGroupsCollection) Update(consumerGroup ConsumerGroup) error
Update updates an existing consumerGroup.
type ConsumersCollection ¶
type ConsumersCollection collection
ConsumersCollection stores and indexes Kong Consumers.
func (*ConsumersCollection) Add ¶
func (k *ConsumersCollection) Add(consumer Consumer) error
Add adds a consumer to the collection An error is thrown if consumer.ID is empty.
func (*ConsumersCollection) Delete ¶
func (k *ConsumersCollection) Delete(userNameOrID string) error
Delete deletes a consumer by name or ID.
func (*ConsumersCollection) GetAll ¶
func (k *ConsumersCollection) GetAll() ([]*Consumer, error)
GetAll gets a consumer by name or ID.
func (*ConsumersCollection) GetByCustomID ¶
func (k *ConsumersCollection) GetByCustomID(customID string) (*Consumer, error)
GetByCustomID gets a consumer by customID.
func (*ConsumersCollection) GetByIDOrUsername ¶
func (k *ConsumersCollection) GetByIDOrUsername(userNameOrID string) (*Consumer, error)
GetByIDOrUsername gets a consumer by name or ID.
func (*ConsumersCollection) Update ¶
func (k *ConsumersCollection) Update(consumer Consumer) error
Update udpates an existing consumer. It returns an error if the consumer is not already present.
type Document ¶
Document represents a document in Konnect. It adds some helper methods along with Meta to the original Document object.
func (*Document) EqualWithOpts ¶
EqualWithOpts returns true if d1 and d2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Document) Identifier ¶
Identifier returns the endpoint key name or ID.
type DocumentsCollection ¶
type DocumentsCollection collection
DocumentsCollection stores and indexes key-auth credentials.
func (*DocumentsCollection) Add ¶
func (k *DocumentsCollection) Add(document Document) error
Add adds a document into DocumentsCollection document.ID should not be nil else an error is thrown.
func (*DocumentsCollection) DeleteByParent ¶
func (k *DocumentsCollection) DeleteByParent(parent konnect.ParentInfoer, pathOrID string) error
DeleteByParent deletes a Document by parent and path or ID.
func (*DocumentsCollection) GetAll ¶
func (k *DocumentsCollection) GetAll() ([]*Document, error)
GetAll gets all Documents.
func (*DocumentsCollection) GetAllByParent ¶
func (k *DocumentsCollection) GetAllByParent(parent konnect.ParentInfoer) ([]*Document, error)
GetAllByParent returns all documents for a Parent
func (*DocumentsCollection) GetByParent ¶
func (k *DocumentsCollection) GetByParent(parent konnect.ParentInfoer, pathOrID string) (*Document, error)
GetByParent returns a document attached to a Parent with a given path or ID
func (*DocumentsCollection) Update ¶
func (k *DocumentsCollection) Update(document Document) error
Update updates a Document
type EmptyInterfaceUsingUnderlyingType ¶ added in v1.11.1
type EmptyInterfaceUsingUnderlyingType []interface{}
EmptyInterfaceUsingUnderlyingType is a type to sort an array of empty interfaces using the underlying type of the interface. The entries are compared as strings. The underlying type can be string or int. If it's neither, it panics. This is used to sort the Config field of a Plugin object. The underlying type remains unchanged.
func (EmptyInterfaceUsingUnderlyingType) Len ¶ added in v1.11.1
func (e EmptyInterfaceUsingUnderlyingType) Len() int
func (EmptyInterfaceUsingUnderlyingType) Less ¶ added in v1.11.1
func (e EmptyInterfaceUsingUnderlyingType) Less(i, j int) bool
func (EmptyInterfaceUsingUnderlyingType) Swap ¶ added in v1.11.1
func (e EmptyInterfaceUsingUnderlyingType) Swap(i, j int)
type FilterChain ¶ added in v1.11.0
type FilterChain struct { kong.FilterChain `yaml:",inline"` Meta }
FilterChain represents a filter chain in Kong.
func (*FilterChain) Console ¶ added in v1.11.0
func (p1 *FilterChain) Console() string
Console returns an entity's identity in a human readable string.
func (*FilterChain) EqualWithOpts ¶ added in v1.11.0
func (p1 *FilterChain) EqualWithOpts(p2 *FilterChain, ignoreID, ignoreTS, ignoreForeign bool, ) bool
EqualWithOpts returns true if p1 and p2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
type FilterChainsCollection ¶ added in v1.11.0
type FilterChainsCollection collection
FilterChainsCollection stores and indexes Kong Services.
func (*FilterChainsCollection) Add ¶ added in v1.11.0
func (k *FilterChainsCollection) Add(filterChain FilterChain) error
Add adds a filter chain to FilterChainsCollection
func (*FilterChainsCollection) Delete ¶ added in v1.11.0
func (k *FilterChainsCollection) Delete(id string) error
Delete deletes a filter chain by ID.
func (*FilterChainsCollection) Get ¶ added in v1.11.0
func (k *FilterChainsCollection) Get(id string) (*FilterChain, error)
Get gets a filter chain by id.
func (*FilterChainsCollection) GetAll ¶ added in v1.11.0
func (k *FilterChainsCollection) GetAll() ([]*FilterChain, error)
GetAll gets a filter chain by name or ID.
func (*FilterChainsCollection) GetAllByRouteID ¶ added in v1.11.0
func (k *FilterChainsCollection) GetAllByRouteID(id string) ([]*FilterChain, error, )
GetAllByRouteID returns all filter chains referencing a route by its id.
func (*FilterChainsCollection) GetAllByServiceID ¶ added in v1.11.0
func (k *FilterChainsCollection) GetAllByServiceID(id string) ([]*FilterChain, error, )
GetAllByServiceID returns all filter chains referencing a service by its id.
func (*FilterChainsCollection) GetByProp ¶ added in v1.11.0
func (k *FilterChainsCollection) GetByProp(serviceID, routeID string) (*FilterChain, error)
GetByProp returns a filter chain which matches the given serviceID or routeID.
func (*FilterChainsCollection) Update ¶ added in v1.11.0
func (k *FilterChainsCollection) Update(filterChain FilterChain) error
Update updates a filter chain
type HMACAuth ¶
HMACAuth represents a key-auth credential in Kong. It adds some helper methods along with Meta to the original HMACAuth object.
func (*HMACAuth) EqualWithOpts ¶
EqualWithOpts returns true if h1 and h2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*HMACAuth) GetConsumer ¶
GetConsumer returns the credential's Consumer's ID. If Consumer's ID is empty, it returns an empty string.
type HMACAuthsCollection ¶
type HMACAuthsCollection struct {
// contains filtered or unexported fields
}
HMACAuthsCollection stores and indexes hmac-auth credentials.
func (*HMACAuthsCollection) Add ¶
func (k *HMACAuthsCollection) Add(hmacAuth HMACAuth) error
Add adds a hmac-auth credential to HMACAuthsCollection
func (*HMACAuthsCollection) Delete ¶
func (k *HMACAuthsCollection) Delete(keyOrID string) error
Delete deletes a hmac-auth credential by key or ID.
func (*HMACAuthsCollection) Get ¶
func (k *HMACAuthsCollection) Get(keyOrID string) (*HMACAuth, error)
Get gets a hmac-auth credential by key or ID.
func (*HMACAuthsCollection) GetAll ¶
func (k *HMACAuthsCollection) GetAll() ([]*HMACAuth, error)
GetAll gets all hmac-auth credentials.
func (*HMACAuthsCollection) GetAllByConsumerID ¶
func (k *HMACAuthsCollection) GetAllByConsumerID(id string) ([]*HMACAuth, error, )
GetAllByConsumerID returns all hmac-auth credentials belong to a Consumer with id.
func (*HMACAuthsCollection) Schema ¶
func (k *HMACAuthsCollection) Schema() *memdb.TableSchema
func (*HMACAuthsCollection) Update ¶
func (k *HMACAuthsCollection) Update(hmacAuth HMACAuth) error
Update updates an existing hmac-auth credential.
type JWTAuth ¶
JWTAuth represents a jwt credential in Kong. It adds some helper methods along with Meta to the original JWTAuth object.
func (*JWTAuth) EqualWithOpts ¶
EqualWithOpts returns true if j1 and j2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*JWTAuth) GetConsumer ¶
GetConsumer returns the credential's Consumer's ID. If Consumer's ID is empty, it returns an empty string.
type JWTAuthsCollection ¶
type JWTAuthsCollection struct {
// contains filtered or unexported fields
}
JWTAuthsCollection stores and indexes jwt-auth credentials.
func (*JWTAuthsCollection) Add ¶
func (k *JWTAuthsCollection) Add(jwtAuth JWTAuth) error
Add adds a jwt-auth credential to JWTAuthsCollection
func (*JWTAuthsCollection) Delete ¶
func (k *JWTAuthsCollection) Delete(keyOrID string) error
Delete deletes a jwt-auth credential by key or ID.
func (*JWTAuthsCollection) Get ¶
func (k *JWTAuthsCollection) Get(keyOrID string) (*JWTAuth, error)
Get gets a jwt-auth credential by key or ID.
func (*JWTAuthsCollection) GetAll ¶
func (k *JWTAuthsCollection) GetAll() ([]*JWTAuth, error)
GetAll gets all jwt-auth credentials.
func (*JWTAuthsCollection) GetAllByConsumerID ¶
func (k *JWTAuthsCollection) GetAllByConsumerID(id string) ([]*JWTAuth, error, )
GetAllByConsumerID returns all jwt-auth credentials belong to a Consumer with id.
func (*JWTAuthsCollection) Schema ¶
func (k *JWTAuthsCollection) Schema() *memdb.TableSchema
func (*JWTAuthsCollection) Update ¶
func (k *JWTAuthsCollection) Update(jwtAuth JWTAuth) error
Update updates an existing jwt-auth credential.
type KeyAuth ¶
KeyAuth represents a key-auth credential in Kong. It adds some helper methods along with Meta to the original KeyAuth object.
func (*KeyAuth) EqualWithOpts ¶
EqualWithOpts returns true if k1 and k2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*KeyAuth) GetConsumer ¶
GetConsumer returns the credential's Consumer's ID. If Consumer's ID is empty, it returns an empty string.
type KeyAuthsCollection ¶
type KeyAuthsCollection struct {
// contains filtered or unexported fields
}
KeyAuthsCollection stores and indexes key-auth credentials.
func (*KeyAuthsCollection) Add ¶
func (k *KeyAuthsCollection) Add(keyAuth KeyAuth) error
Add adds a key-auth credential to KeyAuthsCollection
func (*KeyAuthsCollection) Delete ¶
func (k *KeyAuthsCollection) Delete(keyOrID string) error
Delete deletes a key-auth credential by key or ID.
func (*KeyAuthsCollection) Get ¶
func (k *KeyAuthsCollection) Get(keyOrID string) (*KeyAuth, error)
Get gets a key-auth credential by key or ID.
func (*KeyAuthsCollection) GetAll ¶
func (k *KeyAuthsCollection) GetAll() ([]*KeyAuth, error)
GetAll gets all key-auth credentials.
func (*KeyAuthsCollection) GetAllByConsumerID ¶
func (k *KeyAuthsCollection) GetAllByConsumerID(id string) ([]*KeyAuth, error, )
GetAllByConsumerID returns all key-auth credentials belong to a Consumer with id.
func (*KeyAuthsCollection) Schema ¶
func (k *KeyAuthsCollection) Schema() *memdb.TableSchema
func (*KeyAuthsCollection) Update ¶
func (k *KeyAuthsCollection) Update(keyAuth KeyAuth) error
Update updates an existing key-auth credential.
type KongState ¶
type KongState struct { Services *ServicesCollection Routes *RoutesCollection Upstreams *UpstreamsCollection Targets *TargetsCollection Certificates *CertificatesCollection SNIs *SNIsCollection CACertificates *CACertificatesCollection Plugins *PluginsCollection FilterChains *FilterChainsCollection Consumers *ConsumersCollection Vaults *VaultsCollection Licenses *LicensesCollection ConsumerGroups *ConsumerGroupsCollection ConsumerGroupConsumers *ConsumerGroupConsumersCollection ConsumerGroupPlugins *ConsumerGroupPluginsCollection KeyAuths *KeyAuthsCollection HMACAuths *HMACAuthsCollection JWTAuths *JWTAuthsCollection BasicAuths *BasicAuthsCollection ACLGroups *ACLGroupsCollection Oauth2Creds *Oauth2CredsCollection MTLSAuths *MTLSAuthsCollection RBACRoles *RBACRolesCollection RBACEndpointPermissions *RBACEndpointPermissionsCollection // konnect-specific entities ServicePackages *ServicePackagesCollection ServiceVersions *ServiceVersionsCollection Documents *DocumentsCollection // contains filtered or unexported fields }
KongState is an in-memory database representation of Kong's configuration.
func Get ¶
func Get(raw *utils.KongRawState) (*KongState, error)
Get builds a KongState from a raw representation of Kong.
func GetKonnectState ¶
func GetKonnectState(rawKong *utils.KongRawState, rawKonnect *utils.KonnectRawState, ) (*KongState, error)
func NewKongState ¶
NewKongState creates a new in-memory KongState.
type License ¶ added in v1.9.0
License represents a license in Kong. It adds some helper methods along with Meta to the original License object.
func (*License) Console ¶ added in v1.9.0
Console returns the string to identify the License. Since License do not have an alternative field to identify them, it also returns the ID.
func (*License) EqualWithOpts ¶ added in v1.9.0
EqualWithOpts returns true if licenses l and l2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*License) Identifier ¶ added in v1.9.0
Identifier returns the ID of the License.
type LicensesCollection ¶ added in v1.9.0
type LicensesCollection collection
func (*LicensesCollection) Add ¶ added in v1.9.0
func (k *LicensesCollection) Add(l License) error
func (*LicensesCollection) Delete ¶ added in v1.9.0
func (k *LicensesCollection) Delete(id string) error
func (*LicensesCollection) Get ¶ added in v1.9.0
func (k *LicensesCollection) Get(id string) (*License, error)
func (*LicensesCollection) GetAll ¶ added in v1.9.0
func (k *LicensesCollection) GetAll() ([]*License, error)
func (*LicensesCollection) Update ¶ added in v1.9.0
func (k *LicensesCollection) Update(l License) error
type MTLSAuth ¶
MTLSAuth represents an mtls-auth credential in Kong. It adds some helper methods along with Meta to the original MTLSAuth object.
func (*MTLSAuth) EqualWithOpts ¶
EqualWithOpts returns true if j1 and j2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*MTLSAuth) GetConsumer ¶
func (*MTLSAuth) GetID2 ¶
GetID2 returns the endpoint key of the entity, BUT NO SUCH THING EXISTS 😱 TODO: this is kind of a pointless clone of GetID for MTLSAuth. the mtls-auth entity cannot be referenced by anything other than its ID (it has no unique fields), but the entity interface requires this function. this duplication doesn't appear to be harmful, but it's weird.
type MTLSAuthsCollection ¶
type MTLSAuthsCollection struct {
// contains filtered or unexported fields
}
MTLSAuthsCollection stores and indexes mtls-auth credentials.
func (*MTLSAuthsCollection) Add ¶
func (k *MTLSAuthsCollection) Add(mtlsAuth MTLSAuth) error
Add adds a mtls-auth credential to MTLSAuthsCollection
func (*MTLSAuthsCollection) Delete ¶
func (k *MTLSAuthsCollection) Delete(ID string) error
Delete deletes a mtls-auth credential by ID.
func (*MTLSAuthsCollection) Get ¶
func (k *MTLSAuthsCollection) Get(ID string) (*MTLSAuth, error)
Get gets a mtls-auth credential by ID.
func (*MTLSAuthsCollection) GetAll ¶
func (k *MTLSAuthsCollection) GetAll() ([]*MTLSAuth, error)
GetAll gets all mtls-auth credentials.
func (*MTLSAuthsCollection) GetAllByConsumerID ¶
func (k *MTLSAuthsCollection) GetAllByConsumerID(id string) ([]*MTLSAuth, error, )
GetAllByConsumerID returns all mtls-auth credentials belong to a Consumer with id.
func (*MTLSAuthsCollection) Schema ¶
func (k *MTLSAuthsCollection) Schema() *memdb.TableSchema
func (*MTLSAuthsCollection) Update ¶
func (k *MTLSAuthsCollection) Update(mtlsAuth MTLSAuth) error
Update updates an existing mtls-auth credential.
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
Meta stores metadata for any entity.
type Oauth2Credential ¶
type Oauth2Credential struct { kong.Oauth2Credential `yaml:",inline"` Meta }
Oauth2Credential represents an Oauth2 credential in Kong. It adds some helper methods along with Meta to the original Oauth2Credential object.
func (*Oauth2Credential) Console ¶
func (k1 *Oauth2Credential) Console() string
Console returns an entity's identity in a human readable string.
func (*Oauth2Credential) Equal ¶
func (k1 *Oauth2Credential) Equal(k2 *Oauth2Credential) bool
Equal returns true if k1 and k2 are equal.
func (*Oauth2Credential) EqualWithOpts ¶
func (k1 *Oauth2Credential) EqualWithOpts(k2 *Oauth2Credential, ignoreID, ignoreTS, ignoreForeign bool, ) bool
EqualWithOpts returns true if k1 and k2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Oauth2Credential) GetConsumer ¶
func (k1 *Oauth2Credential) GetConsumer() string
GetConsumer returns the credential's Consumer's ID. If Consumer's ID is empty, it returns an empty string.
func (*Oauth2Credential) GetID ¶
func (k1 *Oauth2Credential) GetID() string
GetID returns ID. If ID is empty, it returns an empty string.
func (*Oauth2Credential) GetID2 ¶
func (k1 *Oauth2Credential) GetID2() string
GetID2 returns the endpoint key of the entity, the ClientID field for Oauth2Credential.
type Oauth2CredsCollection ¶
type Oauth2CredsCollection struct {
// contains filtered or unexported fields
}
Oauth2CredsCollection stores and indexes oauth2 credentials.
func (*Oauth2CredsCollection) Add ¶
func (k *Oauth2CredsCollection) Add(keyAuth Oauth2Credential) error
Add adds a oauth2 credential to Oauth2CredsCollection
func (*Oauth2CredsCollection) Delete ¶
func (k *Oauth2CredsCollection) Delete(keyOrID string) error
Delete deletes a oauth2 credential by key or ID.
func (*Oauth2CredsCollection) Get ¶
func (k *Oauth2CredsCollection) Get(keyOrID string) (*Oauth2Credential, error)
Get gets a oauth2 credential by key or ID.
func (*Oauth2CredsCollection) GetAll ¶
func (k *Oauth2CredsCollection) GetAll() ([]*Oauth2Credential, error)
GetAll gets all oauth2 credentials.
func (*Oauth2CredsCollection) GetAllByConsumerID ¶
func (k *Oauth2CredsCollection) GetAllByConsumerID(id string) ([]*Oauth2Credential, error, )
GetAllByConsumerID returns all oauth2 credentials belong to a Consumer with id.
func (*Oauth2CredsCollection) Schema ¶
func (k *Oauth2CredsCollection) Schema() *memdb.TableSchema
func (*Oauth2CredsCollection) Update ¶
func (k *Oauth2CredsCollection) Update(keyAuth Oauth2Credential) error
Update updates an existing oauth2 credential.
type Plugin ¶
Plugin represents a route in Kong. It adds some helper methods along with Meta to the original Plugin object.
func (*Plugin) Equal ¶
Equal returns true if r1 and r2 are equal. TODO add compare array without position
func (*Plugin) EqualWithOpts ¶
EqualWithOpts returns true if p1 and p2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Plugin) Identifier ¶
Identifier returns the endpoint key name or ID.
type PluginsCollection ¶
type PluginsCollection collection
PluginsCollection stores and indexes Kong Services.
func (*PluginsCollection) Add ¶
func (k *PluginsCollection) Add(plugin Plugin) error
Add adds a plugin to PluginsCollection
func (*PluginsCollection) Delete ¶
func (k *PluginsCollection) Delete(id string) error
Delete deletes a plugin by ID.
func (*PluginsCollection) Get ¶
func (k *PluginsCollection) Get(id string) (*Plugin, error)
Get gets a plugin by id.
func (*PluginsCollection) GetAll ¶
func (k *PluginsCollection) GetAll() ([]*Plugin, error)
GetAll gets a plugin by name or ID.
func (*PluginsCollection) GetAllByConsumerGroupID ¶
func (k *PluginsCollection) GetAllByConsumerGroupID(id string) ([]*Plugin, error, )
GetAllByConsumerGroupID returns all plugins referencing a consumer-group by its id.
func (*PluginsCollection) GetAllByConsumerID ¶
func (k *PluginsCollection) GetAllByConsumerID(id string) ([]*Plugin, error, )
GetAllByConsumerID returns all plugins referencing a consumer by its id.
func (*PluginsCollection) GetAllByName ¶
func (k *PluginsCollection) GetAllByName(name string) ([]*Plugin, error)
GetAllByName returns all plugins of a specific type (key-auth, ratelimiting, etc).
func (*PluginsCollection) GetAllByRouteID ¶
func (k *PluginsCollection) GetAllByRouteID(id string) ([]*Plugin, error, )
GetAllByRouteID returns all plugins referencing a route by its id.
func (*PluginsCollection) GetAllByServiceID ¶
func (k *PluginsCollection) GetAllByServiceID(id string) ([]*Plugin, error, )
GetAllByServiceID returns all plugins referencing a service by its id.
func (*PluginsCollection) GetByProp ¶
func (k *PluginsCollection) GetByProp( name, serviceID, routeID, consumerID, consumerGroupID string, ) (*Plugin, error)
GetByProp returns a plugin which matches all the properties passed in the arguments. If serviceID, routeID, consumerID and consumerGroupID are empty strings, then a global plugin is searched. Otherwise, a plugin with name and the supplied foreign references is searched. name is required.
func (*PluginsCollection) Update ¶
func (k *PluginsCollection) Update(plugin Plugin) error
Update updates a plugin
type RBACEndpointPermission ¶
type RBACEndpointPermission struct { ID string kong.RBACEndpointPermission `yaml:",inline"` Meta }
RBACEndpointPermission represents an RBAC Role in Kong. It adds some helper methods along with Meta to the original RBACEndpointPermission object.
func (*RBACEndpointPermission) Console ¶
func (r1 *RBACEndpointPermission) Console() string
Console returns an entity's identity in a human readable string.
func (*RBACEndpointPermission) Equal ¶
func (r1 *RBACEndpointPermission) Equal(r2 *RBACEndpointPermission) bool
Equal returns true if r1 and r2 are equal. TODO add compare array without position
func (*RBACEndpointPermission) EqualWithOpts ¶
func (r1 *RBACEndpointPermission) EqualWithOpts(r2 *RBACEndpointPermission, ignoreID, ignoreTS, _ bool, ) bool
EqualWithOpts returns true if r1 and r2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*RBACEndpointPermission) Identifier ¶
func (r1 *RBACEndpointPermission) Identifier() string
Identifier returns a composite ID base on Role ID, workspace, and endpoint
type RBACEndpointPermissionsCollection ¶
type RBACEndpointPermissionsCollection collection
RBACEndpointPermissionsCollection stores and indexes Kong RBACEndpointPermissions.
func (*RBACEndpointPermissionsCollection) Add ¶
func (k *RBACEndpointPermissionsCollection) Add(rbacEndpointPermission RBACEndpointPermission) error
Add adds a rbacEndpointPermission into RBACEndpointPermissionsCollection rbacEndpointPermission.Endpoint should not be nil else an error is thrown.
func (*RBACEndpointPermissionsCollection) Delete ¶
func (k *RBACEndpointPermissionsCollection) Delete(endpointIdentifier string) error
Delete deletes a rbacEndpointPermission by name or ID.
func (*RBACEndpointPermissionsCollection) Get ¶
func (k *RBACEndpointPermissionsCollection) Get(nameOrID string) (*RBACEndpointPermission, error)
Get gets a rbacEndpointPermission by name or ID.
func (*RBACEndpointPermissionsCollection) GetAll ¶
func (k *RBACEndpointPermissionsCollection) GetAll() ([]*RBACEndpointPermission, error)
GetAll gets a rbacEndpointPermission by name or ID.
func (*RBACEndpointPermissionsCollection) GetAllByRoleID ¶
func (k *RBACEndpointPermissionsCollection) GetAllByRoleID(id string) ([]*RBACEndpointPermission, error, )
GetAllByRoleID returns all endpoint permissions by referencing a role by its id.
func (*RBACEndpointPermissionsCollection) Update ¶
func (k *RBACEndpointPermissionsCollection) Update(rbacEndpointPermission RBACEndpointPermission) error
Update updates a rbacEndpointPermission
type RBACRole ¶
RBACRole represents an RBAC Role in Kong. It adds some helper methods along with Meta to the original RBACRole object.
func (*RBACRole) Equal ¶
Equal returns true if r1 and r2 are equal. TODO add compare array without position
func (*RBACRole) EqualWithOpts ¶
EqualWithOpts returns true if r1 and r2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*RBACRole) Identifier ¶
Identifier returns the endpoint key name or ID.
type RBACRolesCollection ¶
type RBACRolesCollection collection
RBACRolesCollection stores and indexes Kong RBACRoles.
func (*RBACRolesCollection) Add ¶
func (k *RBACRolesCollection) Add(rbacRole RBACRole) error
Add adds a rbacRole into RBACRolesCollection rbacRole.ID should not be nil else an error is thrown.
func (*RBACRolesCollection) Delete ¶
func (k *RBACRolesCollection) Delete(nameOrID string) error
Delete deletes a rbacRole by name or ID.
func (*RBACRolesCollection) Get ¶
func (k *RBACRolesCollection) Get(nameOrID string) (*RBACRole, error)
Get gets a rbacRole by name or ID.
func (*RBACRolesCollection) GetAll ¶
func (k *RBACRolesCollection) GetAll() ([]*RBACRole, error)
GetAll gets a rbacRole by name or ID.
func (*RBACRolesCollection) Update ¶
func (k *RBACRolesCollection) Update(rbacRole RBACRole) error
Update updates a rbacRole
type Route ¶
Route represents a route in Kong. It adds some helper methods along with Meta to the original Route object.
func (*Route) Equal ¶
Equal returns true if r1 and r2 are equal. TODO add compare array without position
func (*Route) EqualWithOpts ¶
EqualWithOpts returns true if r1 and r2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Route) Identifier ¶
Identifier returns the endpoint key name or ID.
type RoutesCollection ¶
type RoutesCollection collection
RoutesCollection stores and indexes Kong Routes.
func (*RoutesCollection) Add ¶
func (k *RoutesCollection) Add(route Route) error
Add adds a route into RoutesCollection route.ID should not be nil else an error is thrown.
func (*RoutesCollection) Delete ¶
func (k *RoutesCollection) Delete(nameOrID string) error
Delete deletes a route by name or ID.
func (*RoutesCollection) Get ¶
func (k *RoutesCollection) Get(nameOrID string) (*Route, error)
Get gets a route by name or ID.
func (*RoutesCollection) GetAll ¶
func (k *RoutesCollection) GetAll() ([]*Route, error)
GetAll gets a route by name or ID.
func (*RoutesCollection) GetAllByServiceID ¶
func (k *RoutesCollection) GetAllByServiceID(id string) ([]*Route, error, )
GetAllByServiceID returns all routes referencing a service by its id.
func (*RoutesCollection) Update ¶
func (k *RoutesCollection) Update(route Route) error
Update updates a route
type SNI ¶
SNI represents a SNI in Kong. It adds some helper methods along with Meta to the original SNI object.
func (*SNI) Equal ¶
Equal returns true if s1 and s2 are equal. TODO add compare array without position
func (*SNI) EqualWithOpts ¶
EqualWithOpts returns true if s1 and s2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*SNI) Identifier ¶
Identifier returns the endpoint key name or ID.
type SNIsCollection ¶
type SNIsCollection collection
SNIsCollection stores and indexes Kong SNIs.
func (*SNIsCollection) Add ¶
func (k *SNIsCollection) Add(sni SNI) error
Add adds a sni into SNIsCollection sni.ID should not be nil else an error is thrown.
func (*SNIsCollection) Delete ¶
func (k *SNIsCollection) Delete(nameOrID string) error
Delete deletes a sni by name or ID.
func (*SNIsCollection) Get ¶
func (k *SNIsCollection) Get(nameOrID string) (*SNI, error)
Get gets a sni by name or ID.
func (*SNIsCollection) GetAll ¶
func (k *SNIsCollection) GetAll() ([]*SNI, error)
GetAll gets a sni by name or ID.
func (*SNIsCollection) GetAllByCertID ¶
func (k *SNIsCollection) GetAllByCertID(id string) ([]*SNI, error, )
GetAllByCertID returns all routes referencing a service by its id.
type Service ¶
Service represents a service in Kong. It adds some helper methods along with Meta to the original Service object.
func (*Service) EqualWithOpts ¶
EqualWithOpts returns true if s1 and s2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Service) Identifier ¶
Identifier returns the endpoint key name or ID.
type ServicePackage ¶
type ServicePackage struct { konnect.ServicePackage `yaml:",inline"` Meta }
ServicePackage represents a service package in Konnect. It adds some helper methods along with Meta to the original ServicePackage object.
func (*ServicePackage) Console ¶
func (s1 *ServicePackage) Console() string
Console returns an entity's identity in a human readable string.
func (*ServicePackage) Equal ¶
func (s1 *ServicePackage) Equal(s2 *ServicePackage) bool
Equal returns true if s1 and s2 are equal.
func (*ServicePackage) EqualWithOpts ¶
func (s1 *ServicePackage) EqualWithOpts(s2 *ServicePackage, ignoreID bool, _ bool, ) bool
EqualWithOpts returns true if s1 and s2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ServicePackage) Identifier ¶
func (s1 *ServicePackage) Identifier() string
Identifier returns the endpoint key name or ID.
type ServicePackagesCollection ¶
type ServicePackagesCollection collection
ServicePackagesCollection stores and indexes Kong Services.
func (*ServicePackagesCollection) Add ¶
func (k *ServicePackagesCollection) Add(servicePackage ServicePackage) error
Add adds a servicePackage to the collection. service.ID should not be nil else an error is thrown.
func (*ServicePackagesCollection) Delete ¶
func (k *ServicePackagesCollection) Delete(nameOrID string) error
Delete deletes a servicePackage by name or ID.
func (*ServicePackagesCollection) Get ¶
func (k *ServicePackagesCollection) Get(nameOrID string) (*ServicePackage, error)
Get gets a servicePackage by name or ID.
func (*ServicePackagesCollection) GetAll ¶
func (k *ServicePackagesCollection) GetAll() ([]*ServicePackage, error)
GetAll returns all the servicePackages.
func (*ServicePackagesCollection) Update ¶
func (k *ServicePackagesCollection) Update(servicePackage ServicePackage) error
Update udpates an existing service. It returns an error if the servicePackage is not already present.
type ServiceVersion ¶
type ServiceVersion struct { konnect.ServiceVersion `yaml:",inline"` Meta }
ServiceVersion represents a service version in Konnect. It adds some helper methods along with Meta to the original ServiceVersion object.
func (*ServiceVersion) Console ¶
func (s1 *ServiceVersion) Console() string
Console returns an entity's identity in a human readable string.
func (*ServiceVersion) Equal ¶
func (s1 *ServiceVersion) Equal(s2 *ServiceVersion) bool
Equal returns true if s1 and s2 are equal.
func (*ServiceVersion) EqualWithOpts ¶
func (s1 *ServiceVersion) EqualWithOpts(s2 *ServiceVersion, ignoreID, _, ignoreForeign bool, ) bool
EqualWithOpts returns true if s1 and s2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*ServiceVersion) Identifier ¶
func (s1 *ServiceVersion) Identifier() string
Identifier returns the endpoint key name or ID.
type ServiceVersionsCollection ¶
type ServiceVersionsCollection collection
ServiceVersionsCollection stores and indexes Service Versions.
func (*ServiceVersionsCollection) Add ¶
func (k *ServiceVersionsCollection) Add(serviceVersion ServiceVersion) error
Add adds a serviceVersion into ServiceVersionsCollection serviceVersion.ID should not be nil else an error is thrown.
func (*ServiceVersionsCollection) Delete ¶
func (k *ServiceVersionsCollection) Delete(packageID, nameOrID string) error
Delete deletes a serviceVersion by name or ID.
func (*ServiceVersionsCollection) Get ¶
func (k *ServiceVersionsCollection) Get(packageID, nameOrID string) (*ServiceVersion, error)
Get gets a Service Version by name or ID.
func (*ServiceVersionsCollection) GetAll ¶
func (k *ServiceVersionsCollection) GetAll() ([]*ServiceVersion, error)
GetAll gets all serviceVersios.
func (*ServiceVersionsCollection) GetAllByServicePackageID ¶
func (k *ServiceVersionsCollection) GetAllByServicePackageID(id string) ([]*ServiceVersion, error, )
GetAllByServicePackageID returns all serviceVersions for a servicePackage id.
func (*ServiceVersionsCollection) Update ¶
func (k *ServiceVersionsCollection) Update(serviceVersion ServiceVersion) error
Update updates a Service Version.
type ServicesCollection ¶
type ServicesCollection collection
ServicesCollection stores and indexes Kong Services.
func (*ServicesCollection) Add ¶
func (k *ServicesCollection) Add(service Service) error
Add adds a service to the collection. service.ID should not be nil else an error is thrown.
func (*ServicesCollection) Delete ¶
func (k *ServicesCollection) Delete(nameOrID string) error
Delete deletes a service by name or ID.
func (*ServicesCollection) Get ¶
func (k *ServicesCollection) Get(nameOrID string) (*Service, error)
Get gets a service by name or ID.
func (*ServicesCollection) GetAll ¶
func (k *ServicesCollection) GetAll() ([]*Service, error)
GetAll returns all the services.
func (*ServicesCollection) Update ¶
func (k *ServicesCollection) Update(service Service) error
Update udpates an existing service. It returns an error if the service is not already present.
type Target ¶
Target represents a Target in Kong. It adds some helper methods along with Meta to the original Target object.
func (*Target) Equal ¶
Equal returns true if t1 and t2 are equal. TODO add compare array without position
func (*Target) EqualWithOpts ¶
EqualWithOpts returns true if t1 and t2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Target) Identifier ¶
Identifier returns the endpoint key name or ID.
type TargetsCollection ¶
type TargetsCollection collection
TargetsCollection stores and indexes Kong Upstreams.
func (*TargetsCollection) Add ¶
func (k *TargetsCollection) Add(target Target) error
Add adds a target to TargetsCollection. target should have an ID, Target and it's upstream's ID is set.
func (*TargetsCollection) Delete ¶
func (k *TargetsCollection) Delete(upstreamID, targetOrID string) error
Delete deletes a target by its ID.
func (*TargetsCollection) Get ¶
func (k *TargetsCollection) Get(upstreamID, targetOrID string, ) (*Target, error)
Get returns a specific target for upstream with upstreamID.
func (*TargetsCollection) GetAll ¶
func (k *TargetsCollection) GetAll() ([]*Target, error)
GetAll gets a target by Target or ID.
func (*TargetsCollection) GetAllByUpstreamID ¶
func (k *TargetsCollection) GetAllByUpstreamID(id string) ([]*Target, error, )
GetAllByUpstreamID returns all targets referencing a Upstream by its ID.
func (*TargetsCollection) Update ¶
func (k *TargetsCollection) Update(target Target) error
Update updates a target
type Upstream ¶
Upstream represents a upstream in Kong. It adds some helper methods along with Meta to the original Upstream object.
func (*Upstream) EqualWithOpts ¶
EqualWithOpts returns true if u1 and u2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Upstream) Identifier ¶
Identifier returns the endpoint key name or ID.
type UpstreamsCollection ¶
type UpstreamsCollection collection
UpstreamsCollection stores and indexes Kong Upstreams.
func (*UpstreamsCollection) Add ¶
func (k *UpstreamsCollection) Add(upstream Upstream) error
Add adds an upstream to the collection. upstream.ID should not be nil else an error is thrown.
func (*UpstreamsCollection) Delete ¶
func (k *UpstreamsCollection) Delete(nameOrID string) error
Delete deletes an upstream by it's name or ID.
func (*UpstreamsCollection) Get ¶
func (k *UpstreamsCollection) Get(nameOrID string) (*Upstream, error)
Get gets an upstream by name or ID.
func (*UpstreamsCollection) GetAll ¶
func (k *UpstreamsCollection) GetAll() ([]*Upstream, error)
GetAll gets all upstreams in the state.
func (*UpstreamsCollection) Update ¶
func (k *UpstreamsCollection) Update(upstream Upstream) error
Update udpates an existing upstream.
type Vault ¶
Vault represents a vault in Kong. It adds some helper methods along with Meta to the original Vault object.
func (*Vault) Equal ¶
Equal returns true if v1 and v2 are equal. TODO add compare array without position
func (*Vault) EqualWithOpts ¶
EqualWithOpts returns true if v1 and v2 are equal. If ignoreID is set to true, IDs will be ignored while comparison. If ignoreTS is set to true, timestamp fields will be ignored.
func (*Vault) Identifier ¶
Identifier returns the endpoint key name or ID.
type VaultsCollection ¶
type VaultsCollection collection
VaultsCollection stores and indexes Kong Vaults.
func (*VaultsCollection) Add ¶
func (k *VaultsCollection) Add(vault Vault) error
Add adds a vault to the collection. vault.ID should not be nil else an error is thrown.
func (*VaultsCollection) Delete ¶
func (k *VaultsCollection) Delete(prefixOrID string) error
Delete deletes a vault by its prefix or ID.
func (*VaultsCollection) Get ¶
func (k *VaultsCollection) Get(prefixOrID string) (*Vault, error)
Get gets a vault by prefix or ID.
func (*VaultsCollection) GetAll ¶
func (k *VaultsCollection) GetAll() ([]*Vault, error)
GetAll gets all vaults in the state.
func (*VaultsCollection) Update ¶
func (k *VaultsCollection) Update(vault Vault) error
Update udpates an existing vault.
Source Files ¶
- aclgroup.go
- basicauth.go
- builder.go
- cacert.go
- certificate.go
- consumer.go
- consumer_group.go
- consumer_group_consumers.go
- consumer_group_plugin.go
- credentials.go
- document.go
- filter_chain.go
- hmacauth.go
- jwtauth.go
- keyauth.go
- konnect_types.go
- license.go
- mtlsauth.go
- oauth2.go
- plugin.go
- rbac_endpoint_permission.go
- rbac_role.go
- route.go
- service.go
- service_package.go
- service_version.go
- sni.go
- state.go
- target.go
- types.go
- upstream.go
- utils.go
- vault.go