Documentation ¶
Index ¶
- Variables
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetAccessToken() string
- func (x *Account) GetAddress() *Address
- func (x *Account) GetCreatedAt() *timestamppb.Timestamp
- func (x *Account) GetEmail() string
- func (x *Account) GetID() string
- func (x *Account) GetId() string
- func (x *Account) GetIsActive() bool
- func (x *Account) GetLevel() uint32
- func (x *Account) GetPassword() string
- func (x *Account) GetRoles() []*Role
- func (x *Account) GetSocialIDMap() map[string]string
- func (x *Account) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Account) GetUsername() string
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) SetCreatedAt(t *timestamppb.Timestamp)
- func (x *Account) SetID(id primitive.ObjectID)
- func (x *Account) SetInContext(c context.Context) context.Context
- func (x *Account) SetUpdatedAt(t *timestamppb.Timestamp)
- func (x *Account) String() string
- type Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetCity() string
- func (x *Address) GetState() string
- func (x *Address) GetStreet() string
- func (x *Address) GetZipCode() string
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var File_domain_user_model_user_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // ID is the unique identifier of the user account. // @gotags: bson:"_id" Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // Username is the username of the user. // @gotags: bson:"username" Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty" bson:"username"` // Email is the email address of the user. // @gotags: bson:"email" Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty" bson:"email"` // Password is the password of the user. // @gotags: json:"-" bson:"password" Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"-" bson:"password"` // AccessToken is the access token of the user. // @gotags: bson:"-" AccessToken string `protobuf:"bytes,12,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty" bson:"-"` // Address is the address of the user. // @gotags: bson:"address" Address *Address `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty" bson:"address"` // IsActive is the status of the user account. // @gotags: bson:"is_active" IsActive bool `protobuf:"varint,6,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty" bson:"is_active"` // Level is the access level of the user account. // @gotags: bson:"level" Level uint32 `protobuf:"varint,7,opt,name=Level,proto3" json:"Level,omitempty" bson:"level"` // Roles is the list of roles assigned to the user. // @gotags: bson:"roles" Roles []*Role `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty" bson:"roles"` // SocialIDMap is the map of social IDs of the user. // @gotags: bson:"social_id_map" SocialIDMap map[string]string `` /* 184-byte string literal not displayed */ // CreatedAt is the creation time of the user account. // @gotags: bson:"created_at" CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty" bson:"created_at"` // UpdatedAt is the update time of the user account. // @gotags: bson:"updated_at" UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty" bson:"updated_at"` // contains filtered or unexported fields }
Account is an entity that represents a user account.
func FromContext ¶
FromContext extracts the user from the context.
func (*Account) Descriptor
deprecated
func (*Account) GetAccessToken ¶
func (*Account) GetAddress ¶
func (*Account) GetCreatedAt ¶
func (x *Account) GetCreatedAt() *timestamppb.Timestamp
func (*Account) GetIsActive ¶
func (*Account) GetPassword ¶
func (*Account) GetSocialIDMap ¶
func (*Account) GetUpdatedAt ¶
func (x *Account) GetUpdatedAt() *timestamppb.Timestamp
func (*Account) GetUsername ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
func (*Account) SetCreatedAt ¶
func (x *Account) SetCreatedAt(t *timestamppb.Timestamp)
func (*Account) SetInContext ¶
SetInContext sets the user in the context.
func (*Account) SetUpdatedAt ¶
func (x *Account) SetUpdatedAt(t *timestamppb.Timestamp)
type Address ¶
type Address struct { // Street is the street address of the user. // @gotags: bson:"street" Street string `protobuf:"bytes,1,opt,name=street,proto3" json:"street,omitempty" bson:"street"` // City is the city where the user is located. // @gotags: bson:"city" City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty" bson:"city"` // State is the state where the user is located. // @gotags: bson:"state" State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty" bson:"state"` // ZipCode is the postal code of the user's location. // @gotags: bson:"zip_code" ZipCode string `protobuf:"bytes,4,opt,name=zip_code,json=zipCode,proto3" json:"zip_code,omitempty" bson:"zip_code"` // contains filtered or unexported fields }
Address is a value object that represents the address of a user.
func (*Address) Descriptor
deprecated
func (*Address) GetZipCode ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
type Role ¶
type Role struct { // ID is the unique identifier of the role. // @gotags: bson:"_id" Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // Name is the name of the role. // @gotags: bson:"name" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" bson:"name"` // contains filtered or unexported fields }
Role is an entity that represents the role of a user.
func (*Role) Descriptor
deprecated
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.