models

package
v0.0.0-...-5783ac8 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicUser

type PublicUser struct {
	Id        string    `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	CreatedAt time.Time `json:"createdAt"`
}

type User

type User struct {
	Id        string    `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"createdAt"`
}

func (User) Create

func (u User) Create(form UserSignupForm) error

func (User) GetAll

func (u User) GetAll() ([]PublicUser, error)

func (User) GetHashByEmail

func (u User) GetHashByEmail(email string) (string, error)

func (User) GetOneByName

func (u User) GetOneByName(name string) (PublicUser, error)

type UserLoginForm

type UserLoginForm struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserSignupForm

type UserSignupForm struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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