Documentation
¶
Index ¶
- type ConfigBlameParams
- func (c *ConfigBlameParams) GetIncludeDefaults() bool
- func (c *ConfigBlameParams) GetPath() *sdcpb.Path
- func (c *ConfigBlameParams) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
- func (c *ConfigBlameParams) SetIncludeDefaults(includeDefaults bool) *ConfigBlameParams
- func (c *ConfigBlameParams) SetPath(p *sdcpb.Path) *ConfigBlameParams
- func (c *ConfigBlameParams) String() string
- type ConfigLoad
- type ConfigShowConfig
- func (c *ConfigShowConfig) GetAll() bool
- func (c *ConfigShowConfig) GetOutputFormat() types.ConfigFormat
- func (c *ConfigShowConfig) GetPath() *sdcpb.Path
- func (c *ConfigShowConfig) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
- func (c *ConfigShowConfig) SetAll(b bool) *ConfigShowConfig
- func (c *ConfigShowConfig) SetOutputFormat(f types.ConfigFormat) *ConfigShowConfig
- func (c *ConfigShowConfig) SetPath(p *sdcpb.Path) *ConfigShowConfig
- func (c *ConfigShowConfig) String() string
- type ConfigShowInterface
- type ConfigValidate
- type DiffConfig
- func (d *DiffConfig) GetColor() bool
- func (d *DiffConfig) GetContextLines() int
- func (d *DiffConfig) GetDiffType() enum.DiffType
- func (d *DiffConfig) GetFormat() types.ConfigFormat
- func (d *DiffConfig) GetPath() *sdcpb.Path
- func (d *DiffConfig) GetShowHeader() bool
- func (d *DiffConfig) GetWidth() int
- func (d *DiffConfig) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
- func (d *DiffConfig) SetColor(b bool) *DiffConfig
- func (d *DiffConfig) SetConfig(c types.ConfigFormat) *DiffConfig
- func (d *DiffConfig) SetContextLines(l int) *DiffConfig
- func (d *DiffConfig) SetPath(p *sdcpb.Path) *DiffConfig
- func (d *DiffConfig) SetShowHeader(b bool) *DiffConfig
- func (d *DiffConfig) SetWidth(w int) *DiffConfig
- func (d *DiffConfig) String() string
- type Executor
- type SchemaLoadConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigBlameParams ¶
type ConfigBlameParams struct {
// contains filtered or unexported fields
}
func NewConfigBlameParams ¶
func NewConfigBlameParams() *ConfigBlameParams
func (*ConfigBlameParams) GetIncludeDefaults ¶
func (c *ConfigBlameParams) GetIncludeDefaults() bool
func (*ConfigBlameParams) GetPath ¶
func (c *ConfigBlameParams) GetPath() *sdcpb.Path
func (*ConfigBlameParams) Run ¶
func (c *ConfigBlameParams) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*ConfigBlameParams) SetIncludeDefaults ¶
func (c *ConfigBlameParams) SetIncludeDefaults(includeDefaults bool) *ConfigBlameParams
func (*ConfigBlameParams) SetPath ¶
func (c *ConfigBlameParams) SetPath(p *sdcpb.Path) *ConfigBlameParams
func (*ConfigBlameParams) String ¶
func (c *ConfigBlameParams) String() string
type ConfigLoad ¶
type ConfigLoad struct {
// contains filtered or unexported fields
}
func NewConfigLoad ¶
func NewConfigLoad(intent *types.Intent) *ConfigLoad
func (*ConfigLoad) GetIntent ¶
func (cl *ConfigLoad) GetIntent() *types.Intent
func (*ConfigLoad) Run ¶
func (c *ConfigLoad) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*ConfigLoad) String ¶
func (c *ConfigLoad) String() string
type ConfigShowConfig ¶
type ConfigShowConfig struct {
// contains filtered or unexported fields
}
func NewConfigShowConfig ¶
func NewConfigShowConfig() *ConfigShowConfig
func (*ConfigShowConfig) GetAll ¶
func (c *ConfigShowConfig) GetAll() bool
func (*ConfigShowConfig) GetOutputFormat ¶
func (c *ConfigShowConfig) GetOutputFormat() types.ConfigFormat
func (*ConfigShowConfig) GetPath ¶
func (c *ConfigShowConfig) GetPath() *sdcpb.Path
func (*ConfigShowConfig) Run ¶
func (c *ConfigShowConfig) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*ConfigShowConfig) SetAll ¶
func (c *ConfigShowConfig) SetAll(b bool) *ConfigShowConfig
func (*ConfigShowConfig) SetOutputFormat ¶
func (c *ConfigShowConfig) SetOutputFormat(f types.ConfigFormat) *ConfigShowConfig
func (*ConfigShowConfig) SetPath ¶
func (c *ConfigShowConfig) SetPath(p *sdcpb.Path) *ConfigShowConfig
func (*ConfigShowConfig) String ¶
func (c *ConfigShowConfig) String() string
type ConfigShowInterface ¶
type ConfigShowInterface interface {
// ToJson returns the Tree contained structure as JSON
// use e.g. json.MarshalIndent() on the returned struct
ToJson(ctx context.Context, onlyNewOrUpdated bool) (any, error)
// ToJsonIETF returns the Tree contained structure as JSON_IETF
// use e.g. json.MarshalIndent() on the returned struct
ToJsonIETF(ctx context.Context, onlyNewOrUpdated bool) (any, error)
ToXML(ctx context.Context, onlyNewOrUpdated bool, honorNamespace bool, operationWithNamespace bool, useOperationRemove bool) (*etree.Document, error)
// ToProto basically
GetHighestPrecedence(ctx context.Context, onlyNewOrUpdated bool, includeDefaults bool, includeExplicitDelete bool) api.LeafVariantSlice
// deletes for proto and json(_ietf)
GetDeletes(ctx context.Context, aggregatePaths bool) (treetypes.DeleteEntriesList, error)
}
type ConfigValidate ¶
type ConfigValidate struct {
}
func NewConfigValidate ¶
func NewConfigValidate() *ConfigValidate
func (*ConfigValidate) Run ¶
func (c *ConfigValidate) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*ConfigValidate) String ¶
func (c *ConfigValidate) String() string
type DiffConfig ¶
type DiffConfig struct {
// contains filtered or unexported fields
}
func NewDiffConfig ¶
func NewDiffConfig(dt enum.DiffType) *DiffConfig
func (*DiffConfig) GetColor ¶
func (d *DiffConfig) GetColor() bool
func (*DiffConfig) GetContextLines ¶
func (d *DiffConfig) GetContextLines() int
func (*DiffConfig) GetDiffType ¶
func (d *DiffConfig) GetDiffType() enum.DiffType
func (*DiffConfig) GetFormat ¶
func (d *DiffConfig) GetFormat() types.ConfigFormat
func (*DiffConfig) GetPath ¶
func (d *DiffConfig) GetPath() *sdcpb.Path
func (*DiffConfig) GetShowHeader ¶
func (d *DiffConfig) GetShowHeader() bool
func (*DiffConfig) GetWidth ¶
func (d *DiffConfig) GetWidth() int
func (*DiffConfig) Run ¶
func (d *DiffConfig) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*DiffConfig) SetColor ¶
func (d *DiffConfig) SetColor(b bool) *DiffConfig
func (*DiffConfig) SetConfig ¶
func (d *DiffConfig) SetConfig(c types.ConfigFormat) *DiffConfig
func (*DiffConfig) SetContextLines ¶
func (d *DiffConfig) SetContextLines(l int) *DiffConfig
func (*DiffConfig) SetPath ¶
func (d *DiffConfig) SetPath(p *sdcpb.Path) *DiffConfig
func (*DiffConfig) SetShowHeader ¶
func (d *DiffConfig) SetShowHeader(b bool) *DiffConfig
func (*DiffConfig) SetWidth ¶
func (d *DiffConfig) SetWidth(w int) *DiffConfig
func (*DiffConfig) String ¶
func (d *DiffConfig) String() string
type Executor ¶
type Executor interface {
GetTreeJson(ctx context.Context, path *sdcpb.Path) (any, error)
GetDiff(ctx context.Context, dc *DiffConfig) (string, error)
SchemaDownload(ctx context.Context, schemaDefinition *SchemaLoadConfig) (*sdcpb.Schema, error)
TreeLoadData(ctx context.Context, cl *ConfigLoad) error
TreeShow(ctx context.Context, config *ConfigShowConfig) (ConfigShowInterface, error)
TreeValidate(ctx context.Context) (types.ValidationResults, *types.ValidationStats, error)
TreeBlame(ctx context.Context, cb *ConfigBlameParams) (*sdcpb.BlameTreeElement, error)
}
type SchemaLoadConfig ¶
type SchemaLoadConfig struct {
Schema []byte `json:"schema,omitempty" yaml:"schema,omitempty"`
}
func NewSchemaLoadConfig ¶
func NewSchemaLoadConfig() *SchemaLoadConfig
func (*SchemaLoadConfig) GetSchema ¶
func (s *SchemaLoadConfig) GetSchema() []byte
func (*SchemaLoadConfig) Run ¶
func (s *SchemaLoadConfig) Run(ctx context.Context, cde Executor) (interfaces.Output, error)
func (*SchemaLoadConfig) SetSchema ¶
func (s *SchemaLoadConfig) SetSchema(schema []byte) *SchemaLoadConfig
func (*SchemaLoadConfig) String ¶
func (s *SchemaLoadConfig) String() string
Click to show internal directories.
Click to hide internal directories.