api

package
v0.0.0-...-236e835 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundErrorHandler = func(w http.ResponseWriter, message string) {
		writeError(w, message, http.StatusNotFound)
	}
	RequestErrorHandler = func(w http.ResponseWriter, err error) {
		writeError(w, err.Error(), http.StatusBadRequest)
	}
	InternalErrorHandler = func(w http.ResponseWriter) {
		writeError(w, "An unexpected error occurred.", http.StatusInternalServerError)
	}
)

Functions

This section is empty.

Types

type DeleteAccountParams

type DeleteAccountParams struct {
	Username int
}

type Error

type Error struct {
	Code    int
	Message string
}

type GetAccountParams

type GetAccountParams struct {
	Username string
}

type GetAccountResponse

type GetAccountResponse struct {
	Username string
	Age      int
}

type LoginParams

type LoginParams struct {
	Username string
}

type LoginResponse

type LoginResponse struct {
	Username  string
	AuthToken string
}

type LogoutParams

type LogoutParams struct {
	Username string
}

type UpdateAccountBody

type UpdateAccountBody struct {
	Username string
	Age      int
}

type UpdateAccountParams

type UpdateAccountParams struct {
	Username string
	Age      int
}

type UpdateAccountResponse

type UpdateAccountResponse struct {
	Username string
	Age      int
}

Jump to

Keyboard shortcuts

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