Model

package
v0.0.0-...-37dfdd7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheControl          = "cache-control"
	ContentEncoding       = "content-encoding"
	ContentLength         = "content-length"
	LastModified          = "last-modified"
	ContentMD5            = "content-md5"
	ContentType           = "content-type"
	LastChecked           = "last-checked"
	UploadTime            = "upload-time"
	ContentMetadataLength = "x-xiaomi-meta-content-length"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	AccessControlLists []AccessControlList `json:"accessControlList"`
	Owners             Owner               `json:"owner"`
}

func NewACL

func NewACL(jsonValue []byte) (*ACL, error)

type AccessControlList

type AccessControlList struct {
	Grantees   Grantee `json:"grantee"`
	Permission string  `json:"permission"`
	Type       string  `json:"type"`
}

type BucketInfo

type BucketInfo struct {
	AllowOutsideAccess bool   `json:"allowOutsideAccess"`
	CreationTime       int64  `json:"creationTime"`
	BucketName         string `json:"name"`
	ObjectNum          int64  `json:"numObjects"`
	UsedSpace          int64  `json:"usedSpace"`
}

func NewBucketInfo

func NewBucketInfo(jsonValue []byte) (*BucketInfo, error)

type FDSError

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

func NewFDSError

func NewFDSError(msg string, code int) *FDSError

func (*FDSError) Code

func (e *FDSError) Code() int

func (*FDSError) Error

func (e *FDSError) Error() string

func (*FDSError) Message

func (e *FDSError) Message() string

type FDSListMultipartUploadsResult

type FDSListMultipartUploadsResult struct {
	BucketName     string
	Prefix         string
	MaxKeys        int
	Marker         string
	IsTruncated    bool
	NextMarker     string
	Uploads        []MultipartUploadResult
	CommonPrefixes []string
	Delimiter      string
	// contains filtered or unexported fields
}

func NewFDSListMultipartUploadsResult

func NewFDSListMultipartUploadsResult(jsonValue []byte) (*FDSListMultipartUploadsResult, error)

type FDSMetaData

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

func NewFDSMetaData

func NewFDSMetaData(rawValue map[string][]string) *FDSMetaData

func (*FDSMetaData) GetCacheControl

func (d *FDSMetaData) GetCacheControl() (string, error)

func (*FDSMetaData) GetContentEncoding

func (d *FDSMetaData) GetContentEncoding() (string, error)

func (*FDSMetaData) GetContentLength

func (d *FDSMetaData) GetContentLength() (int64, error)

func (*FDSMetaData) GetContentMD5

func (d *FDSMetaData) GetContentMD5() (string, error)

func (*FDSMetaData) GetContentType

func (d *FDSMetaData) GetContentType() (string, error)

func (*FDSMetaData) GetKey

func (d *FDSMetaData) GetKey(k string) (string, error)

func (*FDSMetaData) GetLastChecked

func (d *FDSMetaData) GetLastChecked() (int64, error)

func (*FDSMetaData) GetLastModified

func (d *FDSMetaData) GetLastModified() (string, error)

func (*FDSMetaData) GetMetadataContentLength

func (d *FDSMetaData) GetMetadataContentLength() (int64, error)

func (*FDSMetaData) GetRawMetadata

func (d *FDSMetaData) GetRawMetadata() map[string][]string

func (*FDSMetaData) GetUploadTime

func (d *FDSMetaData) GetUploadTime() (int64, error)

func (*FDSMetaData) Serialize

func (d *FDSMetaData) Serialize() ([]byte, error)

Serialize will serialize the FDSMetaData to byte slice

type FDSObject

type FDSObject struct {
	ObjectName    string
	BucketName    string
	Metadata      FDSMetaData
	ObjectContent []byte
}

type FDSObjectListing

type FDSObjectListing struct {
	BucketName      string `json:"name"`
	Prefix          string
	Delimiter       string
	Marker          string
	NextMarker      string
	MaxKeys         int
	Truncated       bool
	ObjectSummaries []FDSObjectSummary `json:"objects"`
	CommonPrefixes  []string
	// contains filtered or unexported fields
}

func NewFDSObjectListing

func NewFDSObjectListing(jsonValue []byte) (*FDSObjectListing, error)

func (*FDSObjectListing) IsTuncated

func (f *FDSObjectListing) IsTuncated() bool

type FDSObjectSummary

type FDSObjectSummary struct {
	Etag         string    `json:"etag"`
	ObjectName   string    `json:"name"`
	Owner        Owner     `json:"owner"`
	Size         int64     `json:"size"`
	LastModified time.Time `json:"lastModified"`
	UploadTime   int64     `json:"uploadTime"`
	// contains filtered or unexported fields
}

func NewFDSObjectSummary

func NewFDSObjectSummary(jsonValue []byte) (*FDSObjectSummary, error)

type FDSUploadPartResult

type FDSUploadPartResult struct {
	PartNumber int
	Etag       string
	PartSize   int64
}

type FDSUploadPartResultList

type FDSUploadPartResultList struct {
	UploadPartResultList []FDSUploadPartResult
}

func NewFDSUploadPartResultList

func NewFDSUploadPartResultList(rawJson []byte) (*FDSUploadPartResultList, error)

type Grantee

type Grantee struct {
	Id          string `json:"id"`
	DisplayName string `json:"displayName"`
}

type InitMultipartUploadResult

type InitMultipartUploadResult struct {
	BucketName string
	ObjectName string
	UploadId   string
	// contains filtered or unexported fields
}

func NewInitMultipartUploadResult

func NewInitMultipartUploadResult(jsonValue []byte) (*InitMultipartUploadResult, error)

type MultipartUploadResult

type MultipartUploadResult struct {
	ObjectName  string
	UploadId    string
	UploadParts []string
}

type Owner

type Owner struct {
	Id          string `json:"id"`
	DisplayName string `json:"displayName"`
}

type PutObjectResult

type PutObjectResult struct {
	BucketName  string
	ObjectName  string
	AccessKeyId string
	Signature   string
	Expires     int64
	// contains filtered or unexported fields
}

func NewPutObjectResult

func NewPutObjectResult(jsonValue []byte) (*PutObjectResult, error)

type UploadPartList

type UploadPartList struct {
	UploadPartResultList []UploadPartResult `json:"uploadPartResultList"`
}

func NewUploadPartList

func NewUploadPartList(jsonValue []byte) (*UploadPartList, error)

func (*UploadPartList) AddUploadPartResult

func (u *UploadPartList) AddUploadPartResult(i *UploadPartResult)

type UploadPartResult

type UploadPartResult struct {
	PartNumber int    `json:"partNumber"`
	Etag       string `json:"etag"`
	PartSize   int64  `json:"partSize"`
	// contains filtered or unexported fields
}

func NewUploadPartResult

func NewUploadPartResult(jsonValue []byte) (*UploadPartResult, error)

Jump to

Keyboard shortcuts

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