Documentation ¶
Overview ¶
Package identitypb provides the "well-known" Identity type for representing application and handler (etc) identifies as Protocol Buffers messages.
Index ¶
- Variables
- type Identity
- func (*Identity) Descriptor() ([]byte, []int)deprecated
- func (x *Identity) Equal(id *Identity) bool
- func (x *Identity) Format(f fmt.State, verb rune)
- func (x *Identity) GetKey() *uuidpb.UUID
- func (x *Identity) GetName() string
- func (*Identity) ProtoMessage()
- func (x *Identity) ProtoReflect() protoreflect.Message
- func (x *Identity) Reset()
- func (x *Identity) SetKey(v *uuidpb.UUID)
- func (x *Identity) SetName(v string)
- func (x *Identity) String() string
- func (x *Identity) Validate() error
- type IdentityBuilder
Constants ¶
This section is empty.
Variables ¶
var File_github_com_dogmatiq_enginekit_protobuf_identitypb_identity_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct { // Name is the entity's human-readable name. // // The name should be unique enough to allow a human to identify the entity // without ambiguity. There is no hard requirement for uniqueness. // // Entity names may be changed at any time. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Key is the entity's immutable, unique key. // // The key is used to uniquely identify the entity globally, and across all // time. Every entity must have its own UUID, which must not be changed. Key *uuidpb.UUID `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
Identity represents the identity of an entity.
It is used to identify Dogma applications, handlers, sites, streams, etc.
func (*Identity) Descriptor
deprecated
func (*Identity) Format ¶
Format implements the fmt.Formatter interface, allowing UUIDs to be formatted with functions from the fmt package.
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
type IdentityBuilder ¶
type IdentityBuilder struct {
// contains filtered or unexported fields
}
func NewIdentityBuilder ¶
func NewIdentityBuilder() *IdentityBuilder
NewIdentityBuilder returns a builder that constructs Identity messages.
func (*IdentityBuilder) Build ¶
func (b *IdentityBuilder) Build() *Identity
Build returns a new Identity 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 (*IdentityBuilder) From ¶
func (b *IdentityBuilder) From(x *Identity) *IdentityBuilder
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 (*IdentityBuilder) WithKey ¶
func (b *IdentityBuilder) WithKey(v *uuidpb.UUID) *IdentityBuilder
WithKey configures the builder to set the Key field to v, then returns b.
func (*IdentityBuilder) WithName ¶
func (b *IdentityBuilder) WithName(v string) *IdentityBuilder
WithName configures the builder to set the Name field to v, then returns b.