Documentation ¶
Index ¶
- type ID
- func (id *ID) Equal(id2 *ID) bool
- func (id *ID) Marshal(b ...[]byte) ([]byte, error)
- func (id *ID) MarshalJSON() ([]byte, error)
- func (id *ID) Parse(s string) error
- func (id *ID) SetSHA256(v [sha256.Size]byte)
- func (id *ID) String() string
- func (id *ID) ToV2() *refs.ContainerID
- func (id *ID) Unmarshal(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID refs.ContainerID
ID represents v2-compatible container identifier.
func NewFromV2 ¶
func NewFromV2(idV2 *refs.ContainerID) *ID
NewFromV2 wraps v2 ContainerID message to ID.
func (*ID) Marshal ¶
Marshal marshals ID into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*ID) MarshalJSON ¶
MarshalJSON encodes ID to protobuf JSON format.
func (*ID) Parse ¶
Parse parses string representation of ID.
Returns error if s is not a base58 encoded ID data.
func (*ID) UnmarshalJSON ¶
UnmarshalJSON decodes ID from protobuf JSON format.
Click to show internal directories.
Click to hide internal directories.