Documentation
¶
Index ¶
- type Client
- func (c *Client) API() *cf.Client
- func (c *Client) AccountID() string
- func (c *Client) CreateCNAME(ctx context.Context, zoneID, name, target string) (string, error)
- func (c *Client) CreateTunnel(ctx context.Context, name string) (*shared.CloudflareTunnel, error)
- func (c *Client) DeleteDNSRecord(ctx context.Context, zoneID, recordID string) error
- func (c *Client) DeleteTunnel(ctx context.Context, tunnelID string) error
- func (c *Client) FindDNSRecord(ctx context.Context, zoneID, name string) (string, error)
- func (c *Client) FindZoneByDomain(ctx context.Context, domain string) (*zones.Zone, error)
- func (c *Client) GetTunnelToken(ctx context.Context, tunnelID string) (string, error)
- func (c *Client) ListTunnels(ctx context.Context) ([]shared.CloudflareTunnel, error)
- func (c *Client) ListZones(ctx context.Context) ([]zones.Zone, error)
- func (c *Client) PushIngressConfig(ctx context.Context, tunnelID string, routes []IngressRule) error
- func (c *Client) UpdateCNAME(ctx context.Context, zoneID, recordID, name, target string) error
- type IngressRule
- type ZoneInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateCNAME ¶
CreateCNAME 创建 CNAME 记录指向隧道
func (*Client) CreateTunnel ¶
CreateTunnel 创建 Cloudflare Tunnel
func (*Client) DeleteDNSRecord ¶
DeleteDNSRecord 删除 DNS 记录
func (*Client) DeleteTunnel ¶
DeleteTunnel 删除隧道
func (*Client) FindDNSRecord ¶ added in v0.8.1
FindDNSRecord 查找指定域名的 DNS 记录
func (*Client) FindZoneByDomain ¶
FindZoneByDomain 根据域名查找 Zone
func (*Client) GetTunnelToken ¶
GetTunnelToken 获取隧道运行 Token
func (*Client) ListTunnels ¶
ListTunnels 列出所有隧道
func (*Client) PushIngressConfig ¶ added in v0.4.1
func (c *Client) PushIngressConfig(ctx context.Context, tunnelID string, routes []IngressRule) error
PushIngressConfig 推送 ingress 配置到 Cloudflare 远端
type IngressRule ¶ added in v0.4.1
IngressRule ingress 路由规则
Click to show internal directories.
Click to hide internal directories.