cpi

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

Context Provider Interface for context configurations

Documentation

Index

Constants

View Source
const CONTEXT_TYPE = internal.CONTEXT_TYPE
View Source
const KIND_CONFIGTYPE = internal.KIND_CONFIGTYPE
View Source
const OCM_CONFIG_TYPE_SUFFIX = internal.OCM_CONFIG_TYPE_SUFFIX

Variables

View Source
var DefaultContext = internal.DefaultContext

Functions

func ErrNoContext

func ErrNoContext(name string) error

func IsErrConfigNotApplicable

func IsErrConfigNotApplicable(err error) bool

func IsErrNoContext

func IsErrNoContext(err error) bool

func IsGeneric

func IsGeneric(cfg Config) bool

func RegisterConfigType

func RegisterConfigType(rtype ConfigType)

func RegisterConfigTypeVersions added in v0.3.0

func RegisterConfigTypeVersions(s ConfigTypeVersionScheme)

Types

type Config

type Config = internal.Config

func NewGenericConfig

func NewGenericConfig(data []byte, unmarshaler runtime.Unmarshaler) (Config, error)

type ConfigApplier added in v0.7.0

type ConfigApplier = internal.ConfigApplier

type ConfigApplierFunction added in v0.7.0

type ConfigApplierFunction = internal.ConfigApplierFunction

type ConfigSet added in v0.3.0

type ConfigSet = internal.ConfigSet

type ConfigType

type ConfigType = internal.ConfigType

func NewConfigType

func NewConfigType[I Config](name string, usages ...string) ConfigType

func NewConfigTypeByFormatVersion added in v0.3.0

func NewConfigTypeByFormatVersion(name string, fmt runtime.FormatVersion[Config], usages ...string) ConfigType

func NewConfigTypeyConverter added in v0.3.0

func NewConfigTypeyConverter[I Config, V runtime.TypedObject](name string, converter runtime.Converter[I, V], usages ...string) ConfigType

type ConfigTypeScheme

type ConfigTypeScheme = internal.ConfigTypeScheme

func NewConfigTypeScheme

func NewConfigTypeScheme() ConfigTypeScheme

type ConfigTypeVersionScheme added in v0.3.0

type ConfigTypeVersionScheme = runtime.TypeVersionScheme[Config, ConfigType]

func NewConfigTypeVersionScheme added in v0.3.0

func NewConfigTypeVersionScheme(kind string) ConfigTypeVersionScheme

type ConfigurationList added in v0.3.0

type ConfigurationList = internal.ConfigurationList

type ContentSpec added in v0.7.0

type ContentSpec struct {
	Data       RawData        `json:"data,omitempty"`
	StringData string         `json:"stringdata,omitempty"`
	Path       string         `json:"path,omitempty"`
	Parsed     interface{}    `json:"-"`
	FileSystem vfs.FileSystem `json:"-"`
}

func (ContentSpec) Get added in v0.7.0

func (k ContentSpec) Get() (interface{}, error)

type Context

type Context = internal.Context

func FromProvider added in v0.3.0

func FromProvider(p ContextProvider) Context

type ContextProvider

type ContextProvider = internal.ContextProvider

type GenericConfig

type GenericConfig = internal.GenericConfig

func ToGenericConfig

func ToGenericConfig(c Config) (*GenericConfig, error)

type RawData added in v0.7.0

type RawData []byte

func (RawData) MarshalJSON added in v0.7.0

func (r RawData) MarshalJSON() ([]byte, error)

func (*RawData) UnmarshalJSON added in v0.7.0

func (r *RawData) UnmarshalJSON(data []byte) error

type Updater

type Updater = internal.Updater

func NewUpdater

func NewUpdater(ctx Context, target interface{}) Updater

func NewUpdaterForFactory added in v0.9.0

func NewUpdaterForFactory[T any](ctx Context, f func() T) Updater

Jump to

Keyboard shortcuts

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