chi

package
v1.0.0-alpha-4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Middlewares []func(http.Handler) http.Handler
	Handlers    []ConfigHandler
	Routes      []ConfigRouter
}

type ConfigHandler

type ConfigHandler struct {
	Handler http.Handler
	Pattern string
}

type ConfigRouter

type ConfigRouter struct {
	Method      string
	HandlerFunc http.HandlerFunc
	Pattern     string
}

type Plugin

type Plugin func(context.Context) (*Config, error)

type Server

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

func NewServer

func NewServer(ctx context.Context, plugins ...Plugin) *Server

func NewServerWithOptions

func NewServerWithOptions(ctx context.Context, opts *server.Options, plugins ...Plugin) *Server

func (*Server) Mux

func (s *Server) Mux() *chi.Mux

func (*Server) Serve

func (s *Server) Serve(ctx context.Context)

Jump to

Keyboard shortcuts

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