node

package
v1.5.0-slog1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleInterface

type ModuleInterface interface {
	RunEnabledScript(string, []string, map[string]string) (bool, error)
	GetName() string
	GetOrder() uint32
	GetPath() string
}

type Node

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

func NewNode

func NewNode() *Node

func (Node) GetModule

func (n Node) GetModule() ModuleInterface

func (Node) GetName

func (n Node) GetName() string

func (Node) GetState

func (n Node) GetState() bool

func (Node) GetType

func (n Node) GetType() NodeType

func (Node) GetUpdatedBy

func (n Node) GetUpdatedBy() string

func (Node) GetWeight

func (n Node) GetWeight() NodeWeight

func (*Node) SetState

func (n *Node) SetState(enabled bool)

func (*Node) SetUpdatedBy

func (n *Node) SetUpdatedBy(updatedBy string)

func (*Node) WithModule

func (n *Node) WithModule(module ModuleInterface) *Node

func (*Node) WithName

func (n *Node) WithName(name string) *Node

func (*Node) WithType

func (n *Node) WithType(typ NodeType) *Node

func (*Node) WithWeight

func (n *Node) WithWeight(order uint32) *Node

type NodeType

type NodeType string
const (
	ModuleType NodeType = "module"
	WeightType NodeType = "weight"
)

type NodeWeight

type NodeWeight uint32

func (NodeWeight) Int

func (weight NodeWeight) Int() int

func (NodeWeight) String

func (weight NodeWeight) String() string

type NodeWeightRange added in v1.5.0

type NodeWeightRange []NodeWeight

func (NodeWeightRange) Len added in v1.5.0

func (r NodeWeightRange) Len() int

func (NodeWeightRange) Less added in v1.5.0

func (r NodeWeightRange) Less(i, j int) bool

func (NodeWeightRange) Swap added in v1.5.0

func (r NodeWeightRange) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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