Documentation
¶
Index ¶
- func GetStateFromContent(fileContent *Content) (*state.KongState, []string, error)
- func GetStateFromFile(filename string) (*state.KongState, []string, error)
- func KongStateToFile(kongState *state.KongState, selectTags []string, filename string) error
- type Certificate
- type Consumer
- type Content
- type Info
- type Plugin
- type Route
- type Service
- type Target
- type Upstream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStateFromContent ¶
GetStateFromContent takes the serialized state and returns a Kong. It will return an error if the file representation is invalid or if there is any error during processing. All entities without an ID will get a `placeholder-{iota}` ID assigned to them.
func GetStateFromFile ¶
GetStateFromFile reads in a file with filename and constructs a state. It will return an error if the file representation is invalid or if there is any error during processing. All entities without an ID will get a `placeholder-{iota}` ID assigned to them.
Types ¶
type Certificate ¶
type Certificate struct {
kong.Certificate `yaml:",inline,omitempty"`
}
Certificate represents a Kong Certificate.
type Consumer ¶
type Consumer struct { kong.Consumer `yaml:",inline,omitempty"` Plugins []*Plugin `yaml:",omitempty"` }
Consumer represents a consumer in Kong.
type Content ¶
type Content struct { Info Info `yaml:"_info,omitempty"` Services []Service `yaml:",omitempty"` Upstreams []Upstream `yaml:",omitempty"` Certificates []Certificate `yaml:",omitempty"` Plugins []Plugin `yaml:",omitempty"` Consumers []Consumer `yaml:",omitempty"` }
Content represents a serialized Kong state.
type Info ¶
type Info struct {
SelectorTags []string `yaml:"select_tags,omitempty"`
}
Info contains meta-data of the file.
type Service ¶
type Service struct { kong.Service `yaml:",inline,omitempty"` Routes []*Route `yaml:",omitempty"` Plugins []*Plugin `yaml:",omitempty"` }
Service represents a Kong Service and it's associated routes and plugins.