updater

package
v0.0.0-...-13c9884 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputChanges

func OutputChanges(cs *ChangeSet) string

func SplitLines

func SplitLines(s string) []string

Types

type ChangeSet

type ChangeSet struct {
	LastVersion string
	Changes     []CommitData
	Component   *config.ComponentConfig
	Forced      bool
}

func (*ChangeSet) HasChanges

func (cs *ChangeSet) HasChanges() bool

type CommitAuthor

type CommitAuthor struct {
	Name  string
	Email string
	Date  time.Time
}

type CommitData

type CommitData struct {
	Commit    string
	Parents   []string
	Author    CommitAuthor
	Committer CommitAuthor
	Message   string
	Tags      []string
}

type PartialConfig

type PartialConfig struct {
	MachComposer   config.MachComposer      `yaml:"mach_composer"`
	Components     []config.ComponentConfig `yaml:"components"`
	ComponentsNode *yaml.Node
	Sops           yaml.Node `yaml:"sops"`
	// contains filtered or unexported fields
}

func (*PartialConfig) GetComponent

func (c *PartialConfig) GetComponent(name string) *config.ComponentConfig

type PartialRawConfig

type PartialRawConfig struct {
	MachComposer config.MachComposer `yaml:"mach_composer"`
	Components   yaml.Node           `yaml:"components"`
	Sops         yaml.Node           `yaml:"sops"`
}

type UpdateError

type UpdateError struct {
	// contains filtered or unexported fields
}

func (*UpdateError) Error

func (e *UpdateError) Error() string

type UpdateSet

type UpdateSet struct {
	// contains filtered or unexported fields
}

func (*UpdateSet) ChangeLog

func (u *UpdateSet) ChangeLog() string

func (*UpdateSet) ComponentChangeLog

func (u *UpdateSet) ComponentChangeLog(component string) string

func (*UpdateSet) HasChanges

func (u *UpdateSet) HasChanges() bool

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

func NewUpdater

func NewUpdater(ctx context.Context, filename string, useCloud bool) (*Updater, error)

NewUpdater creates an update to update the component versions in a config file.

func (*Updater) GetUpdateSet

func (u *Updater) GetUpdateSet() *UpdateSet

func (*Updater) UpdateAllComponents

func (u *Updater) UpdateAllComponents(ctx context.Context) error

UpdateAllComponents updates all the components in the config file.

func (*Updater) UpdateComponent

func (u *Updater) UpdateComponent(ctx context.Context, name, version string) error

UpdateComponent updates a specific component. When the version is empty it will retrieve the last version for the given component.

func (*Updater) Write

func (u *Updater) Write(ctx context.Context) bool

type WorkerJob

type WorkerJob struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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