address

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address refs.Address

Address represents v2-compatible object address.

func NewAddress

func NewAddress() *Address

NewAddress creates and initializes blank Address.

Works similar as NewAddressFromV2(new(Address)).

Defaults:

  • cid: nil;
  • oid: nil.

func NewAddressFromV2

func NewAddressFromV2(aV2 *refs.Address) *Address

NewAddressFromV2 converts v2 Address message to Address.

Nil refs.Address converts to nil.

func (*Address) ContainerID

func (a *Address) ContainerID() *cid.ID

ContainerID returns container identifier.

func (*Address) Marshal

func (a *Address) Marshal() ([]byte, error)

Marshal marshals Address into a protobuf binary form.

func (*Address) MarshalJSON

func (a *Address) MarshalJSON() ([]byte, error)

MarshalJSON encodes Address to protobuf JSON format.

func (*Address) ObjectID

func (a *Address) ObjectID() *oid.ID

ObjectID returns object identifier.

func (*Address) Parse

func (a *Address) Parse(s string) error

Parse converts base58 string representation into Address.

func (*Address) SetContainerID

func (a *Address) SetContainerID(id *cid.ID)

SetContainerID sets container identifier.

func (*Address) SetObjectID

func (a *Address) SetObjectID(id *oid.ID)

SetObjectID sets object identifier.

func (*Address) String

func (a *Address) String() string

String returns string representation of Object.Address.

func (*Address) ToV2

func (a *Address) ToV2() *refs.Address

ToV2 converts Address to v2 Address message.

Nil Address converts to nil.

func (*Address) Unmarshal

func (a *Address) Unmarshal(data []byte) error

Unmarshal unmarshals protobuf binary representation of Address.

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes Address from protobuf JSON format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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