Documentation
¶
Index ¶
- Variables
- func CheckApplyBucketConfigMatchesVolume(dir ApplyBucketConfig, volID string, alias []string) bool
- func MarshalObjectRefJSON(ref *ObjectRef) ([]byte, error)
- func NewObjectRefBlock() block.Block
- func NewObjectRefSubBlockCtor(r **ObjectRef) block.SubBlockCtor
- type AccessBucketFunc
- type ApplyBucketConfig
- type ApplyBucketConfigResult
- func (m *ApplyBucketConfigResult) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ApplyBucketConfigResult) CloneVT() *ApplyBucketConfigResult
- func (this *ApplyBucketConfigResult) EqualMessageVT(thatMsg any) bool
- func (this *ApplyBucketConfigResult) EqualVT(that *ApplyBucketConfigResult) bool
- func (x *ApplyBucketConfigResult) GetBucketConf() *Config
- func (x *ApplyBucketConfigResult) GetBucketId() string
- func (x *ApplyBucketConfigResult) GetError() string
- func (x *ApplyBucketConfigResult) GetOldBucketConf() *Config
- func (x *ApplyBucketConfigResult) GetTimestamp() *timestamppb.Timestamp
- func (x *ApplyBucketConfigResult) GetUpdated() bool
- func (x *ApplyBucketConfigResult) GetVolumeId() string
- func (x *ApplyBucketConfigResult) MarshalJSON() ([]byte, error)
- func (x *ApplyBucketConfigResult) MarshalProtoJSON(s *json.MarshalState)
- func (x *ApplyBucketConfigResult) MarshalProtoText() string
- func (m *ApplyBucketConfigResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ApplyBucketConfigResult) MarshalToVT(dAtA []byte) (int, error)
- func (m *ApplyBucketConfigResult) MarshalVT() (dAtA []byte, err error)
- func (*ApplyBucketConfigResult) ProtoMessage()
- func (x *ApplyBucketConfigResult) Reset()
- func (m *ApplyBucketConfigResult) SizeVT() (n int)
- func (x *ApplyBucketConfigResult) String() string
- func (x *ApplyBucketConfigResult) UnmarshalJSON(b []byte) error
- func (x *ApplyBucketConfigResult) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ApplyBucketConfigResult) UnmarshalVT(dAtA []byte) error
- type ApplyBucketConfigValue
- type Bucket
- type BucketHandle
- type BucketInfo
- func (m *BucketInfo) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *BucketInfo) CloneVT() *BucketInfo
- func (this *BucketInfo) EqualMessageVT(thatMsg any) bool
- func (this *BucketInfo) EqualVT(that *BucketInfo) bool
- func (x *BucketInfo) GetConfig() *Config
- func (x *BucketInfo) MarshalJSON() ([]byte, error)
- func (x *BucketInfo) MarshalProtoJSON(s *json.MarshalState)
- func (x *BucketInfo) MarshalProtoText() string
- func (m *BucketInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *BucketInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *BucketInfo) MarshalVT() (dAtA []byte, err error)
- func (*BucketInfo) ProtoMessage()
- func (x *BucketInfo) Reset()
- func (m *BucketInfo) SizeVT() (n int)
- func (x *BucketInfo) String() string
- func (x *BucketInfo) UnmarshalJSON(b []byte) error
- func (x *BucketInfo) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *BucketInfo) UnmarshalVT(dAtA []byte) error
- type BucketOpArgs
- func (m *BucketOpArgs) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *BucketOpArgs) CloneVT() *BucketOpArgs
- func (this *BucketOpArgs) EqualMessageVT(thatMsg any) bool
- func (this *BucketOpArgs) EqualVT(that *BucketOpArgs) bool
- func (x *BucketOpArgs) GetBucketId() string
- func (x *BucketOpArgs) GetVolumeId() string
- func (x *BucketOpArgs) MarshalJSON() ([]byte, error)
- func (x *BucketOpArgs) MarshalProtoJSON(s *json.MarshalState)
- func (x *BucketOpArgs) MarshalProtoText() string
- func (m *BucketOpArgs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *BucketOpArgs) MarshalToVT(dAtA []byte) (int, error)
- func (m *BucketOpArgs) MarshalVT() (dAtA []byte, err error)
- func (*BucketOpArgs) ProtoMessage()
- func (x *BucketOpArgs) Reset()
- func (m *BucketOpArgs) SizeVT() (n int)
- func (x *BucketOpArgs) String() string
- func (x *BucketOpArgs) UnmarshalJSON(b []byte) error
- func (x *BucketOpArgs) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *BucketOpArgs) UnmarshalVT(dAtA []byte) error
- func (r *BucketOpArgs) Validate() error
- type BucketOps
- type BuildBucketAPI
- type BuildBucketAPIValue
- 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 (x *Config) GetId() string
- func (x *Config) GetLookup() *LookupConfig
- func (x *Config) GetPutOpts() *block.PutOpts
- func (x *Config) GetRev() uint32
- 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 (*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 LookupConfig
- func (m *LookupConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *LookupConfig) CloneVT() *LookupConfig
- func (this *LookupConfig) EqualMessageVT(thatMsg any) bool
- func (this *LookupConfig) EqualVT(that *LookupConfig) bool
- func (x *LookupConfig) GetController() *proto.ControllerConfig
- func (x *LookupConfig) GetDisable() bool
- func (x *LookupConfig) MarshalJSON() ([]byte, error)
- func (x *LookupConfig) MarshalProtoJSON(s *json.MarshalState)
- func (x *LookupConfig) MarshalProtoText() string
- func (m *LookupConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *LookupConfig) MarshalToVT(dAtA []byte) (int, error)
- func (m *LookupConfig) MarshalVT() (dAtA []byte, err error)
- func (*LookupConfig) ProtoMessage()
- func (x *LookupConfig) Reset()
- func (m *LookupConfig) SizeVT() (n int)
- func (x *LookupConfig) String() string
- func (x *LookupConfig) UnmarshalJSON(b []byte) error
- func (x *LookupConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *LookupConfig) UnmarshalVT(dAtA []byte) error
- type ObjectRef
- func (o *ObjectRef) ApplyBlockRef(id uint32, ptr *block.BlockRef) error
- func (o *ObjectRef) BlockAliasIdentity() *block.AliasIdentityToken
- func (o *ObjectRef) Clone() *ObjectRef
- func (m *ObjectRef) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ObjectRef) CloneVT() *ObjectRef
- func (o *ObjectRef) CopyFrom(ot *ObjectRef)
- func (this *ObjectRef) EqualMessageVT(thatMsg any) bool
- func (this *ObjectRef) EqualVT(that *ObjectRef) bool
- func (o *ObjectRef) EqualsRef(ot *ObjectRef) bool
- func (o *ObjectRef) EqualsRefIgnoreRootRef(ot *ObjectRef) bool
- func (o *ObjectRef) GetBlockRefCtor(id uint32) block.Ctor
- func (o *ObjectRef) GetBlockRefs() (map[uint32]*block.BlockRef, error)
- func (x *ObjectRef) GetBucketId() string
- func (o *ObjectRef) GetEmpty() bool
- func (x *ObjectRef) GetRootRef() *block.BlockRef
- func (x *ObjectRef) GetTransformConf() *transform.Config
- func (x *ObjectRef) GetTransformConfRef() *block.BlockRef
- func (o *ObjectRef) IsNil() bool
- func (o *ObjectRef) MarshalB58() string
- func (o *ObjectRef) MarshalBlock() ([]byte, error)
- func (o *ObjectRef) MarshalJSON() ([]byte, error)
- func (o *ObjectRef) MarshalProtoJSON(s *json.MarshalState)
- func (x *ObjectRef) MarshalProtoText() string
- func (o *ObjectRef) MarshalString() string
- func (m *ObjectRef) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ObjectRef) MarshalToVT(dAtA []byte) (int, error)
- func (m *ObjectRef) MarshalVT() (dAtA []byte, err error)
- func (o *ObjectRef) ParseFromB58(ref string) error
- func (*ObjectRef) ProtoMessage()
- func (x *ObjectRef) Reset()
- func (m *ObjectRef) SizeVT() (n int)
- func (x *ObjectRef) String() string
- func (o *ObjectRef) UnmarshalB58(ref string) error
- func (o *ObjectRef) UnmarshalBlock(data []byte) error
- func (o *ObjectRef) UnmarshalJSON(b []byte) error
- func (o *ObjectRef) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ObjectRef) UnmarshalVT(dAtA []byte) error
- func (o *ObjectRef) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBucketIDEmpty is returned if the bucket id was empty. ErrBucketIDEmpty = errors.New("bucket id cannot be empty") // ErrStoreIDEmpty is returned if the bucket store id was empty. ErrStoreIDEmpty = errors.New("bucket store id cannot be empty") // ErrRevEmpty is returned if the revision was empty. ErrRevEmpty = errors.New("bucket rev cannot be empty") // ErrBucketNotFound is returned when the bucket was not found. ErrBucketNotFound = errors.New("bucket not found") )
Functions ¶
func CheckApplyBucketConfigMatchesVolume ¶
func CheckApplyBucketConfigMatchesVolume(dir ApplyBucketConfig, volID string, alias []string) bool
CheckApplyBucketConfigMatchesVolume checks if the directive matches the volume. volID is the primary volume ID. alias is a list of any alias volume IDs for volID.
func MarshalObjectRefJSON ¶
MarshalObjectRefJSON marshals an ObjectRef to JSON.
Returns "{}" if the ref is nil.
func NewObjectRefBlock ¶
NewObjectRefBlock constructs a new object ref block.
func NewObjectRefSubBlockCtor ¶
func NewObjectRefSubBlockCtor(r **ObjectRef) block.SubBlockCtor
NewObjectRefSubBlock constructs a new object ref sub-block constructor.
Types ¶
type AccessBucketFunc ¶
type AccessBucketFunc = func(ctx context.Context, released func()) (BucketHandle, func(), error)
AccessBucketFunc is a function to access a BucketHandle. Optionally pass a released function that may be called when the handle was released. Returns a release function.
func NewAccessBucketViaBusFunc ¶
func NewAccessBucketViaBusFunc(b bus.Bus, bucketID, bucketStoreID string, returnIfIdle bool) AccessBucketFunc
NewAccessBucketViaBusFunc builds a new func which accesses the Bucket on the given bus using the AccessBucket directive.
If returnIfIdle is set: ErrBucketNotFound is returned if not found.
type ApplyBucketConfig ¶
type ApplyBucketConfig interface {
// Directive indicates ApplyBucketConfig is a directive.
directive.Directive
// ApplyBucketConfigBucketConf returns the desired bucket config.
// The configuration with the highest rev will be applied.
// Cannot be empty.
ApplyBucketConfigBucketConf() *Config
// ApplyBucketConfigVolumeIDRe returns the volume ID constraint.
// Can be empty to select only volumes that already have the bucket.
// Cannot be specified if VolumeIDList is set.
ApplyBucketConfigVolumeIDRe() *regexp.Regexp
// ApplyBucketConfigVolumeIDList returns a specific list of volumes to apply to.
// If empty, uses the VolumeIDRe field instead.
// Cannot be specified if VolumeIDRe is set.
ApplyBucketConfigVolumeIDList() []string
}
ApplyBucketConfig is a directive to apply a bucket configuration.
func NewApplyBucketConfig ¶
func NewApplyBucketConfig( bucketConf *Config, volumeIDRe *regexp.Regexp, volumeIDList []string, ) ApplyBucketConfig
NewApplyBucketConfig constructs an ApplyBucketConfig.
func NewApplyBucketConfigToVolume ¶
func NewApplyBucketConfigToVolume(bucketConf *Config, volumeID string) ApplyBucketConfig
NewApplyBucketConfigToVolume constructs an ApplyBucketConfig with the volume id.
func NewApplyBucketConfigToVolumes ¶
func NewApplyBucketConfigToVolumes(bucketConf *Config, volumeIDs []string) ApplyBucketConfig
NewApplyBucketConfigToVolumes constructs an ApplyBucketConfig with a list of volume ids.
type ApplyBucketConfigResult ¶
type ApplyBucketConfigResult struct {
// VolumeId is the volume ID for this apply event.
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volumeId,omitempty"`
// BucketId returns the bucket ID for this apply event.
BucketId string `protobuf:"bytes,2,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
// BucketConf returns the bucket configuration applied.
BucketConf *Config `protobuf:"bytes,3,opt,name=bucket_conf,json=bucketConf,proto3" json:"bucketConf,omitempty"`
// OldBucketConf returns the previous bucket configuration.
OldBucketConf *Config `protobuf:"bytes,4,opt,name=old_bucket_conf,json=oldBucketConf,proto3" json:"oldBucketConf,omitempty"`
// Timestamp returns the timestamp of the event.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Updated indicates if the value was updated.
Updated bool `protobuf:"varint,6,opt,name=updated,proto3" json:"updated,omitempty"`
// Error contains any error applying the value.
// Note: all other values might be empty if this is set.
Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
ApplyBucketConfigResult is the result of the ApplyBucketConfig directive.
func (*ApplyBucketConfigResult) CloneMessageVT ¶
func (m *ApplyBucketConfigResult) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ApplyBucketConfigResult) CloneVT ¶
func (m *ApplyBucketConfigResult) CloneVT() *ApplyBucketConfigResult
func (*ApplyBucketConfigResult) EqualMessageVT ¶
func (this *ApplyBucketConfigResult) EqualMessageVT(thatMsg any) bool
func (*ApplyBucketConfigResult) EqualVT ¶
func (this *ApplyBucketConfigResult) EqualVT(that *ApplyBucketConfigResult) bool
func (*ApplyBucketConfigResult) GetBucketConf ¶
func (x *ApplyBucketConfigResult) GetBucketConf() *Config
func (*ApplyBucketConfigResult) GetBucketId ¶
func (x *ApplyBucketConfigResult) GetBucketId() string
func (*ApplyBucketConfigResult) GetError ¶
func (x *ApplyBucketConfigResult) GetError() string
func (*ApplyBucketConfigResult) GetOldBucketConf ¶
func (x *ApplyBucketConfigResult) GetOldBucketConf() *Config
func (*ApplyBucketConfigResult) GetTimestamp ¶
func (x *ApplyBucketConfigResult) GetTimestamp() *timestamppb.Timestamp
func (*ApplyBucketConfigResult) GetUpdated ¶
func (x *ApplyBucketConfigResult) GetUpdated() bool
func (*ApplyBucketConfigResult) GetVolumeId ¶
func (x *ApplyBucketConfigResult) GetVolumeId() string
func (*ApplyBucketConfigResult) MarshalJSON ¶
func (x *ApplyBucketConfigResult) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ApplyBucketConfigResult to JSON.
func (*ApplyBucketConfigResult) MarshalProtoJSON ¶
func (x *ApplyBucketConfigResult) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ApplyBucketConfigResult message to JSON.
func (*ApplyBucketConfigResult) MarshalProtoText ¶
func (x *ApplyBucketConfigResult) MarshalProtoText() string
func (*ApplyBucketConfigResult) MarshalToSizedBufferVT ¶
func (m *ApplyBucketConfigResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ApplyBucketConfigResult) MarshalToVT ¶
func (m *ApplyBucketConfigResult) MarshalToVT(dAtA []byte) (int, error)
func (*ApplyBucketConfigResult) MarshalVT ¶
func (m *ApplyBucketConfigResult) MarshalVT() (dAtA []byte, err error)
func (*ApplyBucketConfigResult) ProtoMessage ¶
func (*ApplyBucketConfigResult) ProtoMessage()
func (*ApplyBucketConfigResult) Reset ¶
func (x *ApplyBucketConfigResult) Reset()
func (*ApplyBucketConfigResult) SizeVT ¶
func (m *ApplyBucketConfigResult) SizeVT() (n int)
func (*ApplyBucketConfigResult) String ¶
func (x *ApplyBucketConfigResult) String() string
func (*ApplyBucketConfigResult) UnmarshalJSON ¶
func (x *ApplyBucketConfigResult) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ApplyBucketConfigResult from JSON.
func (*ApplyBucketConfigResult) UnmarshalProtoJSON ¶
func (x *ApplyBucketConfigResult) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ApplyBucketConfigResult message from JSON.
func (*ApplyBucketConfigResult) UnmarshalVT ¶
func (m *ApplyBucketConfigResult) UnmarshalVT(dAtA []byte) error
type ApplyBucketConfigValue ¶
type ApplyBucketConfigValue = *ApplyBucketConfigResult
ApplyBucketConfigValue is the result type for ApplyBucketConfig.
func ExApplyBucketConfig ¶
func ExApplyBucketConfig(ctx context.Context, b bus.Bus, apply ApplyBucketConfig) (ApplyBucketConfigValue, error)
ExApplyBucketConfig executes applying a bucket config directive.
type Bucket ¶
type Bucket interface {
// BucketOps indicates Bucket implements the bucket operations.
BucketOps
// GetBucketConfig returns a copy of the bucket configuration.
GetBucketConfig() *Config
}
Bucket is a bucket API handle. All calls use the bucket handle context.
func NewBucketRW ¶
NewBucketRW constructs a new Bucket handle using a read handle and an optional write handle. If the write handle is not nil, the write (put and delete) calls will go to it. Otherwise, all calls are sent to the read handle.
type BucketHandle ¶
type BucketHandle interface {
// GetID returns the bucket ID.
GetID() string
// GetExists returns if the bucket exists. If false, the bucket does not
// exist in the store, and all block calls will not work.
GetExists() bool
// GetBucketConfig returns the bucket configuration in use.
// May be nil if the bucket does not exist in the store.
GetBucketConfig() *Config
// GetBucket returns the bucket object.
// May be nil if the bucket does not exist in the store.
GetBucket() Bucket
}
BucketHandle is a bucket API handle. All calls use the bucket handle context.
func NewBucketHandle ¶
func NewBucketHandle(bucketID string, bkt Bucket) BucketHandle
NewBucketHandle constructs a new bucket handle.
type BucketInfo ¶
type BucketInfo struct {
// Config contains the current latest bucket configuration.
Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
// contains filtered or unexported fields
}
BucketInfo is general information about a bucket.
func NewBucketInfo ¶
func NewBucketInfo(conf *Config) *BucketInfo
NewBucketInfo constructs a new bucket info with required fields.
func (*BucketInfo) CloneMessageVT ¶
func (m *BucketInfo) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*BucketInfo) CloneVT ¶
func (m *BucketInfo) CloneVT() *BucketInfo
func (*BucketInfo) EqualMessageVT ¶
func (this *BucketInfo) EqualMessageVT(thatMsg any) bool
func (*BucketInfo) EqualVT ¶
func (this *BucketInfo) EqualVT(that *BucketInfo) bool
func (*BucketInfo) GetConfig ¶
func (x *BucketInfo) GetConfig() *Config
func (*BucketInfo) MarshalJSON ¶
func (x *BucketInfo) MarshalJSON() ([]byte, error)
MarshalJSON marshals the BucketInfo to JSON.
func (*BucketInfo) MarshalProtoJSON ¶
func (x *BucketInfo) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the BucketInfo message to JSON.
func (*BucketInfo) MarshalProtoText ¶
func (x *BucketInfo) MarshalProtoText() string
func (*BucketInfo) MarshalToSizedBufferVT ¶
func (m *BucketInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BucketInfo) MarshalToVT ¶
func (m *BucketInfo) MarshalToVT(dAtA []byte) (int, error)
func (*BucketInfo) MarshalVT ¶
func (m *BucketInfo) MarshalVT() (dAtA []byte, err error)
func (*BucketInfo) ProtoMessage ¶
func (*BucketInfo) ProtoMessage()
func (*BucketInfo) Reset ¶
func (x *BucketInfo) Reset()
func (*BucketInfo) SizeVT ¶
func (m *BucketInfo) SizeVT() (n int)
func (*BucketInfo) String ¶
func (x *BucketInfo) String() string
func (*BucketInfo) UnmarshalJSON ¶
func (x *BucketInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the BucketInfo from JSON.
func (*BucketInfo) UnmarshalProtoJSON ¶
func (x *BucketInfo) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the BucketInfo message from JSON.
func (*BucketInfo) UnmarshalVT ¶
func (m *BucketInfo) UnmarshalVT(dAtA []byte) error
type BucketOpArgs ¶
type BucketOpArgs struct {
// BucketId is the bucket ID to operate on.
BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
// VolumeId is the volume ID to operate on.
// If empty, will use the lookup controller.
VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId,proto3" json:"volumeId,omitempty"`
// contains filtered or unexported fields
}
BucketOpArgs are common arguments for a bucket operation.
func (*BucketOpArgs) CloneMessageVT ¶
func (m *BucketOpArgs) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*BucketOpArgs) CloneVT ¶
func (m *BucketOpArgs) CloneVT() *BucketOpArgs
func (*BucketOpArgs) EqualMessageVT ¶
func (this *BucketOpArgs) EqualMessageVT(thatMsg any) bool
func (*BucketOpArgs) EqualVT ¶
func (this *BucketOpArgs) EqualVT(that *BucketOpArgs) bool
func (*BucketOpArgs) GetBucketId ¶
func (x *BucketOpArgs) GetBucketId() string
func (*BucketOpArgs) GetVolumeId ¶
func (x *BucketOpArgs) GetVolumeId() string
func (*BucketOpArgs) MarshalJSON ¶
func (x *BucketOpArgs) MarshalJSON() ([]byte, error)
MarshalJSON marshals the BucketOpArgs to JSON.
func (*BucketOpArgs) MarshalProtoJSON ¶
func (x *BucketOpArgs) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the BucketOpArgs message to JSON.
func (*BucketOpArgs) MarshalProtoText ¶
func (x *BucketOpArgs) MarshalProtoText() string
func (*BucketOpArgs) MarshalToSizedBufferVT ¶
func (m *BucketOpArgs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BucketOpArgs) MarshalToVT ¶
func (m *BucketOpArgs) MarshalToVT(dAtA []byte) (int, error)
func (*BucketOpArgs) MarshalVT ¶
func (m *BucketOpArgs) MarshalVT() (dAtA []byte, err error)
func (*BucketOpArgs) ProtoMessage ¶
func (*BucketOpArgs) ProtoMessage()
func (*BucketOpArgs) Reset ¶
func (x *BucketOpArgs) Reset()
func (*BucketOpArgs) SizeVT ¶
func (m *BucketOpArgs) SizeVT() (n int)
func (*BucketOpArgs) String ¶
func (x *BucketOpArgs) String() string
func (*BucketOpArgs) UnmarshalJSON ¶
func (x *BucketOpArgs) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the BucketOpArgs from JSON.
func (*BucketOpArgs) UnmarshalProtoJSON ¶
func (x *BucketOpArgs) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the BucketOpArgs message from JSON.
func (*BucketOpArgs) UnmarshalVT ¶
func (m *BucketOpArgs) UnmarshalVT(dAtA []byte) error
func (*BucketOpArgs) Validate ¶
func (r *BucketOpArgs) Validate() error
Validate validates the op arguments.
type BucketOps ¶
BucketOps are operations against a bucket API handle. All calls use the bucket handle context.
type BuildBucketAPI ¶
type BuildBucketAPI interface {
// Directive indicates BuildBucketAPI is a directive.
directive.Directive
// BuildBucketAPIBucketID returns the bucket ID constraint.
// Cannot be empty.
BuildBucketAPIBucketID() string
// BuildBucketAPIStoreID returns the store ID constraint.
// The ID can be either a bucket store ID or a volume ID.
// Cannot be empty.
BuildBucketAPIStoreID() string
}
BuildBucketAPI is a directive to get an API handle for a storage bucket.
func NewBuildBucketAPI ¶
func NewBuildBucketAPI(bucketID, storeID string) BuildBucketAPI
NewBuildBucketAPI constructs a new BuildBucketAPI directive.
type BuildBucketAPIValue ¶
type BuildBucketAPIValue = BucketHandle
BuildBucketAPIValue is the result type for BuildBucketAPI. The value is removed and replaced when any values change.
type Config ¶
type Config struct {
// Id is the bucket identifier.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Rev is the configuration rev.
// increment by 1 on modification
Rev uint32 `protobuf:"varint,2,opt,name=rev,proto3" json:"rev,omitempty"`
// PutOpts are the default put options for the bucket.
PutOpts *block.PutOpts `protobuf:"bytes,4,opt,name=put_opts,json=putOpts,proto3" json:"putOpts,omitempty"`
// Lookup controls the lookup confiuration.
Lookup *LookupConfig `protobuf:"bytes,5,opt,name=lookup,proto3" json:"lookup,omitempty"` // TODO: block size limit?
// contains filtered or unexported fields
}
Config is a bucket configuration object.
func NewConfig ¶
func NewConfig( id string, rev uint32, lkConfig *LookupConfig, ) (*Config, error)
NewConfig constructs a new bucket config.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) GetLookup ¶
func (x *Config) GetLookup() *LookupConfig
func (*Config) GetPutOpts ¶
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 LookupConfig ¶
type LookupConfig struct {
// Disble indicates we should not service cross-volume calls against this
// bucket.
Disable bool `protobuf:"varint,1,opt,name=disable,proto3" json:"disable,omitempty"`
// Controller contains the lookup controller configuration.
// If unset, will default to the node-default lookup controller.
// If disabled, this field will be ignored.
Controller *proto.ControllerConfig `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
// contains filtered or unexported fields
}
LookupConfig configures the bucket behavior across multiple volumes.
func NewLookupConfig ¶
func NewLookupConfig(conf configset.ControllerConfig) (*LookupConfig, error)
NewLookupConfig constructs a new LookupConfig with a config object.
If the config is nil sets Disable: true.
func (*LookupConfig) CloneMessageVT ¶
func (m *LookupConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*LookupConfig) CloneVT ¶
func (m *LookupConfig) CloneVT() *LookupConfig
func (*LookupConfig) EqualMessageVT ¶
func (this *LookupConfig) EqualMessageVT(thatMsg any) bool
func (*LookupConfig) EqualVT ¶
func (this *LookupConfig) EqualVT(that *LookupConfig) bool
func (*LookupConfig) GetController ¶
func (x *LookupConfig) GetController() *proto.ControllerConfig
func (*LookupConfig) GetDisable ¶
func (x *LookupConfig) GetDisable() bool
func (*LookupConfig) MarshalJSON ¶
func (x *LookupConfig) MarshalJSON() ([]byte, error)
MarshalJSON marshals the LookupConfig to JSON.
func (*LookupConfig) MarshalProtoJSON ¶
func (x *LookupConfig) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the LookupConfig message to JSON.
func (*LookupConfig) MarshalProtoText ¶
func (x *LookupConfig) MarshalProtoText() string
func (*LookupConfig) MarshalToSizedBufferVT ¶
func (m *LookupConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*LookupConfig) MarshalToVT ¶
func (m *LookupConfig) MarshalToVT(dAtA []byte) (int, error)
func (*LookupConfig) MarshalVT ¶
func (m *LookupConfig) MarshalVT() (dAtA []byte, err error)
func (*LookupConfig) ProtoMessage ¶
func (*LookupConfig) ProtoMessage()
func (*LookupConfig) Reset ¶
func (x *LookupConfig) Reset()
func (*LookupConfig) SizeVT ¶
func (m *LookupConfig) SizeVT() (n int)
func (*LookupConfig) String ¶
func (x *LookupConfig) String() string
func (*LookupConfig) UnmarshalJSON ¶
func (x *LookupConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the LookupConfig from JSON.
func (*LookupConfig) UnmarshalProtoJSON ¶
func (x *LookupConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the LookupConfig message from JSON.
func (*LookupConfig) UnmarshalVT ¶
func (m *LookupConfig) UnmarshalVT(dAtA []byte) error
type ObjectRef ¶
type ObjectRef struct {
// RootRef is the root block ref.
RootRef *block.BlockRef `protobuf:"bytes,1,opt,name=root_ref,json=rootRef,proto3" json:"rootRef,omitempty"`
// BucketId is the bucket id, if switching buckets.
// May be empty to indicate same bucket.
BucketId string `protobuf:"bytes,2,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
// TransformConfRef is the transformation configuration block ref.
// Must be encoded with the same transformation config as the parent.
// May be empty to indicate same conf as parent.
TransformConfRef *block.BlockRef `protobuf:"bytes,3,opt,name=transform_conf_ref,json=transformConfRef,proto3" json:"transformConfRef,omitempty"`
// TransformConf is an in-line transform configuration.
TransformConf *transform.Config `protobuf:"bytes,4,opt,name=transform_conf,json=transformConf,proto3" json:"transformConf,omitempty"`
// contains filtered or unexported fields
}
ObjectRef is a reference that may contain a transformation config reference and/or a bucket ID change.
protobuf-go-lite:disable-json
func ParseObjectRef ¶
ParseObjectRef parses an object ref string.
func UnmarshalObjectRef ¶
UnmarshalObjectRef attempts to unmarshal an ObjectRef from bytes.
func UnmarshalObjectRefJSON ¶
UnmarshalObjectRefJSON attempts to unmarshal an ObjectRef from JSON.
func (*ObjectRef) ApplyBlockRef ¶
ApplyBlockRef applies a ref change with a field id. The reference may be nil if the child block is nil.
func (*ObjectRef) BlockAliasIdentity ¶ added in v0.52.0
func (o *ObjectRef) BlockAliasIdentity() *block.AliasIdentityToken
BlockAliasIdentity returns the in-memory alias token for ObjectRef.
func (*ObjectRef) CloneMessageVT ¶
func (m *ObjectRef) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ObjectRef) EqualMessageVT ¶
func (*ObjectRef) EqualsRefIgnoreRootRef ¶
EqualsRefIgnoreRootRef checks if two refs are equal except for RootRef.
func (*ObjectRef) GetBlockRefCtor ¶
GetBlockRefCtor returns the constructor for the block at the ref id. Return nil to indicate invalid ref ID or unknown.
func (*ObjectRef) GetBlockRefs ¶
GetBlockRefs returns all block references by ID. May return nil, and values may also be nil. Note: this does not include pending references (in a cursor)
func (*ObjectRef) GetBucketId ¶
func (*ObjectRef) GetEmpty ¶
GetEmpty returns if the ref and transform configs are empty.
NOTE: ignores if BucketId is empty.
func (*ObjectRef) GetRootRef ¶
func (*ObjectRef) GetTransformConf ¶
func (*ObjectRef) GetTransformConfRef ¶
func (*ObjectRef) MarshalB58 ¶
MarshalB58 marshals the reference to a base58 string form.
func (*ObjectRef) MarshalBlock ¶
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ObjectRef) MarshalJSON ¶
MarshalJSON marshals the ObjectRef to JSON.
func (*ObjectRef) MarshalProtoJSON ¶
func (o *ObjectRef) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ObjectRef message to JSON.
func (*ObjectRef) MarshalProtoText ¶
func (*ObjectRef) MarshalString ¶
MarshalString marshals the reference to a string form.
func (*ObjectRef) MarshalToSizedBufferVT ¶
func (*ObjectRef) ParseFromB58 ¶
ParseFromB58 parses the object ref from a base58 string.
func (*ObjectRef) ProtoMessage ¶
func (*ObjectRef) ProtoMessage()
func (*ObjectRef) UnmarshalB58 ¶
UnmarshalB58 unmarshals the reference from base58 string form.
func (*ObjectRef) UnmarshalBlock ¶
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ObjectRef) UnmarshalJSON ¶
UnmarshalJSON unmarshals the ObjectRef from JSON.
func (*ObjectRef) UnmarshalProtoJSON ¶
func (o *ObjectRef) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ObjectRef message from JSON.