gin

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

tao-gin

Go Report Card GoDoc GitHub release (latest by date)

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

Config your 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 {
	Schema       string   `json:"schema"`
	Host         string   `json:"host"`
	Port         int      `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"`
	Pprof        *Pprof   `json:"pprof"`
	RunAfters    []string `json:"run_after,omitempty"`
}

Config implements tao.Config

func (*Config) Name added in v0.1.2

func (g *Config) Name() string

Name of 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

type Pprof added in v0.1.1

type Pprof struct {
	Enable bool   `json:"enable"`
	Prefix string `json:"prefix"`
}

Pprof config of gin

Jump to

Keyboard shortcuts

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