server

package
v0.0.0-...-949c8fb Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AsApiRouter

func AsApiRouter(f any) any

func AsWebRouter

func AsWebRouter(f any) any

func ErrorHandler

func ErrorHandler(isDev bool, c *fiber.Ctx, err error) error

func NewServer

func NewServer(deps Dependencies) (*fiber.App, error)

func SetupRouter

func SetupRouter(deps SetupRouterDependecies) *fiber.App

Types

type ApiRouter

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

func NewApiRouter

func NewApiRouter(version string, router func(fiber.Router), names ...string) ApiRouter

type ApiRouters

type ApiRouters []ApiRouter

func (ApiRouters) Register

func (ar ApiRouters) Register(router fiber.Router)

type CodeLine

type CodeLine struct {
	Number    int
	Content   string
	IsCurrent bool
}

type Dependencies

type Dependencies struct {
	fx.In

	Config *config.Config
	Logger *logger.Logger
}

type SetupRouterDependecies

type SetupRouterDependecies struct {
	fx.In

	App          *fiber.App
	SessionStore *session.Store
	Config       *config.Config

	WebRoutes []WebRouter `group:"web_router"`
	ApiRoutes []ApiRouter `group:"api_router"`
}

type StackFrameContext

type StackFrameContext struct {
	Frame      debug.StackFrame
	CodeLines  []CodeLine
	IsInternal bool
}

type WebRouter

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

func NewWebRouter

func NewWebRouter(prefix string, router func(fiber.Router), names ...string) WebRouter

type WebRouters

type WebRouters []WebRouter

func (WebRouters) Register

func (wr WebRouters) Register(router fiber.Router)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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