controllers

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Conf         *config.Config
	Engine       *web.Engine
	Logger       logger.Logger
	BuildTime    string
	BuildVersion string
}

Controller - rest-api controller

func New

func New(opts ...Option) *Controller

New - Create new REST-API

func (*Controller) Version

func (c *Controller) Version(ctx web.Context) error

Version of application

type JSON

type JSON = map[string]interface{}

JSON alias

type Option

type Option func(*Options)

Option closure

func BuildTime

func BuildTime(buildTime string) Option

BuildTime closure to set field in Options

func BuildVersion

func BuildVersion(buildVersion string) Option

BuildVersion closure to set field in Options

func Config

func Config(c *config.Config) Option

Config closure to set field in Options

func Engine

func Engine(e *web.Engine) Option

Engine closure to set field in Options

func Logger

func Logger(log logger.Logger) Option

Logger closure to set field in Options

type Options

type Options struct {
	Conf         *config.Config
	Engine       *web.Engine
	Logger       logger.Logger
	BuildTime    string
	BuildVersion string
}

Options of controller

Jump to

Keyboard shortcuts

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