Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claim ¶
type Claim struct { Email string `json:"email"` ID primitive.ObjectID `bson:"_id" json:"_id,omitempy"` jwt.StandardClaims }
Claim Structure required to process JWT.
type Follow ¶
type Follow struct { UserID string `bson:"userId" json:"userId"` UserFollowedID string `bson:"userFollowedID" json:"userFollowedID"` }
Follow model.
type Like ¶
type Like struct { UserID string `bson:"userId" json:"userId"` LikesList []string `bson:"likesList" json:"likesList"` }
Like model.
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token,omitempty"`
}
LoginResponse Token that is returned with the login.
type Msg ¶
type Msg struct { Message string `bson:"message" json:"message"` InReplyToMessageID string `bson:"inReplyToMessageId" json:"inReplyToMessageId"` }
Msg Capture the received message from the body.
type RecordLike ¶
type RecordLike struct { UserID string `bson:"userId" json:"userId"` LikesList []string `bson:"likesList" json:"likesList"` }
RecordLike model.
type RecordMsg ¶
type RecordMsg struct { UserID string `bson:"userId" json:"userId,omitempty"` Message string `bson:"message" json:"message,omitempty"` Datetime time.Time `bson:"datetime" json:"datetime,omitempty"` InReplyToMessageID string `bson:"inReplyToMessageId" json:"inReplyToMessageId,omitempty"` LikesCount uint64 `bson:"likesCount" json:"likesCount"` }
RecordMsg Structure for message.
type ResponseCheckFollow ¶
type ResponseCheckFollow struct {
Status bool `json:"status"`
}
ResponseCheckFollow returns true or false after consulting the follow between two users.
type ReturnFollowersMsg ¶
type ReturnFollowersMsg struct { ID primitive.ObjectID `bson:"_id" json:"_id,omitempty"` UserID string `bson:"userId" json:"userId,omitempty"` UserFollowedID string `bson:"userFollowedID" json:"userFollowedID,omitempty"` Msg struct { Message string `bson:"message" json:"message,omitempty"` InReplyToMessageID string `bson:"inReplyToMessageId" json:"inReplyToMessageId,omitempty"` Datetime time.Time `bson:"datetime" json:"datetime,omitempty"` ID string `bson:"_id" json:"_id,omitempty"` } }
ReturnFollowersMsg Structure for returned message.
type ReturnMsg ¶
type ReturnMsg struct { ID primitive.ObjectID `bson:"_id" json:"_id,omitempty"` UserID string `bson:"userId" json:"userId,omitempty"` Message string `bson:"message" json:"message,omitempty"` Datetime time.Time `bson:"datetime" json:"datetime,omitempty"` InReplyToMessageID string `bson:"inReplyToMessageId" json:"inReplyToMessageId,omitempty"` LikesCount uint64 `bson:"likesCount" json:"likesCount"` }
ReturnMsg Structure to return each message.
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` Name string `bson:"name" json:"name,omitempty"` LastName string `bson:"lastName" json:"lastName,omitempty"` DateOfBirth time.Time `bson:"dateOfBirth" json:"dateOfBirth,omitempty"` Email string `bson:"email" json:"email"` Password string `bson:"password" json:"password,omitempty"` Avatar string `bson:"avatar" json:"avatar,omitempty"` Banner string `bson:"banner" json:"banner,omitempty"` Biography string `bson:"biography" json:"biography,omitempty"` Location string `bson:"location" json:"location,omitempty"` WebSite string `bson:"webSite" json:"webSite,omitempty"` FollowingCount uint64 `bson:"followingCount" json:"followingCount"` FollowersCount uint64 `bson:"followersCount" json:"followersCount"` }
User model.
Click to show internal directories.
Click to hide internal directories.