obs

package
v1.14.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UploadOperation bindings.OperationKind = "upload"
)

add operations that are not listed under the standard bindings operations.

Variables

This section is empty.

Functions

func NewHuaweiOBS

func NewHuaweiOBS(logger logger.Logger) bindings.OutputBinding

NewHuaweiOBS returns a new Huawei OBS instance.

Types

type HuaweiOBS

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

func (*HuaweiOBS) GetComponentMetadata added in v1.11.0

func (o *HuaweiOBS) GetComponentMetadata() (metadataInfo metadata.MetadataMap)

GetComponentMetadata returns the metadata of the component.

func (*HuaweiOBS) Init

func (o *HuaweiOBS) Init(_ context.Context, metadata bindings.Metadata) error

Init does metadata parsing and connection creation.

func (*HuaweiOBS) Invoke

func (*HuaweiOBS) Operations

func (o *HuaweiOBS) Operations() []bindings.OperationKind

type HuaweiOBSAPI

type HuaweiOBSAPI interface {
	PutObject(ctx context.Context, input *obs.PutObjectInput) (output *obs.PutObjectOutput, err error)
	PutFile(ctx context.Context, input *obs.PutFileInput) (output *obs.PutObjectOutput, err error)
	GetObject(ctx context.Context, input *obs.GetObjectInput) (output *obs.GetObjectOutput, err error)
	DeleteObject(ctx context.Context, input *obs.DeleteObjectInput) (output *obs.DeleteObjectOutput, err error)
	ListObjects(ctx context.Context, input *obs.ListObjectsInput) (output *obs.ListObjectsOutput, err error)
}

HuaweiOBSAPI holds only the necessary API functions from the OBS SDK The interface can also provide a way to implement stubs for the purpose of unit testing.

type HuaweiOBSService

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

HuaweiOBSService is a service layer which wraps the actual OBS SDK client to provide the API functions and it implements the HuaweiOBSAPI through wrapper functions.

func (*HuaweiOBSService) DeleteObject

func (s *HuaweiOBSService) DeleteObject(ctx context.Context, input *obs.DeleteObjectInput) (output *obs.DeleteObjectOutput, err error)

func (*HuaweiOBSService) GetObject

func (s *HuaweiOBSService) GetObject(ctx context.Context, input *obs.GetObjectInput) (output *obs.GetObjectOutput, err error)

func (*HuaweiOBSService) ListObjects

func (s *HuaweiOBSService) ListObjects(ctx context.Context, input *obs.ListObjectsInput) (output *obs.ListObjectsOutput, err error)

func (*HuaweiOBSService) PutFile

func (s *HuaweiOBSService) PutFile(ctx context.Context, input *obs.PutFileInput) (output *obs.PutObjectOutput, err error)

func (*HuaweiOBSService) PutObject

func (s *HuaweiOBSService) PutObject(ctx context.Context, input *obs.PutObjectInput) (output *obs.PutObjectOutput, err error)

Jump to

Keyboard shortcuts

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