obs

package
v1.8.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 10 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

This section is empty.

Types

type HuaweiOBS

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

func NewHuaweiOBS

func NewHuaweiOBS(logger logger.Logger) *HuaweiOBS

NewHuaweiOBS returns a new Huawei OBS instance.

func (*HuaweiOBS) Init

func (o *HuaweiOBS) Init(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(input *obs.PutObjectInput) (output *obs.PutObjectOutput, err error)
	PutFile(input *obs.PutFileInput) (output *obs.PutObjectOutput, err error)
	GetObject(input *obs.GetObjectInput) (output *obs.GetObjectOutput, err error)
	DeleteObject(input *obs.DeleteObjectInput) (output *obs.DeleteObjectOutput, err error)
	ListObjects(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(input *obs.DeleteObjectInput) (output *obs.DeleteObjectOutput, err error)

func (*HuaweiOBSService) GetObject

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

func (*HuaweiOBSService) ListObjects

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

func (*HuaweiOBSService) PutFile

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

func (*HuaweiOBSService) PutObject

func (s *HuaweiOBSService) PutObject(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