store

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFSStore added in v1.0.10

type CFSStore struct {
	MountPath string
	StoreDir  string
}

CFSStore implements the Store interface for CFS (Cloud File System)

func (*CFSStore) Upload added in v1.0.10

func (cs *CFSStore) Upload(ctx context.Context, path string) (downloadurl string, err error)

Upload uploads the corefile to the CFS mount point Returns the local file path (since CFS is a mounted filesystem)

type S3Store

type S3Store struct {
	Region          string
	AccesskeyID     string
	SecretAccessKey string
	Bucket          string
	StoreDir        string
	Endpoint        string

	PresignExpire time.Duration
	// contains filtered or unexported fields
}

func (*S3Store) Upload

func (ss *S3Store) Upload(ctx context.Context, path string) (downloadurl string, err error)

type Store

type Store interface {
	Upload(ctx context.Context, filepath string) (downloadurl string, err error)
}

func NewCFSStore added in v1.0.10

func NewCFSStore(mountPath, storedir string) (Store, error)

NewCFSStore creates a new CFS store instance

func NewS3Store

func NewS3Store(region, akid, aksecret, bucket, endpoint, storedir string, presignExpire int) (Store, error)

func NewStore added in v1.0.10

func NewStore(protocol, region, akid, aksecret, bucket, endpoint, cfsMountPath, storedir string, presignExpire int) (Store, error)

NewStore creates a Store instance based on the protocol protocol: "s3" for S3/COS, "cfs" for CFS

Jump to

Keyboard shortcuts

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