app

package
v0.0.0-...-237b7f0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: AGPL-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 App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(
	cfg configs.Config,
	logger *logger.Logger,
	repo Repository,
) *App

func (*App) CreateUser

func (a *App) CreateUser(u *domain.User) error

func (*App) GetUser

func (a *App) GetUser(u *domain.User) (*domain.User, error)

func (*App) GetUserToken

func (a *App) GetUserToken(u *domain.User) (string, error)

func (*App) ValidateUserPassword

func (a *App) ValidateUserPassword(u *domain.User) (bool, error)

type Repository

type Repository interface {
	// users
	CreateUser(*domain.User) (*domain.User, error)
	GetUserByUsername(username string) (*domain.User, error)
	GetUserCount() (int, error)
}

Jump to

Keyboard shortcuts

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