Documentation ¶
Index ¶
- func CheckEmail(client *mongo.Client, req *proto.CheckEmailRequest) error
- func DeleteSession(client *mongo.Client, req *proto.DeleteSessionRequest) error
- func FlushSessions(client *mongo.Client, req *proto.FlushSessionsRequest) error
- func Init(client *mongo.Client) error
- func ValidateEmail(client *mongo.Client, req *proto.ValidateEmailRequest) error
- type Session
- type User
- func CreateSession(client *mongo.Client, req *proto.CreateSessionRequest) (*User, string, error)
- func CreateUser(client *mongo.Client, req *proto.CreateUserRequest) (*User, string, error)
- func GetUser(client *mongo.Client, req *proto.GetUserRequest) (*User, error)
- func UpdateUser(client *mongo.Client, req *proto.UpdateUserRequest) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEmail ¶
func CheckEmail(client *mongo.Client, req *proto.CheckEmailRequest) error
func DeleteSession ¶
func DeleteSession(client *mongo.Client, req *proto.DeleteSessionRequest) error
func FlushSessions ¶
func FlushSessions(client *mongo.Client, req *proto.FlushSessionsRequest) error
func ValidateEmail ¶
func ValidateEmail(client *mongo.Client, req *proto.ValidateEmailRequest) error
Types ¶
type User ¶
type User struct { Name string `bson:"name"` Email string `bson:"email"` Uuid string `bson:"uuid"` PasswordHash string `bson:"hash"` ValidationToken string `bson:"validation_token"` Sessions []Session `bson:"sessions"` }
func CreateSession ¶
func CreateUser ¶
func UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.