Skip to content

Latest commit

 

History

History
138 lines (88 loc) · 3.37 KB

File metadata and controls

138 lines (88 loc) · 3.37 KB

\CacheAPI

All URIs are relative to https://api.aerostack.dev/v1

Method HTTP request Description
CacheGet Post /cache/get Get cached value
CacheSet Post /cache/set Set cached value

CacheGet

CacheGet200Response CacheGet(ctx).CacheGetRequest(cacheGetRequest).Execute()

Get cached value

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	cacheGetRequest := *openapiclient.NewCacheGetRequest("user:123:profile") // CacheGetRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CacheAPI.CacheGet(context.Background()).CacheGetRequest(cacheGetRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CacheAPI.CacheGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CacheGet`: CacheGet200Response
	fmt.Fprintf(os.Stdout, "Response from `CacheAPI.CacheGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCacheGetRequest struct via the builder pattern

Name Type Description Notes
cacheGetRequest CacheGetRequest

Return type

CacheGet200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CacheSet

CacheSet200Response CacheSet(ctx).CacheSetRequest(cacheSetRequest).Execute()

Set cached value

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	cacheSetRequest := *openapiclient.NewCacheSetRequest("Key_example", interface{}(123)) // CacheSetRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.CacheAPI.CacheSet(context.Background()).CacheSetRequest(cacheSetRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CacheAPI.CacheSet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CacheSet`: CacheSet200Response
	fmt.Fprintf(os.Stdout, "Response from `CacheAPI.CacheSet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCacheSetRequest struct via the builder pattern

Name Type Description Notes
cacheSetRequest CacheSetRequest

Return type

CacheSet200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]