Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteBoundDevice(apiClient *openapi.APIClient, ctx *config.Context, targetDeviceId string) error
- func NewApiClient(authToken *string, transport *http.Transport) *openapi.APIClient
- func Register(apiClient *openapi.APIClient, publicKey *wireguard.Key, deviceModel string) (*openapi.Register200Response, error)
- func UpdateLicenseKey(apiClient *openapi.APIClient, ctx *config.Context) (*openapi.UpdateAccount200Response, error)
- type Account
- type BoundDevice
- func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
- func GetBoundDevices(apiClient *openapi.APIClient, ctx *config.Context) ([]BoundDevice, error)
- func GetSourceBoundDevice(apiClient *openapi.APIClient, ctx *config.Context) (*BoundDevice, error)
- func UpdateSourceBoundDeviceActive(apiClient *openapi.APIClient, ctx *config.Context, targetDeviceId string, ...) (*BoundDevice, error)
- func UpdateSourceBoundDeviceName(apiClient *openapi.APIClient, ctx *config.Context, targetDeviceId string, ...) (*BoundDevice, error)
- type SourceDevice
Constants ¶
View Source
const ( ApiUrl = "https://api.cloudflareclient.com" ApiVersion = "v0a1922" )
Variables ¶
View Source
var ( DefaultHeaders = map[string]string{ "User-Agent": "okhttp/3.12.1", "CF-Client-Version": "a-6.3-1922", } DefaultTransport = &http.Transport{ TLSClientConfig: &tls.Config{ MinVersion: tls.VersionTLS12, MaxVersion: tls.VersionTLS12}, ForceAttemptHTTP2: false, Proxy: http.ProxyFromEnvironment, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, } )
Functions ¶
func DeleteBoundDevice ¶
func NewApiClient ¶ added in v0.0.2
func UpdateLicenseKey ¶
Types ¶
type BoundDevice ¶
type BoundDevice openapi.BoundDevice
func FindDevice ¶
func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
func GetBoundDevices ¶
func GetSourceBoundDevice ¶
Click to show internal directories.
Click to hide internal directories.