gin

package
v0.0.0-...-221f2c5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mod  string `yaml:"mod"`
	Addr string `yaml:"addr"`
}

type Controller

type Controller interface {
	RegisterRoute(engine *gin.RouterGroup)
}

type DefaultRouter

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

func (DefaultRouter) Init

func (r DefaultRouter) Init(engine *gin.Engine)

func (*DefaultRouter) RegisterController

func (r *DefaultRouter) RegisterController(c Controller)

type Entry

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

func NewEntry

func NewEntry(conf *Config, router Router, logger *zap.Logger) *Entry

func (*Entry) Engine

func (e *Entry) Engine() *gin.Engine

func (*Entry) Run

func (e *Entry) Run() error

func (*Entry) Stop

func (e *Entry) Stop(ctx context.Context) error

type Router

type Router interface {
	Init(engine *gin.Engine)
	RegisterController(c Controller)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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