implementation

package
v0.1.61 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: GPL-3.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	CertKeyRef  *v1.GitopsCertKeyRef
	HttpAuthRef *v1.GitopsHttpauthRef
}

type Commit added in v0.1.56

type Commit struct {
	Format  iformat.Format
	Patch   []byte
	Message string
	Clone   *definitions.Definition
}

func NewCommit added in v0.1.56

func NewCommit() *Commit

func (*Commit) ApplyPatch added in v0.1.56

func (c *Commit) ApplyPatch(definition idefinitions.IDefinition) ([]byte, error)

func (*Commit) FromJson added in v0.1.56

func (c *Commit) FromJson(data []byte) error

func (*Commit) GenerateClone added in v0.1.56

func (c *Commit) GenerateClone() error

func (*Commit) Parse added in v0.1.56

func (c *Commit) Parse(format string, spec string) error

func (*Commit) ToJson added in v0.1.56

func (c *Commit) ToJson() ([]byte, error)

func (*Commit) UnmarshalJSON added in v0.1.56

func (c *Commit) UnmarshalJSON(data []byte) error

func (*Commit) WriteFile added in v0.1.56

func (c *Commit) WriteFile(path string, bytes []byte) error

type FileKind added in v0.0.114

type FileKind struct {
	File string
	Kind string
}

type FilePath added in v0.1.56

type FilePath struct {
	Absolute string
	Relative string
}

type Gitops

type Gitops struct {
	Gitops     *GitopsInternal
	Definition *v1.GitopsDefinition
}

func New

func New(definition *v1.GitopsDefinition, config *configuration.Configuration) (*Gitops, error)

func (*Gitops) Commit

func (gitops *Gitops) Commit(logger *zap.Logger, client *clients.Http, user *authentication.User, commit *Commit) error

func (*Gitops) Drift

func (gitops *Gitops) Drift(client *clients.Http, user *authentication.User) (bool, []error)

func (*Gitops) GetAutoSync added in v0.1.56

func (gitops *Gitops) GetAutoSync() bool

func (*Gitops) GetCommit added in v0.1.56

func (gitops *Gitops) GetCommit() *object.Commit

func (*Gitops) GetDefinition added in v0.1.30

func (gitops *Gitops) GetDefinition() idefinitions.IDefinition

func (*Gitops) GetDirectory added in v0.1.56

func (gitops *Gitops) GetDirectory() string

func (*Gitops) GetFilePath added in v0.1.56

func (gitops *Gitops) GetFilePath(file string) (*FilePath, error)

func (*Gitops) GetForceClone added in v0.1.56

func (gitops *Gitops) GetForceClone() bool

func (*Gitops) GetForceSync added in v0.1.56

func (gitops *Gitops) GetForceSync() bool

func (*Gitops) GetGit added in v0.1.56

func (gitops *Gitops) GetGit() *internal.Git

func (*Gitops) GetGroup added in v0.0.128

func (gitops *Gitops) GetGroup() string

func (*Gitops) GetGroupIdentifier added in v0.0.128

func (gitops *Gitops) GetGroupIdentifier() string

func (*Gitops) GetName added in v0.0.128

func (gitops *Gitops) GetName() string

func (*Gitops) GetPack added in v0.1.56

func (gitops *Gitops) GetPack() *packer.Pack

func (*Gitops) GetQueue added in v0.1.56

func (gitops *Gitops) GetQueue() *QueueTS

func (*Gitops) GetStatus added in v0.1.26

func (gitops *Gitops) GetStatus() *status.Status

func (*Gitops) Prepare

func (gitops *Gitops) Prepare(client *clients.Http, user *authentication.User) error

func (*Gitops) SetCommit added in v0.1.56

func (gitops *Gitops) SetCommit(commit *object.Commit, err error) error

func (*Gitops) SetForceClone added in v0.1.56

func (gitops *Gitops) SetForceClone(value bool)

func (*Gitops) SetForceSync added in v0.1.56

func (gitops *Gitops) SetForceSync(value bool)

func (*Gitops) SetPack added in v0.1.56

func (gitops *Gitops) SetPack(pack *packer.Pack, err error) error

func (*Gitops) ShouldSync added in v0.1.26

func (gitops *Gitops) ShouldSync() bool

func (*Gitops) Sync

func (gitops *Gitops) Sync(logger *zap.Logger, client *clients.Http, user *authentication.User) ([]*common.Request, []error)

func (*Gitops) SyncState added in v0.1.35

func (gitops *Gitops) SyncState(logger *zap.Logger, client *clients.Http, user *authentication.User) ([]*common.Request, []error)

func (*Gitops) ToJSON added in v0.1.42

func (gitops *Gitops) ToJSON() ([]byte, error)

func (*Gitops) Update added in v0.1.30

func (gitops *Gitops) Update(pack *packer.Pack) error

type GitopsInternal added in v0.1.56

type GitopsInternal struct {
	Git             *internal.Git
	Node            *node.Node
	Group           string
	Name            string
	PatchQueue      *QueueTS
	LogPath         string
	DirectoryPath   string
	PoolingInterval time.Duration
	LastPoll        time.Time
	ForceClone      bool
	AutomaticSync   bool
	ForceSync       bool
	Commit          *object.Commit
	Status          *status.Status
	Auth            *Auth

	Pack  *packer.Pack
	Ghost bool
	// contains filtered or unexported fields
}

type QueueTS added in v0.1.56

type QueueTS struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewQueueTS added in v0.1.56

func NewQueueTS() *QueueTS

func (*QueueTS) GetSnapshot added in v0.1.56

func (s *QueueTS) GetSnapshot() []*Commit

func (*QueueTS) Insert added in v0.1.56

func (s *QueueTS) Insert(value *Commit)

func (*QueueTS) IsEmpty added in v0.1.56

func (s *QueueTS) IsEmpty() bool

func (*QueueTS) Peek added in v0.1.56

func (s *QueueTS) Peek() *Commit

func (*QueueTS) Pop added in v0.1.56

func (s *QueueTS) Pop() *Commit

func (*QueueTS) Size added in v0.1.56

func (s *QueueTS) Size() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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