storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFile        string = "run.log"
	PlanBinFile    string = "plan.bin"
	PlanJsonFile   string = "plan.json"
	PrettyPlanFile string = "pretty.plan"
	ShortDiffFile  string = "short.diff"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Backend StorageBackend
	Config  config.Config
}

func New

func New(config config.Config) Storage

func (*Storage) GetAttempts

func (s *Storage) GetAttempts(namespace string, layer string, run string) (int, error)

func (*Storage) GetLatestLogs

func (s *Storage) GetLatestLogs(namespace string, layer string, run string) ([]byte, error)

func (*Storage) GetLatestPlan

func (s *Storage) GetLatestPlan(namespace string, layer string, run string, format string) ([]byte, error)

func (*Storage) GetLogs

func (s *Storage) GetLogs(namespace string, layer string, run string, attempt string) ([]byte, error)

func (*Storage) GetPlan

func (s *Storage) GetPlan(namespace string, layer string, run string, attempt string, format string) ([]byte, error)

func (*Storage) PutLogs

func (s *Storage) PutLogs(namespace string, layer string, run string, attempt string, logs []byte) error

func (*Storage) PutPlan

func (s *Storage) PutPlan(namespace string, layer string, run string, attempt string, format string, plan []byte) error

type StorageBackend

type StorageBackend interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte, ttl int) error
	Delete(key string) error
	List(prefix string) ([]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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