chart

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	SchemaConfig    SchemaConfig
	ResourcesConfig ResourcesConfig
	// contains filtered or unexported fields
}

func NewChart

func NewChart(root string) (*Chart, error)

func NewChartEmpty

func NewChartEmpty(root string) *Chart

func (*Chart) CleanupTemplates

func (chart *Chart) CleanupTemplates() error

func (*Chart) IsEmpty

func (chart *Chart) IsEmpty() (bool, error)

func (*Chart) PreprocessorExists

func (chart *Chart) PreprocessorExists(kind string) bool

func (*Chart) ReadDefinitions

func (chart *Chart) ReadDefinitions() (*[]JsonSchema, error)

func (*Chart) WriteDocsResourcesMd

func (chart *Chart) WriteDocsResourcesMd(body string) error

func (*Chart) WriteGen

func (chart *Chart) WriteGen() error

func (*Chart) WriteInit

func (chart *Chart) WriteInit() error

func (*Chart) WriteSchema

func (chart *Chart) WriteSchema(schema JsonSchema) error

func (*Chart) WriteSchemaFull

func (chart *Chart) WriteSchemaFull(schema JsonSchema) error

func (*Chart) WriteSettings

func (chart *Chart) WriteSettings(body string) error

func (*Chart) WriteTemplate

func (chart *Chart) WriteTemplate(name, body string) error

type ConversionRule

type ConversionRule struct {
	Source     *string            `json:"source"`
	Target     string             `json:"target"`
	Properties *map[string]string `json:"properties,omitempty"`
	Allowed    *[]string          `json:"allowed,omitempty"`
	Disallowed *[]string          `json:"disallowed,omitempty"`
	Required   *[]string          `json:"required,omitempty"`
	Related    map[string]string  `json:"related"`
}

type JsonSchema

type JsonSchema struct {
	Schema      string                 `json:"$schema"`
	Type        string                 `json:"type"`
	Definitions map[string]interface{} `json:"definitions"`
	Properties  map[string]interface{} `json:"properties"`
}

type ResourceDefinition

type ResourceDefinition struct {
	Template      bool   `json:"template"`
	ApiVersion    string `json:"apiVersion"`
	Kind          string `json:"kind"`
	JsonSchemaRef string `json:"jsonSchemaRef"`
	Root          bool   `json:"root"`
	Defaults      bool   `json:"defaults"`
}

func (*ResourceDefinition) UnmarshalJSON

func (c *ResourceDefinition) UnmarshalJSON(data []byte) error

type ResourcesConfig

type ResourcesConfig struct {
	Resources map[string]ResourceDefinition `json:"resources"`
}

type SchemaConfig

type SchemaConfig struct {
	Definitions []helpers.FilePath `json:"definitions"`
	Rules       []ConversionRule   `json:"rules"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL