srv

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GIN = "gin"
)

Variables

View Source
var GetTraceId func(c context.Context, wrap ...string) string

GetTraceId customize func to get request trace id

View Source
var Handler http.Handler

Handler http handler

View Source
var Server http.Server

Server http server

Functions

This section is empty.

Types

type Srv

type Srv struct {
	// non-zero attr
	Name      string `json:",omitempty"`
	Tag       string `json:",omitempty"`
	Author    string `json:",omitempty"`
	Host      string `json:",omitempty"`
	IP        string `json:",omitempty"`
	FrameWork string `json:",omitempty"`
	Listen    string `json:",omitempty"`
	Port      string `json:",omitempty"`
	BaseURL   string `json:",omitempty"`

	// zero val is ok
	Release  bool
	Trace    bool
	Pprof    bool
	Cors     bool
	Static   string
	HtmlGlob string
}

Srv config

func Defaults

func Defaults(srv *Srv) (*Srv, error)

Defaults srv

Jump to

Keyboard shortcuts

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