Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶
type Basic struct { ID bson.ObjectId `bson:"_id,omitempty"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` Deleted bool `bson:"deleted"` }
Basic holds basic info for db record
func (*Basic) PreparePut ¶
func (b *Basic) PreparePut()
PreparePut prepares Basic before database put operation
type Conversation ¶
type Conversation struct { Basic `bson:",inline"` ClientID string `bson:"ClientID"` ConversationName string `bson:"ConversationName"` ConversationAdmin string `bson:"ConversationAdmin"` Members []Member `bson:"Members"` }
Conversation holds conversation basic info
type Member ¶
type Member struct { MemberID string `bson:"MemberID"` NickName string `bson:"NickName"` Role string `bson:"Role"` JoinedBy string `bson:"JoinedBy"` JoiningTime time.Time `bson:"JoiningTime"` RemovedBy string `bson:"RemovedBy,omitempty"` RemovingTime time.Time `bson:"RemovingTime,omitempty"` LeavingTime time.Time `bson:"LeavingTime,omitempty"` }
Member holds conversation member info
type Role ¶
type Role struct { Basic `bson:",inline"` Name string `bson:"name"` RoleAccess app.AccessList `bson:"role_access"` UserAccess app.AccessList `bson:"user_access"` CredentialAccess app.AccessList `bson:"credential_access"` ConversationAccess app.AccessList `bson:"conversation_access"` }
Role holds role data
type User ¶
type User struct { Basic `bson:",inline"` UserName string `bson:"user_name,omitempty"` Name string `bson:"name,omitempty"` Password string `bson:"password,omitempty"` RoleID bson.ObjectId `bson:"role_id,omitempty"` Email string `bson:"email,omitempty"` Verified bool `bson:"verified,omitempty"` Phone string `bson:"phone,omitempty"` Address []string `bson:"address,omitempty"` DateOfBirth time.Time `bson:"data_of_birth,omitempty"` Gender string `bson:"gender,omitempty"` }
User holds User data
Click to show internal directories.
Click to hide internal directories.