Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteBoundDevice(ctx *config.Context, targetDeviceId string) error
- func MakeApiClient(authToken *string) *openapi.APIClient
- func Register(publicKey *wireguard.Key, deviceModel string) (*openapi.Register200Response, error)
- func UpdateLicenseKey(ctx *config.Context) (*openapi.UpdateAccount200Response, error)
- type Account
- type BoundDevice
- func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
- func GetBoundDevices(ctx *config.Context) ([]BoundDevice, error)
- func GetSourceBoundDevice(ctx *config.Context) (*BoundDevice, error)
- func UpdateSourceBoundDeviceActive(ctx *config.Context, targetDeviceId string, active bool) (*BoundDevice, error)
- func UpdateSourceBoundDeviceName(ctx *config.Context, targetDeviceId string, newName 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 ¶ added in v2.2.29
func MakeApiClient ¶
func UpdateLicenseKey ¶
func UpdateLicenseKey(ctx *config.Context) (*openapi.UpdateAccount200Response, error)
Types ¶
type BoundDevice ¶
type BoundDevice openapi.BoundDevice
func FindDevice ¶
func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
func GetBoundDevices ¶
func GetBoundDevices(ctx *config.Context) ([]BoundDevice, error)
func GetSourceBoundDevice ¶
func GetSourceBoundDevice(ctx *config.Context) (*BoundDevice, error)
type SourceDevice ¶ added in v2.2.29
type SourceDevice openapi.GetSourceDevice200Response
func GetSourceDevice ¶
func GetSourceDevice(ctx *config.Context) (*SourceDevice, error)
Click to show internal directories.
Click to hide internal directories.