declcfg

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToModel

func ConvertToModel(cfg DeclarativeConfig) (model.Model, error)

func WriteDir

func WriteDir(cfg DeclarativeConfig, configDir string) error

func WriteJSON added in v1.17.1

func WriteJSON(cfg DeclarativeConfig, w io.Writer) error

func WriteYAML added in v1.17.1

func WriteYAML(cfg DeclarativeConfig, w io.Writer) error

Types

type Bundle

type Bundle struct {
	Schema        string              `json:"schema"`
	Name          string              `json:"name"`
	Package       string              `json:"package"`
	Image         string              `json:"image"`
	Properties    []property.Property `json:"properties,omitempty"`
	RelatedImages []RelatedImage      `json:"relatedImages,omitempty"`

	// These fields are present so that we can continue serving
	// the GRPC API the way packageserver expects us to in a
	// backwards-compatible way. These are populated from
	// any `olm.bundle.object` properties.
	//
	// These fields will never be persisted in the bundle blob as
	// first class fields.
	CsvJSON string   `json:"-"`
	Objects []string `json:"-"`
}

type DeclarativeConfig

type DeclarativeConfig struct {
	Packages []Package
	Bundles  []Bundle
	Others   []Meta
}

func ConvertFromModel

func ConvertFromModel(mpkgs model.Model) DeclarativeConfig

func LoadDir

func LoadDir(configDir string) (*DeclarativeConfig, error)

type Icon

type Icon struct {
	Data      []byte `json:"base64data"`
	MediaType string `json:"mediatype"`
}

type Meta

type Meta struct {
	Schema  string
	Package string

	Blob json.RawMessage
}

func (Meta) MarshalJSON

func (m Meta) MarshalJSON() ([]byte, error)

func (*Meta) UnmarshalJSON

func (m *Meta) UnmarshalJSON(blob []byte) error

type Package

type Package struct {
	Schema         string `json:"schema"`
	Name           string `json:"name"`
	DefaultChannel string `json:"defaultChannel"`
	Icon           *Icon  `json:"icon,omitempty"`
	Description    string `json:"description,omitempty"`
}

type RelatedImage

type RelatedImage struct {
	Name  string `json:"name"`
	Image string `json:"image"`
}

Jump to

Keyboard shortcuts

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