user

package
v0.0.0-...-cd5feb8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Unlicense Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao interface {
	InsertUser(u *User) error
	DeleteUser(u *User) error
}

Dao interface contains all those methods required for performing user related database operations. All database should implement this interface.

type Handler

type Handler struct {
	Dao Dao
}

Handler sample user handler

func (*Handler) Create

func (u *Handler) Create(w http.ResponseWriter, r *http.Request)

Create handles create user request

func (*Handler) Delete

func (u *Handler) Delete(w http.ResponseWriter, r *http.Request)

Delete handles delete user request

type User

type User struct {
	// Name of user
	Name string `json:"name"`
}

User data structure

Jump to

Keyboard shortcuts

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