Documentation
¶
Overview ¶
Package analysis analyses schemas and creates comparison.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyser ¶
type Analyser struct {
// The cluster apps handed over to the agent.
ClusterApps []ClusterApp
// Schemas holds the full schema information in the original hierarchical
// form. Map key is the provider name.
Schemas map[string]*jsonschema.Schema
// FlattenedSchema holds a flattened schema where all property names
// are brought into a path like `/main/sub/subsub`.
// Top level map key is the provider name.
// Second level map key is the property name in path form.
FlattenedSchema map[string]map[string]*jsonschema.Schema
}
Analyser is the agent that performs comparison and analysis on the schemas.
func New ¶
func New(clusterApps []ClusterApp) (*Analyser, error)
func (*Analyser) Features ¶
Return "features" found in all schemas.
A feature is a unique combination of the JSON schema capabilities used.
func (*Analyser) HierarchicalKeys ¶
Returns a list of all hierarchical property keys from all schemas.
func (*Analyser) MergedSchemas ¶
func (a *Analyser) MergedSchemas() map[string]map[string]ProviderPropertySummary
MergedSchemas returns a map of properties occuring over all analysed schemas, with the list of providers and additional info as their value.
type ClusterApp ¶
type ClusterApp struct {
// User-friendly name of the Cluster API infrastructure provider.
ProviderName string
// URL of the GitHub repo landing page.
RepositoryURL string
// URL of the schema file in JSON for download.
SchemaURL string
}
ClusterApp holds information on a Giant Swarm cluster app for a Cluster API provider.
type PropertyDetails ¶
type PropertyDetails struct {
Key string
KeyHierarchical string
Types []string
DefaultValue string
}
PropertyDetails is an extract of information regarding a single property in a schema.
type ProviderPropertySummary ¶
Click to show internal directories.
Click to hide internal directories.