models

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ADD     Action = "add"
	REPLACE Action = "replace"
	REMOVE  Action = "remove"
	UPSERT  Action = "upsert"
)

type Arg

type Arg struct {
	RuleOperation
	Payload *ArgModel `json:"payload"`
}

type ArgModel

type ArgModel struct {
	Key      string      `json:"key"`
	Value    *ValueModel `json:"value"`
	Options  Options     `json:"options"`
	Section  *int        `json:"section,omitempty"`
	Category Category    `json:"category" default:"arg"`
}

type Args

type Args []*Arg

func (*Args) Merge

func (args *Args) Merge(newArgs []*Arg)

type Category

type Category string
const (
	ARG Category = "arg"
	ENV Category = "env"
	VAR Category = "var"
)

type Config

type Config struct {
	Operations map[NodeType]*RuleOperationCollection `json:"operations"`
}

type Env

type Env struct {
	RuleOperation
	Payload EnvModel `json:"payload"`
}

type EnvModel

type EnvModel struct {
	Key      string      `json:"key"`
	Value    *ValueModel `json:"value"`
	Options  Options     `json:"options"`
	Category Category    `json:"category" default:"env"`
}

type Envs

type Envs []*Env

func (*Envs) Merge

func (envs *Envs) Merge(newEnvs []*Env)

type FileTypeValue

type FileTypeValue struct {
	Source      *string `json:"source"`
	Destination string  `json:"destination"`
}

type Metadata

type Metadata struct {
	Chainspec    *string `json:"chainspec"`
	ImageVersion *string `json:"imageVersion"`
}

type NodeType

type NodeType string
const (
	Full      NodeType = "full"
	Validator NodeType = "validator"
	Collator  NodeType = "collator"
	Archive   NodeType = "archive"
	Light     NodeType = "light"
)

type Options

type Options struct {
	Overwritable bool `json:"overwritable"`
}

type RuleOperation

type RuleOperation struct {
	Action Action `json:"action"`
}

type RuleOperationCollection

type RuleOperationCollection struct {
	Arg Args `json:"arg"`
	Var Vars `json:"var"`
	Env Envs `json:"env"`
}

type RuleValueInputType

type RuleValueInputType string
const (
	Variable RuleValueInputType = "variable"
	Template RuleValueInputType = "template"
)

type ValueModel

type ValueModel struct {
	Payload   interface{}        `json:"payload"`
	InputType RuleValueInputType `json:"inputType"`
}

type Var

type Var struct {
	RuleOperation
	Payload *VarModel `json:"payload"`
}

type VarModel

type VarModel struct {
	Key      string    `json:"key"`
	Value    *VarValue `json:"value"`
	Options  Options   `json:"options"`
	Category Category  `json:"category" default:"var"`
}

type VarValue

type VarValue struct {
	Payload   interface{}  `json:"payload"`
	ValueType VarValueType `json:"valueType"`
}

type VarValueType

type VarValueType string
const (
	String      VarValueType = "string"
	StringArray VarValueType = "array"
	Empty       VarValueType = "empty"
	File        VarValueType = "file"
)

type Vars

type Vars []*Var

func (*Vars) Merge

func (vars *Vars) Merge(newVars []*Var)

Jump to

Keyboard shortcuts

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