controller

package
v0.0.0-...-c69a8cc Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package controller provides http handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct{}

Alert is a alert controller - handleres served http request

func (Alert) Create

func (Alert) Create(ctx goctx.Context) gin.HandlerFunc

Create handlerFunc for create alert.

func (Alert) Get

func (Alert) Get(ctx goctx.Context) gin.HandlerFunc

Get handlerFunc for get alert by id.

func (Alert) GetList

func (Alert) GetList(ctx goctx.Context) gin.HandlerFunc

GetList handlerFunc for get alerts by user id.

type Auth

type Auth struct{}

Auth is a authorize controller - handleres served http request

func (Auth) Authorize

func (Auth) Authorize(ctx goctx.Context) gin.HandlerFunc

Authorize handlerFunc check login and password.

type Controller

type Controller interface {
	Route(ctx goctx.Context, app *gin.Engine)
}

Controller describes routable controller of http group methods.

type User

type User struct{}

User is a user controller - handleres served http request in context of user changing / getting.

func (User) Create

func (User) Create(ctx goctx.Context) gin.HandlerFunc

Create handlerFunc for create user.

JSON struct as parameter.

func (User) Get

func (User) Get(ctx goctx.Context) gin.HandlerFunc

Get returns handler for user getting.

One uint /:id parameter.

func (User) Route

func (user User) Route(ctx goctx.Context, app *gin.Engine)

Route implements Controller interface.

Jump to

Keyboard shortcuts

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