Documentation
¶
Index ¶
- Constants
- Variables
- type BaiShan
- type BaiShanRefreshResponse
- type BaiShanUsageResponse
- type Cdn
- type CloudFlare
- type CloudFlareGraphQLQuery
- type CloudFlareHttpRequests
- type GoEdge
- type GoEdgeCommonResponse
- type GoEdgeServerResponse
- type GoEdgeTokenResponse
- type GoEdgeUsageResponse
- type HuaWei
- type KuoCai
- type KuoCaiCommonResponse
- type KuoCaiUsageResponse
- type ServiceProvider
Constants ¶
View Source
const Binding = "cdn"
Variables ¶
View Source
var App foundation.Application
Functions ¶
This section is empty.
Types ¶
type BaiShanRefreshResponse ¶
type BaiShanUsageResponse ¶
type Cdn ¶
type Cdn struct {
// contains filtered or unexported fields
}
func (*Cdn) RefreshPath ¶
func (*Cdn) RefreshUrl ¶
type CloudFlare ¶
func (*CloudFlare) RefreshPath ¶
func (s *CloudFlare) RefreshPath(paths []string) error
RefreshPath 刷新路径
func (*CloudFlare) RefreshUrl ¶
func (s *CloudFlare) RefreshUrl(urls []string) error
RefreshUrl 刷新URL
type CloudFlareGraphQLQuery ¶
type CloudFlareGraphQLQuery struct {
Query string `json:"query"`
Variables map[string]any `json:"variables"`
}
CloudFlareGraphQLQuery 结构体用于构造 GraphQL 查询
type CloudFlareHttpRequests ¶
type CloudFlareHttpRequests struct {
Data struct {
Viewer struct {
Zones []struct {
HttpRequests1DGroups []struct {
Sum struct {
Requests int `json:"requests"`
} `json:"sum"`
} `json:"httpRequests1dGroups"`
} `json:"zones"`
} `json:"viewer"`
} `json:"data"`
Errors []struct {
Message string `json:"message"`
} `json:"errors"`
}
CloudFlareHttpRequests 结构体用于解析 GraphQL 查询结果
type GoEdge ¶ added in v1.0.1
type GoEdge struct {
API, AccessKeyID, AccessKey string
}
func (*GoEdge) RefreshPath ¶ added in v1.0.1
RefreshPath 刷新路径
func (*GoEdge) RefreshUrl ¶ added in v1.0.1
RefreshUrl 刷新URL
type GoEdgeCommonResponse ¶ added in v1.0.1
type GoEdgeServerResponse ¶ added in v1.0.1
type GoEdgeTokenResponse ¶ added in v1.0.1
type GoEdgeUsageResponse ¶ added in v1.0.1
type GoEdgeUsageResponse struct {
Code int `json:"code"`
Data struct {
ServerDailyStat struct {
ServerId int `json:"serverId"`
Bytes int `json:"bytes"`
CachedBytes int `json:"cachedBytes"`
CountRequests int `json:"countRequests"`
} `json:"serverDailyStat"`
} `json:"data"`
Message string `json:"message"`
}
type HuaWei ¶
type HuaWei struct {
AccessKey, SecretKey string // 密钥
}
type KuoCai ¶
type KuoCai struct {
UserName, PassWord string
}
type KuoCaiCommonResponse ¶
type KuoCaiUsageResponse ¶
type KuoCaiUsageResponse struct {
Code string `json:"code"`
Message string `json:"message"`
Data struct {
VisitsSummary struct {
HitFlux string `json:"hit_flux"`
ReqNum int `json:"req_num"`
HitNum int `json:"hit_num"`
} `json:"visits_summary"`
VisitsDetail struct {
HitFlux struct {
Unit string `json:"unit"`
Data []float64 `json:"data"`
} `json:"hit_flux"`
ReqNum []int `json:"req_num"`
HitNum []int `json:"hit_num"`
} `json:"visits_detail"`
Labels []string `json:"labels"`
} `json:"data"`
Success bool `json:"success"`
SuccessWithDateResp bool `json:"successWithDateResp"`
}
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (receiver *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (receiver *ServiceProvider) Register(app foundation.Application)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.