Documentation
¶
Index ¶
- Constants
- Variables
- func NewBlockStoreBuilder(le *logrus.Entry, conf *Config, verbose bool) block_store_controller.BlockStoreBuilder
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (x *Config) GetBlockStoreId() string
- func (x *Config) GetBucketIds() []string
- func (c *Config) GetConfigID() string
- func (x *Config) GetForceHashType() hash.HashType
- func (x *Config) GetReadOnly() bool
- func (x *Config) GetSkipNotFound() bool
- func (x *Config) GetUrl() string
- func (x *Config) GetVerbose() bool
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (c *Config) ParseURL() (*url.URL, error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Controller
- type ExistsResponse
- func (m *ExistsResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ExistsResponse) CloneVT() *ExistsResponse
- func (this *ExistsResponse) EqualMessageVT(thatMsg any) bool
- func (this *ExistsResponse) EqualVT(that *ExistsResponse) bool
- func (x *ExistsResponse) GetErr() string
- func (x *ExistsResponse) GetExists() bool
- func (x *ExistsResponse) GetNotFound() bool
- func (o *ExistsResponse) MarshalBlock() ([]byte, error)
- func (x *ExistsResponse) MarshalJSON() ([]byte, error)
- func (x *ExistsResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *ExistsResponse) MarshalProtoText() string
- func (m *ExistsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ExistsResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ExistsResponse) MarshalVT() (dAtA []byte, err error)
- func (*ExistsResponse) ProtoMessage()
- func (x *ExistsResponse) Reset()
- func (m *ExistsResponse) SizeVT() (n int)
- func (x *ExistsResponse) String() string
- func (o *ExistsResponse) UnmarshalBlock(data []byte) error
- func (x *ExistsResponse) UnmarshalJSON(b []byte) error
- func (x *ExistsResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ExistsResponse) UnmarshalVT(dAtA []byte) error
- type Factory
- func (t *Factory) Construct(ctx context.Context, conf config.Config, opts controller.ConstructOpts) (controller.Controller, error)
- func (t *Factory) ConstructConfig() config.Config
- func (t *Factory) GetConfigID() string
- func (t *Factory) GetControllerID() string
- func (t *Factory) GetVersion() controller.Version
- type GetResponse
- func (m *GetResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *GetResponse) CloneVT() *GetResponse
- func (this *GetResponse) EqualMessageVT(thatMsg any) bool
- func (this *GetResponse) EqualVT(that *GetResponse) bool
- func (x *GetResponse) GetData() []byte
- func (x *GetResponse) GetErr() string
- func (x *GetResponse) GetNotFound() bool
- func (o *GetResponse) MarshalBlock() ([]byte, error)
- func (x *GetResponse) MarshalJSON() ([]byte, error)
- func (x *GetResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *GetResponse) MarshalProtoText() string
- func (m *GetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GetResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *GetResponse) MarshalVT() (dAtA []byte, err error)
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) Reset()
- func (m *GetResponse) SizeVT() (n int)
- func (x *GetResponse) String() string
- func (o *GetResponse) UnmarshalBlock(data []byte) error
- func (x *GetResponse) UnmarshalJSON(b []byte) error
- func (x *GetResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *GetResponse) UnmarshalVT(dAtA []byte) error
- type HTTPBlock
- func (b *HTTPBlock) BeginReadOperation(context.Context) (block.StoreOps, func(), error)
- func (b *HTTPBlock) GetBlock(ctx context.Context, ref *block.BlockRef) ([]byte, bool, error)
- func (b *HTTPBlock) GetBlockExists(ctx context.Context, ref *block.BlockRef) (bool, error)
- func (b *HTTPBlock) GetBlockExistsBatch(ctx context.Context, refs []*block.BlockRef) ([]bool, error)
- func (b *HTTPBlock) GetHashType() hash.HashType
- func (b *HTTPBlock) GetSupportedFeatures() block.StoreFeature
- func (b *HTTPBlock) PutBlock(ctx context.Context, data []byte, opts *block.PutOpts) (ref *block.BlockRef, exists bool, err error)
- func (b *HTTPBlock) PutBlockBatch(ctx context.Context, entries []*block.PutBatchEntry) error
- func (b *HTTPBlock) RmBlock(ctx context.Context, ref *block.BlockRef) error
- func (b *HTTPBlock) StatBlock(ctx context.Context, ref *block.BlockRef) (*block.BlockStat, error)
- func (b *HTTPBlock) Sync(context.Context) (bool, error)
- type PutRequest
- func (m *PutRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *PutRequest) CloneVT() *PutRequest
- func (this *PutRequest) EqualMessageVT(thatMsg any) bool
- func (this *PutRequest) EqualVT(that *PutRequest) bool
- func (x *PutRequest) GetData() []byte
- func (x *PutRequest) GetPutOpts() *block.PutOpts
- func (o *PutRequest) MarshalBlock() ([]byte, error)
- func (x *PutRequest) MarshalJSON() ([]byte, error)
- func (x *PutRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *PutRequest) MarshalProtoText() string
- func (m *PutRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *PutRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *PutRequest) MarshalVT() (dAtA []byte, err error)
- func (*PutRequest) ProtoMessage()
- func (x *PutRequest) Reset()
- func (m *PutRequest) SizeVT() (n int)
- func (x *PutRequest) String() string
- func (o *PutRequest) UnmarshalBlock(data []byte) error
- func (x *PutRequest) UnmarshalJSON(b []byte) error
- func (x *PutRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *PutRequest) UnmarshalVT(dAtA []byte) error
- func (o *PutRequest) Validate() error
- type PutResponse
- func (m *PutResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *PutResponse) CloneVT() *PutResponse
- func (this *PutResponse) EqualMessageVT(thatMsg any) bool
- func (this *PutResponse) EqualVT(that *PutResponse) bool
- func (x *PutResponse) GetErr() string
- func (x *PutResponse) GetExists() bool
- func (x *PutResponse) GetRef() *block.BlockRef
- func (o *PutResponse) MarshalBlock() ([]byte, error)
- func (x *PutResponse) MarshalJSON() ([]byte, error)
- func (x *PutResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *PutResponse) MarshalProtoText() string
- func (m *PutResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *PutResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *PutResponse) MarshalVT() (dAtA []byte, err error)
- func (*PutResponse) ProtoMessage()
- func (x *PutResponse) Reset()
- func (m *PutResponse) SizeVT() (n int)
- func (x *PutResponse) String() string
- func (o *PutResponse) UnmarshalBlock(data []byte) error
- func (x *PutResponse) UnmarshalJSON(b []byte) error
- func (x *PutResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *PutResponse) UnmarshalVT(dAtA []byte) error
- func (o *PutResponse) Validate() error
- type RmResponse
- func (m *RmResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *RmResponse) CloneVT() *RmResponse
- func (this *RmResponse) EqualMessageVT(thatMsg any) bool
- func (this *RmResponse) EqualVT(that *RmResponse) bool
- func (x *RmResponse) GetErr() string
- func (x *RmResponse) GetRemoved() bool
- func (o *RmResponse) MarshalBlock() ([]byte, error)
- func (x *RmResponse) MarshalJSON() ([]byte, error)
- func (x *RmResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *RmResponse) MarshalProtoText() string
- func (m *RmResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *RmResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *RmResponse) MarshalVT() (dAtA []byte, err error)
- func (*RmResponse) ProtoMessage()
- func (x *RmResponse) Reset()
- func (m *RmResponse) SizeVT() (n int)
- func (x *RmResponse) String() string
- func (o *RmResponse) UnmarshalBlock(data []byte) error
- func (x *RmResponse) UnmarshalJSON(b []byte) error
- func (x *RmResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *RmResponse) UnmarshalVT(dAtA []byte) error
Constants ¶
const ( // GetPath is the path of the get endpoint. GetPath = "get" // PutPath is the path of the put endpoint. PutPath = "put" // ExistsPath is the path of the exists endpoint. ExistsPath = "exists" // RmPath is the path of the rm endpoint. RmPath = "rm" )
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "hydra/block/store/http"
ControllerID identifies the http block store controller.
Variables ¶
var Version = controller.MustParseVersion("0.0.1")
Version is the version of the block store implementation.
Functions ¶
func NewBlockStoreBuilder ¶
func NewBlockStoreBuilder(le *logrus.Entry, conf *Config, verbose bool) block_store_controller.BlockStoreBuilder
NewBlockStoreBuilder constructs a new block store builder from config.
le can be nil to disable logging verbose logs successes as well as failures
Types ¶
type Config ¶
type Config struct {
// BlockStoreId is the block store id to use on the bus.
BlockStoreId string `protobuf:"bytes,1,opt,name=block_store_id,json=blockStoreId,proto3" json:"blockStoreId,omitempty"`
// Url is the base url to access the api.
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// ReadOnly disables writing to the http store.
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"readOnly,omitempty"`
// ForceHashType forces writing the given hash type to the store.
// If unset, accepts any hash type.
ForceHashType hash.HashType `protobuf:"varint,4,opt,name=force_hash_type,json=forceHashType,proto3" json:"forceHashType,omitempty"`
// BucketIds is a list of bucket ids to serve LookupBlockFromNetwork directives.
BucketIds []string `protobuf:"bytes,5,rep,name=bucket_ids,json=bucketIds,proto3" json:"bucketIds,omitempty"`
// SkipNotFound skips returning a value if the block was not found.
SkipNotFound bool `protobuf:"varint,6,opt,name=skip_not_found,json=skipNotFound,proto3" json:"skipNotFound,omitempty"`
// Verbose enables verbose logging of the block store.
Verbose bool `protobuf:"varint,7,opt,name=verbose,proto3" json:"verbose,omitempty"`
// contains filtered or unexported fields
}
Config configures the block store http controller.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the config is equal to another.
func (*Config) GetBlockStoreId ¶
func (*Config) GetBucketIds ¶
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type.
func (*Config) GetForceHashType ¶
func (*Config) GetReadOnly ¶
func (*Config) GetSkipNotFound ¶
func (*Config) GetVerbose ¶
func (*Config) MarshalJSON ¶
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type Controller ¶
type Controller = block_store_controller.Controller
Controller implements the http block store controller.
func NewController ¶
func NewController(le *logrus.Entry, conf *Config) *Controller
NewController builds a new http block store controller.
type ExistsResponse ¶
type ExistsResponse struct {
// Exists indicates that the block existed in the store.
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
// NotFound indicates that the block did not exist in the store.
// If false, exists=true.
NotFound bool `protobuf:"varint,2,opt,name=not_found,json=notFound,proto3" json:"notFound,omitempty"`
// Err contains any error checking if the ref exists.
// If empty, not_found or data must be set.
Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"`
// contains filtered or unexported fields
}
ExistsResponse is the response to a Exists request.
func (*ExistsResponse) CloneMessageVT ¶
func (m *ExistsResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ExistsResponse) CloneVT ¶
func (m *ExistsResponse) CloneVT() *ExistsResponse
func (*ExistsResponse) EqualMessageVT ¶
func (this *ExistsResponse) EqualMessageVT(thatMsg any) bool
func (*ExistsResponse) EqualVT ¶
func (this *ExistsResponse) EqualVT(that *ExistsResponse) bool
func (*ExistsResponse) GetErr ¶
func (x *ExistsResponse) GetErr() string
func (*ExistsResponse) GetExists ¶
func (x *ExistsResponse) GetExists() bool
func (*ExistsResponse) GetNotFound ¶
func (x *ExistsResponse) GetNotFound() bool
func (*ExistsResponse) MarshalBlock ¶
func (o *ExistsResponse) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary.
func (*ExistsResponse) MarshalJSON ¶
func (x *ExistsResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ExistsResponse to JSON.
func (*ExistsResponse) MarshalProtoJSON ¶
func (x *ExistsResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ExistsResponse message to JSON.
func (*ExistsResponse) MarshalProtoText ¶
func (x *ExistsResponse) MarshalProtoText() string
func (*ExistsResponse) MarshalToSizedBufferVT ¶
func (m *ExistsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ExistsResponse) MarshalToVT ¶
func (m *ExistsResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ExistsResponse) MarshalVT ¶
func (m *ExistsResponse) MarshalVT() (dAtA []byte, err error)
func (*ExistsResponse) ProtoMessage ¶
func (*ExistsResponse) ProtoMessage()
func (*ExistsResponse) Reset ¶
func (x *ExistsResponse) Reset()
func (*ExistsResponse) SizeVT ¶
func (m *ExistsResponse) SizeVT() (n int)
func (*ExistsResponse) String ¶
func (x *ExistsResponse) String() string
func (*ExistsResponse) UnmarshalBlock ¶
func (o *ExistsResponse) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object.
func (*ExistsResponse) UnmarshalJSON ¶
func (x *ExistsResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ExistsResponse from JSON.
func (*ExistsResponse) UnmarshalProtoJSON ¶
func (x *ExistsResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ExistsResponse message from JSON.
func (*ExistsResponse) UnmarshalVT ¶
func (m *ExistsResponse) UnmarshalVT(dAtA []byte) error
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs the http block store.
func (*Factory) Construct ¶
func (t *Factory) Construct( ctx context.Context, conf config.Config, opts controller.ConstructOpts, ) (controller.Controller, error)
Construct constructs the associated controller given configuration.
func (*Factory) ConstructConfig ¶
ConstructConfig constructs an instance of the controller configuration.
func (*Factory) GetConfigID ¶
GetConfigID returns the configuration ID for the controller.
func (*Factory) GetControllerID ¶
GetControllerID returns the unique ID for the controller.
func (*Factory) GetVersion ¶
func (t *Factory) GetVersion() controller.Version
GetVersion returns the version of this controller.
type GetResponse ¶
type GetResponse struct {
// NotFound indicates that the block did not exist in the store.
NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"notFound,omitempty"`
// Data contains the block data, if not_found and err are empty.
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// Err contains any error getting the ref.
// If empty, not_found or data must be set.
Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"`
// contains filtered or unexported fields
}
GetResponse is the response to a Get request.
func (*GetResponse) CloneMessageVT ¶
func (m *GetResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*GetResponse) CloneVT ¶
func (m *GetResponse) CloneVT() *GetResponse
func (*GetResponse) EqualMessageVT ¶
func (this *GetResponse) EqualMessageVT(thatMsg any) bool
func (*GetResponse) EqualVT ¶
func (this *GetResponse) EqualVT(that *GetResponse) bool
func (*GetResponse) GetData ¶
func (x *GetResponse) GetData() []byte
func (*GetResponse) GetErr ¶
func (x *GetResponse) GetErr() string
func (*GetResponse) GetNotFound ¶
func (x *GetResponse) GetNotFound() bool
func (*GetResponse) MarshalBlock ¶
func (o *GetResponse) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary.
func (*GetResponse) MarshalJSON ¶
func (x *GetResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the GetResponse to JSON.
func (*GetResponse) MarshalProtoJSON ¶
func (x *GetResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the GetResponse message to JSON.
func (*GetResponse) MarshalProtoText ¶
func (x *GetResponse) MarshalProtoText() string
func (*GetResponse) MarshalToSizedBufferVT ¶
func (m *GetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GetResponse) MarshalToVT ¶
func (m *GetResponse) MarshalToVT(dAtA []byte) (int, error)
func (*GetResponse) MarshalVT ¶
func (m *GetResponse) MarshalVT() (dAtA []byte, err error)
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) SizeVT ¶
func (m *GetResponse) SizeVT() (n int)
func (*GetResponse) String ¶
func (x *GetResponse) String() string
func (*GetResponse) UnmarshalBlock ¶
func (o *GetResponse) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object.
func (*GetResponse) UnmarshalJSON ¶
func (x *GetResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the GetResponse from JSON.
func (*GetResponse) UnmarshalProtoJSON ¶
func (x *GetResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the GetResponse message from JSON.
func (*GetResponse) UnmarshalVT ¶
func (m *GetResponse) UnmarshalVT(dAtA []byte) error
type HTTPBlock ¶
type HTTPBlock struct {
// contains filtered or unexported fields
}
HTTPBlock is a block store on top of a HTTP client and base URL prefix.
func NewHTTPBlock ¶
func NewHTTPBlock(le *logrus.Entry, write bool, client *http.Client, baseURL *url.URL, hashType hash.HashType, verbose bool) *HTTPBlock
NewHTTPBlock builds a new block store on top of a HTTP service. The lookup path /block/{cid} will be appended to the URL path.
baseURL cannot be nil client can be nil to use the default client hashType can be 0 to use the default hash type. if write=false, supports read operations only. if verbose=true logs successful cases as well as failures. le can be nil to disable logging entirely
func (*HTTPBlock) BeginReadOperation ¶ added in v0.51.7
BeginReadOperation returns the HTTP block store as the scoped read handle.
func (*HTTPBlock) GetBlock ¶
GetBlock looks up a block in the store. Returns data, found, and any unexpected error.
func (*HTTPBlock) GetBlockExists ¶
GetBlockExists checks if a block exists in the store. Returns found, and any unexpected error.
func (*HTTPBlock) GetBlockExistsBatch ¶
func (b *HTTPBlock) GetBlockExistsBatch(ctx context.Context, refs []*block.BlockRef) ([]bool, error)
GetBlockExistsBatch loops calling GetBlockExists per ref.
func (*HTTPBlock) GetHashType ¶
GetHashType returns the preferred hash type for the store. This should return as fast as possible (called frequently). If 0 is returned, uses a default defined by Hydra.
func (*HTTPBlock) GetSupportedFeatures ¶
func (b *HTTPBlock) GetSupportedFeatures() block.StoreFeature
GetSupportedFeatures returns the native feature bitmask for the store.
func (*HTTPBlock) PutBlock ¶
func (b *HTTPBlock) PutBlock(ctx context.Context, data []byte, opts *block.PutOpts) (ref *block.BlockRef, exists bool, err error)
PutBlock puts a block into the store. Stores should check if the block already exists if possible.
func (*HTTPBlock) PutBlockBatch ¶
PutBlockBatch loops calling PutBlock or RmBlock per entry.
func (*HTTPBlock) RmBlock ¶
RmBlock deletes a block from the store. Should not return an error if the block did not exist.
type PutRequest ¶
type PutRequest struct {
// Data is the data to put at the key.
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// PutOpts sets the put options.
PutOpts *block.PutOpts `protobuf:"bytes,2,opt,name=put_opts,json=putOpts,proto3" json:"putOpts,omitempty"`
// contains filtered or unexported fields
}
PutRequest is the request body for a Put request.
func (*PutRequest) CloneMessageVT ¶
func (m *PutRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*PutRequest) CloneVT ¶
func (m *PutRequest) CloneVT() *PutRequest
func (*PutRequest) EqualMessageVT ¶
func (this *PutRequest) EqualMessageVT(thatMsg any) bool
func (*PutRequest) EqualVT ¶
func (this *PutRequest) EqualVT(that *PutRequest) bool
func (*PutRequest) GetData ¶
func (x *PutRequest) GetData() []byte
func (*PutRequest) GetPutOpts ¶
func (x *PutRequest) GetPutOpts() *block.PutOpts
func (*PutRequest) MarshalBlock ¶
func (o *PutRequest) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*PutRequest) MarshalJSON ¶
func (x *PutRequest) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PutRequest to JSON.
func (*PutRequest) MarshalProtoJSON ¶
func (x *PutRequest) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the PutRequest message to JSON.
func (*PutRequest) MarshalProtoText ¶
func (x *PutRequest) MarshalProtoText() string
func (*PutRequest) MarshalToSizedBufferVT ¶
func (m *PutRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*PutRequest) MarshalToVT ¶
func (m *PutRequest) MarshalToVT(dAtA []byte) (int, error)
func (*PutRequest) MarshalVT ¶
func (m *PutRequest) MarshalVT() (dAtA []byte, err error)
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) SizeVT ¶
func (m *PutRequest) SizeVT() (n int)
func (*PutRequest) String ¶
func (x *PutRequest) String() string
func (*PutRequest) UnmarshalBlock ¶
func (o *PutRequest) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*PutRequest) UnmarshalJSON ¶
func (x *PutRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the PutRequest from JSON.
func (*PutRequest) UnmarshalProtoJSON ¶
func (x *PutRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the PutRequest message from JSON.
func (*PutRequest) UnmarshalVT ¶
func (m *PutRequest) UnmarshalVT(dAtA []byte) error
func (*PutRequest) Validate ¶
func (o *PutRequest) Validate() error
Validate validates the put request.
type PutResponse ¶
type PutResponse struct {
// Ref contains the put block ref.
Ref *block.BlockRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
// Exists indicates that the block already existed in the store.
// Some stores may always return false for this.
Exists bool `protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"`
// Err contains any error putting the ref.
// If empty, the ref must not be nil, op succeeded.
Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"`
// contains filtered or unexported fields
}
PutResponse is the response to a Put request.
func (*PutResponse) CloneMessageVT ¶
func (m *PutResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*PutResponse) CloneVT ¶
func (m *PutResponse) CloneVT() *PutResponse
func (*PutResponse) EqualMessageVT ¶
func (this *PutResponse) EqualMessageVT(thatMsg any) bool
func (*PutResponse) EqualVT ¶
func (this *PutResponse) EqualVT(that *PutResponse) bool
func (*PutResponse) GetErr ¶
func (x *PutResponse) GetErr() string
func (*PutResponse) GetExists ¶
func (x *PutResponse) GetExists() bool
func (*PutResponse) GetRef ¶
func (x *PutResponse) GetRef() *block.BlockRef
func (*PutResponse) MarshalBlock ¶
func (o *PutResponse) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*PutResponse) MarshalJSON ¶
func (x *PutResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PutResponse to JSON.
func (*PutResponse) MarshalProtoJSON ¶
func (x *PutResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the PutResponse message to JSON.
func (*PutResponse) MarshalProtoText ¶
func (x *PutResponse) MarshalProtoText() string
func (*PutResponse) MarshalToSizedBufferVT ¶
func (m *PutResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*PutResponse) MarshalToVT ¶
func (m *PutResponse) MarshalToVT(dAtA []byte) (int, error)
func (*PutResponse) MarshalVT ¶
func (m *PutResponse) MarshalVT() (dAtA []byte, err error)
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶
func (x *PutResponse) Reset()
func (*PutResponse) SizeVT ¶
func (m *PutResponse) SizeVT() (n int)
func (*PutResponse) String ¶
func (x *PutResponse) String() string
func (*PutResponse) UnmarshalBlock ¶
func (o *PutResponse) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*PutResponse) UnmarshalJSON ¶
func (x *PutResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the PutResponse from JSON.
func (*PutResponse) UnmarshalProtoJSON ¶
func (x *PutResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the PutResponse message from JSON.
func (*PutResponse) UnmarshalVT ¶
func (m *PutResponse) UnmarshalVT(dAtA []byte) error
func (*PutResponse) Validate ¶
func (o *PutResponse) Validate() error
Validate validates the put response.
type RmResponse ¶
type RmResponse struct {
// Removed indicates the request was processed successfully.
// Must be set if err is empty.
Removed bool `protobuf:"varint,1,opt,name=removed,proto3" json:"removed,omitempty"`
// Err contains any error deleting the block.
Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
// contains filtered or unexported fields
}
RmResponse is the response to a Rm request.
func (*RmResponse) CloneMessageVT ¶
func (m *RmResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*RmResponse) CloneVT ¶
func (m *RmResponse) CloneVT() *RmResponse
func (*RmResponse) EqualMessageVT ¶
func (this *RmResponse) EqualMessageVT(thatMsg any) bool
func (*RmResponse) EqualVT ¶
func (this *RmResponse) EqualVT(that *RmResponse) bool
func (*RmResponse) GetErr ¶
func (x *RmResponse) GetErr() string
func (*RmResponse) GetRemoved ¶
func (x *RmResponse) GetRemoved() bool
func (*RmResponse) MarshalBlock ¶
func (o *RmResponse) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary.
func (*RmResponse) MarshalJSON ¶
func (x *RmResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the RmResponse to JSON.
func (*RmResponse) MarshalProtoJSON ¶
func (x *RmResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the RmResponse message to JSON.
func (*RmResponse) MarshalProtoText ¶
func (x *RmResponse) MarshalProtoText() string
func (*RmResponse) MarshalToSizedBufferVT ¶
func (m *RmResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*RmResponse) MarshalToVT ¶
func (m *RmResponse) MarshalToVT(dAtA []byte) (int, error)
func (*RmResponse) MarshalVT ¶
func (m *RmResponse) MarshalVT() (dAtA []byte, err error)
func (*RmResponse) ProtoMessage ¶
func (*RmResponse) ProtoMessage()
func (*RmResponse) Reset ¶
func (x *RmResponse) Reset()
func (*RmResponse) SizeVT ¶
func (m *RmResponse) SizeVT() (n int)
func (*RmResponse) String ¶
func (x *RmResponse) String() string
func (*RmResponse) UnmarshalBlock ¶
func (o *RmResponse) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object.
func (*RmResponse) UnmarshalJSON ¶
func (x *RmResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the RmResponse from JSON.
func (*RmResponse) UnmarshalProtoJSON ¶
func (x *RmResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the RmResponse message from JSON.
func (*RmResponse) UnmarshalVT ¶
func (m *RmResponse) UnmarshalVT(dAtA []byte) error