users

package
v0.0.0-...-d131206 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthCtx

func AuthCtx(next http.Handler) http.Handler

func RegisterUserEndpoints

func RegisterUserEndpoints(mux *chi.Mux, db *sql.DB)

Types

type User

type User struct {
	Username string
	Password string
	Id       int
}

type UserRepository

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

func NewUserRepo

func NewUserRepo(db *sql.DB) UserRepository

func (*UserRepository) CreateUser

func (ur *UserRepository) CreateUser(model User) (int, error)

func (*UserRepository) GetUser

func (ur *UserRepository) GetUser(userName string) (User, error)

func (*UserRepository) UserExists

func (ur *UserRepository) UserExists(userName string) (bool, error)

Directories

Path Synopsis
templ: version: v0.2.696
templ: version: v0.2.696

Jump to

Keyboard shortcuts

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