storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: GPL-3.0, Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TencentCosAddr = cutil.HexToAddress("0000000000000000000000000000000000011110")

Functions

func CosExecute

func CosExecute(cos *TencentCosContract, input []byte) ([]byte, error)

execute the cos contract

Types

type ObjectMeta

type ObjectMeta struct {
	ETag          string
	VersionId     string
	EncryptionAlg string
}

ObjectMeta object meta info

type RespError

type RespError struct {
	Code      string `xml:"Code"`
	Message   string `xml:"Message"`
	Resource  string `xml:"Resource"`
	RequestId string `xml:"RequestId"`
	TraceId   string `xml:"TraceId"`
}

Cos response error

type TencentCosContract

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

TencentCosContract `tencent cloud object storage` system contract

func NewTencentCosContract

func NewTencentCosContract(rw *buffer.SystemBufferReadWriterCloser) *TencentCosContract

create a new instance

func (*TencentCosContract) Address

func (this *TencentCosContract) Address() types.Address

func (*TencentCosContract) GetObject

func (this *TencentCosContract) GetObject(rawurl, name string) (types.Address, error)

GetObject download an object from the cloud server to `sysBufferRW`

func (*TencentCosContract) PutObject

func (this *TencentCosContract) PutObject(rawurl, name string) (*ObjectMeta, error)

PutObject upload an object(stored in `sysBufferRW`) to cloud server

Jump to

Keyboard shortcuts

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