Skip to content

quantcdn/quant-admin-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for quantadmingo

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

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.10.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

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 quantadmingo "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")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value quantadmingo.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), quantadmingo.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value quantadmingo.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), quantadmingo.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

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 quantadmingo.ContextOperationServerIndices and quantadmingo.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), quantadmingo.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), quantadmingo.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

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}
DefaultAPI RulesServeStaticCreate Post /organizations/{organization}/projects/{project}/rules/serve-static
DefaultAPI RulesServeStaticDelete Delete /organizations/{organization}/projects/{project}/rules/serve-static/{rule}
DefaultAPI RulesServeStaticList Get /organizations/{organization}/projects/{project}/rules/serve-static
DefaultAPI RulesServeStaticRead Get /organizations/{organization}/projects/{project}/rules/serve-static/{rule}
DefaultAPI RulesServeStaticUpdate Patch /organizations/{organization}/projects/{project}/rules/serve-static/{rule}
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
RulesBotChallengeAPI RulesBotChallengeCreate Post /organizations/{organization}/projects/{project}/rules/bot-challenge
RulesBotChallengeAPI RulesBotChallengeDelete Delete /organizations/{organization}/projects/{project}/rules/bot-challenge/{rule}
RulesBotChallengeAPI RulesBotChallengeList Get /organizations/{organization}/projects/{project}/rules/bot-challenge
RulesBotChallengeAPI RulesBotChallengeRead Get /organizations/{organization}/projects/{project}/rules/bot-challenge/{rule}
RulesBotChallengeAPI RulesBotChallengeUpdate Patch /organizations/{organization}/projects/{project}/rules/bot-challenge/{rule}
RulesContentFilterAPI RulesContentFilterCreate Post /organizations/{organization}/projects/{project}/rules/content-filter
RulesContentFilterAPI RulesContentFilterDelete Delete /organizations/{organization}/projects/{project}/rules/content-filter/{rule}
RulesContentFilterAPI RulesContentFilterList Get /organizations/{organization}/projects/{project}/rules/content-filter
RulesContentFilterAPI RulesContentFilterRead Get /organizations/{organization}/projects/{project}/rules/content-filter/{rule}
RulesContentFilterAPI RulesContentFilterUpdate Patch /organizations/{organization}/projects/{project}/rules/content-filter/{rule}
RulesCustomResponseAPI RulesCustomResponseCreate Post /organizations/{organization}/projects/{project}/rules/custom-response
RulesCustomResponseAPI RulesCustomResponseDelete Delete /organizations/{organization}/projects/{project}/rules/custom-response/{rule}
RulesCustomResponseAPI RulesCustomResponseList Get /organizations/{organization}/projects/{project}/rules/custom-response
RulesCustomResponseAPI RulesCustomResponseRead Get /organizations/{organization}/projects/{project}/rules/custom-response/{rule}
RulesCustomResponseAPI RulesCustomResponseUpdate Patch /organizations/{organization}/projects/{project}/rules/custom-response/{rule}
RulesFunctionAPI RulesFunctionCreate Post /organizations/{organization}/projects/{project}/rules/function
RulesFunctionAPI RulesFunctionDelete Delete /organizations/{organization}/projects/{project}/rules/function/{rule}
RulesFunctionAPI RulesFunctionList Get /organizations/{organization}/projects/{project}/rules/function
RulesFunctionAPI RulesFunctionRead Get /organizations/{organization}/projects/{project}/rules/function/{rule}
RulesFunctionAPI RulesFunctionUpdate Patch /organizations/{organization}/projects/{project}/rules/function/{rule}
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}

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), quantadmingo.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

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

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages