storages

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenGenericOssReleasePrefixKey

func GenGenericOssReleasePrefixKey(prefix string) string

GenGenericOssReleasePrefixKey generates generic oss release prefix, which is use for OssStorage and S3Storage.

func GenProjectDirPath

func GenProjectDirPath(dir string) string

GenProjectDirPath returns the project dir path, which is used for LocalStorage.

Types

type LocalStorage

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

LocalStorage is an implementation of graph.Storage which uses local filesystem as storage.

func NewLocalStorage

func NewLocalStorage(path string) *LocalStorage

NewLocalStorage creates a new LocalStorage instance.

func (*LocalStorage) Get

func (s *LocalStorage) Get() (map[string][]string, error)

Get returns a project map which key is workspace name and value is its belonged project list.

type OssStorage

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

OssStorage is an implementation of project.Storage which uses oss as storage.

func NewOssStorage

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

NewOssStorage creates a new OssStorage instance.

func (*OssStorage) Get

func (s *OssStorage) Get() (map[string][]string, error)

Get returns a project map which key is workspace name and value is its belonged project list.

type S3Storage

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

S3Storage is an implementation of graph.Storage which uses s3 as storage.

func NewS3Storage

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

NewS3Storage creates a new S3Storage instance.

func (*S3Storage) Get

func (s *S3Storage) Get() (map[string][]string, error)

Get returns a project map which key is workspace name and value is its belonged project list.

Jump to

Keyboard shortcuts

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