### Get Client Configuration Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Shows how to fetch the client configuration using the GetClientConfig API. It initializes the API client, makes the call with the specified API version, and handles the response or errors. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { apiVersion := "apiVersion_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.GetClientConfig(context.Background(), apiVersion).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetClientConfig``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetClientConfig`: GetClientConfig200Response fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetClientConfig`: %v\n", resp) } ``` -------------------------------- ### Get Source Device Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Provides a Go example for retrieving details of a specific source device using the GetSourceDevice API. It requires the API version and the source device ID, and includes error handling. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { apiVersion := "apiVersion_example" // string | sourceDeviceId := "sourceDeviceId_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.GetSourceDevice(context.Background(), apiVersion, sourceDeviceId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetSourceDevice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetSourceDevice`: GetSourceDevice200Response fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSourceDevice`: %v\n", resp) } ``` -------------------------------- ### GetAccount Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Example of how to retrieve account information using the Go client. Requires source device ID and API version. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { sourceDeviceId := "sourceDeviceId_example" // string | apiVersion := "apiVersion_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.GetAccount(context.Background(), sourceDeviceId, apiVersion).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetAccount`: Account fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetAccount`: %v\n", resp) } ``` -------------------------------- ### Get Bound Devices Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Demonstrates how to call the GetBoundDevices API to retrieve a list of bound devices associated with a source device ID and API version. Handles potential errors and prints the response. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { sourceDeviceId := "sourceDeviceId_example" // string | apiVersion := "apiVersion_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.GetBoundDevices(context.Background(), sourceDeviceId, apiVersion).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetBoundDevices``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetBoundDevices`: []BoundDevice fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetBoundDevices`: %v\n", resp) } ``` -------------------------------- ### DeleteBoundDevice Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Example of how to delete a bound device using the Go client. Ensure proper context and device IDs are provided. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { sourceDeviceId := "sourceDeviceId_example" // string | apiVersion := "apiVersion_example" // string | boundDeviceId := "boundDeviceId_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) r, err := apiClient.DefaultAPI.DeleteBoundDevice(context.Background(), sourceDeviceId, apiVersion, boundDeviceId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteBoundDevice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` -------------------------------- ### Install Dependencies for Go API Client Source: https://github.com/virb3/wgcf/blob/master/openapi/README.md Installs necessary testing and networking libraries for the Go API client. Ensure these are available before proceeding with client integration. ```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` -------------------------------- ### Update Source Device Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Demonstrates how to update a source device using the Go SDK. Ensure you have the SDK configured and provide valid API version and source device ID. ```go package main import ( "context" "fmt" "os" openapi "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { apiVersion := "apiVersion_example" // string | sourceDeviceId := "sourceDeviceId_example" // string | updateSourceDeviceRequest := *openapiclient.NewUpdateSourceDeviceRequest("Key_example") // UpdateSourceDeviceRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.UpdateSourceDevice(context.Background(), apiVersion, sourceDeviceId).UpdateSourceDeviceRequest(updateSourceDeviceRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateSourceDevice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateSourceDevice`: UpdateSourceDevice200Response fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateSourceDevice`: %v\n", resp) } ``` -------------------------------- ### Update Account Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Demonstrates how to update an account using the DefaultAPI.UpdateAccount method. Ensure you have the necessary client libraries imported and configured. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { sourceDeviceId := "sourceDeviceId_example" // string | apiVersion := "apiVersion_example" // string | updateAccountRequest := *openapiclient.NewUpdateAccountRequest("License_example") // UpdateAccountRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.UpdateAccount(context.Background(), sourceDeviceId, apiVersion).UpdateAccountRequest(updateAccountRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateAccount``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateAccount`: UpdateAccount200Response fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateAccount`: %v\n", resp) } ``` -------------------------------- ### Minimal wgcf-account.toml Structure Source: https://context7.com/virb3/wgcf/llms.txt This is a minimal example of the wgcf-account.toml configuration file structure. It is commented out in the source but shows the expected key-value pairs. ```toml # device_id = "t.abcd1234efgh5678" # access_token = "abcdefgh12345678abcdefgh12345678" # private_key = "YHB0rOSHMTDwXsVoJfW1wKQ4a+bqr0Idk4P3Nj9X2kE=" # license_key = "XXXX-XXXX-XXXX-XXXX" ``` -------------------------------- ### Update Bound Device Go Example Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Shows how to update a bound device using the DefaultAPI.UpdateBoundDevice method. This requires source device ID, API version, and bound device ID. ```go package main import ( "context" "fmt" "os" openapi client "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { sourceDeviceId := "sourceDeviceId_example" // string | apiVersion := "apiVersion_example" // string | boundDeviceId := "boundDeviceId_example" // string | updateBoundDeviceRequest := *openapiclient.NewUpdateBoundDeviceRequest() // UpdateBoundDeviceRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.UpdateBoundDevice(context.Background(), sourceDeviceId, apiVersion, boundDeviceId).UpdateBoundDeviceRequest(updateBoundDeviceRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateBoundDevice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateBoundDevice`: []BoundDevice fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateBoundDevice`: %v\n", resp) } ``` -------------------------------- ### Usage Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Methods for getting, setting, and checking the Usage field. ```APIDOC ## GetUsage ### Description GetUsage returns the Usage field if non-nil, zero value otherwise. ### Method func (o *Account) GetUsage() float32 ## GetUsageOk ### Description GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method func (o *Account) GetUsageOk() (*float32, bool) ## SetUsage ### Description SetUsage sets Usage field to given value. ### Method func (o *Account) SetUsage(v float32) ## HasUsage ### Description HasUsage returns a boolean if a field has been set. ### Method func (o *Account) HasUsage() bool ``` -------------------------------- ### Services Management Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Config.md Methods for getting and setting the Services property of a Config object. ```APIDOC ## Services Management ### GetServices Returns the Services field if non-nil, zero value otherwise. #### Signature `func (o *Config) GetServices() ConfigServices` ### GetServicesOk Returns a tuple with the Services field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. #### Signature `func (o *Config) GetServicesOk() (*ConfigServices, bool)` ### SetServices Sets the Services field to the given value. #### Signature `func (o *Config) SetServices(v ConfigServices)` ``` -------------------------------- ### Interface Management Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Config.md Methods for getting and setting the Interface property of a Config object. ```APIDOC ## Interface Management ### GetInterface Returns the Interface field if non-nil, zero value otherwise. #### Signature `func (o *Config) GetInterface() ConfigInterface` ### GetInterfaceOk Returns a tuple with the Interface field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. #### Signature `func (o *Config) GetInterfaceOk() (*ConfigInterface, bool)` ### SetInterface Sets the Interface field to the given value. #### Signature `func (o *Config) SetInterface(v ConfigInterface)` ``` -------------------------------- ### Getters and Setters for InstallId Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'InstallId' property of the UpdateSourceDevice200Response. ```APIDOC ## InstallId Property ### GetInstallId `func (o *UpdateSourceDevice200Response) GetInstallId() string` Returns the InstallId field if non-nil, zero value otherwise. ### GetInstallIdOk `func (o *UpdateSourceDevice200Response) GetInstallIdOk() (*string, bool)` Returns a tuple with the InstallId field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetInstallId `func (o *UpdateSourceDevice200Response) SetInstallId(v string)` Sets the InstallId field to the given value. ``` -------------------------------- ### Register Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Registers a new user or device with the service. Requires essential details like FCM token, install ID, and user agreement. ```APIDOC ## Register ### Description Registers a new user or device with the service. Requires essential details like FCM token, install ID, and user agreement. ### Method POST ### Endpoint /register ### Parameters #### Path Parameters - **ctx** (context.Context) - Required - context for authentication, logging, cancellation, deadlines, tracing, etc. - **apiVersion** (string) - Required - API version #### Query Parameters None #### Request Body - **registerRequest** (RegisterRequest) - Required - Registration details - **fcmToken** (string) - Required - FCM token - **installId** (string) - Required - Installation ID - **key** (string) - Required - API key - **locale** (string) - Required - User locale - **model** (string) - Required - Device model - **tos** (string) - Required - Terms of Service agreement - **type** (string) - Required - Type of registration ### Request Example ```go { "fcmToken": "FcmToken_example", "installId": "InstallId_example", "key": "Key_example", "locale": "Locale_example", "model": "Model_example", "tos": "Tos_example", "type": "Type_example" } ``` ### Response #### Success Response (200) - **Register200Response** (Register200Response) - Details of the registration response #### Response Example ```json { "example": "response body" } ``` ### Authorization No authorization required ``` -------------------------------- ### Account Getters and Setters Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Provides methods to get and set the properties of an Account object. ```APIDOC ## Account Properties ### AccountType - **Get**: `func (o *Account) GetAccountType() string` - **GetOk**: `func (o *Account) GetAccountTypeOk() (*string, bool)` - **Set**: `func (o *Account) SetAccountType(v string)` ### Created - **Get**: `func (o *Account) GetCreated() string` - **GetOk**: `func (o *Account) GetCreatedOk() (*string, bool)` - **Set**: `func (o *Account) SetCreated(v string)` ### Id - **Get**: `func (o *Account) GetId() string` - **GetOk**: `func (o *Account) GetIdOk() (*string, bool)` - **Set**: `func (o *Account) SetId(v string)` ### License - **Get**: `func (o *Account) GetLicense() string` - **GetOk**: `func (o *Account) GetLicenseOk() (*string, bool)` - **Set**: `func (o *Account) SetLicense(v string)` ### PremiumData - **Get**: `func (o *Account) GetPremiumData() float32` - **GetOk**: `func (o *Account) GetPremiumDataOk() (*float32, bool)` - **Set**: `func (o *Account) SetPremiumData(v float32)` ### Quota - **Get**: `func (o *Account) GetQuota() float32` - **GetOk**: `func (o *Account) GetQuotaOk() (*float32, bool)` - **Set**: `func (o *Account) SetQuota(v float32)` ### ReferralCount - **Get**: `func (o *Account) GetReferralCount() float32` - **GetOk**: `func (o *Account) GetReferralCountOk() (*float32, bool)` - **Set**: `func (o *Account) SetReferralCount(v float32)` ### ReferralRenewalCountdown - **Get**: `func (o *Account) GetReferralRenewalCountdown() float32` ### Role - **Get**: `func (o *Account) GetRole() string` - **GetOk**: `func (o *Account) GetRoleOk() (*string, bool)` - **Set**: `func (o *Account) SetRole(v string)` ### Updated - **Get**: `func (o *Account) GetUpdated() string` - **GetOk**: `func (o *Account) GetUpdatedOk() (*string, bool)` - **Set**: `func (o *Account) SetUpdated(v string)` ### WarpPlus - **Get**: `func (o *Account) GetWarpPlus() bool` - **GetOk**: `func (o *Account) GetWarpPlusOk() (*bool, bool)` - **Set**: `func (o *Account) SetWarpPlus(v bool)` ### Usage - **Get**: `func (o *Account) GetUsage() *float32` - **GetOk**: `func (o *Account) GetUsageOk() (*float32, bool)` - **Set**: `func (o *Account) SetUsage(v *float32)` ``` -------------------------------- ### Place Methods Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the Place field, including a safe getter that checks for non-nil values. ```APIDOC ## GetPlace ### Description Retrieves the Place field. ### Method `GetPlace()` ### Returns - `float32`: The value of the Place field. ## GetPlaceOk ### Description Retrieves the Place field and a boolean indicating if it was set. ### Method `GetPlaceOk()` ### Returns - `(*float32, bool)`: A tuple containing a pointer to the Place field and a boolean. The boolean is true if the field was set, false otherwise. ## SetPlace ### Description Sets the Place field to a given value. ### Method `SetPlace(v float32)` ### Parameters - `v` (float32) - The value to set for the Place field. ``` -------------------------------- ### BoundDevice Getters and Setters Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/BoundDevice.md Provides methods to get and set the properties of a BoundDevice object. Each property has a getter (e.g., GetActivated), a getter that also returns a boolean indicating if the value was set (e.g., GetActivatedOk), and a setter (e.g., SetActivated). The 'Name' property also has a HasName method. ```APIDOC ## BoundDevice Properties ### Activated - **GetActivated**: `func (o *BoundDevice) GetActivated() string` - Returns the Activated field if non-nil, zero value otherwise. - **GetActivatedOk**: `func (o *BoundDevice) GetActivatedOk() (*string, bool)` - Returns a tuple with the Activated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetActivated**: `func (o *BoundDevice) SetActivated(v string)` - Sets the Activated field to the given value. ### Active - **GetActive**: `func (o *BoundDevice) GetActive() bool` - Returns the Active field if non-nil, zero value otherwise. - **GetActiveOk**: `func (o *BoundDevice) GetActiveOk() (*bool, bool)` - Returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetActive**: `func (o *BoundDevice) SetActive(v bool)` - Sets the Active field to the given value. ### Created - **GetCreated**: `func (o *BoundDevice) GetCreated() string` - Returns the Created field if non-nil, zero value otherwise. - **GetCreatedOk**: `func (o *BoundDevice) GetCreatedOk() (*string, bool)` - Returns a tuple with the Created field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetCreated**: `func (o *BoundDevice) SetCreated(v string)` - Sets the Created field to the given value. ### Id - **GetId**: `func (o *BoundDevice) GetId() string` - Returns the Id field if non-nil, zero value otherwise. - **GetIdOk**: `func (o *BoundDevice) GetIdOk() (*string, bool)` - Returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetId**: `func (o *BoundDevice) SetId(v string)` - Sets the Id field to the given value. ### Model - **GetModel**: `func (o *BoundDevice) GetModel() string` - Returns the Model field if non-nil, zero value otherwise. - **GetModelOk**: `func (o *BoundDevice) GetModelOk() (*string, bool)` - Returns a tuple with the Model field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetModel**: `func (o *BoundDevice) SetModel(v string)` - Sets the Model field to the given value. ### Name - **GetName**: `func (o *BoundDevice) GetName() string` - Returns the Name field if non-nil, zero value otherwise. - **GetNameOk**: `func (o *BoundDevice) GetNameOk() (*string, bool)` - Returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetName**: `func (o *BoundDevice) SetName(v string)` - Sets the Name field to the given value. - **HasName**: `func (o *BoundDevice) HasName() bool` - Returns a boolean if a field has been set. ### Role - **GetRole**: `func (o *BoundDevice) GetRole() string` - Returns the Role field if non-nil, zero value otherwise. - **GetRoleOk**: `func (o *BoundDevice) GetRoleOk() (*string, bool)` - Returns a tuple with the Role field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetRole**: `func (o *BoundDevice) SetRole(v string)` - Sets the Role field to the given value. ### Type - **GetType**: `func (o *BoundDevice) GetType() string` - Returns the Type field if non-nil, zero value otherwise. - **GetTypeOk**: `func (o *BoundDevice) GetTypeOk() (*string, bool)` - Returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. - **SetType**: `func (o *BoundDevice) SetType(v string)` - Sets the Type field to the given value. ``` -------------------------------- ### Account Methods Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the Account field, including a safe getter that checks for non-nil values. ```APIDOC ## GetAccount ### Description Retrieves the Account field. ### Method `GetAccount()` ### Returns - `Account`: The value of the Account field. ## GetAccountOk ### Description Retrieves the Account field and a boolean indicating if it was set. ### Method `GetAccountOk()` ### Returns - `(*Account, bool)`: A tuple containing a pointer to the Account field and a boolean. The boolean is true if the field was set, false otherwise. ## SetAccount ### Description Sets the Account field to a given value. ### Method `SetAccount(v Account)` ### Parameters - `v` (Account) - The value to set for the Account field. ``` -------------------------------- ### Tos Methods Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the Tos field, including a safe getter that checks for non-nil values. ```APIDOC ## GetTos ### Description Retrieves the Tos field. ### Method `GetTos()` ### Returns - `string`: The value of the Tos field. ## GetTosOk ### Description Retrieves the Tos field and a boolean indicating if it was set. ### Method `GetTosOk()` ### Returns - `(*string, bool)`: A tuple containing a pointer to the Tos field and a boolean. The boolean is true if the field was set, false otherwise. ## SetTos ### Description Sets the Tos field to a given value. ### Method `SetTos(v string)` ### Parameters - `v` (string) - The value to set for the Tos field. ``` -------------------------------- ### WarpPlus Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Methods for getting and setting the WarpPlus field. ```APIDOC ## GetWarpPlus ### Description GetWarpPlus returns the WarpPlus field if non-nil, zero value otherwise. ### Method func (o *Account) GetWarpPlus() bool ## GetWarpPlusOk ### Description GetWarpPlusOk returns a tuple with the WarpPlus field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method func (o *Account) GetWarpPlusOk() (*bool, bool) ## SetWarpPlus ### Description SetWarpPlus sets WarpPlus field to given value. ### Method func (o *Account) SetWarpPlus(v bool) ``` -------------------------------- ### Updated Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Methods for getting and setting the Updated field. ```APIDOC ## GetUpdated ### Description GetUpdated returns the Updated field if non-nil, zero value otherwise. ### Method func (o *Account) GetUpdated() string ## GetUpdatedOk ### Description GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method func (o *Account) GetUpdatedOk() (*string, bool) ## SetUpdated ### Description SetUpdated sets Updated field to given value. ### Method func (o *Account) SetUpdated(v string) ``` -------------------------------- ### Role Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Methods for getting and setting the Role field. ```APIDOC ## GetRole ### Description GetRole returns the Role field if non-nil, zero value otherwise. ### Method func (o *Account) GetRole() string ## GetRoleOk ### Description GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method func (o *Account) GetRoleOk() (*string, bool) ## SetRole ### Description SetRole sets Role field to given value. ### Method func (o *Account) SetRole(v string) ``` -------------------------------- ### ReferralRenewalCountdown Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Account.md Methods for getting and setting the ReferralRenewalCountdown field. ```APIDOC ## GetReferralRenewalCountdownOk ### Description GetReferralRenewalCountdownOk returns a tuple with the ReferralRenewalCountdown field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method func (o *Account) GetReferralRenewalCountdownOk() (*float32, bool) ## SetReferralRenewalCountdown ### Description SetReferralRenewalCountdown sets ReferralRenewalCountdown field to given value. ### Method func (o *Account) SetReferralRenewalCountdown(v float32) ``` -------------------------------- ### Register New wgcf Account Source: https://github.com/virb3/wgcf/blob/master/README.md Run this command to create a new wgcf account. The account details will be saved to `wgcf-account.toml`. ```bash wgcf register ``` -------------------------------- ### Config Field Getter Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/GetSourceDevice200Response.md Provides a method to get the Config field. ```APIDOC ## GetConfig ### Description `func (o *GetSourceDevice200Response) GetConfig() Config` GetConfig returns the Config field if non-nil, zero value otherwise. ``` -------------------------------- ### Constructor Functions Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/GetClientConfig200Response.md Provides functions to create new instances of GetClientConfig200Response. ```APIDOC ## Constructors ### NewGetClientConfig200Response `func NewGetClientConfig200Response(captivePortal []GetClientConfig200ResponseCaptivePortalInner, denylist []GetClientConfig200ResponseDenylistInner, premiumDataBytes float32, referralRewardBytes float32, ) *GetClientConfig200Response` Instantiates a new GetClientConfig200Response object with required properties. ### NewGetClientConfig200ResponseWithDefaults `func NewGetClientConfig200ResponseWithDefaults() *GetClientConfig200Response` Instantiates a new GetClientConfig200Response object with default values. ``` -------------------------------- ### Token Field Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Register200Response.md Provides a method to get the Token field of the Register200Response object. ```APIDOC ## GetToken `func (o *Register200Response) GetToken() string` GetToken returns the Token field if non-nil, zero value otherwise. ``` -------------------------------- ### Constructor Methods Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/GetClientConfig200ResponseCaptivePortalInner.md Provides methods for instantiating the GetClientConfig200ResponseCaptivePortalInner object. ```APIDOC ### NewGetClientConfig200ResponseCaptivePortalInner `func NewGetClientConfig200ResponseCaptivePortalInner(name string, networks []GetClientConfig200ResponseCaptivePortalInnerNetworksInner, ) *GetClientConfig200ResponseCaptivePortalInner` NewGetClientConfig200ResponseCaptivePortalInner instantiates a new GetClientConfig200ResponseCaptivePortalInner object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGetClientConfig200ResponseCaptivePortalInnerWithDefaults `func NewGetClientConfig200ResponseCaptivePortalInnerWithDefaults() *GetClientConfig200ResponseCaptivePortalInner` NewGetClientConfig200ResponseCaptivePortalInnerWithDefaults instantiates a new GetClientConfig200ResponseCaptivePortalInner object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ``` -------------------------------- ### ConfigInterface Constructors Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/ConfigInterface.md Provides methods for creating new instances of ConfigInterface. NewConfigInterface allows for initial property setting, while NewConfigInterfaceWithDefaults initializes with default values. ```APIDOC ## Constructor ### NewConfigInterface `func NewConfigInterface(addresses NetworkAddress, ) *ConfigInterface` NewConfigInterface instantiates a new ConfigInterface object. This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed. ### NewConfigInterfaceWithDefaults `func NewConfigInterfaceWithDefaults() *ConfigInterface` NewConfigInterfaceWithDefaults instantiates a new ConfigInterface object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set. ``` -------------------------------- ### Register User Account Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/DefaultApi.md Use this to register a new user account. Ensure all required fields in RegisterRequest are populated. ```go package main import ( "context" "fmt" "os" openapi "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { apiVersion := "apiVersion_example" // string | registerRequest := *openapiclient.NewRegisterRequest("FcmToken_example", "InstallId_example", "Key_example", "Locale_example", "Model_example", "Tos_example", "Type_example") // RegisterRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.DefaultAPI.Register(context.Background(), apiVersion).RegisterRequest(registerRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.Register``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `Register`: Register200Response fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.Register`: %v\n", resp) } ``` -------------------------------- ### Peers Management Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Config.md Methods for getting and setting the Peers property of a Config object. ```APIDOC ## Peers Management ### GetPeers Returns the Peers field if non-nil, zero value otherwise. #### Signature `func (o *Config) GetPeers() []Peer` ### GetPeersOk Returns a tuple with the Peers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. #### Signature `func (o *Config) GetPeersOk() (*[]Peer, bool)` ### SetPeers Sets the Peers field to the given value. #### Signature `func (o *Config) SetPeers(v []Peer)` ``` -------------------------------- ### Select Server Configuration by Index Source: https://github.com/virb3/wgcf/blob/master/openapi/README.md Overrides the default server configuration by setting the server index in the context. Use this to target a specific server defined in the OpenAPI specification. ```go ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) ``` -------------------------------- ### Constructor Functions Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/GetSourceDevice200Response.md Provides functions to create new instances of GetSourceDevice200Response, with options for setting all required properties or using default values. ```APIDOC ## Constructor Functions ### NewGetSourceDevice200Response `func NewGetSourceDevice200Response(created string, enabled bool, fcmToken string, id string, installId string, key string, locale string, model string, name string, place float32, tos string, type_ string, updated string, waitlistEnabled bool, warpEnabled bool, account Account, config Config) *GetSourceDevice200Response` Instantiates a new GetSourceDevice200Response object. This constructor assigns default values to properties that have them defined and ensures properties required by the API are set. The set of arguments will change if the set of required properties is changed. ### NewGetSourceDevice200ResponseWithDefaults `func NewGetSourceDevice200ResponseWithDefaults() *GetSourceDevice200Response` Instantiates a new GetSourceDevice200Response object. This constructor only assigns default values to properties that have them defined, but it doesn't guarantee that properties required by the API are set. ``` -------------------------------- ### ClientId Management Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Config.md Methods for getting and setting the ClientId property of a Config object. ```APIDOC ## ClientId Management ### GetClientId Returns the ClientId field if non-nil, zero value otherwise. #### Signature `func (o *Config) GetClientId() string` ### GetClientIdOk Returns a tuple with the ClientId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. #### Signature `func (o *Config) GetClientIdOk() (*string, bool)` ### SetClientId Sets the ClientId field to the given value. #### Signature `func (o *Config) SetClientId(v string)` ``` -------------------------------- ### Update account settings or bind a Warp+ license key Source: https://context7.com/virb3/wgcf/llms.txt Use `wgcf update` to bind a Warp+ license key, change the device name, or manage linked devices. Up to 5 devices can be linked per account. The full workflow includes registration, license binding, and profile generation. ```bash wgcf update --license-key "XXXX-XXXX-XXXX-XXXX" wgcf update --name "home-server" wgcf update --deactivate "t.abcd1234efgh5678" wgcf update --activate "t.abcd1234efgh5678" wgcf update --remove "t.abcd1234efgh5678" # Full Warp+ onboarding workflow: # 1. Register a fresh account (avoids the Warp VPN bug) wgcf register --accept-tos # 2. Immediately bind the license key wgcf update --license-key "XXXX-XXXX-XXXX-XXXX" # 3. Generate the profile wgcf generate ``` -------------------------------- ### Getters and Setters for Locale Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'Locale' property of the UpdateSourceDevice200Response. ```APIDOC ## Locale Property ### GetLocale `func (o *UpdateSourceDevice200Response) GetLocale() string` Returns the Locale field if non-nil, zero value otherwise. ### GetLocaleOk `func (o *UpdateSourceDevice200Response) GetLocaleOk() (*string, bool)` Returns a tuple with the Locale field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetLocale `func (o *UpdateSourceDevice200Response) SetLocale(v string)` Sets the Locale field to the given value. ``` -------------------------------- ### Getters and Setters for Key Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'Key' property of the UpdateSourceDevice200Response. ```APIDOC ## Key Property ### GetKey `func (o *UpdateSourceDevice200Response) GetKey() string` Returns the Key field if non-nil, zero value otherwise. ### GetKeyOk `func (o *UpdateSourceDevice200Response) GetKeyOk() (*string, bool)` Returns a tuple with the Key field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetKey `func (o *UpdateSourceDevice200Response) SetKey(v string)` Sets the Key field to the given value. ``` -------------------------------- ### Generate WireGuard profile with `wireguard.NewProfile` and `Profile.Save` Source: https://context7.com/virb3/wgcf/llms.txt Create a WireGuard configuration file using `wireguard.NewProfile` with `ProfileData` and save it using `profile.Save`. The generated file includes Cloudflare's DNS resolvers and MTU 1280, with permissions set to `0600`. ```go import "github.com/ViRb3/wgcf/v2/wireguard" profile, err := wireguard.NewProfile(&wireguard.ProfileData{ PrivateKey: "YHB0rOSHMTDwXsVoJfW1wKQ4a+bqr0Idk4P3Nj9X2kE=", Address1: "172.16.0.2", Address2: "fd01:5ca1:ab1e::2", PublicKey: "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h8R6BQ3Q=", Endpoint: "162.159.193.10:2408", }) if err != nil { log.Fatal(err) } if err := profile.Save("warp.conf"); err != nil { log.Fatal(err) } // Writes warp.conf with mode 0600: // [Interface] // PrivateKey = YHB0rOSHMTDwXsVoJfW1wKQ4a+bqr0Idk4P3Nj9X2kE= // Address = 172.16.0.2/32, fd01:5ca1:ab1e::2/128 // DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001 // MTU = 1280 // [Peer] // PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h8R6BQ3Q= // AllowedIPs = 0.0.0.0/0, ::/0 // Endpoint = 162.159.193.10:2408 ``` -------------------------------- ### SetUpdated Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/SourceDevice.md Sets the Updated field of a SourceDevice. ```APIDOC ## SetUpdated ### Description Sets the Updated field to the given value. ### Method Signature `func (o *SourceDevice) SetUpdated(v string)` ``` -------------------------------- ### Getters and Setters for Id Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'Id' property of the UpdateSourceDevice200Response. ```APIDOC ## Id Property ### GetId `func (o *UpdateSourceDevice200Response) GetId() string` Returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *UpdateSourceDevice200Response) GetIdOk() (*string, bool)` Returns a tuple with the Id field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetId `func (o *UpdateSourceDevice200Response) SetId(v string)` Sets the Id field to the given value. ``` -------------------------------- ### Global --config flag Source: https://context7.com/virb3/wgcf/llms.txt Allows specifying a custom TOML configuration file for account settings, overriding the default `wgcf-account.toml`. Configuration values can also be provided via environment variables. ```APIDOC ## Global `--config` flag — Custom account configuration file All commands accept a `--config` flag (default: `wgcf-account.toml`) to specify an alternative TOML configuration file. Fields can also be supplied as environment variables prefixed with `WGCF_` (e.g., `WGCF_DEVICE_ID`, `WGCF_ACCESS_TOKEN`, `WGCF_PRIVATE_KEY`, `WGCF_LICENSE_KEY`). ### Usage ```bash # Use a custom config file wgcf --config /secure/path/my-warp.toml status ``` ``` -------------------------------- ### Getters and Setters for FcmToken Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'FcmToken' property of the UpdateSourceDevice200Response. ```APIDOC ## FcmToken Property ### GetFcmToken `func (o *UpdateSourceDevice200Response) GetFcmToken() string` Returns the FcmToken field if non-nil, zero value otherwise. ### GetFcmTokenOk `func (o *UpdateSourceDevice200Response) GetFcmTokenOk() (*string, bool)` Returns a tuple with the FcmToken field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetFcmToken `func (o *UpdateSourceDevice200Response) SetFcmToken(v string)` Sets the FcmToken field to the given value. ``` -------------------------------- ### Print account and device details Source: https://context7.com/virb3/wgcf/llms.txt Use `wgcf status` to view account type, quota, premium data balance, and a list of all bound devices with their details. The current device is marked with `(current)`. ```bash wgcf status # Example output: # ================================================================ # Account # ================================================================ # Id : abcd1234efgh5678ijkl # Account type : free # Created : 2024-01-15T10:30:00.000Z # Updated : 2024-06-01T08:00:00.000Z # Premium data : 0 B # Quota : 0 B # Role : child # # ================================================================ # Devices # ================================================================ # Id : t.abcd1234efgh5678 (current) # Type : Android # Model : PC # Name : my-laptop ``` -------------------------------- ### Config Field Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Register200Response.md Provides methods to get and set the Config field of the Register200Response object. ```APIDOC ## GetConfig `func (o *Register200Response) GetConfig() Config` GetConfig returns the Config field if non-nil, zero value otherwise. ## GetConfigOk `func (o *Register200Response) GetConfigOk() (*Config, bool)` GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ## SetConfig `func (o *Register200Response) SetConfig(v Config)` SetConfig sets Config field to given value. ``` -------------------------------- ### NewConfig Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/Config.md Creates a new Config object with the provided client ID, interface, peers, and services. This constructor initializes default values and ensures required properties are set. ```APIDOC ## NewConfig ### Description Instantiates a new Config object. This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed. ### Signature `func NewConfig(clientId string, interface_ ConfigInterface, peers []Peer, services ConfigServices) *Config` ``` -------------------------------- ### Configure Templated Server URL Variables Source: https://github.com/virb3/wgcf/blob/master/openapi/README.md Provides custom variables to template the server URL. This allows dynamic configuration of server endpoints, such as specifying a different base path. ```go ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` -------------------------------- ### Getters and Setters for Enabled Source: https://github.com/virb3/wgcf/blob/master/openapi/docs/UpdateSourceDevice200Response.md Provides methods to get and set the 'Enabled' property of the UpdateSourceDevice200Response. ```APIDOC ## Enabled Property ### GetEnabled `func (o *UpdateSourceDevice200Response) GetEnabled() bool` Returns the Enabled field if non-nil, zero value otherwise. ### GetEnabledOk `func (o *UpdateSourceDevice200Response) GetEnabledOk() (*bool, bool)` Returns a tuple with the Enabled field if it's non-nil, zero value otherwise, and a boolean to check if the value has been set. ### SetEnabled `func (o *UpdateSourceDevice200Response) SetEnabled(v bool)` Sets the Enabled field to the given value. ``` -------------------------------- ### Use custom config file with `--config` flag Source: https://context7.com/virb3/wgcf/llms.txt Specify an alternative TOML configuration file for wgcf commands using the `--config` flag. Environment variables prefixed with `WGCF_` can also be used to supply configuration fields. ```bash # Use a custom config file wgcf --config /secure/path/my-warp.toml status ```