http_server

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

type HttpServer struct {

	//viper.GetString("listen")
	//env := viper.GetString("env")
	Env  string
	Addr string
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(env, addr string) *HttpServer

func (*HttpServer) AddMiddleware

func (hs *HttpServer) AddMiddleware(ms ...gin.HandlerFunc)

func (*HttpServer) ExtendRouter

func (hs *HttpServer) ExtendRouter(rfs ...RouterFunc)

func (*HttpServer) ListenAndServe

func (hs *HttpServer) ListenAndServe() error

func (*HttpServer) ListenAndServe2 added in v1.1.23

func (hs *HttpServer) ListenAndServe2() error

func (*HttpServer) Server

func (hs *HttpServer) Server() *gin.Engine

type RouterFunc

type RouterFunc func(g *gin.Engine)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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