core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROUTE_TYPE_EMBED   = "embed"
	ROUTE_TYPE_STATIC  = "static"
	ROUTE_TYPE_MINIO   = "minio"
	ROUTE_TYPE_DYNAMIC = "dynamic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProxy

type AuthProxy struct {
	Enabled bool                   `json:"enabled"`
	Mode    string                 `json:"mode"`
	Cas     *auth_proxy_cas.Config `json:"cas"`
}

type AuthZ

type AuthZ struct {
	Enabled         bool   `json:"enabled"`
	RouteMatchExpr  string `json:"routeMatchExpr"`
	Backend         string `json:"backend"`
	Failover        bool   `json:"failover"`
	IncludeBody     bool   `json:"includeBody"`
	BodySizeInBytes int    `json:"bodySizeInBytes"`
}

type Config

type Config struct {
	Port            int32                 `json:"port"`
	Prefork         bool                  `json:"prefork"`
	ShowAcl         bool                  `json:"showAcl"`
	UseLimit        bool                  `json:"useLimit"`        //是否启用频率限制
	LimitExpiration int                   `json:"limitExpiration"` //频率限制的时间窗口
	LimitMax        int                   `json:"limitMax"`        //频率限制的窗口期内允许的访问次数
	UseSSL          bool                  `json:"useSSL"`          //是否开启ssl
	CertFile        string                `json:"certFile"`        //文件必须放在cert目录
	KeyFile         string                `json:"keyFile"`
	AuthProxy       *AuthProxy            `json:"authProxy"`
	Jwt             *jwt_parser.JwtConfig `json:"jwt"`
	Authz           *AuthZ                `json:"authz"`
	Logcat          *Logcat               `json:"logcat"`
	Routes          []Route
}

func MakeConfig

func MakeConfig(confFile string) (*Config, error)

type CoreplusWebServer

type CoreplusWebServer struct {
	*fiber.App
	// contains filtered or unexported fields
}

func NewWebServer

func NewWebServer(conf *Config) *CoreplusWebServer

type Logcat

type Logcat struct {
	Enabled bool   `json:"enabled"`
	Backend string `json:"backend"`
}

type Route

type Route struct {
	Type        string `json:"type"`
	Backend     string `json:"backend"`
	Prefix      string `json:"prefix"`
	StripPrefix bool   `json:"stripPrefix"`
	TryFile     string `json:"tryFile"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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