Versions in this module Expand all Collapse all v0 v0.0.2 Nov 3, 2023 v0.0.1 Nov 3, 2023 Changes in this version + const JSON + const YAML + var ErrWorkspaceNotFound = fmt.Errorf("workspace not found") + var ErrorFilenameEmpty = fmt.Errorf("filename cannot be empty") + var ErrorTransformFalseNotSupported = fmt.Errorf("_transform: false is not supported") + func Get(ctx context.Context, fileContent *Content, opt RenderConfig, ...) (*utils.KongRawState, error) + func GetForKonnect(ctx context.Context, fileContent *Content, opt RenderConfig, ...) (*utils.KongRawState, *utils.KonnectRawState, error) + func KongStateToFile(kongState *state.KongState, config WriteConfig) error + func KonnectStateToFile(kongState *state.KongState, config WriteConfig) error + func WriteContentToFile(content *Content, filename string, format Format) error + type Content struct + CACertificates []FCACertificate + Certificates []FCertificate + ConsumerGroups []FConsumerGroupObject + Consumers []FConsumer + FormatVersion string + Info *Info + Konnect *Konnect + Licenses []FLicense + PluginConfigs map[string]kong.Configuration + Plugins []FPlugin + RBACRoles []FRBACRole + Routes []FRoute + ServicePackages []FServicePackage + Services []FService + Transform *bool + Upstreams []FUpstream + Vaults []FVault + Workspace string + func GetContentFromFiles(filenames []string, mockEnvVars bool) (*Content, error) + func KongStateToContent(kongState *state.KongState, config WriteConfig) (*Content, error) + func (c Content) PopulateDocumentContent(filenames []string) error + func (c Content) StripLocalDocumentPath() + func (in *Content) DeepCopy() *Content + func (in *Content) DeepCopyInto(out *Content) + type FCACertificate struct + func (in *FCACertificate) DeepCopy() *FCACertificate + func (in *FCACertificate) DeepCopyInto(out *FCACertificate) + type FCertificate struct + Cert *string + CreatedAt *int64 + ID *string + Key *string + SNIs []kong.SNI + Tags []*string + func (in *FCertificate) DeepCopy() *FCertificate + func (in *FCertificate) DeepCopyInto(out *FCertificate) + type FConsumer struct + ACLGroups []*kong.ACLGroup + BasicAuths []*kong.BasicAuth + Groups []*kong.ConsumerGroup + HMACAuths []*kong.HMACAuth + JWTAuths []*kong.JWTAuth + KeyAuths []*kong.KeyAuth + MTLSAuths []*kong.MTLSAuth + Oauth2Creds []*kong.Oauth2Credential + Plugins []*FPlugin + func (in *FConsumer) DeepCopy() *FConsumer + func (in *FConsumer) DeepCopyInto(out *FConsumer) + type FConsumerGroupObject struct + Consumers []*kong.Consumer + Plugins []*kong.ConsumerGroupPlugin + func (in *FConsumerGroupObject) DeepCopy() *FConsumerGroupObject + func (in *FConsumerGroupObject) DeepCopyInto(out *FConsumerGroupObject) + type FDocument struct + Content *string + ID *string + Path *string + Published *bool + func (in *FDocument) DeepCopy() *FDocument + func (in *FDocument) DeepCopyInto(out *FDocument) + type FLicense struct + func (in *FLicense) DeepCopy() *FLicense + func (in *FLicense) DeepCopyInto(out *FLicense) + type FPlugin struct + ConfigSource *string + func (in *FPlugin) DeepCopy() *FPlugin + func (in *FPlugin) DeepCopyInto(out *FPlugin) + func (p *FPlugin) UnmarshalJSON(b []byte) error + func (p *FPlugin) UnmarshalYAML(unmarshal func(interface{}) error) error + func (p FPlugin) MarshalJSON() ([]byte, error) + func (p FPlugin) MarshalYAML() (interface{}, error) + type FRBACEndpointPermission struct + func (frbac FRBACEndpointPermission) MarshalJSON() ([]byte, error) + func (in *FRBACEndpointPermission) DeepCopy() *FRBACEndpointPermission + func (in *FRBACEndpointPermission) DeepCopyInto(out *FRBACEndpointPermission) + type FRBACRole struct + EndpointPermissions []*FRBACEndpointPermission + func (in *FRBACRole) DeepCopy() *FRBACRole + func (in *FRBACRole) DeepCopyInto(out *FRBACRole) + type FRoute struct + Plugins []*FPlugin + func (in *FRoute) DeepCopy() *FRoute + func (in *FRoute) DeepCopyInto(out *FRoute) + type FService struct + Plugins []*FPlugin + Routes []*FRoute + URL *string + func (in *FService) DeepCopy() *FService + func (in *FService) DeepCopyInto(out *FService) + func (s *FService) UnmarshalJSON(b []byte) error + func (s *FService) UnmarshalYAML(unmarshal func(interface{}) error) error + func (s FService) MarshalJSON() ([]byte, error) + func (s FService) MarshalYAML() (interface{}, error) + type FServicePackage struct + Description *string + Document *FDocument + ID *string + Name *string + Versions []FServiceVersion + func (in *FServicePackage) DeepCopy() *FServicePackage + func (in *FServicePackage) DeepCopyInto(out *FServicePackage) + type FServiceVersion struct + Document *FDocument + ID *string + Implementation *Implementation + Version *string + func (in *FServiceVersion) DeepCopy() *FServiceVersion + func (in *FServiceVersion) DeepCopyInto(out *FServiceVersion) + type FTarget struct + func (in *FTarget) DeepCopy() *FTarget + func (in *FTarget) DeepCopyInto(out *FTarget) + type FUpstream struct + Targets []*FTarget + func (in *FUpstream) DeepCopy() *FUpstream + func (in *FUpstream) DeepCopyInto(out *FUpstream) + type FVault struct + func (in *FVault) DeepCopy() *FVault + func (in *FVault) DeepCopyInto(out *FVault) + type Format string + type Implementation struct + Kong *Kong + Type string + func (in *Implementation) DeepCopy() *Implementation + func (in *Implementation) DeepCopyInto(out *Implementation) + type Info struct + Defaults KongDefaults + SelectorTags []string + func (in *Info) DeepCopy() *Info + func (in *Info) DeepCopyInto(out *Info) + type Kong struct + Service *FService + func (in *Kong) DeepCopy() *Kong + func (in *Kong) DeepCopyInto(out *Kong) + type KongDefaults struct + Route *kong.Route + Service *kong.Service + Target *kong.Target + Upstream *kong.Upstream + func (in *KongDefaults) DeepCopy() *KongDefaults + func (in *KongDefaults) DeepCopyInto(out *KongDefaults) + type Konnect struct + ControlPlaneName string + RuntimeGroupName string + func (in *Konnect) DeepCopy() *Konnect + func (in *Konnect) DeepCopyInto(out *Konnect) + type RenderConfig struct + CurrentState *state.KongState + KongVersion semver.Version + type ValidationError struct + Err error + Object string + func (e *ValidationError) Error() string + type WriteConfig struct + ControlPlaneName string + FileFormat Format + Filename string + KongVersion string + SelectTags []string + WithID bool + Workspace string