Documentation
¶
Index ¶
- Constants
- Variables
- 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 UpdateSourceBoundDevice(ctx *config.Context, data openapi.UpdateBoundDeviceRequest) (*BoundDevice, error)
- func UpdateSourceBoundDeviceActive(ctx *config.Context, active bool) (*BoundDevice, error)
- func UpdateSourceBoundDeviceName(ctx *config.Context, newName string) (*BoundDevice, error)
- type Device
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 MakeApiClient ¶
func UpdateLicenseKey ¶
func UpdateLicenseKey(ctx *config.Context) (*openapi.UpdateAccount200Response, error)
Types ¶
type Account ¶
type Account openapi.GetAccount200Response
type BoundDevice ¶
type BoundDevice openapi.GetBoundDevices200Response
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)
func UpdateSourceBoundDevice ¶
func UpdateSourceBoundDevice(ctx *config.Context, data openapi.UpdateBoundDeviceRequest) (*BoundDevice, error)
func UpdateSourceBoundDeviceActive ¶
func UpdateSourceBoundDeviceActive(ctx *config.Context, active bool) (*BoundDevice, error)
func UpdateSourceBoundDeviceName ¶
func UpdateSourceBoundDeviceName(ctx *config.Context, newName string) (*BoundDevice, error)
type Device ¶
type Device openapi.UpdateSourceDevice200Response
Click to show internal directories.
Click to hide internal directories.