ops

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(infra *infrastructure.Metadata) error

Add adds an infrastructure to queue, which can be subsequently pushed using push command

func AddWithDbName added in v0.0.15

func AddWithDbName(infra *infrastructure.Metadata, queueDb string) error

func Cat

Cat gets the infra.json and returns it as bytes

func CatFromStorage

func CatFromStorage(fs billy.Filesystem, args string) ([]*infrastructure.Metadata, error)

CatFromStorage parses the provided argument storage for infrastructure, and returns results

func Push

func Push(cfg config.GlobalConfig) error

Push pushes all the infrastructure from queue

func PushFromStorage

func PushFromStorage(repo *git.Repository, fs billy.Filesystem, infraMetaQueue *infrastructure.MetadataGroup, cfg config.GlobalConfig) error

func PushWithDbQueue added in v0.0.15

func PushWithDbQueue(cfg config.GlobalConfig, queueDB string) error

func Remove

func Remove(cfg config.GlobalConfig, id string) error

func RemoveFromStorage

func RemoveFromStorage(cfg config.GlobalConfig, repo *git.Repository, fs billy.Filesystem, id string) error

func SafePushFromStorage added in v0.0.23

func SafePushFromStorage(repo *git.Repository, fs billy.Filesystem, infraMetaQueue *infrastructure.MetadataGroup, cfg config.GlobalConfig) error

func SafeRemoveFromStorage added in v0.0.13

func SafeRemoveFromStorage(cfg config.GlobalConfig, repo *git.Repository, fs billy.Filesystem, id string) error

func SafeUpsertFromStorage added in v0.0.12

func SafeUpsertFromStorage(cfg config.GlobalConfig, repo *git.Repository, fs billy.Filesystem, infra *infrastructure.Metadata) error

func Upsert

func Upsert(cfg config.GlobalConfig, infra *infrastructure.Metadata) error

Upsert pulls the git repository, adds the infrastructure metadata and pushes the repository back. All processes happen within an im-memory git storage system to minimize moving parts

func UpsertFromStorage

func UpsertFromStorage(cfg config.GlobalConfig, repo *git.Repository, fs billy.Filesystem, infra *infrastructure.Metadata) error

UpsertFromStorage parses the provided argument storage for infrastructure adds the infrastructure metadata and pushes the repository back. All processes happen within an im-memory git storage system to minimize moving parts

Types

type GoCatContext

type GoCatContext struct {
	Repo    *git.Repository
	Storage billy.Filesystem
	Config  config.GlobalConfig
}

Jump to

Keyboard shortcuts

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