oss

package
v3.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOssDirectory

func GetOssDirectory(bucket *oss.Bucket, objectName, path string) error

GetOssDirectory download an OSS "directory" to local path

func IsOssDirectory

func IsOssDirectory(bucket *oss.Bucket, objectName string) (bool, error)

IsDirectory tests if the key is acting like a OSS directory. This just means it has at least one object which is prefixed with the given key

func IsOssErrCode

func IsOssErrCode(err error, code string) bool

IsOssErrCode tests if an err is an oss.ServiceError with the specified code

func ListOssDirectory

func ListOssDirectory(bucket *oss.Bucket, objectKey string) (files []string, err error)

ListOssDirectory lists all the files which are the descendants of the specified objectKey, if a file has suffix '/', then it is an OSS directory

Types

type ArtifactDriver

type ArtifactDriver struct {
	Endpoint      string
	AccessKey     string
	SecretKey     string
	SecurityToken string
}

ArtifactDriver is a driver for OSS

func (*ArtifactDriver) ListObjects

func (ossDriver *ArtifactDriver) ListObjects(artifact *wfv1.Artifact) ([]string, error)

func (*ArtifactDriver) Load

func (ossDriver *ArtifactDriver) Load(inputArtifact *wfv1.Artifact, path string) error

Downloads artifacts from OSS compliant storage, e.g., downloading an artifact into local path

func (*ArtifactDriver) Save

func (ossDriver *ArtifactDriver) Save(path string, outputArtifact *wfv1.Artifact) error

Saves an artifact to OSS compliant storage, e.g., uploading a local file to OSS bucket

Jump to

Keyboard shortcuts

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