dao

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApi

func AddApi(apiConfPath, apiName, requestURL, requestMethod, proxyURL, proxyMethod string, groupID, backendID int, follow, isRaw bool, param []*conf.Param, constantParam []*conf.ConstantParam) (bool, int)

新增接口

func AddApiGroup

func AddApiGroup(groupConfPath, groupName string) (bool, int)

新增分组

func AddBackend

func AddBackend(backendConfPath, backendName, backendPath string) (bool, int)

新增后端

func AddGateway

func AddGateway(gatewayName, gatewayAlias string) bool

新增网关

func AddRateLimit

func AddRateLimit(strategyConfPath, strategyID, period string, startTime, endTime, priority, limitCount int, allow bool) bool

新增流量限制

func AddStrategy

func AddStrategy(strategyConfPath, strategyName string) (bool, string)

新增策略组

func CheckApiURLIsExist

func CheckApiURLIsExist(apiConfPath, requestURL, requestMethod, follow string, apiID int) bool

请求路径及请求方式查重

func CheckGatewayAliasIsExist

func CheckGatewayAliasIsExist(gatewayAlias string) bool

检查网关别名是否存在

func CheckLogin

func CheckLogin(userToken, loginName string) bool

检查用户是否登录

func DeleteApi

func DeleteApi(apiConfPath string, apiID int) bool

func DeleteApiGroup

func DeleteApiGroup(groupConfPath string, groupID int) bool

删除分组

func DeleteApiOfGroup

func DeleteApiOfGroup(apiConfPath string, groupID int) bool

批量修改接口分组

func DeleteBackend

func DeleteBackend(backendConfPath string, backendID int) bool

删除后端信息

func DeleteGateway

func DeleteGateway(gatewayAlias string) bool

删除网关

func DeleteRateLimit

func DeleteRateLimit(strategyConfPath, strategyID string, rateLimitID int) bool

删除流量限制

func DeleteStrategy

func DeleteStrategy(strategyConfPath, strategyID string) bool

删除策略组

func EditApi

func EditApi(apiConfPath, apiName, requestURL, requestMethod, proxyURL, proxyMethod string, apiID, groupID, backendID int, follow, isRaw bool, param []*conf.Param, constantParam []*conf.ConstantParam) bool

修改接口

func EditApiGroup

func EditApiGroup(groupConfPath, groupName string, groupID int) bool

修改分组

func EditAuth

func EditAuth(strategyConfPath, strategyID, auth, basicUserName, basicUserPassword, apiKey string) bool

编辑鉴权信息

func EditBackend

func EditBackend(backendConfPath, backendName, backendPath, gatewayAlias string, backendID int) bool

修改后端信息

func EditGateway

func EditGateway(gatewayName, gatewayAlias, oldGatewayAlias string) bool

修改网关信息

func EditGatewayIPList

func EditGatewayIPList(gatewayAlias, ipLimitType, ipWhiteList, ipBlackList string) bool

修改网关黑白名单

func EditGlobalConfig

func EditGlobalConfig(gatewayPort string) bool

编辑全局配置

func EditRateLimit

func EditRateLimit(strategyConfPath, strategyID, period string, rateLimitID, startTime, endTime, priority, limitCount int, allow bool) bool

修改流量限制

func EditStrategy

func EditStrategy(strategyConfPath, strategyName, strategyID string) bool

修改策略组

func EditStrategyIPList

func EditStrategyIPList(strategyConfPath, strategyID, ipLimitType, ipWhiteList, ipBlackList string) bool

修改策略组黑白名单

func GetAllApiList

func GetAllApiList(apiConfPath string) map[string]interface{}

获取接口列表

func GetApiCount

func GetApiCount(apiConfPath string) int

获取接口数量

func GetApiGroupCount

func GetApiGroupCount(groupConfPath string) int

获取接口数量

func GetApiGroupInfo

func GetApiGroupInfo(groupConfPath string, groupID int) (bool, *conf.GroupInfo)

获取api分组信息

func GetApiGroupList

func GetApiGroupList(groupConfPath string) []*conf.GroupInfo

获取分组列表

func GetApiInfo

func GetApiInfo(apiConfPath string, apiID int) (bool, map[string]interface{})

获取接口详情

func GetApiListByGroup

func GetApiListByGroup(apiConfPath string, groupID int) map[string]interface{}

func GetAuthInfo

func GetAuthInfo(strategyConfPath, strategyID string) map[string]string

获取鉴权信息

func GetBackendInfo

func GetBackendInfo(backendConfPath string, backendID int) (bool, *conf.BackendInfo)

获取后端信息

func GetBackendList

func GetBackendList(backendConfPath string) []*conf.BackendInfo

获取后端列表

func GetGatewayConfPath

func GetGatewayConfPath(gatewayAlias string) (bool, map[string]string)

获取网关配置路径

func GetGatewayIPList

func GetGatewayIPList(gatewayAlias string) map[string]string

获取网关黑白名单

func GetGatewayInfo

func GetGatewayInfo(gatewayAlias string) (bool, map[string]interface{})

获取网关信息

func GetGatewayList

func GetGatewayList() (bool, []map[string]interface{})

获取网关列表

func GetRateLimitInfo

func GetRateLimitInfo(strategyConfPath, strategyID string, limitID int) (bool, *conf.RateLimitInfo)

获取流量限制列表

func GetRateLimitList

func GetRateLimitList(strategyConfPath, strategyID string) []map[string]interface{}

获取流量限制列表

func GetSimpleStrategyList

func GetSimpleStrategyList(strategyConfPath string) []map[string]interface{}

获取简易策略组列表

func GetStrategyCount

func GetStrategyCount(strategyConfPath string) int

获取策略组数量

func GetStrategyIPList

func GetStrategyIPList(strategyConfPath, strategyID string) map[string]string

获取策略组黑白名单

func GetStrategyList

func GetStrategyList(strategyConfPath string) []map[string]interface{}

获取策略组列表

func Install

func Install(port, loginName, loginPassword, path string) bool

安装

func Login

func Login(loginName, loginPassword string) bool

用户登录

func SearchApi

func SearchApi(apiConfPath, keyword string) []map[string]interface{}

搜索接口

Types

This section is empty.

Jump to

Keyboard shortcuts

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