v3

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = config.Version{Number: 3}

Version is the config.Version for project configuration 3

Functions

func New

func New() config.Config

New returns a new config.Config

Types

type Cfg

type Cfg struct {
	// Version
	Version config.Version `json:"version"`

	// String fields
	Domain      string      `json:"domain,omitempty"`
	Repository  string      `json:"repo,omitempty"`
	Name        string      `json:"projectName,omitempty"`
	PluginChain stringSlice `json:"layout,omitempty"`

	// Boolean fields
	MultiGroup bool `json:"multigroup,omitempty"`

	// Resources
	Resources []resource.Resource `json:"resources,omitempty"`

	// Plugins
	Plugins pluginConfigs `json:"plugins,omitempty"`
}

func (*Cfg) AddResource

func (c *Cfg) AddResource(res resource.Resource) error

AddResource implements config.Config

func (*Cfg) ClearMultiGroup

func (c *Cfg) ClearMultiGroup() error

ClearMultiGroup implements config.Config

func (Cfg) DecodePluginConfig

func (c Cfg) DecodePluginConfig(key string, configObj interface{}) error

DecodePluginConfig implements config.Config

func (*Cfg) EncodePluginConfig

func (c *Cfg) EncodePluginConfig(key string, configObj interface{}) error

EncodePluginConfig will return an error if used on any project version < v3.

func (Cfg) GetDomain

func (c Cfg) GetDomain() string

GetDomain implements config.Config

func (Cfg) GetPluginChain

func (c Cfg) GetPluginChain() []string

GetPluginChain implements config.Config

func (Cfg) GetProjectName

func (c Cfg) GetProjectName() string

GetProjectName implements config.Config

func (Cfg) GetRepository

func (c Cfg) GetRepository() string

GetRepository implements config.Config

func (Cfg) GetResource

func (c Cfg) GetResource(gvk resource.GVK) (resource.Resource, error)

GetResource implements config.Config

func (Cfg) GetResources

func (c Cfg) GetResources() ([]resource.Resource, error)

GetResources implements config.Config

func (Cfg) GetVersion

func (c Cfg) GetVersion() config.Version

GetVersion implements config.Config

func (Cfg) HasGroup

func (c Cfg) HasGroup(group string) bool

HasGroup implements config.Config

func (Cfg) HasResource

func (c Cfg) HasResource(gvk resource.GVK) bool

HasResource implements config.Config

func (Cfg) IsMultiGroup

func (c Cfg) IsMultiGroup() bool

IsMultiGroup implements config.Config

func (Cfg) ListCRDVersions

func (c Cfg) ListCRDVersions() []string

ListCRDVersions implements config.Config

func (Cfg) ListWebhookVersions

func (c Cfg) ListWebhookVersions() []string

ListWebhookVersions implements config.Config

func (Cfg) MarshalYAML

func (c Cfg) MarshalYAML() ([]byte, error)

Marshal implements config.Config

func (Cfg) ResourcesLength

func (c Cfg) ResourcesLength() int

ResourcesLength implements config.Config

func (*Cfg) SetDomain

func (c *Cfg) SetDomain(domain string) error

SetDomain implements config.Config

func (*Cfg) SetMultiGroup

func (c *Cfg) SetMultiGroup() error

SetMultiGroup implements config.Config

func (*Cfg) SetPluginChain

func (c *Cfg) SetPluginChain(pluginChain []string) error

SetPluginChain implements config.Config

func (*Cfg) SetProjectName

func (c *Cfg) SetProjectName(name string) error

SetProjectName implements config.Config

func (*Cfg) SetRepository

func (c *Cfg) SetRepository(repository string) error

SetRepository implements config.Config

func (*Cfg) UnmarshalYAML

func (c *Cfg) UnmarshalYAML(b []byte) error

Unmarshal implements config.Config

func (*Cfg) UpdateResource

func (c *Cfg) UpdateResource(res resource.Resource) error

UpdateResource implements config.Config

Jump to

Keyboard shortcuts

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