commonv1

package
v0.1.49 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GITOPS_DRIFTED = "drifted"
View Source
var GITOPS_ERROR = "error"
View Source
var GITOPS_MISSING = "missing"
View Source
var GITOPS_NOTOWNER = "notowner"
View Source
var GITOPS_SYNCED = "synced"

Functions

This section is empty.

Types

type Gitops added in v0.1.30

type Gitops struct {
	Synced   bool
	Drifted  bool
	Missing  bool
	NotOwner bool
	Error    bool
	State    string
	Messages []Message
	Commit   plumbing.Hash
	Changes  []jsondiff.Operation
	LastSync time.Time
}

func (*Gitops) AddError added in v0.1.31

func (g *Gitops) AddError(err error)

func (*Gitops) AddMessage added in v0.1.31

func (g *Gitops) AddMessage(category string, message string)

func (*Gitops) Clean added in v0.1.30

func (g *Gitops) Clean()

func (*Gitops) Set added in v0.1.30

func (g *Gitops) Set(state string, value bool)

type Message added in v0.1.31

type Message struct {
	Category  string
	Message   string
	Timestamp time.Time
}

type Meta added in v0.0.137

type Meta struct {
	Group   string            `json:"group" validate:"required"`
	Name    string            `json:"name" validate:"required"`
	Labels  map[string]string `json:"labels,omitempty"`
	Runtime *Runtime          `json:"runtime"`
}

type Opts added in v0.0.137

type Opts struct {
	Name  string
	Value string
}

func (*Opts) IsEmpty added in v0.0.137

func (opt *Opts) IsEmpty() bool

type Owner

type Owner struct {
	Kind  string
	Group string
	Name  string
}

func (Owner) IsEmpty

func (owner Owner) IsEmpty() bool

func (Owner) IsEqual

func (owner Owner) IsEqual(o Owner) bool

type Runtime

type Runtime struct {
	Owner    Owner  `json:"owner"`
	Node     uint64 `json:"node"`
	NodeName string `json:"nodeName"`
}

func (*Runtime) GetNode

func (runtime *Runtime) GetNode() uint64

func (*Runtime) GetNodeName added in v0.0.128

func (runtime *Runtime) GetNodeName() string

func (*Runtime) GetOwner

func (runtime *Runtime) GetOwner() Owner

func (*Runtime) SetNode

func (runtime *Runtime) SetNode(node uint64)

func (*Runtime) SetNodeName added in v0.0.128

func (runtime *Runtime) SetNodeName(nodeName string)

func (*Runtime) SetOwner

func (runtime *Runtime) SetOwner(kind string, group string, name string)

type State added in v0.0.137

type State struct {
	Gitops  Gitops
	Options []*Opts
	Lock    *sync.RWMutex `json:"-"`
}

func NewState added in v0.1.40

func NewState() *State

func (*State) AddOpt added in v0.0.137

func (state *State) AddOpt(name string, value string)

func (*State) ClearOpt added in v0.1.31

func (state *State) ClearOpt(name string)

func (*State) GetOpt added in v0.0.137

func (state *State) GetOpt(name string) *Opts

Jump to

Keyboard shortcuts

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