framework

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Metrics bool
	Chain   string
	Data    *FieldData
}

type Field

type Field struct {
	Type Type

	// Required specifies if the field is required
	Required bool

	// Default value for the field
	Default interface{}

	// ForceNew signals whether a change in this field requires a restart
	ForceNew bool

	// Description of the field
	Description string

	// AllowedValues is the list of allowed values for the field
	AllowedValues []interface{}
}

Field is a field in a record

func (*Field) DefaultOrZero

func (s *Field) DefaultOrZero() interface{}

type FieldData

type FieldData struct {
	Raw    map[string]interface{}
	Schema map[string]*Field
}

func (*FieldData) Get

func (d *FieldData) Get(k string) interface{}

func (*FieldData) GetOk

func (d *FieldData) GetOk(k string) (interface{}, bool)

func (*FieldData) GetOkErr

func (d *FieldData) GetOkErr(k string) (interface{}, bool, error)

func (*FieldData) GetString

func (d *FieldData) GetString(k string) string

func (*FieldData) Validate

func (d *FieldData) Validate() error

type Framework

type Framework interface {
	Config() map[string]*Field
	Chains() []string
	Generate(config *Config) map[string]*proto.Task
}

type TestingFramework

type TestingFramework struct {
	F Framework
}

func (*TestingFramework) ImageExists

func (tf *TestingFramework) ImageExists(t *testing.T)

ImageTest tests that the images are correct and exist in the framework

type Type

type Type int
const (
	TypeInvalid Type = iota
	TypeString
	TypeBool
)

func (Type) String

func (t Type) String() string

func (Type) Zero

func (t Type) Zero() interface{}

Jump to

Keyboard shortcuts

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