models

package
v0.0.0-...-c21ba44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseFailedResponse

type BaseFailedResponse struct {
	Error string `json:"error"`
}

type BaseObject

type BaseObject struct {
	CreatedAt time.Time `json:"created_at" form:"created_at"`
	UpdatedAt time.Time `json:"updated_at" form:"updated_at"`
	CreatedBy string    `json:"created_by" form:"created_by"`
	UpdatedBy string    `json:"updated_by" form:"updated_by"`
}

type BaseSuccessResponse

type BaseSuccessResponse struct {
	Message string `json:"message"`
}

type JwtCustomClaims

type JwtCustomClaims struct {
	Name  string `json:"name"`
	UUID  string `json:"uuid"`
	Admin bool   `json:"admin"`
	jwt.StandardClaims
}

type User

type User struct {
	ID             string    `json:"id"`
	Firstname      string    `json:"first_name" form:"first_name"`
	Lastname       string    `json:"last_name" form:"last_name"`
	Alias          string    `json:"alias" form:"alias"`
	Email          string    `json:"email" form:"email"`
	Username       string    `json:"username" form:"username"`
	Password       string    `json:"password" form:"password"`
	HashedPassword string    `json:"hashed_password" form:"hashed_password"`
	DateofBirth    time.Time `json:"date_of_birth" form:"date_of_birth"`
	BaseObject
}

type UserLoginForm

type UserLoginForm struct {
	UsernameOrEmail string `json:"credentials" form:"credentials"`
	Password        string `json:"password" form:"password"`
}

type UserLoginResponse

type UserLoginResponse struct {
	Token string `json:"token"`
}

type UserSignUpForm

type UserSignUpForm struct {
	Firstname   string    `json:"first_name" form:"first_name"`
	Lastname    string    `json:"last_name" form:"last_name"`
	Email       string    `json:"email" form:"email"`
	Username    string    `json:"username" form:"username"`
	Password    string    `json:"password" form:"password"`
	Alias       string    `json:"alias" form:"alias"`
	DateofBirth time.Time `json:"date_of_birth" form:"date_of_birth"`
}

type UserSignupResponse

type UserSignupResponse struct {
	Firstname      string `json:"first_name"`
	Lastname       string `json:"last_name"`
	Email          string `json:"email"`
	HashedPassword string `json:"hashed_password"`
	BaseObject
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL