usecases

package
v0.0.0-...-4805206 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionConfig

type SessionConfig func(ss *UserSession) error

func WithMongoUserRepository

func WithMongoUserRepository() SessionConfig

type UserSession

type UserSession struct {
	JWTSecret string
	// contains filtered or unexported fields
}

func NewSession

func NewSession(cfgs ...SessionConfig) *UserSession

func (*UserSession) Login

func (ss *UserSession) Login(ctx context.Context, email, password string) (tokenString string, statusCode int, err error)

func (*UserSession) SignUp

func (ss *UserSession) SignUp(ctx context.Context, u user.User) (statusCode int, err error)

Jump to

Keyboard shortcuts

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