Documentation ¶
Index ¶
- Variables
- func GenGenericOssReleasePrefixKey(prefix, project, workspace string) string
- func GenReleaseDirPath(dir, project, workspace string) string
- func GenReleasePrefixKeyWithPath(prefix, path string) string
- type LocalStorage
- func (s *LocalStorage) Create(r *v1.Release) error
- func (s *LocalStorage) Get(revision uint64) (*v1.Release, error)
- func (s *LocalStorage) GetLatestRevision() uint64
- func (s *LocalStorage) GetRevisions() []uint64
- func (s *LocalStorage) GetStackBoundRevisions(stack string) []uint64
- func (s *LocalStorage) Update(r *v1.Release) error
- type OssStorage
- func (s *OssStorage) Create(r *v1.Release) error
- func (s *OssStorage) Get(revision uint64) (*v1.Release, error)
- func (s *OssStorage) GetLatestRevision() uint64
- func (s *OssStorage) GetRevisions() []uint64
- func (s *OssStorage) GetStackBoundRevisions(stack string) []uint64
- func (s *OssStorage) Update(r *v1.Release) error
- type S3Storage
- func (s *S3Storage) Create(r *v1.Release) error
- func (s *S3Storage) Get(revision uint64) (*v1.Release, error)
- func (s *S3Storage) GetLatestRevision() uint64
- func (s *S3Storage) GetRevisions() []uint64
- func (s *S3Storage) GetStackBoundRevisions(stack string) []uint64
- func (s *S3Storage) Update(r *v1.Release) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrReleaseNotExist = errors.New("release does not exist") ErrReleaseAlreadyExist = errors.New("release has already existed") )
Functions ¶
func GenGenericOssReleasePrefixKey ¶
GenGenericOssReleasePrefixKey generates generic oss release prefix, which is use for OssStorage and S3Storage.
func GenReleaseDirPath ¶
GenReleaseDirPath generates the release dir path, which is used for LocalStorage.
func GenReleasePrefixKeyWithPath ¶ added in v0.13.0
GenReleasePrefixKeyWithPath generates oss state file key with cloud and env instead of workspace, which is use for OssStorage and S3Storage.
Types ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
LocalStorage is an implementation of release.Storage which uses local filesystem as storage.
func NewLocalStorage ¶
func NewLocalStorage(path string) (*LocalStorage, error)
NewLocalStorage news local release storage, and derives metadata.
func (*LocalStorage) GetLatestRevision ¶
func (s *LocalStorage) GetLatestRevision() uint64
func (*LocalStorage) GetRevisions ¶
func (s *LocalStorage) GetRevisions() []uint64
func (*LocalStorage) GetStackBoundRevisions ¶
func (s *LocalStorage) GetStackBoundRevisions(stack string) []uint64
type OssStorage ¶
type OssStorage struct {
// contains filtered or unexported fields
}
OssStorage is an implementation of release.Storage which uses oss as storage.
func NewOssStorage ¶
func NewOssStorage(bucket *oss.Bucket, prefix string) (*OssStorage, error)
NewOssStorage news oss release storage, and derives metadata.
func (*OssStorage) GetLatestRevision ¶
func (s *OssStorage) GetLatestRevision() uint64
func (*OssStorage) GetRevisions ¶
func (s *OssStorage) GetRevisions() []uint64
func (*OssStorage) GetStackBoundRevisions ¶
func (s *OssStorage) GetStackBoundRevisions(stack string) []uint64
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage is an implementation of release.Storage which uses s3 as storage.
func NewS3Storage ¶
NewS3Storage news s3 release storage, and derives metadata.