types

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 1 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 {
	Swagger

	Engine                    *echo.Echo
	ModuleConfigs             []Module
	Prefix                    string
	Version                   string
	DisableDefaultMiddlewares bool
	DisabledClearTerminal     bool
	ReleaseMode               bool

	HideBanner             bool
	HideProjectInformation bool
	HidePort               bool
}

type GorgMiddleware

type GorgMiddleware string
const (
	Auth    GorgMiddleware = "auth"
	Logger  GorgMiddleware = "logger"
	Recover GorgMiddleware = "recover"
)

type HttpMethod

type HttpMethod string
const (
	GET     HttpMethod = "GET"
	PUT     HttpMethod = "PUT"
	HEAD    HttpMethod = "HEAD"
	POST    HttpMethod = "POST"
	PATCH   HttpMethod = "PATCH"
	TRACE   HttpMethod = "TRACE"
	DELETE  HttpMethod = "DELETE"
	OPTIONS HttpMethod = "OPTIONS"
	CONNECT HttpMethod = "CONNECT"
)

type Module

type Module struct {
	Prefix       string
	Version      string
	AuthRequired bool
	Name         string
	Routes       []Route
}

type Route

type Route struct {
	Prefix       string
	Version      string
	AuthRequired bool

	Doc RouteDoc

	Path    string
	Method  HttpMethod
	Methods []HttpMethod
	Handler func(c echo.Context) error
	Body    any
	Query   any
	Res     any
}

type RouteDoc

type RouteDoc struct {
	Description string
	Summary     string
}

type Swagger

type Swagger struct {
	IsDisabled  bool
	ID          string
	Swagger     string
	Host        string
	BasePath    string
	Title       string
	Description string
}

Jump to

Keyboard shortcuts

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