storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSimpleListObjectACLOKResponse added in v0.2.0

func GenerateSimpleListObjectACLOKResponse(bucket string, object string, rules []storage.ACLRule) (*http.Response, error)

func GenerateSimplePostObjectOKResponse added in v0.2.0

func GenerateSimplePostObjectOKResponse(bucket string, object string, contentType string, size uint64) *apigcs.Object

GenerateSimplePostObjectOKResponse is 最低限指定したそうな場所だけ指定すれば残りは適当に埋めたOKResponseを返す

func GenerateSimpleUpdateObjectAttrsOKResponse added in v0.2.0

func GenerateSimpleUpdateObjectAttrsOKResponse(bucket string, object string) (*http.Response, error)

GenerateSimpleUpdateObjectAttrsOKResponse is 更新したObjectの結果のAttrsの情報は気にせず、validなものがあれば良い時に使える

func GetObjectOKResponseSample added in v0.2.0

func GetObjectOKResponseSample() *http.Response

func PostObjectOKResponseSample added in v0.2.0

func PostObjectOKResponseSample() *http.Response

Types

type Faker

type Faker struct {
	Client *http.Client
	// contains filtered or unexported fields
}

func NewFaker

func NewFaker(t *testing.T) *Faker

func NewFakerWithoutTesting added in v0.3.0

func NewFakerWithoutTesting() *Faker

func (*Faker) AddGetObjectResponse added in v0.2.0

func (faker *Faker) AddGetObjectResponse(bucket string, object string, response *http.Response) error

AddGetObjectResponse is 指定したobjectの読み込みに対してのResponseを登録する 同じObjectを複数回読み込む時は複数回Addする

func (*Faker) AddListObjectACLOKResponse added in v0.2.0

func (faker *Faker) AddListObjectACLOKResponse(bucket string, object string, rules []storage.ACLRule) error

AddListObjectACLOKResponse is 指定したobjectのACLListの取得に対してのResponseを登録する 同じ操作を複数回実行する時は複数回Addする

func (*Faker) AddListObjectACLResponse added in v0.2.0

func (faker *Faker) AddListObjectACLResponse(bucket string, object string, response *http.Response) error

AddListObjectACLResponse is 指定したobjectのACLListの取得に対してのResponseを登録する 同じ操作を複数回実行する時は複数回Addする

func (*Faker) AddPostObjectOKResponse added in v0.2.0

func (faker *Faker) AddPostObjectOKResponse(bucket string, object string, header map[string][]string, resp *apigcs.Object) error

func (*Faker) AddResponse added in v0.2.0

func (faker *Faker) AddResponse(url string, method string, response *http.Response) error

AddResponse is RequestされたURLに対するResponseを登録する 同じURLを複数回呼ぶ時は複数回Addする

func (*Faker) AddUpdateObjectAttrsOKResponse added in v0.2.0

func (faker *Faker) AddUpdateObjectAttrsOKResponse(bucket string, object string, obj *apigcs.Object) error

AddUpdateObjectAttrsOKResponse is 指定したobjectのmetaのUpdateに対してのOKResponseを登録する 同じ操作を複数回実行する時は複数回Addする

func (*Faker) AddUpdateObjectAttrsResponse added in v0.2.0

func (faker *Faker) AddUpdateObjectAttrsResponse(bucket string, object string, response *http.Response) error

AddUpdateObjectAttrsResponse is 指定したobjectのmetaのUpdateに対してのResponseを登録する 同じ操作を複数回実行する時は複数回Addする

func (*Faker) AddUpdateObjectAttrsSimpleOKResponse added in v0.2.0

func (faker *Faker) AddUpdateObjectAttrsSimpleOKResponse(bucket string, object string) error

AddUpdateObjectAttrsSimpleOKResponse is 指定したobjectのmetaのUpdateに対してのOKResponseを登録する 同じ操作を複数回実行する時は複数回Addする

Updateして帰ってくるObjectの内容を使わない場合に、雑に情報を返してくれる

type Transport

type Transport struct {
	Transport http.RoundTripper
	// contains filtered or unexported fields
}

func (*Transport) RoundTrip

func (tran *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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