Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
Types ¶
type Accessory ¶
type Accessory struct { ID *primitive.ObjectID `bson:"_id, omitempty" json:"id, omitempty"` Name string `bson:"name" json:"name" form:"name" validate:"required"` Task int32 `bson:"task" json:"task" form:"task" validate:"required,accessory_task"` Description string `bson:"description" json:"description" form:"description" validate:"required"` Icon string `bson:"icon" json:"icon"` PinId uint8 `bson:"pin_id" json:"pin_id" validate:"required"` PinType uint8 `bson:"pin_type" json:"pin_type" form:"pin_id" validate:"required"` IsActive bool `bson:"is_active" json:"is_active"` IsPublic bool `bson:"is_public" json:"is_public" form:"is_public"` UserId *primitive.ObjectID `bson:"user_id, omitempty" json:"user_id, omitempty"` CreatedAt time.Time `bson:"created_at, omitempty" json:"created_at, omitempty"` UpdatedAt time.Time `bson:"updated_at, omitempty" json:"updated_at, omitempty"` }
type AccessoryUser ¶
type AccessoryUser struct { ID *primitive.ObjectID `bson:"_id, omitempty" json:"id, omitempty"` UserId *primitive.ObjectID `bson:"user_id, omitempty" json:"user_id, omitempty"` AccessoryID *primitive.ObjectID `bson:"accessory_id, omitempty" json:"accessory_id, omitempty"` CreatedAt time.Time `bson:"created_at, omitempty" json:"created_at, omitempty"` UpdatedAt time.Time `bson:"updated_at, omitempty" json:"updated_at, omitempty"` }
type Log ¶
type Log struct { ID *primitive.ObjectID `bson:"_id, omitempty" json:"id, omitempty"` UserId *primitive.ObjectID `bson:"user_id, omitempty" json:"user_id, omitempty"` AccessoryID *primitive.ObjectID `bson:"accessory_id, omitempty" json:"accessory_id, omitempty"` Read bool `bson:"read, omitempty" json:"checked"` CreatedAt time.Time `bson:"created_at, omitempty" json:"created_at, omitempty"` UpdatedAt time.Time `bson:"updated_at, omitempty" json:"updated_at, omitempty"` }
type RefreshedToken ¶
type RefreshedToken struct { ID *primitive.ObjectID `bson:"_id, omitempty" json:"id, omitempty"` UserId *primitive.ObjectID `bson:"user_id, omitempty" json:"user_id, omitempty"` Token string `bson:"token, omitempty" json:"-, omitempty"` Valid bool `bson:"valid, omitempty" json:"valid, omitempty"` Csrf string `bson:"csrf, omitempty" json:"csrf, omitempty"` CreatedAt time.Time `bson:"created_at, omitempty" json:"created_at, omitempty"` ExpiresAt time.Time `bson:"expires_at, omitempty" json:"expires_at, omitempty"` }
type User ¶
type User struct { ID *primitive.ObjectID `bson:"_id, omitempty" json:"id, omitempty"` Fullname string `bson:"fullname, omitempty" json:"fullname, omitempty"` Username string `bson:"username, omitempty" json:"username, omitempty"` Hash string `bson:"user_hash, omitempty" json:"hash, omitempty"` Email string `bson:"email, omitempty" json:"email, omitempty"` Password string `bson:"password, omitempty" json:"-, omitempty"` IsActive bool `bson:"is_active, omitempty" json:"is_active, omitempty"` Avatar string `bson:"avatar, omitempty" json:"avatar, omitempty"` RoleId uint64 `bson:"role_id, omitempty" json:"role_id, omitempty"` LastLogin time.Time `bson:"last_login, omitempty" json:"last_login, omitempty"` JoinedAt time.Time `bson:"joined_at, omitempty" json:"joined_at, omitempty"` UpdatedAt time.Time `bson:"updated_at, omitempty" json:"updated_at, omitempty"` }
func (*User) SetPassword ¶
func (*User) ValidatePassword ¶
Click to show internal directories.
Click to hide internal directories.