controllers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountController

type CountController struct {
	Repository repositories.CountRepository
}

CountController is controller for count operations.

func (CountController) GetCounts

func (c CountController) GetCounts(ctx *gin.Context)

GetCounts gets counts for a counter.

type CounterController

type CounterController struct {
	Repository repositories.CounterRepository
}

CounterController is controller for count operations.

func (CounterController) Down

func (c CounterController) Down(ctx *gin.Context)

Down decreases Counter.

func (CounterController) Get

func (c CounterController) Get(ctx *gin.Context)

Get gets Counter.

func (CounterController) Up

func (c CounterController) Up(ctx *gin.Context)

Up increases Counter.

type DownQuery

type DownQuery struct {
	Name string `form:"name" json:"name" binding:"required,alphanum"`
}

DownQuery is query for Counter down params.

type GetCountsQuery

type GetCountsQuery struct {
	Name    string `form:"name" json:"name" binding:"required,alphanum,max=100"`
	GroupBy string `form:"group_by" json:"group_by" binding:"required"`
	OrderBy string `form:"order_by" json:"order_by" binding:""`
}

GetCountsQuery is query for Count params.

type HealthController

type HealthController struct{}

HealthController controls Health operations.

func (HealthController) Status

func (h HealthController) Status(c *gin.Context)

Status returns constant response.

type QueryParamMissingError added in v0.4.0

type QueryParamMissingError struct {
	Parameter string
}

QueryParamMissingError is a error for missing query for a controller.

func (QueryParamMissingError) Error added in v0.4.0

func (e QueryParamMissingError) Error() string

Error fails for the error.

type UpQuery

type UpQuery struct {
	Name string `form:"name" json:"name" binding:"required,alphanum,max=100"`
}

UpQuery is query for Counter up params.

Jump to

Keyboard shortcuts

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