No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 0.0.0
- Package version: 1.0.0
- Generator version: 7.6.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import openapi "github.com/quantcdn/quant-admin-go"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value openapi.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices
and openapi.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://dashboard.quantcdn.io/api/v2
Class | Method | HTTP request | Description |
---|---|---|---|
CrawlerSchedulesAPI | CrawlerSchedulesCreate | Post /organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules | |
CrawlerSchedulesAPI | CrawlerSchedulesDelete | Delete /organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules/{crawler_schedule} | |
CrawlerSchedulesAPI | CrawlerSchedulesList | Get /organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules | |
CrawlerSchedulesAPI | CrawlerSchedulesRead | Get /organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules/{crawler_schedule} | |
CrawlerSchedulesAPI | CrawlerSchedulesUpdate | Patch /organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules/{crawler_schedule} | |
CrawlersAPI | CrawlersCreate | Post /organizations/{organization}/projects/{project}/crawlers | |
CrawlersAPI | CrawlersDelete | Delete /organizations/{organization}/projects/{project}/crawlers/{crawler} | |
CrawlersAPI | CrawlersList | Get /organizations/{organization}/projects/{project}/crawlers | |
CrawlersAPI | CrawlersRead | Get /organizations/{organization}/projects/{project}/crawlers/{crawler} | |
CrawlersAPI | CrawlersUpdate | Patch /organizations/{organization}/projects/{project}/crawlers/{crawler} | |
DomainsAPI | DomainsCreate | Post /organizations/{organization}/projects/{project}/domains | |
DomainsAPI | DomainsDelete | Delete /organizations/{organization}/projects/{project}/domains/{domain} | |
DomainsAPI | DomainsList | Get /organizations/{organization}/projects/{project}/domains | |
DomainsAPI | DomainsRead | Get /organizations/{organization}/projects/{project}/domains/{domain} | |
DomainsAPI | DomainsUpdate | Patch /organizations/{organization}/projects/{project}/domains/{domain} | |
HeadersAPI | HeadersCreate | Post /organizations/{organization}/projects/{project}/custom-headers | |
HeadersAPI | HeadersDelete | Delete /organizations/{organization}/projects/{project}/custom-headers | |
HeadersAPI | HeadersList | Get /organizations/{organization}/projects/{project}/custom-headers | |
KVAPI | KVCreate | Post /organizations/{organization}/projects/{project}/kv | |
KVAPI | KVDelete | Delete /organizations/{organization}/projects/{project}/kv/{store} | |
KVAPI | KVList | Get /organizations/{organization}/projects/{project}/kv | |
KVAPI | KVRead | Get /organizations/{organization}/projects/{project}/kv/{store} | |
KVAPI | KVUpdate | Patch /organizations/{organization}/projects/{project}/kv/{store} | |
KVItemsAPI | KVItemsCreate | Post /organizations/{organization}/projects/{project}/kv/{store}/items | |
KVItemsAPI | KVItemsDelete | Delete /organizations/{organization}/projects/{project}/kv/{store}/items/{item} | |
KVItemsAPI | KVItemsList | Get /organizations/{organization}/projects/{project}/kv/{store}/items | |
KVItemsAPI | KVItemsRead | Get /organizations/{organization}/projects/{project}/kv/{store}/items/{item} | |
KVItemsAPI | KVItemsUpdate | Patch /organizations/{organization}/projects/{project}/kv/{store}/items/{item} | |
OrganizationsAPI | OrganizationsList | Get /organizations | |
OrganizationsAPI | OrganizationsRead | Get /organizations/{organization} | |
ProjectsAPI | ProjectsCreate | Post /organizations/{organization}/projects | |
ProjectsAPI | ProjectsDelete | Delete /organizations/{organization}/projects/{project} | |
ProjectsAPI | ProjectsList | Get /organizations/{organization}/projects | |
ProjectsAPI | ProjectsRead | Get /organizations/{organization}/projects/{project} | |
ProjectsAPI | ProjectsUpdate | Patch /organizations/{organization}/projects/{project} | |
PurgeAPI | PurgeCreate | Post /organizations/{organization}/projects/{project}/purge | |
RulesProxyAPI | RulesProxyCreate | Post /organizations/{organization}/projects/{project}/rules/proxy | |
RulesProxyAPI | RulesProxyDelete | Delete /organizations/{organization}/projects/{project}/rules/proxy/{rule} | |
RulesProxyAPI | RulesProxyList | Get /organizations/{organization}/projects/{project}/rules/proxy | |
RulesProxyAPI | RulesProxyRead | Get /organizations/{organization}/projects/{project}/rules/proxy/{rule} | |
RulesProxyAPI | RulesProxyUpdate | Patch /organizations/{organization}/projects/{project}/rules/proxy/{rule} | |
RulesRedirectAPI | RulesRedirectCreate | Post /organizations/{organization}/projects/{project}/rules/redirect | |
RulesRedirectAPI | RulesRedirectDelete | Delete /organizations/{organization}/projects/{project}/rules/redirect/{rule} | |
RulesRedirectAPI | RulesRedirectList | Get /organizations/{organization}/projects/{project}/rules/redirect | |
RulesRedirectAPI | RulesRedirectRead | Get /organizations/{organization}/projects/{project}/rules/redirect/{rule} | |
RulesRedirectAPI | RulesRedirectUpdate | Patch /organizations/{organization}/projects/{project}/rules/redirect/{rule} | |
SecretsAPI | SecretsCreate | Post /organizations/{organization}/projects/{project}/secrets | |
SecretsAPI | SecretsDelete | Delete /organizations/{organization}/projects/{project}/secrets/{store} | |
SecretsAPI | SecretsList | Get /organizations/{organization}/projects/{project}/secrets | |
SecretsAPI | SecretsRead | Get /organizations/{organization}/projects/{project}/secrets/{store} | |
SecretsAPI | SecretsUpdate | Patch /organizations/{organization}/projects/{project}/secrets/{store} |
- Crawler
- CrawlerRequest
- CrawlerRequestUpdate
- CrawlerSchedule
- CrawlerScheduleRequest
- CrawlerScheduleRequestUpdate
- Domain
- DomainRequest
- DomainRequestUpdate
- Error
- FailoverConfig
- HeadersCreateRequest
- HeadersDeleteRequest
- NotifyConfig
- Organization
- Project
- ProjectRequest
- ProjectRequestUpdate
- ProxyConfig
- ProxyConfigUpdate
- PurgeRequest
- Rule
- RuleAuth
- RuleAuthAction
- RuleCustomResponse
- RuleCustomResponseAction
- RuleHeader
- RuleHeaderAction
- RuleProxy
- RuleProxyAction
- RuleProxyRequest
- RuleProxyRequestUpdate
- RuleRedirect
- RuleRedirectAction
- RuleRedirectRequest
- RuleRedirectRequestUpdate
- Store
- StoreItem
- StoreItemUpdate
- StoreUpdate
- Threshold
- WAFConfig
- WAFConfigUpdate
Authentication schemes defined for the API:
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime