Documentation ¶
Index ¶
- Variables
- type User
- func (u *User) BeforeCreate(scope *gorm.Scope) error
- func (u *User) BeforeUpdate(scope *gorm.Scope) error
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetCreatedAt() uint32
- func (m *User) GetFirstName() string
- func (m *User) GetID() uint32
- func (m *User) GetLastName() string
- func (m *User) GetPassword() string
- func (m *User) GetRole() User_Role
- func (m *User) GetUpdatedAt() uint32
- func (m *User) GetUsername() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type User_Role
Constants ¶
This section is empty.
Variables ¶
View Source
var User_Role_name = map[int32]string{
0: "ROLE_USER",
1: "ROLE_CONTENT_ADMIN",
2: "ROLE_ADMIN",
}
View Source
var User_Role_value = map[string]int32{
"ROLE_USER": 0,
"ROLE_CONTENT_ADMIN": 1,
"ROLE_ADMIN": 2,
}
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` CreatedAt uint32 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt uint32 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` FirstName string `protobuf:"bytes,4,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,5,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` // @inject_tag: gorm:"unique;not null" Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty" gorm:"unique;not null"` // @inject_tag: json:"-" Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"-"` // @inject_tag: json:"role" Role User_Role `protobuf:"varint,8,opt,name=role,proto3,enum=models.User_Role" json:"role"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) BeforeCreate ¶
Add custom hooks here, e.g. for ORM
func (*User) Descriptor ¶
func (*User) GetCreatedAt ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) GetPassword ¶
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.