types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandTypeUnknown        = "unknown"
	CommandTypeConfigDiff     = "config-diff"
	CommandTypeConfigShow     = "config-show"
	CommandTypeConfigLoad     = "config-load"
	CommandTypeConfigBlame    = "config-blame"
	CommandTypeConfigValidate = "config-validate"
	CommandTypeSchemaLoad     = "schema-load"
	CommandTypePipelineStop   = "pipeline-stop"
)

Variables

ConfigFormatsList List of all the known config formats

Functions

This section is empty.

Types

type CommandType

type CommandType string

func ParseCommandType

func ParseCommandType(s string) CommandType

func (CommandType) String

func (c CommandType) String() string

type ConfigFormat

type ConfigFormat string
const (
	ConfigFormatUnknown  ConfigFormat = "unknown"
	ConfigFormatJson     ConfigFormat = "json"
	ConfigFormatJsonIetf ConfigFormat = "json_ietf"
	ConfigFormatXml      ConfigFormat = "xml"
	ConfigFormatYaml     ConfigFormat = "yaml"
	ConfigFormatSdc      ConfigFormat = "sdc"
	ConfigFormatXPath    ConfigFormat = "xpath"
)

func ParseConfigFormat

func ParseConfigFormat(s string) (ConfigFormat, error)

func (ConfigFormat) String

func (c ConfigFormat) String() string

type ConfigFormats

type ConfigFormats []ConfigFormat

func (ConfigFormats) StringSlice

func (c ConfigFormats) StringSlice() []string

type Intent

type Intent struct {
	Name     string
	Prio     int32
	Flag     *dsTypes.UpdateInsertFlags
	BasePath string // basepath for the config data (no filepath)
	Format   ConfigFormat
	Data     []byte
}

func NewIntent

func NewIntent(name string, prio int32, flag *dsTypes.UpdateInsertFlags) *Intent

func (*Intent) Export

func (i *Intent) Export() *output.IntentOutput

func (*Intent) GetBasePath

func (i *Intent) GetBasePath() string

func (*Intent) GetData

func (i *Intent) GetData() []byte

func (*Intent) GetFlag

func (i *Intent) GetFlag() *dsTypes.UpdateInsertFlags

func (*Intent) GetFormat

func (i *Intent) GetFormat() ConfigFormat

func (*Intent) GetName

func (i *Intent) GetName() string

func (*Intent) GetPrio

func (i *Intent) GetPrio() int32

func (*Intent) SetBasePath

func (i *Intent) SetBasePath(p string) *Intent

func (*Intent) SetData

func (i *Intent) SetData(format ConfigFormat, data []byte) *Intent

func (*Intent) SetPrio

func (i *Intent) SetPrio(p int32) *Intent

func (*Intent) String

func (i *Intent) String() string

type Intents

type Intents map[string]*Intent

func (*Intents) AddIntent

func (i *Intents) AddIntent(ii *Intent)

func (Intents) Export

func (i Intents) Export() []*output.IntentOutput

type Target

type Target struct {
	// contains filtered or unexported fields
}

func NewTarget

func NewTarget(w TargetConfig) *Target

func (*Target) AddIntent

func (t *Target) AddIntent(i *Intent) error

func (*Target) DeleteIntent

func (t *Target) DeleteIntent(name string) error

func (*Target) Export

func (t *Target) Export() *output.TargetOutput

func (*Target) GetIntents

func (t *Target) GetIntents() Intents

func (*Target) GetSchema

func (t *Target) GetSchema() *sdcpb.Schema

func (*Target) Persist

func (t *Target) Persist() error

func (*Target) SetSchema

func (t *Target) SetSchema(s *sdcpb.Schema)

type TargetConfig

type TargetConfig interface {
	TargetName() string
	ConfigFileName(intentName string) string
	ConfigFileGlob() string
	SchemaDefinitionFilePath() string
	TargetPath() string
}

type Targets

type Targets []*Target

func (*Targets) Add

func (t *Targets) Add(w *Target)

func (Targets) Export

func (t Targets) Export() output.TargetOutputSlice

Jump to

Keyboard shortcuts

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