Documentation ¶
Index ¶
- func ChecksumTypeToGRPC(t ChecksumType) refs.ChecksumType
- func ContainerIDsToGRPCMessage(ids []ContainerID) (res []*refs.ContainerID)
- func IsZeroSubnet(id *SubnetID) bool
- func MakeZeroSubnet(id *SubnetID)
- func ObjectIDListToGRPCMessage(ids []ObjectID) (res []*refs.ObjectID)
- func ObjectIDNestedListMarshal(fNum int64, buf []byte, ids []ObjectID) (off int)
- func ObjectIDNestedListSize(fNum int64, ids []ObjectID) (sz int)
- type Address
- func (a *Address) FromGRPCMessage(m grpc.Message) error
- func (a *Address) GetContainerID() *ContainerID
- func (a *Address) GetObjectID() *ObjectID
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) SetContainerID(v *ContainerID)
- func (a *Address) SetObjectID(v *ObjectID)
- func (a *Address) StableMarshal(buf []byte) []byte
- func (a *Address) StableSize() (size int)
- func (a *Address) ToGRPCMessage() grpc.Message
- func (a *Address) Unmarshal(data []byte) error
- func (a *Address) UnmarshalJSON(data []byte) error
- type Checksum
- func (c *Checksum) FromGRPCMessage(m grpc.Message) error
- func (c *Checksum) GetSum() []byte
- func (c *Checksum) GetType() ChecksumType
- func (c *Checksum) MarshalJSON() ([]byte, error)
- func (c *Checksum) SetSum(v []byte)
- func (c *Checksum) SetType(v ChecksumType)
- func (c *Checksum) StableMarshal(buf []byte) []byte
- func (c *Checksum) StableSize() (size int)
- func (c *Checksum) ToGRPCMessage() grpc.Message
- func (c *Checksum) Unmarshal(data []byte) error
- func (c *Checksum) UnmarshalJSON(data []byte) error
- type ChecksumType
- type ContainerID
- func (c *ContainerID) FromGRPCMessage(m grpc.Message) error
- func (c *ContainerID) GetValue() []byte
- func (c *ContainerID) MarshalJSON() ([]byte, error)
- func (c *ContainerID) SetValue(v []byte)
- func (c *ContainerID) StableMarshal(buf []byte) []byte
- func (c *ContainerID) StableSize() int
- func (c *ContainerID) ToGRPCMessage() grpc.Message
- func (c *ContainerID) Unmarshal(data []byte) error
- func (c *ContainerID) UnmarshalJSON(data []byte) error
- type ObjectID
- func (o *ObjectID) FromGRPCMessage(m grpc.Message) error
- func (o *ObjectID) GetValue() []byte
- func (o *ObjectID) MarshalJSON() ([]byte, error)
- func (o *ObjectID) SetValue(v []byte)
- func (o *ObjectID) StableMarshal(buf []byte) []byte
- func (o *ObjectID) StableSize() int
- func (o *ObjectID) ToGRPCMessage() grpc.Message
- func (o *ObjectID) Unmarshal(data []byte) error
- func (o *ObjectID) UnmarshalJSON(data []byte) error
- type OwnerID
- func (o *OwnerID) FromGRPCMessage(m grpc.Message) error
- func (o *OwnerID) GetValue() []byte
- func (o *OwnerID) MarshalJSON() ([]byte, error)
- func (o *OwnerID) SetValue(v []byte)
- func (o *OwnerID) StableMarshal(buf []byte) []byte
- func (o *OwnerID) StableSize() int
- func (o *OwnerID) ToGRPCMessage() grpc.Message
- func (o *OwnerID) Unmarshal(data []byte) error
- func (o *OwnerID) UnmarshalJSON(data []byte) error
- type Signature
- func (s *Signature) FromGRPCMessage(m grpc.Message) error
- func (s *Signature) GetKey() []byte
- func (s *Signature) GetScheme() SignatureScheme
- func (s *Signature) GetSign() []byte
- func (s *Signature) MarshalJSON() ([]byte, error)
- func (s *Signature) SetKey(v []byte)
- func (s *Signature) SetScheme(scheme SignatureScheme)
- func (s *Signature) SetSign(v []byte)
- func (s *Signature) StableMarshal(buf []byte) []byte
- func (s *Signature) StableSize() (size int)
- func (s *Signature) ToGRPCMessage() grpc.Message
- func (s *Signature) Unmarshal(data []byte) error
- func (s *Signature) UnmarshalJSON(data []byte) error
- type SignatureScheme
- type SubnetID
- func (s *SubnetID) FromGRPCMessage(m grpc.Message) error
- func (s *SubnetID) GetValue() uint32
- func (s *SubnetID) MarshalText() ([]byte, error)
- func (s *SubnetID) SetValue(id uint32)
- func (s *SubnetID) StableMarshal(buf []byte) []byte
- func (s *SubnetID) StableSize() (size int)
- func (s *SubnetID) ToGRPCMessage() grpc.Message
- func (s *SubnetID) Unmarshal(data []byte) error
- func (s *SubnetID) UnmarshalText(txt []byte) error
- type Version
- func (v *Version) FromGRPCMessage(m grpc.Message) error
- func (v *Version) GetMajor() uint32
- func (v *Version) GetMinor() uint32
- func (v *Version) MarshalJSON() ([]byte, error)
- func (v *Version) SetMajor(val uint32)
- func (v *Version) SetMinor(val uint32)
- func (v *Version) StableMarshal(buf []byte) []byte
- func (v *Version) StableSize() (size int)
- func (v *Version) ToGRPCMessage() grpc.Message
- func (v *Version) Unmarshal(data []byte) error
- func (v *Version) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChecksumTypeToGRPC ¶
func ChecksumTypeToGRPC(t ChecksumType) refs.ChecksumType
func ContainerIDsToGRPCMessage ¶
func ContainerIDsToGRPCMessage(ids []ContainerID) (res []*refs.ContainerID)
func IsZeroSubnet ¶
IsZeroSubnet returns true iff the SubnetID refers to zero subnet.
func MakeZeroSubnet ¶
func MakeZeroSubnet(id *SubnetID)
MakeZeroSubnet makes the SubnetID to refer to zero subnet.
func ObjectIDNestedListMarshal ¶
ObjectIDNestedListMarshal writes protobuf repeated ObjectID field with fNum number to buf.
func ObjectIDNestedListSize ¶
ObjectIDNestedListSize returns byte length of nested repeated ObjectID field with fNum number.
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func (*Address) GetContainerID ¶
func (a *Address) GetContainerID() *ContainerID
func (*Address) GetObjectID ¶
func (*Address) MarshalJSON ¶
func (*Address) SetContainerID ¶
func (a *Address) SetContainerID(v *ContainerID)
func (*Address) SetObjectID ¶
func (*Address) StableMarshal ¶
func (*Address) StableSize ¶
func (*Address) ToGRPCMessage ¶
func (*Address) UnmarshalJSON ¶
type Checksum ¶
type Checksum struct {
// contains filtered or unexported fields
}
func (*Checksum) GetType ¶
func (c *Checksum) GetType() ChecksumType
func (*Checksum) MarshalJSON ¶
func (*Checksum) SetType ¶
func (c *Checksum) SetType(v ChecksumType)
func (*Checksum) StableMarshal ¶
func (*Checksum) StableSize ¶
func (*Checksum) ToGRPCMessage ¶
func (*Checksum) UnmarshalJSON ¶
type ChecksumType ¶
type ChecksumType uint32
const ( UnknownChecksum ChecksumType = iota TillichZemor SHA256 )
func ChecksumTypeFromGRPC ¶
func ChecksumTypeFromGRPC(t refs.ChecksumType) ChecksumType
func (*ChecksumType) FromString ¶
func (t *ChecksumType) FromString(s string) bool
FromString parses ChecksumType from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (ChecksumType) String ¶
func (t ChecksumType) String() string
String returns string representation of ChecksumType.
type ContainerID ¶
type ContainerID struct {
// contains filtered or unexported fields
}
func ContainerIDsFromGRPCMessage ¶
func ContainerIDsFromGRPCMessage(idsV2 []*refs.ContainerID) (res []ContainerID, err error)
func (*ContainerID) FromGRPCMessage ¶
func (c *ContainerID) FromGRPCMessage(m grpc.Message) error
func (*ContainerID) GetValue ¶
func (c *ContainerID) GetValue() []byte
func (*ContainerID) MarshalJSON ¶
func (c *ContainerID) MarshalJSON() ([]byte, error)
func (*ContainerID) SetValue ¶
func (c *ContainerID) SetValue(v []byte)
func (*ContainerID) StableMarshal ¶
func (c *ContainerID) StableMarshal(buf []byte) []byte
func (*ContainerID) StableSize ¶
func (c *ContainerID) StableSize() int
func (*ContainerID) ToGRPCMessage ¶
func (c *ContainerID) ToGRPCMessage() grpc.Message
func (*ContainerID) Unmarshal ¶
func (c *ContainerID) Unmarshal(data []byte) error
func (*ContainerID) UnmarshalJSON ¶
func (c *ContainerID) UnmarshalJSON(data []byte) error
type ObjectID ¶
type ObjectID struct {
// contains filtered or unexported fields
}
func (*ObjectID) MarshalJSON ¶
func (*ObjectID) StableMarshal ¶
func (*ObjectID) StableSize ¶
func (*ObjectID) ToGRPCMessage ¶
func (*ObjectID) UnmarshalJSON ¶
type OwnerID ¶
type OwnerID struct {
// contains filtered or unexported fields
}
func (*OwnerID) MarshalJSON ¶
func (*OwnerID) StableMarshal ¶
func (*OwnerID) StableSize ¶
func (*OwnerID) ToGRPCMessage ¶
func (*OwnerID) UnmarshalJSON ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func (*Signature) GetScheme ¶ added in v2.12.0
func (s *Signature) GetScheme() SignatureScheme
func (*Signature) MarshalJSON ¶
func (*Signature) SetScheme ¶ added in v2.12.0
func (s *Signature) SetScheme(scheme SignatureScheme)
func (*Signature) StableMarshal ¶
func (*Signature) StableSize ¶
func (*Signature) ToGRPCMessage ¶
func (*Signature) UnmarshalJSON ¶
type SignatureScheme ¶ added in v2.12.0
type SignatureScheme uint32
const ( ECDSA_SHA512 SignatureScheme = iota ECDSA_RFC6979_SHA256 ECDSA_RFC6979_SHA256_WALLET_CONNECT )
func (*SignatureScheme) FromString ¶ added in v2.12.0
func (t *SignatureScheme) FromString(s string) bool
FromString parses SignatureScheme from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (SignatureScheme) String ¶ added in v2.12.0
func (t SignatureScheme) String() string
String returns string representation of SignatureScheme.
type SubnetID ¶
type SubnetID struct {
// contains filtered or unexported fields
}
func (*SubnetID) FromGRPCMessage ¶
FromGRPCMessage restores Info from grpc.Message.
Supported types:
- refs.SubnetID.
func (*SubnetID) MarshalText ¶
MarshalText encodes SubnetID into text format according to NeoFS API V2 protocol: value in base-10 integer string format.
Implements encoding.TextMarshaler.
func (*SubnetID) StableMarshal ¶
StableMarshal marshals SubnetID to NeoFS API V2 binary format (Protocol Buffers with direct field order).
Returns a slice of recorded data. Data is written to the provided buffer if there is enough space.
func (*SubnetID) StableSize ¶
StableSize returns the number of bytes required to write SubnetID in NeoFS API V2 binary format (see StableMarshal).
func (*SubnetID) ToGRPCMessage ¶
ToGRPCMessage forms refs.SubnetID message and returns it as grpc.Message.
func (*SubnetID) Unmarshal ¶
Unmarshal unmarshals SubnetID from NeoFS API V2 binary format (see StableMarshal). Must not be called on nil.
Note: empty data corresponds to zero ID value or nil pointer to it.
func (*SubnetID) UnmarshalText ¶
UnmarshalText decodes SubnetID from the text according to NeoFS API V2 protocol: should be base-10 integer string format with bitsize = 32.
Returns strconv.ErrRange if integer overflows uint32.
Must not be called on nil.
Implements encoding.TextUnmarshaler.
type Version ¶
type Version struct {
// contains filtered or unexported fields
}