Documentation
¶
Index ¶
- type Blob
- type Client
- type DeleteRequest
- type DeleteResponse
- type ExistsRequest
- type ExistsResponse
- type GetRequest
- type GetResponse
- type MockClient
- func (_m *MockClient) Delete(_a0 context.Context, _a1 *DeleteRequest) (*DeleteResponse, error)
- func (_m *MockClient) Exists(_a0 context.Context, _a1 *ExistsRequest) (*ExistsResponse, error)
- func (_m *MockClient) Get(_a0 context.Context, _a1 *GetRequest) (*GetResponse, error)
- func (_m *MockClient) IsRetryableError(_a0 error) bool
- func (_m *MockClient) Put(_a0 context.Context, _a1 *PutRequest) (*PutResponse, error)
- type PutRequest
- type PutResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct {
Tags map[string]string
Body []byte
}
Blob defines a blob which can be stored and fetched from blobstore
type Client ¶
type Client interface {
Put(context.Context, *PutRequest) (*PutResponse, error)
Get(context.Context, *GetRequest) (*GetResponse, error)
Exists(context.Context, *ExistsRequest) (*ExistsResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
IsRetryableError(error) bool
}
Client defines the interface to a blobstore client.
func NewRetryableClient ¶ added in v0.5.2
func NewRetryableClient(client Client, policy backoff.RetryPolicy) Client
NewRetryableClient constructs a blobstorre client which retries transient errors.
type DeleteRequest ¶ added in v0.13.0
type DeleteRequest struct {
Key string
}
DeleteRequest is the request to Delete
type DeleteResponse ¶ added in v0.13.0
type DeleteResponse struct{}
DeleteResponse is the response from Delete
type ExistsRequest ¶ added in v0.13.0
type ExistsRequest struct {
Key string
}
ExistsRequest is the request to Exists
type ExistsResponse ¶ added in v0.13.0
type ExistsResponse struct {
Exists bool
}
ExistsResponse is the response from Exists
type GetRequest ¶ added in v0.13.0
type GetRequest struct {
Key string
}
GetRequest is the request to Get
type GetResponse ¶ added in v0.13.0
type GetResponse struct {
Blob Blob
}
GetResponse is the response from Get
type MockClient ¶ added in v0.13.0
type MockClient struct {
mock.Mock
}
MockClient is an autogenerated mock type for the Client type
func (*MockClient) Delete ¶ added in v0.13.0
func (_m *MockClient) Delete(_a0 context.Context, _a1 *DeleteRequest) (*DeleteResponse, error)
Delete provides a mock function with given fields: _a0, _a1
func (*MockClient) Exists ¶ added in v0.13.0
func (_m *MockClient) Exists(_a0 context.Context, _a1 *ExistsRequest) (*ExistsResponse, error)
Exists provides a mock function with given fields: _a0, _a1
func (*MockClient) Get ¶ added in v0.13.0
func (_m *MockClient) Get(_a0 context.Context, _a1 *GetRequest) (*GetResponse, error)
Get provides a mock function with given fields: _a0, _a1
func (*MockClient) IsRetryableError ¶ added in v0.13.0
func (_m *MockClient) IsRetryableError(_a0 error) bool
type PutRequest ¶ added in v0.13.0
type PutRequest struct {
Key string
Blob Blob
}
PutRequest is the request to Put