Documentation ¶
Overview ¶
Package uuidpb provides the "well-known" UUID type for representing RFC 4122 UUIDs as Protocol Buffers messages.
Index ¶
- Variables
- func AsByteArray[T ~[16]B, B ~byte](x *UUID) T
- type Map
- type MapKey
- type Set
- type UUID
- func (x *UUID) AsBytes() []byte
- func (x *UUID) AsMapKey() MapKey
- func (x *UUID) AsString() string
- func (x *UUID) Compare(id *UUID) int
- func (x *UUID) DapperString() string
- func (*UUID) Descriptor() ([]byte, []int)deprecated
- func (x *UUID) Equal(id *UUID) bool
- func (x *UUID) Format(f fmt.State, verb rune)
- func (x *UUID) GetLower() uint64
- func (x *UUID) GetUpper() uint64
- func (x *UUID) Less(id *UUID) bool
- func (*UUID) ProtoMessage()
- func (x *UUID) ProtoReflect() protoreflect.Message
- func (x *UUID) Reset()
- func (x *UUID) SetLower(v uint64)
- func (x *UUID) SetUpper(v uint64)
- func (x *UUID) String() string
- func (x *UUID) Validate() error
- type UUIDBuilder
Constants ¶
This section is empty.
Variables ¶
var File_github_com_dogmatiq_enginekit_protobuf_uuidpb_uuid_proto protoreflect.FileDescriptor
Functions ¶
func AsByteArray ¶
AsByteArray returns the UUID as a byte array.
Types ¶
type Map ¶
Map is a map data structure that uses a UUID as its key.
func (Map[V]) Get ¶
Get returns the value associated with k, or the zero-value if k is not present in the map.
type MapKey ¶
type MapKey struct {
// contains filtered or unexported fields
}
MapKey is an opaque representation of a UUID that can be used as a map key.
func (MapKey) DapperString ¶ added in v0.10.1
DapperString implements github.com/dogmatiq/dapper.Stringer.
type UUID ¶
type UUID struct { Upper uint64 `protobuf:"varint,1,opt,name=upper,proto3" json:"upper,omitempty"` Lower uint64 `protobuf:"varint,2,opt,name=lower,proto3" json:"lower,omitempty"` // contains filtered or unexported fields }
UUID is a size-optimized representation of an RFC 4122 UUID.
func FromByteArray ¶
FromByteArray returns a UUID from a byte array.
func FromString ¶
FromString returns a UUID from an RFC 4122 string
func (*UUID) AsMapKey ¶
AsMapKey returns an opaque representation of the UUID that can be used as a map key.
func (*UUID) DapperString ¶
DapperString implements github.com/dogmatiq/dapper.Stringer.
func (*UUID) Descriptor
deprecated
func (*UUID) Format ¶
Format implements the fmt.Formatter interface, allowing UUIDs to be formatted with functions from the fmt package.
func (*UUID) ProtoMessage ¶
func (*UUID) ProtoMessage()
func (*UUID) ProtoReflect ¶
func (x *UUID) ProtoReflect() protoreflect.Message
type UUIDBuilder ¶
type UUIDBuilder struct {
// contains filtered or unexported fields
}
func NewUUIDBuilder ¶
func NewUUIDBuilder() *UUIDBuilder
NewUUIDBuilder returns a builder that constructs UUID messages.
func (*UUIDBuilder) Build ¶
func (b *UUIDBuilder) Build() *UUID
Build returns a new UUID containing the values configured via the builder.
Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.
func (*UUIDBuilder) From ¶
func (b *UUIDBuilder) From(x *UUID) *UUIDBuilder
From configures the builder to use x as the prototype for new messages, then returns b.
It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.
func (*UUIDBuilder) WithLower ¶
func (b *UUIDBuilder) WithLower(v uint64) *UUIDBuilder
WithLower configures the builder to set the Lower field to v, then returns b.
func (*UUIDBuilder) WithUpper ¶
func (b *UUIDBuilder) WithUpper(v uint64) *UUIDBuilder
WithUpper configures the builder to set the Upper field to v, then returns b.