v1beta1

package
v0.0.0-...-bda016d Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJECT_TYPE_OBJECT    ObjectType  = "object"
	OBJECT_TYPE_KEY_VALUE ObjectType  = "keyValue"
	ContentTypeJSON       ContentType = "application/json"

	DEFAULT_CHUNKSIZE   int = 4096
	DEFAULT_BTREE_ORDER int = 4

	SS_CONT            int = 0x00
	SS_FIN             int = 0x01
	SS_APPEND          int = 0x02
	SS_RANDWR          int = 0x04
	SS_KV              int = 0x08
	SS_STAT            int = 0x10
	CCOW_O_REPLACE     int = 0x01
	CCOW_O_CREATE      int = 0x02
	BYTE_BUFFER        int = 16 * 1024
	DEFAULT_EDGEX_PORT int = 3000
)

Variables

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	XMLName      xml.Name `xml:"Bucket"`
	CreationDate string   `xml:"CreationDate"`
	Name         string   `xml:"Name"`
}

Bucket structure

type Buckets

type Buckets struct {
	XMLName xml.Name `xml:"Buckets"`
	Buckets []Bucket `xml:"Bucket"`
}

Buckets - array of Buckets

type ContentType

type ContentType string

type ListAllMyBucketsResult

type ListAllMyBucketsResult struct {
	XMLName xml.Name `xml:"ListAllMyBucketsResult"`
	Buckets Buckets  `xml:"Buckets"`
}

ListAllMyBucketsResult - bucket list structure

type ListBucketResult

type ListBucketResult struct {
	XMLName xml.Name `xml:"ListBucketResult"`
	Objects []Object `xml:"Contents"`
}

ListBucketResult - bucket list structure

type Object

type Object struct {
	XMLName      xml.Name `xml:"Contents"`
	Key          string   `xml:"Key"`
	LastModified string   `xml:"LastModified"`
	Size         int      `xml:"Size"`
}

Object - object structure

type ObjectCreationOptions

type ObjectCreationOptions struct {
	ObjectType  ObjectType
	ContentType ContentType
	ChunkSize   int
	BTreeOrder  int
}

type ObjectStream

type ObjectStream interface {
	io.Reader
	io.Writer
	io.Seeker
	io.Closer
}

type ObjectType

type ObjectType string

type S3xClient

type S3xClient interface {

	// Lists all buckets in system
	BucketList() ([]Bucket, error)

	// Bucket related operations
	BucketHead(bucket string) error
	BucketCreate(bucket string) error
	BucketDelete(bucket string) error

	// Lists all objects for specifuc bucket
	ObjectList(bucket, from, pattern string, maxcount int) ([]Object, error)

	// KeyValue Object related operations
	ObjectHead(bucket, object string) error
	ObjectCreate(bucket, object string, objectType ObjectType, contentType string, chunkSize int, btreeOrder int) error
	ObjectGetStream(bucket, object string) (ObjectStream, error)
	ObjectDelete(bucket, object string) error

	// Single key operations
	KeyValueGet(bucket, object, key string) (string, error)
	KeyValuePost(bucket, object, key string, value *bytes.Buffer, contentType string, more bool) error
	KeyValueDelete(bucket, object, key string, more bool) error

	// Massive key/value operations
	KeyValueMapPost(bucket, object string, values S3xKVMap, more bool) error
	KeyValueMapDelete(bucket, object string, values S3xKVMap, more bool) error
	KeyValuePostJSON(bucket, object, values string, more bool) error
	KeyValuePostCSV(bucket, object, values string, more bool) error
	KeyValueDeleteJSON(bucket, object, keyValueJSON string, more bool) error

	// Object's key/value list
	KeyValueList(bucket, object, from, pattern, contentType string, maxcount int, values bool) (string, error)

	// Transactional methods
	KeyValueCommit(bucket string, object string) error
	KeyValueRollback(bucket string, object string) error
}

type S3xKVMap

type S3xKVMap map[string]interface{}

Jump to

Keyboard shortcuts

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