httpserver

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(c *Config, logger *zap.Logger, init InitRouters) *gin.Engine

func Provide

func Provide() fx.Option

Types

type Config

type Config struct {
	Host               string
	Port               int
	Mode               string
	MaxMultipartMemory uint8
}

func NewConfig

func NewConfig(v *viper.Viper, logger *zap.Logger) (*Config, error)

type InitRouters

type InitRouters func(r *gin.Engine)

type Server

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

func NewServer

func NewServer(c *Config, logger *zap.Logger, router *gin.Engine) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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