http

package
v0.0.0-...-d2fce3e Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Debug        int8
	ReadTimeout  int64
	WriteTimeout int64
	Addr         string
}

type Response

type Response struct {
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(code2StatusCodeMap map[int]int, dirs ...string) *Response

func (*Response) ResultJson

func (r *Response) ResultJson(c *gin.Context, code int, msg string, data interface{})

func (*Response) View

func (r *Response) View(ctx *gin.Context, code int, viewName string, vars jet.VarMap, seo *Seo)

type Seo

type Seo struct {
	Title       string
	Description string
	Keywords    string
	Author      string
}

type Server

type Server struct {
	Gin *gin.Engine
	// contains filtered or unexported fields
}

func New

func New(conf *Conf, log *client.Log) (*Server, error)

func (*Server) Exit

func (s *Server) Exit()

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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