api

package
v0.0.0-...-c685a14 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

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

func DeleteUser

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

func ExampleKV_put

func ExampleKV_put()

func ExampleWatcher_watchWithPrefix

func ExampleWatcher_watchWithPrefix()

func GetUser

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

func UpdateUser

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

Types

type AuthenticationMiddleware

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

func (*AuthenticationMiddleware) Middleware

func (middleware *AuthenticationMiddleware) Middleware(next http.Handler) http.Handler

func (*AuthenticationMiddleware) Populate

func (middleware *AuthenticationMiddleware) Populate()

type HTTPResponse

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

func HTTPAlreadyExists

func HTTPAlreadyExists(msg string) *HTTPResponse

func HTTPBadRequest

func HTTPBadRequest(msg string) *HTTPResponse

func HTTPCreated

func HTTPCreated(msg string) *HTTPResponse

func HTTPDeleted

func HTTPDeleted(msg string) *HTTPResponse

func HTTPGet

func HTTPGet(msg string) *HTTPResponse

func HTTPInternalServerError

func HTTPInternalServerError(msg string) *HTTPResponse

func HTTPNotFound

func HTTPNotFound(msg string) *HTTPResponse

func HTTPUpdated

func HTTPUpdated(msg string) *HTTPResponse

type User

type User struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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