gin

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationRouteGroup = "application"
	MonitoringRouteGroup  = "monitoring"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Name        string           `json:"name,omitempty" yaml:"name,omitempty"`
	Environment string           `json:"environment,omitempty" yaml:"environment,omitempty"`
	Version     string           `json:"version,omitempty" yaml:"version,omitempty"`
	Addresses   server.Addresses `json:"addresses,omitempty" yaml:"addresses,omitempty"`
}

type Server

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

func New

func New(opts Options) (*Server, error)

func (*Server) Register

func (h *Server) Register(method string, route string, handler gin.HandlerFunc)

func (*Server) RegisterGeneric

func (h *Server) RegisterGeneric(method string, route string, handler http.Handler)

func (*Server) RegisterGenericWithGroup

func (h *Server) RegisterGenericWithGroup(name string, method string, route string, handler http.Handler)

func (*Server) RegisterWithGroup

func (h *Server) RegisterWithGroup(name string, method string, route string, handler gin.HandlerFunc)

func (*Server) Run

func (h *Server) Run(runCh chan error)

Jump to

Keyboard shortcuts

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