user

package
v0.0.0-...-ed7ba4f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package user : User service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler : User handler

func NewHandler

func NewHandler(store types.UserStore) *Handler

NewHandler : Create a new user handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(router *mux.Router)

RegisterRoutes : Register user routes

type Store

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

Store : User store

func NewStore

func NewStore(db *sql.DB) *Store

NewStore : Create a new user store

func (*Store) CreateUser

func (s *Store) CreateUser(u types.User) error

CreateUser : Create a new user

func (*Store) GetUserByEmail

func (s *Store) GetUserByEmail(email string) (*types.User, error)

GetUserByEmail : Get user by email

func (*Store) GetUserByID

func (s *Store) GetUserByID(id int) (*types.User, error)

GetUserByID : Get user by ID

Jump to

Keyboard shortcuts

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