storages

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectStoreSpecFileKey

func GetObjectStoreSpecFileKey(prefix, project, stack, workspace string) string

GetObjectStoreSpecFileKey returns the object storage key, which is use for OssStorage and S3Storage.

func GetSpecFilePath

func GetSpecFilePath(dir, project, stack, workspace string) string

GetSpecFilePath returns the location on the disk where the Spec data should be present

Types

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage(path string) *LocalStorage

NewLocalStorage constructs a local filesystem based spec storage.

func (*LocalStorage) Apply

func (s *LocalStorage) Apply(state *v1.Intent) error

Apply updates the spec if already exists, or create a new spec.

func (*LocalStorage) Get

func (s *LocalStorage) Get() (*v1.Intent, error)

Get returns the Spec, if the Spec does not exist, return nil.

type OssStorage

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

func NewOssStorage

func NewOssStorage(bucket *oss.Bucket, key string) *OssStorage

NewOssStorage constructs an Aliyun OSS based spec storage.

func (*OssStorage) Apply

func (s *OssStorage) Apply(intent *v1.Intent) error

Apply updates the spec if already exists, or create a new spec.

func (*OssStorage) Get

func (s *OssStorage) Get() (*v1.Intent, error)

Get returns the Spec, if the Spec does not exist, return nil.

type S3Storage

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

func NewS3Storage

func NewS3Storage(s3 *s3.S3, bucket, key string) *S3Storage

NewS3Storage constructs an AWS S3 based spec storage.

func (*S3Storage) Apply

func (s *S3Storage) Apply(intent *v1.Intent) error

Apply updates the spec if already exists, or create a new spec.

func (*S3Storage) Get

func (s *S3Storage) Get() (*v1.Intent, error)

Get returns the Spec, if the Spec does not exist, return nil.

Jump to

Keyboard shortcuts

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