user

package
v0.0.0-...-44af80e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	component.Core
}

Endpoint contains the dependencies.

func New

func New(bc component.Core) *Endpoint

New returns a new instance of the endpoint.

func (*Endpoint) Create

func (p *Endpoint) Create(w http.ResponseWriter, r *http.Request) (int, error)

Create . swagger:route POST /v1/user user UserCreate

Create a user.

Security:

token:

Responses:

201: CreatedResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

func (*Endpoint) Destroy

func (p *Endpoint) Destroy(w http.ResponseWriter, r *http.Request) (int, error)

Destroy . swagger:route DELETE /v1/user/{user_id} user UserDestroy

Delete a user.

Security:

token:

Responses:

200: OKResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

func (*Endpoint) DestroyAll

func (p *Endpoint) DestroyAll(w http.ResponseWriter, r *http.Request) (int, error)

DestroyAll . swagger:route DELETE /v1/user user UserDestroyAll

Delete all users.

Security:

token:

Responses:

200: OKResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

func (*Endpoint) Index

func (p *Endpoint) Index(w http.ResponseWriter, r *http.Request) (int, error)

Index . swagger:route GET /v1/user user UserIndex

Return all users.

Security:

token:

Responses:

200: UserIndexResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

func (*Endpoint) Routes

func (p *Endpoint) Routes(router component.IRouter)

Routes will set up the endpoints.

func (*Endpoint) Show

func (p *Endpoint) Show(w http.ResponseWriter, r *http.Request) (int, error)

Show . swagger:route GET /v1/user/{user_id} user UserShow

Return one user.

Security:

token:

Responses:

200: UserShowResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

func (*Endpoint) Update

func (p *Endpoint) Update(w http.ResponseWriter, r *http.Request) (int, error)

Update . swagger:route PUT /v1/user/{user_id} user UserUpdate

Make changes to a user.

Security:

token:

Responses:

200: OKResponse
400: BadRequestResponse
401: UnauthorizedResponse
500: InternalServerErrorResponse

Jump to

Keyboard shortcuts

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