model

package
v0.0.0-...-a051c0a Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminSignUpRequest

type AdminSignUpRequest struct {
	Login       string
	Password    string
	InviteToken string
}

type SignInRequest

type SignInRequest struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

type SignInResponse

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

type SignUpRequest

type SignUpRequest struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

type UpdateUserModel

type UpdateUserModel struct {
	ID       int64   `db:"id"`
	Username *string `db:"username"`
	Password *string `db:"password"`
}

type User

type User struct {
	ID        int64     `db:"id"`
	Username  string    `db:"username"`
	Password  string    `db:"password_hashed"`
	Role      int       `db:"role"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type ValidateTokenResponse

type ValidateTokenResponse struct {
	UserID int64
	Login  string
	Role   string
}

Jump to

Keyboard shortcuts

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