http

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 14 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 {
	CORS    cors.Config
	BaseUrl *url.URL
	Debug   bool
	Host    string
	Port    int
}

func (Config) GetCors

func (c Config) GetCors() cors.Config

type Group

type Group struct {
	*gin.RouterGroup
	// contains filtered or unexported fields
}

func (*Group) Group

func (g *Group) Group(key, relativePath string, handlers ...gin.HandlerFunc) *Group

type Router

type Router interface {
	gin.IRoutes
	http.Handler

	Group(path string, handlers ...gin.HandlerFunc) *Group
	GetUrl(key ...string) *url.URL
	SetUrl(key string, value *url.URL)
	Run() error
}

func NewRouter

func NewRouter(c Config, l log.Service) Router

type Service

type Service interface {
	SetBaseUrl(baseUrl string) error
	GetBaseUrl() *url.URL
	InitRouter() Router
	GetUrl(key ...string) *url.URL
	SetUrl(key string, value *url.URL)
	DebugEnabled() bool
}

func NewService

func NewService(c Config, l log.Service) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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