services

package
v0.0.0-...-baff70a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(ctx context.Context, username string, password string) (models.User, error)

func GetUserByUsername

func GetUserByUsername(ctx context.Context, username string) (models.User, error)

func GetUsers

func GetUsers(ctx context.Context) ([]models.User, error)

func IsUniqueUsername

func IsUniqueUsername(ctx context.Context, username string) bool

func IsValidUsernamePassword

func IsValidUsernamePassword(ctx context.Context, username string, password string) bool

func ProduceJwtTokenForUser

func ProduceJwtTokenForUser(ctx context.Context, username string, userId string) (string, time.Time, error)

Produces a JWT token for the user. Returns the token, the expiration time (UTC) and any error

Types

This section is empty.

Jump to

Keyboard shortcuts

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