storagetest

package
v0.0.0-...-ef9846f Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonPrefix

type CommonPrefix struct {
	Prefix string
}

type ListBucketV2Result

type ListBucketV2Result struct {
	CommonPrefixes        []CommonPrefix
	Contents              []ObjectInfo
	Delimiter             string
	EncodingType          string
	IsTruncated           bool
	MaxKeys               int64
	Name                  string
	NextContinuationToken string
	ContinuationToken     string
	Prefix                string
	FetchOwner            string
	StartAfter            string
}

type MockMinIO

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

func NewMockMinIO

func NewMockMinIO() *MockMinIO

func (*MockMinIO) AddBucket

func (m *MockMinIO) AddBucket(name string)

func (*MockMinIO) AddObjects

func (m *MockMinIO) AddObjects(bucket string, objs ...*minio.ObjectInfo)

func (*MockMinIO) Removed

func (m *MockMinIO) Removed(bucket string) []string

func (*MockMinIO) Transport

func (m *MockMinIO) Transport(mock *httpmock.MockTransport)

type ObjectInfo

type ObjectInfo struct {
	ETag         string      `json:"etag"`
	Key          string      `json:"name"`
	LastModified time.Time   `json:"lastModified"`
	Size         int64       `json:"size"`
	ContentType  string      `json:"contentType"`
	Expires      time.Time   `json:"expires"`
	Metadata     http.Header `json:"metadata" xml:"-"`
	UserMetadata StringMap   `json:"userMetadata"`
	UserTags     StringMap   `json:"userTags"`
	UserTagCount int
	Owner        Owner
	Grant        []struct {
		Grantee struct {
			ID          string `xml:"ID"`
			DisplayName string `xml:"DisplayName"`
			URI         string `xml:"URI"`
		} `xml:"Grantee"`
		Permission string `xml:"Permission"`
	} `xml:"Grant"`
	StorageClass      string `json:"storageClass"`
	IsLatest          bool
	IsDeleteMarker    bool
	VersionID         string `xml:"VersionId"`
	ReplicationStatus string `xml:"ReplicationStatus"`
	Expiration        time.Time
	ExpirationRuleID  string
	Err               error `json:"-"`
}

type Owner

type Owner struct {
	DisplayName string `json:"name"`
	ID          string `json:"id"`
}

type StringMap

type StringMap map[string]string

func (*StringMap) MarshalXML

func (m *StringMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*StringMap) UnmarshalXML

func (m *StringMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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