nixos

package
v0.0.0-...-457f07e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NKey string
	Conn *nats.Conn
)

Functions

func DeployActionStrings

func DeployActionStrings() []string

DeployActionStrings returns a slice of all String values of the enum

func Init

func Init(ctx context.Context) (err error)

Types

type DeployAction

type DeployAction int
const (
	Switch DeployAction = iota
	Boot
	Test
	DryActivate
)

func DeployActionString

func DeployActionString(s string) (DeployAction, error)

DeployActionString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func DeployActionValues

func DeployActionValues() []DeployAction

DeployActionValues returns all values of the enum

func (DeployAction) IsADeployAction

func (i DeployAction) IsADeployAction() bool

IsADeployAction returns "true" if the value is listed in the enum definition. "false" otherwise

func (DeployAction) MarshalJSON

func (i DeployAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for DeployAction

func (DeployAction) String

func (i DeployAction) String() string

func (*DeployAction) UnmarshalJSON

func (i *DeployAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DeployAction

type DeployRequest

type DeployRequest struct {
	Action  DeployAction `json:"action"`
	Closure string       `json:"closure"`
}

type DeployResponse

type DeployResponse struct {
	Id   string `json:"id"`
	Logs string `json:"logs"`
}

func DeployWithContext

func DeployWithContext(ctx context.Context, conn *nats.EncodedConn, nkey string, req DeployRequest) (resp DeployResponse, err error)

type DeployResult

type DeployResult struct {
	Success bool `json:"success"`
}

Jump to

Keyboard shortcuts

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