Documentation ¶
Index ¶
- type ID
- func (id *ID) Equal(id2 *ID) bool
- func (id *ID) Marshal() ([]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.ObjectID
- 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 ¶
ID represents v2-compatible object identifier.
func NewID ¶
func NewID() *ID
NewID creates and initializes blank ID.
Works similar as NewIDFromV2(new(ObjectID)).
Defaults:
- value: nil.
func (*ID) MarshalJSON ¶
MarshalJSON encodes ID to protobuf JSON format.
func (*ID) UnmarshalJSON ¶
UnmarshalJSON decodes ID from protobuf JSON format.
Click to show internal directories.
Click to hide internal directories.