domain

package
v0.0.0-...-d3ff880 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBookNotFound        = errors.New("movie not found")
	ErrRefreshTokenExpired = errors.New("refresh token expired")
	ErrUserAlreadyExists   = errors.New("user with this email already exists")
)
View Source
var ErrUserNotFound = errors.New("user with such credentials not found")

Functions

This section is empty.

Types

type Movie

type Movie struct {
	ID               int       `json:"id,omitempty"`
	Title            string    `json:"title"`
	Release          string    `json:"release"`
	StreamingService string    `json:"streamingService"`
	SavedAt          time.Time `json:"savedAt,omitempty"`
}

type MovieMainInfo

type MovieMainInfo struct {
	Title            string `json:"title"`
	Release          string `json:"release"`
	StreamingService string `json:"streamingService"`
}

type RefreshSession

type RefreshSession struct {
	ID        int64
	UserID    int64
	Token     string
	ExpiresAt time.Time
}

type SignInInput

type SignInInput struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,gte=6"`
}

func (SignInInput) Validate

func (i SignInInput) Validate() error

type SignUpInput

type SignUpInput struct {
	Name     string `json:"name" validate:"required,gte=2"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,gte=6"`
}

func (SignUpInput) Validate

func (i SignUpInput) Validate() error

type User

type User struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Email        string    `json:"email"`
	Password     string    `json:"password"`
	RegisteredAt time.Time `json:"registered_at"`
}

Jump to

Keyboard shortcuts

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