handler

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreaTypes

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

AreaTypes handles requests to /area-types

func NewAreaTypes

func NewAreaTypes(r responder, c cantabularClient) *AreaTypes

NewAreaTypes returns a new AreaTypes handler

func (*AreaTypes) Get

func (h *AreaTypes) Get(w http.ResponseWriter, r *http.Request)

Get is the handler for GET /area-types

type Areas

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

Areas handles requests to /area-types

func NewAreas

func NewAreas(r responder, c cantabularClient) *Areas

NewAreas returns a new Areas handler

func (*Areas) Get

func (h *Areas) Get(w http.ResponseWriter, r *http.Request)

Get is the handler for GET /areas

type Error

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

Error is the packages error type

func (Error) Error

func (e Error) Error() string

Error satisfies the standard library Go error interface

func (Error) LogData

func (e Error) LogData() map[string]interface{}

LogData satisfies the dataLogger interface which is used to recover log data from an error

func (Error) Message

func (e Error) Message() string

Message satisfies the messager interface which is used to specify a response to be sent to the caller in place of the error text for a given error. This is useful when you don't want sensitive information or implementation details being exposed to the caller which could be used to find exploits in our API

func (Error) Unwrap

func (e Error) Unwrap() error

Unwrap implements the standard library Go unwrapper interface

type Hello

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

Hello handles requests to /hello

func NewHello

func NewHello(r responder, c cantabularClient) *Hello

NewHello returns a new Hello handler

func (*Hello) Create

func (h *Hello) Create(w http.ResponseWriter, r *http.Request)

Create is the handler for POST /hello - Is used for an error example

func (*Hello) Get

func (h *Hello) Get(w http.ResponseWriter, r *http.Request)

Get is the handler for GET /hello

Jump to

Keyboard shortcuts

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