refs

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SignatureScheme_name = map[int32]string{
		0: "ECDSA_SHA512",
		1: "ECDSA_RFC6979_SHA256",
		2: "ECDSA_RFC6979_SHA256_WALLET_CONNECT",
	}
	SignatureScheme_value = map[string]int32{
		"ECDSA_SHA512":                        0,
		"ECDSA_RFC6979_SHA256":                1,
		"ECDSA_RFC6979_SHA256_WALLET_CONNECT": 2,
	}
)

Enum value maps for SignatureScheme.

View Source
var (
	ChecksumType_name = map[int32]string{
		0: "CHECKSUM_TYPE_UNSPECIFIED",
		1: "TZ",
		2: "SHA256",
	}
	ChecksumType_value = map[string]int32{
		"CHECKSUM_TYPE_UNSPECIFIED": 0,
		"TZ":                        1,
		"SHA256":                    2,
	}
)

Enum value maps for ChecksumType.

View Source
var File_refs_grpc_types_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Address

type Address struct {

	// Container identifier
	ContainerId *ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerID,proto3" json:"container_id,omitempty"`
	// Object identifier
	ObjectId *ObjectID `protobuf:"bytes,2,opt,name=object_id,json=objectID,proto3" json:"object_id,omitempty"`
	// contains filtered or unexported fields
}

Objects in NeoFS are addressed by their ContainerID and ObjectID.

String presentation of `Address` is a concatenation of string encoded `ContainerID` and `ObjectID` delimited by '/' character.

func (*Address) Descriptor deprecated

func (*Address) Descriptor() ([]byte, []int)

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetContainerId

func (x *Address) GetContainerId() *ContainerID

func (*Address) GetObjectId

func (x *Address) GetObjectId() *ObjectID

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

func (x *Address) ProtoReflect() protoreflect.Message

func (*Address) Reset

func (x *Address) Reset()

func (*Address) SetContainerId

func (x *Address) SetContainerId(v *ContainerID)

SetContainerId sets container identifier of the address.

func (*Address) SetObjectId

func (x *Address) SetObjectId(v *ObjectID)

SetObjectId sets object identifier of the address.

func (*Address) String

func (x *Address) String() string

type Checksum

type Checksum struct {

	// Checksum algorithm type
	Type ChecksumType `protobuf:"varint,1,opt,name=type,proto3,enum=neo.fs.v2.refs.ChecksumType" json:"type,omitempty"`
	// Checksum itself
	Sum []byte `protobuf:"bytes,2,opt,name=sum,proto3" json:"sum,omitempty"`
	// contains filtered or unexported fields
}

Checksum message. Depending on checksum algorithm type, the string presentation may vary:

  • TZ \ Hex encoded string without `0x` prefix
  • SHA256 \ Hex encoded string without `0x` prefix

func (*Checksum) Descriptor deprecated

func (*Checksum) Descriptor() ([]byte, []int)

Deprecated: Use Checksum.ProtoReflect.Descriptor instead.

func (*Checksum) GetSum

func (x *Checksum) GetSum() []byte

func (*Checksum) GetType

func (x *Checksum) GetType() ChecksumType

func (*Checksum) ProtoMessage

func (*Checksum) ProtoMessage()

func (*Checksum) ProtoReflect

func (x *Checksum) ProtoReflect() protoreflect.Message

func (*Checksum) Reset

func (x *Checksum) Reset()

func (*Checksum) SetChecksumType

func (x *Checksum) SetChecksumType(v ChecksumType)

SetChecksumType in generic checksum structure.

func (*Checksum) SetSum

func (x *Checksum) SetSum(v []byte)

SetSum in generic checksum structure.

func (*Checksum) String

func (x *Checksum) String() string

type ChecksumType

type ChecksumType int32

Checksum algorithm type.

const (
	// Unknown. Not used
	ChecksumType_CHECKSUM_TYPE_UNSPECIFIED ChecksumType = 0
	// Tillich-Zemor homomorphic hash function
	ChecksumType_TZ ChecksumType = 1
	// SHA-256
	ChecksumType_SHA256 ChecksumType = 2
)

func (ChecksumType) Descriptor

func (ChecksumType) Enum

func (x ChecksumType) Enum() *ChecksumType

func (ChecksumType) EnumDescriptor deprecated

func (ChecksumType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChecksumType.Descriptor instead.

func (*ChecksumType) FromString

func (x *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) Number

func (ChecksumType) String

func (x ChecksumType) String() string

func (ChecksumType) Type

type ContainerID

type ContainerID struct {

	// Container identifier in a binary format.
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

NeoFS container identifier. Container structures are immutable and content-addressed.

`ContainerID` is a 32 byte long [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of stable-marshalled container message.

String presentation is a [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.

JSON value will be data encoded as a string using standard base64 encoding with paddings. Either [standard](https://tools.ietf.org/html/rfc4648#section-4) or [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding with/without paddings are accepted.

func (*ContainerID) Descriptor deprecated

func (*ContainerID) Descriptor() ([]byte, []int)

Deprecated: Use ContainerID.ProtoReflect.Descriptor instead.

func (*ContainerID) GetValue

func (x *ContainerID) GetValue() []byte

func (*ContainerID) ProtoMessage

func (*ContainerID) ProtoMessage()

func (*ContainerID) ProtoReflect

func (x *ContainerID) ProtoReflect() protoreflect.Message

func (*ContainerID) Reset

func (x *ContainerID) Reset()

func (*ContainerID) SetValue

func (x *ContainerID) SetValue(v []byte)

SetValue sets container identifier in a binary format.

func (*ContainerID) String

func (x *ContainerID) String() string

type ObjectID

type ObjectID struct {

	// Object identifier in a binary format
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

NeoFS Object unique identifier. Objects are immutable and content-addressed. It means `ObjectID` will change if the `header` or the `payload` changes.

`ObjectID` is a 32 byte long [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of the object's `header` field, which, in it's turn, contains the hash of the object's payload.

String presentation is a [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.

JSON value will be data encoded as a string using standard base64 encoding with paddings. Either [standard](https://tools.ietf.org/html/rfc4648#section-4) or [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding with/without paddings are accepted.

func (*ObjectID) Descriptor deprecated

func (*ObjectID) Descriptor() ([]byte, []int)

Deprecated: Use ObjectID.ProtoReflect.Descriptor instead.

func (*ObjectID) GetValue

func (x *ObjectID) GetValue() []byte

func (*ObjectID) ProtoMessage

func (*ObjectID) ProtoMessage()

func (*ObjectID) ProtoReflect

func (x *ObjectID) ProtoReflect() protoreflect.Message

func (*ObjectID) Reset

func (x *ObjectID) Reset()

func (*ObjectID) SetValue

func (x *ObjectID) SetValue(v []byte)

SetValue sets object identifier in a binary format.

func (*ObjectID) String

func (x *ObjectID) String() string

type OwnerID

type OwnerID struct {

	// Identifier of the container owner in a binary format
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

`OwnerID` is a derivative of a user's main public key. The transformation algorithm is the same as for Neo3 wallet addresses. Neo3 wallet address can be directly used as `OwnerID`.

`OwnerID` is a 25 bytes sequence starting with Neo version prefix byte followed by 20 bytes of ScrptHash and 4 bytes of checksum.

String presentation is a [Base58 Check](https://en.bitcoin.it/wiki/Base58Check_encoding) Encoded string.

JSON value will be data encoded as a string using standard base64 encoding with paddings. Either [standard](https://tools.ietf.org/html/rfc4648#section-4) or [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding with/without paddings are accepted.

func (*OwnerID) Descriptor deprecated

func (*OwnerID) Descriptor() ([]byte, []int)

Deprecated: Use OwnerID.ProtoReflect.Descriptor instead.

func (*OwnerID) GetValue

func (x *OwnerID) GetValue() []byte

func (*OwnerID) ProtoMessage

func (*OwnerID) ProtoMessage()

func (*OwnerID) ProtoReflect

func (x *OwnerID) ProtoReflect() protoreflect.Message

func (*OwnerID) Reset

func (x *OwnerID) Reset()

func (*OwnerID) SetValue

func (x *OwnerID) SetValue(v []byte)

SetValue sets owner identifier in a binary format.

func (*OwnerID) String

func (x *OwnerID) String() string

type Signature

type Signature struct {

	// Public key used for signing
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Signature
	Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"`
	// Scheme contains digital signature scheme identifier
	Scheme SignatureScheme `protobuf:"varint,3,opt,name=scheme,proto3,enum=neo.fs.v2.refs.SignatureScheme" json:"scheme,omitempty"`
	// contains filtered or unexported fields
}

Signature of something in NeoFS.

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetKey

func (x *Signature) GetKey() []byte

func (*Signature) GetScheme

func (x *Signature) GetScheme() SignatureScheme

func (*Signature) GetSign

func (x *Signature) GetSign() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) SetKey

func (x *Signature) SetKey(v []byte)

SetKey sets public key in a binary format.

func (*Signature) SetScheme

func (x *Signature) SetScheme(s SignatureScheme)

SetScheme sets signature scheme.

func (*Signature) SetSign

func (x *Signature) SetSign(v []byte)

SetSign sets signature.

func (*Signature) String

func (x *Signature) String() string

type SignatureRFC6979

type SignatureRFC6979 struct {

	// Public key used for signing
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Deterministic ECDSA with SHA-256 hashing
	Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"`
	// contains filtered or unexported fields
}

RFC 6979 signature.

func (*SignatureRFC6979) Descriptor deprecated

func (*SignatureRFC6979) Descriptor() ([]byte, []int)

Deprecated: Use SignatureRFC6979.ProtoReflect.Descriptor instead.

func (*SignatureRFC6979) GetKey

func (x *SignatureRFC6979) GetKey() []byte

func (*SignatureRFC6979) GetSign

func (x *SignatureRFC6979) GetSign() []byte

func (*SignatureRFC6979) ProtoMessage

func (*SignatureRFC6979) ProtoMessage()

func (*SignatureRFC6979) ProtoReflect

func (x *SignatureRFC6979) ProtoReflect() protoreflect.Message

func (*SignatureRFC6979) Reset

func (x *SignatureRFC6979) Reset()

func (*SignatureRFC6979) SetKey

func (x *SignatureRFC6979) SetKey(v []byte)

SetKey sets public key in a binary format.

func (*SignatureRFC6979) SetSign

func (x *SignatureRFC6979) SetSign(v []byte)

SetSign sets signature.

func (*SignatureRFC6979) String

func (x *SignatureRFC6979) String() string

type SignatureScheme

type SignatureScheme int32

Signature scheme describes digital signing scheme used for (key, signature) pair.

const (
	// ECDSA with SHA-512 hashing (FIPS 186-3)
	SignatureScheme_ECDSA_SHA512 SignatureScheme = 0
	// Deterministic ECDSA with SHA-256 hashing (RFC 6979)
	SignatureScheme_ECDSA_RFC6979_SHA256 SignatureScheme = 1
	// Deterministic ECDSA with SHA-256 hashing using WalletConnect API.
	// Here the algorithm is the same, but the message format differs.
	SignatureScheme_ECDSA_RFC6979_SHA256_WALLET_CONNECT SignatureScheme = 2
)

func (SignatureScheme) Descriptor

func (SignatureScheme) Enum

func (x SignatureScheme) Enum() *SignatureScheme

func (SignatureScheme) EnumDescriptor deprecated

func (SignatureScheme) EnumDescriptor() ([]byte, []int)

Deprecated: Use SignatureScheme.Descriptor instead.

func (*SignatureScheme) FromString

func (x *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) Number

func (SignatureScheme) String

func (x SignatureScheme) String() string

func (SignatureScheme) Type

type SubnetID

type SubnetID struct {

	// 4-byte integer subnetwork identifier.
	Value uint32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

NeoFS subnetwork identifier.

String representation of a value is base-10 integer.

JSON representation is an object containing a single `value` number field.

func (*SubnetID) Descriptor deprecated

func (*SubnetID) Descriptor() ([]byte, []int)

Deprecated: Use SubnetID.ProtoReflect.Descriptor instead.

func (*SubnetID) GetValue

func (x *SubnetID) GetValue() uint32

func (*SubnetID) ProtoMessage

func (*SubnetID) ProtoMessage()

func (*SubnetID) ProtoReflect

func (x *SubnetID) ProtoReflect() protoreflect.Message

func (*SubnetID) Reset

func (x *SubnetID) Reset()

func (*SubnetID) SetValue

func (x *SubnetID) SetValue(v uint32)

SetValue sets subnet identifier in a base-10 integer format.

func (*SubnetID) String

func (x *SubnetID) String() string

type Version

type Version struct {

	// Major API version
	Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
	// Minor API version
	Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
	// contains filtered or unexported fields
}

API version used by a node.

String presentation is a Semantic Versioning 2.0.0 compatible version string with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number.

func (*Version) Descriptor deprecated

func (*Version) Descriptor() ([]byte, []int)

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetMajor

func (x *Version) GetMajor() uint32

func (*Version) GetMinor

func (x *Version) GetMinor() uint32

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

func (x *Version) ProtoReflect() protoreflect.Message

func (*Version) Reset

func (x *Version) Reset()

func (*Version) SetMajor

func (x *Version) SetMajor(v uint32)

SetMajor sets major version number.

func (*Version) SetMinor

func (x *Version) SetMinor(v uint32)

SetMinor sets minor version number.

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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