Documentation
¶
Index ¶
- Variables
- func SetRPC(client RPCClient)
- type BaseDAO
- type HTTPCachePolicyDAO
- func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicy(ctx context.Context, cachePolicyId int64) (*pb.HTTPCachePolicy, error)
- func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyConfig(ctx context.Context, cachePolicyId int64) (*serverconfigs.HTTPCachePolicy, error)
- func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyWithServerId(ctx context.Context, serverId int64) (*pb.HTTPCachePolicy, error)
- type HTTPFirewallPolicyDAO
- func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicy(ctx context.Context, policyId int64) (*pb.HTTPFirewallPolicy, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyConfig(ctx context.Context, policyId int64) (*firewallconfigs.HTTPFirewallPolicy, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyInboundConfig(ctx context.Context, policyId int64) (*firewallconfigs.HTTPFirewallInboundConfig, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyWithServerId(ctx context.Context, serverId int64) (*pb.HTTPFirewallPolicy, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyBlackIPListId(ctx context.Context, policyId int64) (int64, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyIPListIdWithType(ctx context.Context, policyId int64, listType ipconfigs.IPListType) (int64, error)
- func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyWhiteIPListId(ctx context.Context, policyId int64) (int64, error)
- func (this *HTTPFirewallPolicyDAO) FindHTTPFirewallActionConfigs(ctx context.Context, actions []*firewallconfigs.HTTPFirewallActionConfig) ([]maps.Map, error)
- type HTTPFirewallRuleGroupDAO
- type HTTPFirewallRuleSetDAO
- type HTTPWebDAO
- func (this *HTTPWebDAO) FindWebConfigWithId(ctx context.Context, webId int64) (*serverconfigs.HTTPWebConfig, error)
- func (this *HTTPWebDAO) FindWebConfigWithLocationId(ctx context.Context, locationId int64) (*serverconfigs.HTTPWebConfig, error)
- func (this *HTTPWebDAO) FindWebConfigWithServerGroupId(ctx context.Context, serverGroupId int64) (*serverconfigs.HTTPWebConfig, error)
- func (this *HTTPWebDAO) FindWebConfigWithServerId(ctx context.Context, serverId int64) (*serverconfigs.HTTPWebConfig, error)
- func (this *HTTPWebDAO) InitEmptyHTTPFirewallPolicy(ctx context.Context, serverGroupId int64, serverId int64, webId int64, ...) (int64, error)
- type IPListDAO
- func (this *IPListDAO) CreateIPListForServerId(ctx context.Context, serverId int64, listType string) (int64, error)
- func (this *IPListDAO) FindAllowIPListIdWithServerId(ctx context.Context, serverId int64) (int64, error)
- func (this *IPListDAO) FindDenyIPListIdWithServerId(ctx context.Context, serverId int64) (int64, error)
- type LogDAO
- type NodeClusterDAO
- type RPCClient
- type ServerDAO
- type SettingCode
- type SysSettingDAO
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type HTTPCachePolicyDAO ¶
type HTTPCachePolicyDAO struct {
BaseDAO
}
func (*HTTPCachePolicyDAO) FindEnabledHTTPCachePolicy ¶
func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicy(ctx context.Context, cachePolicyId int64) (*pb.HTTPCachePolicy, error)
查找缓存策略信息
func (*HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyConfig ¶
func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyConfig(ctx context.Context, cachePolicyId int64) (*serverconfigs.HTTPCachePolicy, error)
查找缓存策略配置
func (*HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyWithServerId ¶
func (this *HTTPCachePolicyDAO) FindEnabledHTTPCachePolicyWithServerId(ctx context.Context, serverId int64) (*pb.HTTPCachePolicy, error)
根据服务ID查找缓存策略
type HTTPFirewallPolicyDAO ¶
type HTTPFirewallPolicyDAO struct {
BaseDAO
}
HTTPFirewallPolicyDAO WAF策略相关
func (*HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicy ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicy(ctx context.Context, policyId int64) (*pb.HTTPFirewallPolicy, error)
FindEnabledHTTPFirewallPolicy 查找WAF策略基本信息
func (*HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyConfig ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyConfig(ctx context.Context, policyId int64) (*firewallconfigs.HTTPFirewallPolicy, error)
FindEnabledHTTPFirewallPolicyConfig 查找WAF策略配置
func (*HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyInboundConfig ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyInboundConfig(ctx context.Context, policyId int64) (*firewallconfigs.HTTPFirewallInboundConfig, error)
FindEnabledHTTPFirewallPolicyInboundConfig 查找WAF的Inbound
func (*HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyWithServerId ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledHTTPFirewallPolicyWithServerId(ctx context.Context, serverId int64) (*pb.HTTPFirewallPolicy, error)
FindEnabledHTTPFirewallPolicyWithServerId 根据服务Id查找WAF策略
func (*HTTPFirewallPolicyDAO) FindEnabledPolicyBlackIPListId ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyBlackIPListId(ctx context.Context, policyId int64) (int64, error)
FindEnabledPolicyBlackIPListId 查找WAF的黑名单
func (*HTTPFirewallPolicyDAO) FindEnabledPolicyIPListIdWithType ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyIPListIdWithType(ctx context.Context, policyId int64, listType ipconfigs.IPListType) (int64, error)
FindEnabledPolicyIPListIdWithType 根据类型查找WAF的IP名单
func (*HTTPFirewallPolicyDAO) FindEnabledPolicyWhiteIPListId ¶
func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyWhiteIPListId(ctx context.Context, policyId int64) (int64, error)
FindEnabledPolicyWhiteIPListId 查找WAF的白名单
func (*HTTPFirewallPolicyDAO) FindHTTPFirewallActionConfigs ¶
func (this *HTTPFirewallPolicyDAO) FindHTTPFirewallActionConfigs(ctx context.Context, actions []*firewallconfigs.HTTPFirewallActionConfig) ([]maps.Map, error)
FindHTTPFirewallActionConfigs 查找动作相关信息
type HTTPFirewallRuleGroupDAO ¶
type HTTPFirewallRuleGroupDAO struct {
BaseDAO
}
func (*HTTPFirewallRuleGroupDAO) FindRuleGroupConfig ¶
func (this *HTTPFirewallRuleGroupDAO) FindRuleGroupConfig(ctx context.Context, groupId int64) (*firewallconfigs.HTTPFirewallRuleGroup, error)
查找分组配置
type HTTPFirewallRuleSetDAO ¶
type HTTPFirewallRuleSetDAO struct {
BaseDAO
}
func (*HTTPFirewallRuleSetDAO) FindRuleSetConfig ¶
func (this *HTTPFirewallRuleSetDAO) FindRuleSetConfig(ctx context.Context, setId int64) (*firewallconfigs.HTTPFirewallRuleSet, error)
查找规则集配置
type HTTPWebDAO ¶
type HTTPWebDAO struct {
BaseDAO
}
func (*HTTPWebDAO) FindWebConfigWithId ¶
func (this *HTTPWebDAO) FindWebConfigWithId(ctx context.Context, webId int64) (*serverconfigs.HTTPWebConfig, error)
FindWebConfigWithId 根据WebId查找Web配置
func (*HTTPWebDAO) FindWebConfigWithLocationId ¶
func (this *HTTPWebDAO) FindWebConfigWithLocationId(ctx context.Context, locationId int64) (*serverconfigs.HTTPWebConfig, error)
FindWebConfigWithLocationId 根据LocationId查找Web配置
func (*HTTPWebDAO) FindWebConfigWithServerGroupId ¶
func (this *HTTPWebDAO) FindWebConfigWithServerGroupId(ctx context.Context, serverGroupId int64) (*serverconfigs.HTTPWebConfig, error)
FindWebConfigWithServerGroupId 根据ServerGroupId查找Web配置
func (*HTTPWebDAO) FindWebConfigWithServerId ¶
func (this *HTTPWebDAO) FindWebConfigWithServerId(ctx context.Context, serverId int64) (*serverconfigs.HTTPWebConfig, error)
FindWebConfigWithServerId 根据ServerId查找Web配置
type IPListDAO ¶
type IPListDAO struct {
BaseDAO
}
func (*IPListDAO) CreateIPListForServerId ¶
func (this *IPListDAO) CreateIPListForServerId(ctx context.Context, serverId int64, listType string) (int64, error)
CreateIPListForServerId 为服务创建IP名单
type NodeClusterDAO ¶
type NodeClusterDAO struct {
BaseDAO
}
NodeClusterDAO 集群相关操作
func (*NodeClusterDAO) FindEnabledNodeCluster ¶
func (this *NodeClusterDAO) FindEnabledNodeCluster(ctx context.Context, clusterId int64) (*pb.NodeCluster, error)
FindEnabledNodeCluster 查找集群
func (*NodeClusterDAO) FindEnabledNodeClusterConfigInfo ¶
func (this *NodeClusterDAO) FindEnabledNodeClusterConfigInfo(ctx context.Context, clusterId int64) (*pb.FindEnabledNodeClusterConfigInfoResponse, error)
FindEnabledNodeClusterConfigInfo 查找集群概要信息
type RPCClient ¶
type RPCClient interface {
SysSettingRPC() pb.SysSettingServiceClient
NodeClusterRPC() pb.NodeClusterServiceClient
NodeRegionRPC() pb.NodeRegionServiceClient
ServerRPC() pb.ServerServiceClient
ServerGroupRPC() pb.ServerGroupServiceClient
OriginRPC() pb.OriginServiceClient
HTTPWebRPC() pb.HTTPWebServiceClient
ReverseProxyRPC() pb.ReverseProxyServiceClient
HTTPGzipRPC() pb.HTTPGzipServiceClient
HTTPHeaderRPC() pb.HTTPHeaderServiceClient
HTTPHeaderPolicyRPC() pb.HTTPHeaderPolicyServiceClient
HTTPPageRPC() pb.HTTPPageServiceClient
HTTPAccessLogPolicyRPC() pb.HTTPAccessLogPolicyServiceClient
HTTPCachePolicyRPC() pb.HTTPCachePolicyServiceClient
HTTPFirewallPolicyRPC() pb.HTTPFirewallPolicyServiceClient
HTTPFirewallRuleGroupRPC() pb.HTTPFirewallRuleGroupServiceClient
HTTPFirewallRuleSetRPC() pb.HTTPFirewallRuleSetServiceClient
HTTPLocationRPC() pb.HTTPLocationServiceClient
HTTPWebsocketRPC() pb.HTTPWebsocketServiceClient
HTTPRewriteRuleRPC() pb.HTTPRewriteRuleServiceClient
HTTPAccessLogRPC() pb.HTTPAccessLogServiceClient
SSLCertRPC() pb.SSLCertServiceClient
SSLPolicyRPC() pb.SSLPolicyServiceClient
MessageRPC() pb.MessageServiceClient
IPListRPC() pb.IPListServiceClient
IPItemRPC() pb.IPItemServiceClient
FileRPC() pb.FileServiceClient
FileChunkRPC() pb.FileChunkServiceClient
RegionCountryRPC() pb.RegionCountryServiceClient
RegionProvinceRPC() pb.RegionProvinceServiceClient
LogRPC() pb.LogServiceClient
DNSDomainRPC() pb.DNSDomainServiceClient
DNSRPC() pb.DNSServiceClient
ACMEUserRPC() pb.ACMEUserServiceClient
ACMETaskRPC() pb.ACMETaskServiceClient
UserRPC() pb.UserServiceClient
}
type ServerDAO ¶
type ServerDAO struct {
BaseDAO
}
func (*ServerDAO) FindEnabledServer ¶
FindEnabledServer 查找服务
func (*ServerDAO) FindEnabledServerConfig ¶
func (this *ServerDAO) FindEnabledServerConfig(ctx context.Context, serverId int64) (*serverconfigs.ServerConfig, error)
FindEnabledServerConfig 查找服务配置
type SettingCode ¶
type SettingCode = string
const ( SettingCodeServerGlobalConfig SettingCode = "serverGlobalConfig" // 服务相关全局设置 SettingCodeNodeMonitor SettingCode = "nodeMonitor" // 监控节点状态 SettingCodeClusterHealthCheck SettingCode = "clusterHealthCheck" // 集群健康检查 SettingCodeIPListVersion SettingCode = "ipListVersion" // IP名单的版本号 SettingCodeAdminSecurityConfig SettingCode = "adminSecurityConfig" // 管理员安全设置 )
type SysSettingDAO ¶
type SysSettingDAO struct {
BaseDAO
}
func (*SysSettingDAO) ReadGlobalConfig ¶
func (this *SysSettingDAO) ReadGlobalConfig(ctx context.Context) (*serverconfigs.GlobalConfig, error)
读取服务全局配置