cpi

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 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

func RegisterConfigTypeVersions(s ConfigTypeVersionScheme)

Types

type Config

type Config = internal.Config

func NewGenericConfig

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

type ConfigApplier

type ConfigApplier = internal.ConfigApplier

type ConfigApplierFunction

type ConfigApplierFunction = internal.ConfigApplierFunction

type ConfigSet

type ConfigSet = internal.ConfigSet

type ConfigType

type ConfigType = internal.ConfigType

func NewConfigType

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

func NewConfigTypeByFormatVersion

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

func NewConfigTypeyConverter

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

type ConfigTypeVersionScheme = runtime.TypeVersionScheme[Config, ConfigType]

func NewConfigTypeVersionScheme

func NewConfigTypeVersionScheme(kind string) ConfigTypeVersionScheme

type ConfigurationList

type ConfigurationList = internal.ConfigurationList

type ContentSpec

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

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

type Context

type Context = internal.Context

func FromProvider

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

type RawData []byte

func (RawData) MarshalJSON

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

func (*RawData) UnmarshalJSON

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

type Updater

type Updater = internal.Updater

func NewUpdater

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

func NewUpdaterForFactory

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

Jump to

Keyboard shortcuts

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