user

package
v0.0.0-...-42ff07e Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserCollection is user collection
	UserCollection string = "Users"
)

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(w http.ResponseWriter, r *http.Request)

CreateUser is a function to create user information

func GetUser

func GetUser(w http.ResponseWriter, r *http.Request)

GetUser ...

func NewRouter

func NewRouter() *mux.Router

NewRouter is mux router constructor

func UsersEndpoint

func UsersEndpoint(w http.ResponseWriter, r *http.Request)

UsersEndpoint ...

func YourselfEndpoint

func YourselfEndpoint(w http.ResponseWriter, r *http.Request)

YourselfEndpoint ...

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Route ...

type Routes

type Routes []Route

Routes Route Slice

type User

type User struct {
	UUID  string `json:"uuid"`
	Count int8   `json:"count"`
}

User is one user information

func (*User) Create

func (u *User) Create(c context.Context) (err error)

Create is a function to create user information

func (*User) Get

func (u *User) Get(c context.Context) (err error)

Get is a function to get user information

Jump to

Keyboard shortcuts

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