tao_gin

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

tao-gin

  _______             _____ _       
 |__   __|           / ____(_)      
    | | __ _  ___   | |  __ _ _ __  
    | |/ _` |/ _ \  | | |_ | | '_ \ 
    | | (_| | (_) | | |__| | | | | |
    |_|\__,_|\___/   \_____|_|_| |_|

Configure instead of coding gin server!

Documentation

Index

Constants

View Source
const ConfigKey = "gin"

ConfigKey for this repo

Variables

View Source
var Engine *gin.Engine

Engine of gin implements http.Handler

Functions

This section is empty.

Types

type GinConfig

type GinConfig struct {
	Host         string   `json:"host"`
	Port         string   `json:"port"`
	Listen       string   `json:"listen"`
	Mode         string   `json:"mode"`
	TrustProxies []string `json:"trust_proxies"`
	RunAfter_    []string `json:"run_after,omitempty"`
}

GinConfig implements tao.Config

func (GinConfig) Default

func (g GinConfig) Default() tao.Config

Default config

func (*GinConfig) RunAfter

func (g *GinConfig) RunAfter() []string

RunAfter defines pre task names

func (*GinConfig) ToTask

func (g *GinConfig) ToTask() tao.Task

ToTask transform itself to Task

func (*GinConfig) ValidSelf

func (g *GinConfig) ValidSelf()

ValidSelf with some default values

Jump to

Keyboard shortcuts

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