api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, v any)

Types

type Error

type Error struct {
	Error string `json:"error"`
}

type UserAPI

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

func NewUserAPI

func NewUserAPI(l zerolog.Logger, s store.Store, c cache.Cache) *UserAPI

func (*UserAPI) CreateUser

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

func (*UserAPI) DeleteUser

func (u *UserAPI) DeleteUser(_ http.ResponseWriter, _ *http.Request)

func (*UserAPI) GetUser

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

func (*UserAPI) UpdateUser

func (u *UserAPI) UpdateUser(_ http.ResponseWriter, _ *http.Request)

Jump to

Keyboard shortcuts

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