user

package
v0.0.0-...-4ffe290 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID    string `json:"id" description:"identifier of the user"`
	Name  string `json:"name" description:"name of the user" default:"john"`
	Phone string `json:"phone" description:"phone number of the user"`
	Age   int    `json:"age" description:"age of the user" default:"-1"`
}

type UserResource

type UserResource struct {
	// normally one would use DAO (data access object)
	Users map[string]User
}

func (*UserResource) CreateUser

func (u *UserResource) CreateUser(request *restful.Request, response *restful.Response)

func (UserResource) FindAllUsers

func (u UserResource) FindAllUsers(request *restful.Request, response *restful.Response)

func (UserResource) FindUser

func (u UserResource) FindUser(request *restful.Request, response *restful.Response)

func (*UserResource) RemoveUser

func (u *UserResource) RemoveUser(request *restful.Request, response *restful.Response)

func (*UserResource) UpdateUser

func (u *UserResource) UpdateUser(request *restful.Request, response *restful.Response)

func (UserResource) WebService

func (u UserResource) WebService() *restful.WebService

Jump to

Keyboard shortcuts

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