app

package
v0.0.0-...-d3a3332 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Server  *server.Server
	Routers []chi.Router
	Logger  *slog.Logger
	// contains filtered or unexported fields
}

func NewApp

func NewApp(opts ...AppOptFunc) (*App, error)

type AppOptFunc

type AppOptFunc func(*App) error

func WithConnection

func WithConnection(ctx context.Context, conn string) AppOptFunc

func WithName

func WithName(name string) AppOptFunc

type Router

type Router struct {
	*chi.Mux
}

Router is a wrapper around chi.Mux

func NewRouter

func NewRouter(routes map[string]chi.Router) *Router

NewRouter creates a new Chi router with middleware

Jump to

Keyboard shortcuts

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