Documentation ¶
Index ¶
- func Get(ctx context.Context, client *kong.Client, config Config) (*utils.KongRawState, error)
- func GetAllACLGroups(ctx context.Context, client *kong.Client, tags []string) ([]*kong.ACLGroup, error)
- func GetAllBasicAuths(ctx context.Context, client *kong.Client, tags []string) ([]*kong.BasicAuth, error)
- func GetAllCACertificates(ctx context.Context, client *kong.Client, tags []string) ([]*kong.CACertificate, error)
- func GetAllCertificates(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Certificate, error)
- func GetAllConsumerGroups(ctx context.Context, client *kong.Client, tags []string) ([]*kong.ConsumerGroupObject, error)
- func GetAllConsumers(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Consumer, error)
- func GetAllHMACAuths(ctx context.Context, client *kong.Client, tags []string) ([]*kong.HMACAuth, error)
- func GetAllJWTAuths(ctx context.Context, client *kong.Client, tags []string) ([]*kong.JWTAuth, error)
- func GetAllKeyAuths(ctx context.Context, client *kong.Client, tags []string) ([]*kong.KeyAuth, error)
- func GetAllMTLSAuths(ctx context.Context, client *kong.Client, tags []string) ([]*kong.MTLSAuth, error)
- func GetAllOauth2Creds(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Oauth2Credential, error)
- func GetAllPlugins(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Plugin, error)
- func GetAllRBACREndpointPermissions(ctx context.Context, client *kong.Client) ([]*kong.RBACEndpointPermission, error)
- func GetAllRBACRoles(ctx context.Context, client *kong.Client) ([]*kong.RBACRole, error)
- func GetAllRoutes(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Route, error)
- func GetAllSNIs(ctx context.Context, client *kong.Client, tags []string) ([]*kong.SNI, error)
- func GetAllServices(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Service, error)
- func GetAllTargets(ctx context.Context, client *kong.Client, upstreams []*kong.Upstream, ...) ([]*kong.Target, error)
- func GetAllUpstreams(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Upstream, error)
- func GetAllVaults(ctx context.Context, client *kong.Client, tags []string) ([]*kong.Vault, error)
- func GetFromKonnect(ctx context.Context, konnectClient *konnect.Client, config KonnectConfig) (*utils.KonnectRawState, error)
- type Config
- type KonnectConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllACLGroups ¶
func GetAllACLGroups(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.ACLGroup, error)
GetAllACLGroups queries Kong for all ACL groups using client.
func GetAllBasicAuths ¶
func GetAllBasicAuths(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.BasicAuth, error)
GetAllBasicAuths queries Kong for all basic-auth credentials using client.
func GetAllCACertificates ¶
func GetAllCACertificates(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.CACertificate, error)
GetAllCACertificates queries Kong for all the CACertificates using client.
func GetAllCertificates ¶
func GetAllCertificates(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Certificate, error)
GetAllCertificates queries Kong for all the certificates using client.
func GetAllConsumerGroups ¶
func GetAllConsumerGroups(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.ConsumerGroupObject, error)
GetAllConsumerGroups queries Kong for all the ConsumerGroups using client.
func GetAllConsumers ¶
func GetAllConsumers(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Consumer, error)
GetAllConsumers queries Kong for all the consumers using client. Please use this method with caution if you have a lot of consumers.
func GetAllHMACAuths ¶
func GetAllHMACAuths(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.HMACAuth, error)
GetAllHMACAuths queries Kong for all hmac-auth credentials using client.
func GetAllJWTAuths ¶
func GetAllJWTAuths(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.JWTAuth, error)
GetAllJWTAuths queries Kong for all jwt credentials using client.
func GetAllKeyAuths ¶
func GetAllKeyAuths(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.KeyAuth, error)
GetAllKeyAuths queries Kong for all key-auth credentials using client.
func GetAllMTLSAuths ¶
func GetAllMTLSAuths(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.MTLSAuth, error)
GetAllMTLSAuths queries Kong for all basic-auth credentials using client.
func GetAllOauth2Creds ¶
func GetAllOauth2Creds(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Oauth2Credential, error)
GetAllOauth2Creds queries Kong for all oauth2 credentials using client.
func GetAllPlugins ¶
func GetAllPlugins(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Plugin, error)
GetAllPlugins queries Kong for all the plugins using client.
func GetAllRBACRoles ¶
GetAllRBACRoles queries Kong for all the RBACRoles using client.
func GetAllRoutes ¶
GetAllRoutes queries Kong for all the routes using client.
func GetAllSNIs ¶
GetAllSNIs queries Kong for all the SNIs using client.
func GetAllServices ¶
func GetAllServices(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Service, error)
GetAllServices queries Kong for all the services using client.
func GetAllTargets ¶
func GetAllTargets(ctx context.Context, client *kong.Client, upstreams []*kong.Upstream, tags []string, ) ([]*kong.Target, error)
GetAllTargets queries Kong for all the Targets of upstreams using client. Targets are queries per upstream as there exists no endpoint in Kong to list all targets of all upstreams.
func GetAllUpstreams ¶
func GetAllUpstreams(ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Upstream, error)
GetAllUpstreams queries Kong for all the Upstreams using client.
func GetAllVaults ¶
func GetAllVaults( ctx context.Context, client *kong.Client, tags []string, ) ([]*kong.Vault, error)
GetAllVaults queries Kong for all the Vaults using client.
func GetFromKonnect ¶
func GetFromKonnect(ctx context.Context, konnectClient *konnect.Client, config KonnectConfig, ) (*utils.KonnectRawState, error)
Types ¶
type Config ¶
type Config struct { // If true, only RBAC resources are exported. // SkipConsumers and SelectorTags should be falsy when this is set. RBACResourcesOnly bool // If true, consumers and any plugins associated with it // are not exported. SkipConsumers bool // If true, CA certificates are not exported. SkipCACerts bool // SelectorTags can be used to export entities tagged with only specific // tags. SelectorTags []string // LookUpSelectorTags* can be used to ensure state lookup for entities using // these tags. This functionality is essential when using a plugin that references // consumers or routes associated with tags different from those in the sync command. LookUpSelectorTagsConsumers []string LookUpSelectorTagsRoutes []string // KonnectControlPlane KonnectControlPlane string // IsConsumerGroupScopedPluginSupported IsConsumerGroupScopedPluginSupported bool }
Config can be used to skip exporting certain entities
type KonnectConfig ¶
type KonnectConfig struct { // ID of the Kong Control Plane being managed. ControlPlaneID string }