Documentation ¶
Index ¶
- Constants
- func ArrToCVS(arr ...string) string
- func ArrToJSON(arr ...string) string
- func GVMRPrint(head string, g GVMR)
- func GVMRToCSV(gvm GVMR) string
- func GlobalGetPrepare(opath string) error
- func GlobalGetPrepareInternal(gvm GVMR) error
- func GlobalVMAcquire(opath string) error
- func GlobalVMRelease(opath string) error
- func ObjectGetLocalHeaders(opath string, gvm *GVMR) error
- func SetupS3xClient(obj string) (S3xClient, EdgexTest)
- type Bucket
- type Buckets
- type Edgex
- func (edgex *Edgex) BucketCreate(bucket string) error
- func (edgex *Edgex) BucketDelete(bucket string) error
- func (edgex *Edgex) BucketHead(bucket string) error
- func (edgex *Edgex) BucketList() ([]Bucket, error)
- func (edgex *Edgex) CloseEdgex()
- func (edgex *Edgex) KeyValueCommit(bucket string, object string) error
- func (edgex *Edgex) KeyValueDelete(bucket string, object string, key string, more bool) error
- func (edgex *Edgex) KeyValueDeleteJSON(bucket string, object string, keyValueJSON string, more bool) error
- func (edgex *Edgex) KeyValueGet(bucket string, object string, key string) (string, error)
- func (edgex *Edgex) KeyValueGetInt(bucket string, object string, key string) (string, int)
- func (edgex *Edgex) KeyValueList(bucket string, object string, from string, pattern string, contentType string, ...) (string, error)
- func (edgex *Edgex) KeyValuePost(bucket string, object string, contentType string, key string, ...) error
- func (edgex *Edgex) KeyValuePostCSV(bucket string, object string, keyValueCSV string, more bool) error
- func (edgex *Edgex) KeyValuePostJSON(bucket string, object string, keyValueJSON string, more bool) error
- func (edgex *Edgex) KeyValueRollback(bucket string, object string) error
- func (edgex *Edgex) ObjectCreate(bucket string, object string, objectType string, contentType string, ...) error
- func (edgex *Edgex) ObjectDelete(bucket string, object string) error
- func (edgex *Edgex) ObjectHead(bucket string, object string) error
- func (edgex *Edgex) ObjectList(bucket string, from string, pattern string, maxcount int) ([]Object, error)
- type EdgexTest
- type GVMR
- type ListAllMyBucketsResult
- type ListBucketResult
- type Mockup
- func (mockup *Mockup) BucketCreate(bucket string) error
- func (mockup *Mockup) BucketDelete(bucket string) error
- func (mockup *Mockup) BucketHead(bucket string) error
- func (mockup *Mockup) BucketList() ([]Bucket, error)
- func (mockup *Mockup) CloseEdgex()
- func (mockup *Mockup) KeyValueCommit(bucket string, object string) error
- func (mockup *Mockup) KeyValueDelete(bucket string, object string, key string, more bool) error
- func (mockup *Mockup) KeyValueDeleteJSON(bucket string, object string, keyValueJSON string, more bool) error
- func (mockup *Mockup) KeyValueGet(bucket string, object string, key string) (string, error)
- func (mockup *Mockup) KeyValueGetInt(bucket string, object string, key string) (string, int)
- func (mockup *Mockup) KeyValueList(bucket string, object string, from string, pattern string, contentType string, ...) (string, error)
- func (mockup *Mockup) KeyValuePost(bucket string, object string, contentType string, key string, ...) error
- func (mockup *Mockup) KeyValuePostCSV(bucket string, object string, keyValueCSV string, more bool) error
- func (mockup *Mockup) KeyValuePostJSON(bucket string, object string, keyValueJSON string, more bool) error
- func (mockup *Mockup) KeyValueRollback(bucket string, object string) error
- func (mockup *Mockup) ObjectCreate(bucket string, object string, objectType string, contentType string, ...) error
- func (mockup *Mockup) ObjectDelete(bucket string, object string) error
- func (mockup *Mockup) ObjectHead(bucket string, object string) error
- func (mockup *Mockup) ObjectList(bucket string, from string, pattern string, maxcount int) ([]Object, error)
- type Object
- type S3xClient
Constants ¶
const BYTE_BUFFER int = 16 * 1024
const CCOW_O_CREATE int = 0x02
const CCOW_O_REPLACE int = 0x01
const DEFAULT_BTREE_ORDER int = 4
const DEFAULT_CHUNKSIZE int = 4096
const GVMR_LOCKED int = 1
const GVMR_UNLOCKED int = 0
const OBJECT_TYPE_KEY_VALUE = "keyValue"
const OBJECT_TYPE_OBJECT = "object"
const SS_APPEND int = 0x02
const SS_CONT int = 0x00
const SS_FIN int = 0x01
const SS_KV int = 0x08
const SS_RANDWR int = 0x04
const SS_STAT int = 0x10
Variables ¶
This section is empty.
Functions ¶
func GlobalGetPrepare ¶
func GlobalVMAcquire ¶
GlobalVMAcquire - aquire global VM record lock
func GlobalVMRelease ¶
GlobalVMRelease - release global VM record lock
func ObjectGetLocalHeaders ¶
func SetupS3xClient ¶
SetupS3xClient - setup S3xClient from configuration file
Types ¶
type Bucket ¶
type Bucket struct { XMLName xml.Name `xml:"Bucket"` CreationDate string `xml:"CreationDate"` Name string `xml:"Name"` }
Bucket structure
type Edgex ¶
type Edgex struct { Url string // s3 authentication keys Authkey string Secret string // Current session Bucket string Object string Sid string Debug int }
Edgex - Edgex client structure
func CreateEdgex ¶
CreateEdgex - client structure constructorcd
func (*Edgex) BucketCreate ¶
BucketCreate - create a new bucket
func (*Edgex) BucketDelete ¶
BucketDelete - delete bucket
func (*Edgex) BucketHead ¶
BucketHead - read bucket header fields
func (*Edgex) BucketList ¶
BucketList - read bucket list
func (*Edgex) KeyValueCommit ¶
KeyValueCommit - commit key/value insert/update/delete
func (*Edgex) KeyValueDelete ¶
KeyValueDelete - delete key/value pair
func (*Edgex) KeyValueDeleteJSON ¶
func (edgex *Edgex) KeyValueDeleteJSON(bucket string, object string, keyValueJSON string, more bool) error
KeyValueDeleteJSON - delete key/value pairs defined by json
func (*Edgex) KeyValueGet ¶
KeyValueGet - read object value field
func (*Edgex) KeyValueGetInt ¶
KeyValueGetInt - read object value field
func (*Edgex) KeyValueList ¶
func (edgex *Edgex) KeyValueList(bucket string, object string, from string, pattern string, contentType string, maxcount int, values bool) (string, error)
KeyValueList - read key/value pairs, contentType: application/json or text/csv
func (*Edgex) KeyValuePost ¶
func (edgex *Edgex) KeyValuePost(bucket string, object string, contentType string, key string, value *bytes.Buffer, more bool) error
KeyValuePost - post key/value pairs
func (*Edgex) KeyValuePostCSV ¶
func (edgex *Edgex) KeyValuePostCSV(bucket string, object string, keyValueCSV string, more bool) error
KeyValuePostCSV - post key/value pairs presented like csv
func (*Edgex) KeyValuePostJSON ¶
func (edgex *Edgex) KeyValuePostJSON(bucket string, object string, keyValueJSON string, more bool) error
KeyValuePostJSON - post key/value pairs
func (*Edgex) KeyValueRollback ¶
KeyValueRollback - rollback key/value insert/update/delete session
func (*Edgex) ObjectCreate ¶
func (edgex *Edgex) ObjectCreate(bucket string, object string, objectType string, contentType string, chunkSize int, btreeOrder int) error
ObjectCreate - create object
func (*Edgex) ObjectDelete ¶
ObjectDelete - delete object
func (*Edgex) ObjectHead ¶
ObjectHead - read object header fields
type EdgexTest ¶
type EdgexTest struct { Mockup int `json:"mockup"` Url string `json:"url"` Authkey string `json:"authkey"` Secret string `json:"secret"` Bucket string `json:"bucket"` Object string `json:"object"` Debug int `json:"debug"` }
EdgexTest - general Edgex client test structure
type GVMR ¶
type GVMR struct { Path string Genid uint64 Uvid uint64 Deleted uint Nhid string Vmchid string Segid uint64 Size uint64 Locktime int64 Lockstate int }
GVMR - general global VM structure
func GlobalVMGetInt ¶
GlobalVMGetInt - get global VM record
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 Mockup ¶
type Mockup struct { // Current session Bucket string Object string Sid string Debug int // contains filtered or unexported fields }
Mockup - mockup client mockup structure
func CreateMockup ¶
CreateMockup - client structure constructor
func (*Mockup) BucketCreate ¶
BucketCreate - create a new bucket
func (*Mockup) BucketDelete ¶
BucketDelete - delete bucket
func (*Mockup) BucketHead ¶
BucketHead - read bucket header fields
func (*Mockup) BucketList ¶
BucketList - read bucket list
func (*Mockup) KeyValueCommit ¶
KeyValueCommit - commit key/value insert/update/delete
func (*Mockup) KeyValueDelete ¶
KeyValueDelete - delete key/value pair
func (*Mockup) KeyValueDeleteJSON ¶
func (mockup *Mockup) KeyValueDeleteJSON(bucket string, object string, keyValueJSON string, more bool) error
KeyValueDeleteJSON - delete key/value pairs defined by json
func (*Mockup) KeyValueGet ¶
KeyValueGet - read object value field
func (*Mockup) KeyValueGetInt ¶
KeyValueGetInt - read object value field
func (*Mockup) KeyValueList ¶
func (mockup *Mockup) KeyValueList(bucket string, object string, from string, pattern string, contentType string, maxcount int, values bool) (string, error)
KeyValueList - read key/value pairs, contentType: application/json or text/csv
func (*Mockup) KeyValuePost ¶
func (mockup *Mockup) KeyValuePost(bucket string, object string, contentType string, key string, value *bytes.Buffer, more bool) error
KeyValuePost - post key/value pairs
func (*Mockup) KeyValuePostCSV ¶
func (mockup *Mockup) KeyValuePostCSV(bucket string, object string, keyValueCSV string, more bool) error
KeyValuePostCSV - post key/value pairs presented like csv
func (*Mockup) KeyValuePostJSON ¶
func (mockup *Mockup) KeyValuePostJSON(bucket string, object string, keyValueJSON string, more bool) error
KeyValuePostJSON - post key/value pairs
func (*Mockup) KeyValueRollback ¶
KeyValueRollback - rollback key/value insert/update/delete session
func (*Mockup) ObjectCreate ¶
func (mockup *Mockup) ObjectCreate(bucket string, object string, objectType string, contentType string, chunkSize int, btreeOrder int) error
ObjectCreate - create object
func (*Mockup) ObjectDelete ¶
ObjectDelete - delete object
func (*Mockup) ObjectHead ¶
ObjectHead - read object header fields
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 S3xClient ¶
type S3xClient interface { CloseEdgex() BucketCreate(bucket string) error BucketHead(bucket string) error BucketDelete(bucket string) error ObjectCreate(bucket string, object string, objectType string, contentType string, chunkSize int, btreeOrder int) error KeyValuePost(bucket string, object string, contentType string, key string, value *bytes.Buffer, more bool) error KeyValuePostJSON(bucket string, object string, keyValueJSON string, more bool) error KeyValuePostCSV(bucket string, object string, keyValueCSV string, more bool) error KeyValueDelete(bucket string, object string, key string, more bool) error KeyValueDeleteJSON(bucket string, object string, keyValueJSON string, more bool) error KeyValueCommit(bucket string, object string) error KeyValueRollback(bucket string, object string) error KeyValueGet(bucket string, object string, key string) (string, error) KeyValueGetInt(bucket string, object string, key string) (string, int) KeyValueList(bucket string, object string, from string, pattern string, contentType string, maxcount int, values bool) (string, error) ObjectHead(bucket string, object string) error ObjectDelete(bucket string, object string) error BucketList() ([]Bucket, error) ObjectList(bucket string, from string, pattern string, maxcount int) ([]Object, error) }
S3xClient - s3x client interface