user

package
v0.0.0-...-aa737f3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	RegisterUser(ctx context.Context, registerUser user.RegisterUser) error
	LoginUser(ctx context.Context, loginUser user.LoginUser) (*user.AuthTokens, error)
	RefreshUser(ctx context.Context, refreshUser user.RefreshUser) (*user.AuthTokens, error)
	GetUser(ctx context.Context) (*user.GetUser, error)
	GetUsers(ctx context.Context) ([]*user.GetUser, error)
}

type Router

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

func NewRouter

func NewRouter(manager Manager) *Router

func (*Router) Admin

func (r *Router) Admin(c chi.Router)

func (*Router) GetUser

func (r *Router) GetUser(ctx context.Context, w http.ResponseWriter, req *http.Request)

func (*Router) GetUsers

func (r *Router) GetUsers(ctx context.Context, w http.ResponseWriter, req *http.Request)

func (*Router) LoginUser

func (r *Router) LoginUser(ctx context.Context, w http.ResponseWriter, req *http.Request)

func (*Router) Private

func (r *Router) Private(c chi.Router)

func (*Router) Public

func (r *Router) Public(c chi.Router)

func (*Router) RefreshUser

func (r *Router) RefreshUser(ctx context.Context, w http.ResponseWriter, req *http.Request)

func (*Router) RegisterUser

func (r *Router) RegisterUser(ctx context.Context, w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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