implementation

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const HTTP_AUTH_TYPE string = "http"
View Source
const POLLING_INTERVAL_ERROR = "latest changes not pulled - waiting for interval"
View Source
const SSH_AUTH_TYPE string = "ssh"

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

type AuthInternal

type AuthInternal struct {
	CertKey  *CertKey  `json:"-"`
	HttpAuth *HttpAuth `json:"-"`
}

type AuthType

type AuthType struct {
	AuthType string
}

type CertKey

type CertKey struct {
	Certificate        string `json:"certificate"`
	PublicKey          string `json:"publicKey"`
	PrivateKey         string `json:"privateKey"`
	PrivateKeyPassword string `json:"privateKeyPassword"`
	KeyStore           string `json:"keystore"`
	KeyStorePassword   string `json:"keyStorePassword"`
	CertStore          string `json:"certstore"`
	CertStorePassword  string `json:"certstorePassword"`
	Definition         v1.CertKeyDefinition
}

type Event

type Event struct {
	Event string
}

type Gitops

type Gitops struct {
	RepoURL         string
	Revision        string
	DirectoryPath   string
	PoolingInterval string
	LastPoll        time.Time
	ForcePoll       bool
	AutomaticSync   bool
	ManualSync      bool
	Commit          *object.Commit
	Path            string
	Status          *status.Status
	Auth            *Auth
	AuthInternal    *AuthInternal `json:"-"`
	API             string
	Context         string
	Definition      *v1.GitopsDefinition
}

func New

func New(gitopsObj *v1.GitopsDefinition) *Gitops

func (*Gitops) CloneOrPull

func (gitops *Gitops) CloneOrPull(auth transport.AuthMethod) error

func (*Gitops) Definitions

func (gitops *Gitops) Definitions(relations *relations.RelationRegistry) ([]map[string]string, error)

func (*Gitops) Drift

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

func (*Gitops) GetAuth

func (gitops *Gitops) GetAuth() (transport.AuthMethod, error)

func (*Gitops) Prepare

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

func (*Gitops) Sync

func (gitops *Gitops) Sync(logger *zap.Logger, client *client.Http, user *authentication.User, definitionsOrdered []map[string]string) error

type HttpAuth

type HttpAuth struct {
	Username   string
	Password   string
	Definition v1.HttpAuthDefinition
}

Jump to

Keyboard shortcuts

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