Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Users []primitive.ObjectID `json:"users,omitempty" bson:"users,omitempty"` Messages []primitive.ObjectID `json:"messages,omitempty" bson:"messages,omitempty"` }
Channel struct
type Message ¶
type Message struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Sender string `json:"sender,omitempty" bson:"sender,omitempty"` Text string `json:"text,omitempty" bson:"text,omitempty"` Date string `json:"date,omitempty" bson:"date,omitempty"` }
Message struct
type Token ¶
type Token struct { Username string `json:"username,omitempty" bson:"username,omitempty"` jwt.StandardClaims }
Token ...
type User ¶
type User struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` UserName string `json:"username,omitempty" bson:"username,omitempty" validate:"required"` Salt string `bson:"salt,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty" validate:"required"` Conn *websocket.Conn }
User model structure
Click to show internal directories.
Click to hide internal directories.