service

package
v0.0.0-...-f2c6537 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TOKEN_DURATION   = time.Hour * 24 * 7
	SALT_ROUND_COUNT = 12
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(db *gorm.DB, c *config.Config) *API

func (*API) GenerateToken

func (api *API) GenerateToken(u *model.User) (string, error)

func (*API) SignIn

func (api *API) SignIn(i model.SignInInput) (string, error)

type AuthAPI

type AuthAPI interface {
	SignIn(i model.SignInInput) (string, error)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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