endpoints

package
v0.0.0-...-27601ae Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TagsEndpoint

type TagsEndpoint struct{}

TagsEndpoint represents the controller for operating on the Tags resource

func NewTagsEndpoint

func NewTagsEndpoint() *TagsEndpoint

func (TagsEndpoint) List

type TagsEndpointListResponse

type TagsEndpointListResponse struct {
	Tags []models.Tag `json:"tags"`
}

List endpoint

type TodoEndpoint

type TodoEndpoint struct{}

TodoEndpoint represents the controller for operating on the Todo resource

func NewTodoEndpoint

func NewTodoEndpoint() *TodoEndpoint

func (TodoEndpoint) Info

func (TodoEndpoint) Remove

func (TodoEndpoint) Update

type TodoEndpointInfoRequest

type TodoEndpointInfoRequest struct {
	Todo models.Todo `json:"todo"`
	Auth string      `json:"authority"`
}

Info endpoint

type TodoEndpointInfoResponse

type TodoEndpointInfoResponse struct {
	Error string      `json:"error,omitempty"`
	Todo  models.Todo `json:"todo,omitempty"`
}

type TodoEndpointRemoveRequest

type TodoEndpointRemoveRequest struct {
	Todo models.Todo `json:"todo"`
	Auth string      `json:"authority"`
}

Remove endpoint

type TodoEndpointRemoveResponse

type TodoEndpointRemoveResponse struct {
	Error string `json:"error,omitempty"`
}

type TodoEndpointUpdateRequest

type TodoEndpointUpdateRequest struct {
	Todo models.Todo `json:"todo"`
	Auth string      `json:"authority"`
}

Update endpoint

type TodoEndpointUpdateResponse

type TodoEndpointUpdateResponse struct {
	Error string `json:"error,omitempty"`
}

type TodosEndpoint

type TodosEndpoint struct{}

TodosEndpoint represents the controller for operating on the Todos resource

func NewTodosEndpoint

func NewTodosEndpoint() *TodosEndpoint

func (TodosEndpoint) List

type TodosEndpointListRequest

type TodosEndpointListRequest struct {
	Auth string `json:"authority"`
}

List endpoint

type TodosEndpointListResponse

type TodosEndpointListResponse struct {
	Todos []models.Todo `json:"todos"`
}

type TokenEndpoint

type TokenEndpoint struct{}

TokenEndpoint represents the controller for operating on the Token resource

func NewTokenEndpoint

func NewTokenEndpoint() *TokenEndpoint

func (TokenEndpoint) Invalidate

func (te TokenEndpoint) Invalidate(w http.ResponseWriter, r *http.Request, p httprouter.Params)

func (TokenEndpoint) New

func (TokenEndpoint) Type

type TokenEndpointInvalidateRequest

type TokenEndpointInvalidateRequest struct {
	Token  string  `json:"token"`
	UName  *string `json:"username"`
	UPwdUH *string `json:"password"`
	Auth   *string `json:"authority"`
}

Invalidate endpoint

type TokenEndpointInvalidateResponse

type TokenEndpointInvalidateResponse struct {
	Error string `json:"error,omitempty"`
}

Ref: https://willnorris.com/2014/05/go-rest-apis-and-pointers

type TokenEndpointNewRequest

type TokenEndpointNewRequest struct {
	Type   int     `json:"type"`
	UName  *string `json:"username"`
	UPwdUH *string `json:"password"`
	Auth   *string `json:"authority"`
}

New endpoint

type TokenEndpointNewResponse

type TokenEndpointNewResponse struct {
	Error string `json:"error,omitempty"`
	Token string `json:"token,omitempty"`
}

Ref: https://willnorris.com/2014/05/go-rest-apis-and-pointers

type TokenEndpointTypeRequest

type TokenEndpointTypeRequest struct {
	Token string `json:"token"`
}

Type endpoint

type TokenEndpointTypeResponse

type TokenEndpointTypeResponse struct {
	Type int `json:"type"`
}

Ref: https://willnorris.com/2014/05/go-rest-apis-and-pointers

Jump to

Keyboard shortcuts

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