dao

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedHTTPCachePolicyDAO = new(HTTPCachePolicyDAO)
View Source
var SharedHTTPFirewallPolicyDAO = new(HTTPFirewallPolicyDAO)
View Source
var SharedHTTPFirewallRuleGroupDAO = new(HTTPFirewallRuleGroupDAO)
View Source
var SharedHTTPFirewallRuleSetDAO = new(HTTPFirewallRuleSetDAO)
View Source
var SharedHTTPWebDAO = new(HTTPWebDAO)
View Source
var SharedIPListDAO = new(IPListDAO)
View Source
var SharedLogDAO = NewLogDAO()
View Source
var SharedNodeClusterDAO = new(NodeClusterDAO)
View Source
var SharedServerDAO = new(ServerDAO)

Functions

func SetRPC

func SetRPC(client RPCClient)

Types

type BaseDAO

type BaseDAO struct {
}

func (*BaseDAO) RPC

func (this *BaseDAO) RPC() RPCClient

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) FindEnabledPolicyGreyIPListId added in v1.3.9

func (this *HTTPFirewallPolicyDAO) FindEnabledPolicyGreyIPListId(ctx context.Context, policyId int64) (int64, error)

FindEnabledPolicyGreyIPListId 查找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配置

func (*HTTPWebDAO) InitEmptyHTTPFirewallPolicy

func (this *HTTPWebDAO) InitEmptyHTTPFirewallPolicy(ctx context.Context, serverGroupId int64, serverId int64, webId int64, isOn bool) (int64, error)

InitEmptyHTTPFirewallPolicy 初始化防火墙设置

type IPListDAO

type IPListDAO struct {
	BaseDAO
}

func (*IPListDAO) CreateIPListForServerId

func (this *IPListDAO) CreateIPListForServerId(ctx context.Context, serverId int64, listType string) (int64, error)

CreateIPListForServerId 为服务创建IP名单

func (*IPListDAO) FindAllowIPListIdWithServerId

func (this *IPListDAO) FindAllowIPListIdWithServerId(ctx context.Context, serverId int64) (int64, error)

FindAllowIPListIdWithServerId 查找网站的允许IP列表

func (*IPListDAO) FindDenyIPListIdWithServerId

func (this *IPListDAO) FindDenyIPListIdWithServerId(ctx context.Context, serverId int64) (int64, error)

FindDenyIPListIdWithServerId 查找网站的禁止IP列表

func (*IPListDAO) FindGreyIPListIdWithServerId added in v1.3.9

func (this *IPListDAO) FindGreyIPListIdWithServerId(ctx context.Context, serverId int64) (int64, error)

FindGreyIPListIdWithServerId 查找网站的IP灰名单

type LogDAO

type LogDAO struct {
	BaseDAO
}

func NewLogDAO

func NewLogDAO() *LogDAO

func (*LogDAO) CreateAdminLog

func (this *LogDAO) CreateAdminLog(ctx context.Context, level string, action string, description string, ip string, langMessageCode langs.MessageCode, langMessageArgs []any) error

func (*LogDAO) CreateUserLog

func (this *LogDAO) CreateUserLog(ctx context.Context, level string, action string, description string, ip string) error

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

func (this *ServerDAO) FindEnabledServer(ctx context.Context, serverId int64) (*pb.Server, error)

FindEnabledServer 查找服务

func (*ServerDAO) FindEnabledServerConfig

func (this *ServerDAO) FindEnabledServerConfig(ctx context.Context, serverId int64) (*serverconfigs.ServerConfig, error)

FindEnabledServerConfig 查找服务配置

Jump to

Keyboard shortcuts

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