Documentation ¶
Index ¶
- func Create(tweet Tweet) (string, bool, error)
- func CreateRelation(relation Relation) (bool, error)
- func CreateUser(user User) (string, bool, error)
- func Delete(ID string, UserID string) error
- func DeleteRelation(relation Relation) (bool, error)
- func ReadRelation(relation Relation) (bool, error)
- func ReadTweetFollowers(ID string, page int64) ([]structs.ResponseTweetsFollowers, bool)
- func UpdateUser(user User, ID string) (bool, error)
- type Claim
- type Relation
- type Tweet
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadTweetFollowers ¶
func ReadTweetFollowers(ID string, page int64) ([]structs.ResponseTweetsFollowers, bool)
ReadTweetFollowers read all tweet of followers specific user
Types ¶
type Claim ¶
type Claim struct { Email string `json:"email"` ID primitive.ObjectID `bson:"_id" json:"_id,omitempty"` jwt.StandardClaims }
Claim decode info token
type Relation ¶
type Relation struct { UserID string `bson:"userid" json:"userid"` UserRelation string `bson:"userrelation" json:"userrelation"` }
Relation of users
type Tweet ¶
type Tweet struct { ID primitive.ObjectID `bson:"_id" json:"id,omitempty"` UserID string `bson:"userid" json:"userid,omitempty"` Message string `bson:"message" json:"message,omitempty"` CreateAt time.Time `bson:"createAt" json:"createAt,omitempty"` }
Tweet model tweets
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` Name string `bson:"name,omitempty" json:"name,omitempty"` LastName string `bson:"lastName,omitempty" json:"lastName,omitempty"` BirthDate time.Time `bson:"birthDate,omitempty" json:"birthDate,omitempty"` Email string `bson:"email" json:"email,omitempty"` Password string `bson:"password" json:"password,omitempty"` Avatar string `bson:"avatar,omitempty" json:"avatar,omitempty"` Banner string `bson:"banner,omitempty" json:"banner,omitempty"` Biography string `bson:"biography,omitempty" json:"biography,omitempty"` Location string `bson:"location,omitempty" json:"location,omitempty"` WebSite string `bson:"webSite,omitempty" json:"webSite,omitempty"` }
User data structure
func CheckSignIn ¶
CheckSignIn for auth user
func ExistsUser ¶
ExistsUser verify if a user exists
Click to show internal directories.
Click to hide internal directories.