Documentation
¶
Index ¶
- Variables
- func GetDir(dirPth string) (files []string, err error)
- func ReadConfigure(filepath string) (err error)
- type Api
- type ApiGroup
- type ApiGroupInfo
- type ApiInfo
- type Backend
- type BackendInfo
- type ConstantParam
- type GatewayInfo
- type GlobalConfig
- type Param
- type RateLimitInfo
- type Strategy
- type StrategyInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Configure string
)
Functions ¶
func ReadConfigure ¶
Types ¶
type ApiGroup ¶
type ApiGroup struct {
Group []ApiGroupInfo `json:"group" yaml:"group"`
}
type ApiGroupInfo ¶
type ApiInfo ¶
type ApiInfo struct { ApiName string `json:"api_name" yaml:"api_name"` GroupID int `json:"group_id" yaml:"group_id"` RequestURL string `json:"request_url" yaml:"request_url"` RequestMethod []string `json:"request_method" yaml:"request_method"` BackendID int `json:"backend_id" yaml:"backend_id"` ProxyURL string `json:"proxy_url" yaml:"proxy_url"` ProxyMethod string `json:"proxy_method" yaml:"proxy_method"` IsRaw bool `json:"is_raw" yaml:"is_raw"` ProxyParams []Param `json:"proxy_params" yaml:"proxy_params"` ConstantParams []ConstantParam `json:"constant_params" yaml:"constant_params"` Follow bool `json:"follow" yaml:"follow"` }
type Backend ¶
type Backend struct {
Backend []BackendInfo `json:"backend" yaml:"backend"`
}
func GetBackendList ¶
type BackendInfo ¶
type ConstantParam ¶
type GatewayInfo ¶
type GatewayInfo struct { GatewayName string `json:"gateway_name" yaml:"gateway_name"` GatewayAlias string `json:"gateway_alias" yaml:"gateway_alias"` GatewayStatus string `json:"gateway_status" yaml:"gateway_status"` PluginConfPath string `json:"plugin_conf_path" yaml:"plugin_conf_path"` ApiConfPath string `json:"api_conf_path" yaml:"api_conf_path"` ApiGroupConfPath string `json:"api_group_conf_path" yaml:"api_group_conf_path"` StrategyConfPath string `json:"strategy_conf_path" yaml:"strategy_conf_path"` BackendConfPath string `json:"backend_conf_path" yaml:"backend_conf_path"` Timeout int `json:"timeout" yaml:"timeout"` IPLimitType string `json:"ip_limit_type" yaml:"ip_limit_type"` IPWhiteList []string `json:"ip_white_list" yaml:"ip_white_list"` IPBlackList []string `json:"ip_black_list" yaml:"ip_black_list"` StrategyList Strategy ApiList Api BackendList Backend UpdateTime string `json:"update_time" yaml:"update_time"` CreateTime string `json:"create_time" yaml:"create_time"` GroupList ApiGroup }
func GetGatewayList ¶
func GetGatewayList(path []string) []GatewayInfo
type GlobalConfig ¶
type GlobalConfig struct { Host string `json:"host" yaml:"host"` Port string `json:"port" yaml:"port"` GatewayConfPath string `json:"gateway_conf_path" yaml:"gateway_conf_path"` GatewayList []GatewayInfo }
func ParseConfInfo ¶
func ParseConfInfo() GlobalConfig
type RateLimitInfo ¶
type Strategy ¶
type Strategy struct {
Strategy []StrategyInfo `json:"strategy" yaml:"strategy"`
}
func GetStrategyList ¶
type StrategyInfo ¶
type StrategyInfo struct { StrategyName string `json:"strategy_name" yaml:"strategy_name"` StrategyID string `json:"strategy_id" yaml:"strategy_id"` Auth string `json:"auth" yaml:"auth"` BasicUserName string `json:"basic_user_name" yaml:"basic_user_name"` BasicUserPassword string `json:"basic_user_password" yaml:"basic_user_password"` ApiKey string `json:"api_key" yaml:"api_key"` IPLimitType string `json:"ip_limit_type" yaml:"ip_limit_type"` IPWhiteList []string `json:"ip_white_list" yaml:"ip_white_list"` IPBlackList []string `json:"ip_black_list" yaml:"ip_black_list"` RateLimitList []RateLimitInfo `json:"rate_limit_list" yaml:"rate_limit_list"` UpdateTime string `json:"update_time" yaml:"update_time"` CreateTime string `json:"create_time" yaml:"create_time"` }
Click to show internal directories.
Click to hide internal directories.