gin

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 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

G config of gin

Functions

This section is empty.

Types

type Config added in v0.0.3

type Config struct {
	Host         string   `json:"host"`
	Port         string   `json:"port"`
	Listen       string   `json:"listen"`
	Mode         string   `json:"mode"`
	TrustProxies []string `json:"trust_proxies"`
	HTMLPattern  string   `json:"html_pattern"`
	StaticPath   string   `json:"static_path"`
	RunAfters    []string `json:"run_after,omitempty"`
}

Config implements tao.Config

func (Config) Default added in v0.0.3

func (g Config) Default() tao.Config

Default config

func (*Config) RunAfter added in v0.0.3

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

RunAfter defines pre task names

func (*Config) ToTask added in v0.0.3

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

ToTask transform itself to Task

func (*Config) ValidSelf added in v0.0.3

func (g *Config) ValidSelf()

ValidSelf with some default values

Jump to

Keyboard shortcuts

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