github.com/safedep/dry@v0.0.0-20241016050132-a15651f0548b/apiguard/tykgen/README.md (about) 1 # Go API client for swagger 2 3 The Tyk Gateway API is the primary means for integrating your application with the Tyk API Gateway system. This API is very small, and has no granular permissions system. It is intended to be used purely for internal automation and integration. **Warning: Under no circumstances should outside parties be granted access to this API.** The Tyk Gateway API is capable of: * Managing session objects (key generation) * Managing and listing policies * Managing and listing API Definitions (only when not using the Dashboard) * Hot reloads / reloading a cluster configuration * OAuth client creation (only when not using the Dashboard) In order to use the Gateway API, you'll need to set the `secret` parameter in your tyk.conf file. The shared secret you set should then be sent along as a header with each Gateway API Request in order for it to be successful: ``` x-tyk-authorization: <your-secret> ``` <br/> <b>The Tyk Gateway API is subsumed by the Tyk Dashboard API in Pro installations.</b> 4 5 ## Overview 6 This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. 7 8 - API version: 5.5.0 9 - Package version: 1.0.0 10 - Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen 11 12 ## Installation 13 Put the package under your project folder and add the following in import: 14 ```golang 15 import "./swagger" 16 ``` 17 18 ## Documentation for API Endpoints 19 20 All URIs are relative to *http://localhost/* 21 22 Class | Method | HTTP request | Description 23 ------------ | ------------- | ------------- | ------------- 24 *APIsApi* | [**CreateApi**](docs/APIsApi.md#createapi) | **Post** /tyk/apis | 25 *APIsApi* | [**DeleteApi**](docs/APIsApi.md#deleteapi) | **Delete** /tyk/apis/{apiID} | 26 *APIsApi* | [**GetApi**](docs/APIsApi.md#getapi) | **Get** /tyk/apis/{apiID} | 27 *APIsApi* | [**ListApiVersions**](docs/APIsApi.md#listapiversions) | **Get** /tyk/apis/{apiID}/versions | 28 *APIsApi* | [**ListApis**](docs/APIsApi.md#listapis) | **Get** /tyk/apis | 29 *APIsApi* | [**UpdateApi**](docs/APIsApi.md#updateapi) | **Put** /tyk/apis/{apiID} | 30 *BatchRequestsApi* | [**Batch**](docs/BatchRequestsApi.md#batch) | **Post** /{listen_path}/tyk/batch | Run batch request 31 *CacheInvalidationApi* | [**InvalidateCache**](docs/CacheInvalidationApi.md#invalidatecache) | **Delete** /tyk/cache/{apiID} | Invalidate cache 32 *CertsApi* | [**AddCert**](docs/CertsApi.md#addcert) | **Post** /tyk/certs | Add a certificate 33 *CertsApi* | [**DeleteCerts**](docs/CertsApi.md#deletecerts) | **Delete** /tyk/certs | Delete Certificate 34 *CertsApi* | [**ListCerts**](docs/CertsApi.md#listcerts) | **Get** /tyk/certs | List Certificates 35 *HealthCheckingApi* | [**Hello**](docs/HealthCheckingApi.md#hello) | **Get** /tyk/hello | Check the Health of the Tyk Gateway 36 *HotReloadApi* | [**HotReload**](docs/HotReloadApi.md#hotreload) | **Get** /tyk/reload/ | Hot-reload a single node 37 *HotReloadApi* | [**HotReloadGroup**](docs/HotReloadApi.md#hotreloadgroup) | **Get** /tyk/reload/group | Hot-reload a Tyk group 38 *KeysApi* | [**AddKey**](docs/KeysApi.md#addkey) | **Post** /tyk/keys | Create a key 39 *KeysApi* | [**CreateCustomKey**](docs/KeysApi.md#createcustomkey) | **Post** /tyk/keys/{keyID} | Create Custom Key / Import Key 40 *KeysApi* | [**DeleteKey**](docs/KeysApi.md#deletekey) | **Delete** /tyk/keys/{keyID} | Delete Key 41 *KeysApi* | [**GetKey**](docs/KeysApi.md#getkey) | **Get** /tyk/keys/{keyID} | Get a Key 42 *KeysApi* | [**ListKeys**](docs/KeysApi.md#listkeys) | **Get** /tyk/keys | List Keys 43 *KeysApi* | [**UpdateKey**](docs/KeysApi.md#updatekey) | **Put** /tyk/keys/{keyID} | Update Key 44 *OASAPIsApi* | [**CreateApiOAS**](docs/OASAPIsApi.md#createapioas) | **Post** /tyk/apis/oas | 45 *OASAPIsApi* | [**DeleteOASApi**](docs/OASAPIsApi.md#deleteoasapi) | **Delete** /tyk/apis/oas/{apiID} | 46 *OASAPIsApi* | [**DownloadApiOASPublic**](docs/OASAPIsApi.md#downloadapioaspublic) | **Get** /tyk/apis/oas/{apiID}/export | 47 *OASAPIsApi* | [**DownloadApisOASPublic**](docs/OASAPIsApi.md#downloadapisoaspublic) | **Get** /tyk/apis/oas/export | 48 *OASAPIsApi* | [**ImportOAS**](docs/OASAPIsApi.md#importoas) | **Post** /tyk/apis/oas/import | 49 *OASAPIsApi* | [**ListApiOAS**](docs/OASAPIsApi.md#listapioas) | **Get** /tyk/apis/oas/{apiID} | 50 *OASAPIsApi* | [**ListApisOAS**](docs/OASAPIsApi.md#listapisoas) | **Get** /tyk/apis/oas | 51 *OASAPIsApi* | [**ListOASApiVersions**](docs/OASAPIsApi.md#listoasapiversions) | **Get** /tyk/apis/oas/{apiID}/versions | 52 *OASAPIsApi* | [**PatchApiOAS**](docs/OASAPIsApi.md#patchapioas) | **Patch** /tyk/apis/oas/{apiID} | Patch a single OAS API by ID 53 *OASAPIsApi* | [**UpdateApiOAS**](docs/OASAPIsApi.md#updateapioas) | **Put** /tyk/apis/oas/{apiID} | 54 *OAuthApi* | [**AuthorizeClient**](docs/OAuthApi.md#authorizeclient) | **Post** /tyk/oauth/authorize-client/ | Authorize client 55 *OAuthApi* | [**CreateOAuthClient**](docs/OAuthApi.md#createoauthclient) | **Post** /tyk/oauth/clients/create | Create new OAuth client 56 *OAuthApi* | [**DeleteOAuthClient**](docs/OAuthApi.md#deleteoauthclient) | **Delete** /tyk/oauth/clients/{apiID}/{keyName} | Delete OAuth client 57 *OAuthApi* | [**GetOAuthClient**](docs/OAuthApi.md#getoauthclient) | **Get** /tyk/oauth/clients/{apiID}/{keyName} | Get OAuth client 58 *OAuthApi* | [**GetOAuthClientTokens**](docs/OAuthApi.md#getoauthclienttokens) | **Get** /tyk/oauth/clients/{apiID}/{keyName}/tokens | List tokens 59 *OAuthApi* | [**InvalidateOAuthRefresh**](docs/OAuthApi.md#invalidateoauthrefresh) | **Delete** /tyk/oauth/refresh/{keyName} | Invalidate OAuth refresh token 60 *OAuthApi* | [**ListOAuthClients**](docs/OAuthApi.md#listoauthclients) | **Get** /tyk/oauth/clients/{apiID} | List oAuth clients 61 *OAuthApi* | [**RevokeAllTokens**](docs/OAuthApi.md#revokealltokens) | **Post** /tyk/oauth/revoke_all | revoke all client's tokens 62 *OAuthApi* | [**RevokeSingleToken**](docs/OAuthApi.md#revokesingletoken) | **Post** /tyk/oauth/revoke | revoke token 63 *OAuthApi* | [**UpdateoAuthClient**](docs/OAuthApi.md#updateoauthclient) | **Put** /tyk/oauth/clients/{apiID} | Update OAuth metadata and Policy ID 64 *OrganisationQuotasApi* | [**AddOrgKey**](docs/OrganisationQuotasApi.md#addorgkey) | **Post** /tyk/org/keys/{keyID} | Create an organisation key 65 *OrganisationQuotasApi* | [**DeleteOrgKey**](docs/OrganisationQuotasApi.md#deleteorgkey) | **Delete** /tyk/org/keys/{keyID} | Delete Organisation Key 66 *OrganisationQuotasApi* | [**GetOrgKey**](docs/OrganisationQuotasApi.md#getorgkey) | **Get** /tyk/org/keys/{keyID} | Get an Organisation Key 67 *OrganisationQuotasApi* | [**ListOrgKeys**](docs/OrganisationQuotasApi.md#listorgkeys) | **Get** /tyk/org/keys | List Organisation Keys 68 *OrganisationQuotasApi* | [**UpdateOrgKey**](docs/OrganisationQuotasApi.md#updateorgkey) | **Put** /tyk/org/keys/{keyID} | Update Organisation Key 69 *PoliciesApi* | [**AddPolicy**](docs/PoliciesApi.md#addpolicy) | **Post** /tyk/policies | Create a Policy 70 *PoliciesApi* | [**DeletePolicy**](docs/PoliciesApi.md#deletepolicy) | **Delete** /tyk/policies/{polID} | Delete a Policy 71 *PoliciesApi* | [**GetPolicy**](docs/PoliciesApi.md#getpolicy) | **Get** /tyk/policies/{polID} | Get a Policy 72 *PoliciesApi* | [**ListPolicies**](docs/PoliciesApi.md#listpolicies) | **Get** /tyk/policies | List Policies 73 *PoliciesApi* | [**UpdatePolicy**](docs/PoliciesApi.md#updatepolicy) | **Put** /tyk/policies/{polID} | Update a Policy 74 *SchemaApi* | [**GetSchema**](docs/SchemaApi.md#getschema) | **Get** /tyk/schema | 75 76 ## Documentation For Models 77 78 - [AccessDefinition](docs/AccessDefinition.md) 79 - [AccessSpec](docs/AccessSpec.md) 80 - [ApiAllCertificateBasics](docs/ApiAllCertificateBasics.md) 81 - [ApiAllCertificates](docs/ApiAllCertificates.md) 82 - [ApiAllKeys](docs/ApiAllKeys.md) 83 - [ApiCertificateStatusMessage](docs/ApiCertificateStatusMessage.md) 84 - [ApiDefinition](docs/ApiDefinition.md) 85 - [ApiDefinitionBasicAuth](docs/ApiDefinitionBasicAuth.md) 86 - [ApiDefinitionCors](docs/ApiDefinitionCors.md) 87 - [ApiDefinitionDefinition](docs/ApiDefinitionDefinition.md) 88 - [ApiDefinitionOauthMeta](docs/ApiDefinitionOauthMeta.md) 89 - [ApiDefinitionProxy](docs/ApiDefinitionProxy.md) 90 - [ApiDefinitionProxyTransport](docs/ApiDefinitionProxyTransport.md) 91 - [ApiDefinitionUptimeTests](docs/ApiDefinitionUptimeTests.md) 92 - [ApiDefinitionUptimeTestsConfig](docs/ApiDefinitionUptimeTestsConfig.md) 93 - [ApiDefinitionVersionData](docs/ApiDefinitionVersionData.md) 94 - [ApiLimit](docs/ApiLimit.md) 95 - [ApiModifyKeySuccess](docs/ApiModifyKeySuccess.md) 96 - [ApiStatusMessage](docs/ApiStatusMessage.md) 97 - [ApiVersionMeta](docs/ApiVersionMeta.md) 98 - [Auth](docs/Auth.md) 99 - [AuthProviderMeta](docs/AuthProviderMeta.md) 100 - [BooleanQueryParam](docs/BooleanQueryParam.md) 101 - [CacheMeta](docs/CacheMeta.md) 102 - [CacheOptions](docs/CacheOptions.md) 103 - [CertificateBasics](docs/CertificateBasics.md) 104 - [CertificateMeta](docs/CertificateMeta.md) 105 - [CircuitBreakerMeta](docs/CircuitBreakerMeta.md) 106 - [Components](docs/Components.md) 107 - [Contact](docs/Contact.md) 108 - [EndPointMeta](docs/EndPointMeta.md) 109 - [EndpointMethodMeta](docs/EndpointMethodMeta.md) 110 - [EventHandlerMetaConfig](docs/EventHandlerMetaConfig.md) 111 - [ExtendedPathsSet](docs/ExtendedPathsSet.md) 112 - [ExternalDocumentation](docs/ExternalDocumentation.md) 113 - [GlobalRateLimit](docs/GlobalRateLimit.md) 114 - [GraphAccessDefinition](docs/GraphAccessDefinition.md) 115 - [HardTimeoutMeta](docs/HardTimeoutMeta.md) 116 - [HeaderInjectionMeta](docs/HeaderInjectionMeta.md) 117 - [HostCheckObject](docs/HostCheckObject.md) 118 - [Info](docs/Info.md) 119 - [InlineResponse200](docs/InlineResponse200.md) 120 - [InlineResponse2001](docs/InlineResponse2001.md) 121 - [InlineResponse2002](docs/InlineResponse2002.md) 122 - [InternalMeta](docs/InternalMeta.md) 123 - [License](docs/License.md) 124 - [MethodTransformMeta](docs/MethodTransformMeta.md) 125 - [MiddlewareDefinition](docs/MiddlewareDefinition.md) 126 - [MiddlewareIdExtractor](docs/MiddlewareIdExtractor.md) 127 - [MiddlewareSection](docs/MiddlewareSection.md) 128 - [NewClientRequest](docs/NewClientRequest.md) 129 - [NotificationsManager](docs/NotificationsManager.md) 130 - [OAuthClientToken](docs/OAuthClientToken.md) 131 - [OasSchemaResponse](docs/OasSchemaResponse.md) 132 - [OauthAuthorizeclientBody](docs/OauthAuthorizeclientBody.md) 133 - [OauthRevokeAllBody](docs/OauthRevokeAllBody.md) 134 - [OauthRevokeBody](docs/OauthRevokeBody.md) 135 - [OidProviderConfig](docs/OidProviderConfig.md) 136 - [OpenIdOptions](docs/OpenIdOptions.md) 137 - [Paths](docs/Paths.md) 138 - [PkixAttributeTypeAndValue](docs/PkixAttributeTypeAndValue.md) 139 - [PkixAttributeTypeAndValueSet](docs/PkixAttributeTypeAndValueSet.md) 140 - [PkixName](docs/PkixName.md) 141 - [Policy](docs/Policy.md) 142 - [PolicyPartitions](docs/PolicyPartitions.md) 143 - [RateLimitMeta](docs/RateLimitMeta.md) 144 - [RateLimitSmoothing](docs/RateLimitSmoothing.md) 145 - [Regexp](docs/Regexp.md) 146 - [RequestSizeMeta](docs/RequestSizeMeta.md) 147 - [ResponseProcessor](docs/ResponseProcessor.md) 148 - [RoutingTrigger](docs/RoutingTrigger.md) 149 - [RoutingTriggerOptions](docs/RoutingTriggerOptions.md) 150 - [Schema](docs/Schema.md) 151 - [Server](docs/Server.md) 152 - [ServerVariable](docs/ServerVariable.md) 153 - [ServiceDiscoveryConfiguration](docs/ServiceDiscoveryConfiguration.md) 154 - [SessionProviderMeta](docs/SessionProviderMeta.md) 155 - [SessionState](docs/SessionState.md) 156 - [SessionStateBasicAuthData](docs/SessionStateBasicAuthData.md) 157 - [SessionStateJwtData](docs/SessionStateJwtData.md) 158 - [SessionStateMonitor](docs/SessionStateMonitor.md) 159 - [SignatureConfig](docs/SignatureConfig.md) 160 - [StringRegexMap](docs/StringRegexMap.md) 161 - [Tag](docs/Tag.md) 162 - [TemplateData](docs/TemplateData.md) 163 - [TemplateMeta](docs/TemplateMeta.md) 164 - [TrackEndpointMeta](docs/TrackEndpointMeta.md) 165 - [TransformJqMeta](docs/TransformJqMeta.md) 166 - [UrlRewriteMeta](docs/UrlRewriteMeta.md) 167 - [ValidatePathMeta](docs/ValidatePathMeta.md) 168 - [VersionInfo](docs/VersionInfo.md) 169 - [VersionInfoPaths](docs/VersionInfoPaths.md) 170 - [VirtualMeta](docs/VirtualMeta.md) 171 172 ## Documentation For Authorization 173 174 ## api_key 175 - **Type**: API key 176 177 Example 178 ```golang 179 auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ 180 Key: "APIKEY", 181 Prefix: "Bearer", // Omit if not necessary. 182 }) 183 r, err := client.Service.Operation(auth, args) 184 ``` 185 186 ## Author 187 188