commonv1

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 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                 `json:"synced,omitempty" yaml:"synced,omitempty"`
	Drifted  bool                 `json:"drifted,omitempty" yaml:"drifted,omitempty"`
	Missing  bool                 `json:"missing,omitempty" yaml:"missing,omitempty"`
	NotOwner bool                 `json:"notOwner,omitempty" yaml:"notOwner,omitempty"`
	Error    bool                 `json:"error,omitempty" yaml:"error,omitempty"`
	State    string               `json:"state,omitempty" yaml:"state,omitempty"`
	Messages []Message            `json:"messages,omitempty" yaml:"messages,omitempty"`
	Commit   plumbing.Hash        `json:"commit,omitempty" yaml:"commit,omitempty"`
	Changes  []jsondiff.Operation `json:"changes,omitempty" yaml:"changes,omitempty"`
	LastSync time.Time            `json:"lastSync,omitempty" yaml:"lastSync,omitempty"`
}

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    `json:"category,omitempty" yaml:"category,omitempty"`
	Message   string    `json:"message,omitempty" yaml:"message,omitempty"`
	Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}

type Meta added in v0.0.137

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

func (*Meta) DeleteLabel added in v0.1.56

func (m *Meta) DeleteLabel(key string)

func (*Meta) GetGroup added in v0.1.56

func (m *Meta) GetGroup() string

func (*Meta) GetLabel added in v0.1.56

func (m *Meta) GetLabel(key string) (string, bool)

func (*Meta) GetLabels added in v0.1.56

func (m *Meta) GetLabels() map[string]string

func (*Meta) GetName added in v0.1.56

func (m *Meta) GetName() string

func (*Meta) GetRuntime added in v0.1.56

func (m *Meta) GetRuntime() *Runtime

func (*Meta) SetGroup added in v0.1.56

func (m *Meta) SetGroup(group string)

func (*Meta) SetLabel added in v0.1.56

func (m *Meta) SetLabel(key, value string)

func (*Meta) SetLabels added in v0.1.56

func (m *Meta) SetLabels(labels map[string]string)

func (*Meta) SetName added in v0.1.56

func (m *Meta) SetName(name string)

func (*Meta) SetRuntime added in v0.1.56

func (m *Meta) SetRuntime(runtime *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 `json:"kind,omitempty" yaml:"kind,omitempty"`
	Group string `json:"group,omitempty" yaml:"group,omitempty"`
	Name  string `json:"name,omitempty" yaml:"name,omitempty"`
}

func (*Owner) GetGroup added in v0.1.56

func (o *Owner) GetGroup() string

func (*Owner) GetKind added in v0.1.56

func (o *Owner) GetKind() string

func (*Owner) GetName added in v0.1.56

func (o *Owner) GetName() string

func (*Owner) IsEmpty

func (o *Owner) IsEmpty() bool

func (*Owner) IsEqual

func (o *Owner) IsEqual(cmp *Owner) bool

func (*Owner) SetGroup added in v0.1.56

func (o *Owner) SetGroup(group string)

func (*Owner) SetKind added in v0.1.56

func (o *Owner) SetKind(kind string)

func (*Owner) SetName added in v0.1.56

func (o *Owner) SetName(name string)

type Runtime

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

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       `json:"gitops,omitempty" yaml:"gitops,omitempty"`
	Options []*Opts       `json:"options,omitempty" yaml:"options,omitempty"`
	Lock    *sync.RWMutex `json:"-" yaml:"-"`
}

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