parallelguard

package module
v0.0.0-...-6838d42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

ParallelGuard Go SDK

This SDK helps developers easily send requests to ParallelGuard using Go.

For detailed usage, please check ParallelGuard Go manual.

For more details about the ParallelGuard API, please check ParallelGuard API Specification.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSignature

func GenSignature(key string, value string, pass string, ts string) (string, error)

Generate Signature

Types

type Result

type Result struct {
	Response string
	Code     string
}

func Get

func Get(url, key string) Result

Do Get request Parameters

$url: the get API call end point
$key: the key to be get

Return

'code': the HTTP status code.
'response': the data of string or the error message string.

func GetVersion

func GetVersion(url, key, version string) Result

Get the key of a version Parameters

$url: the get API call end point
$key: the key to be get
$version: the version of key to be get

Return

'code': the HTTP status code.
'response': the data of string or the error message string.

func ListVersions

func ListVersions(url string, key string, opts *map[string]string) Result

Get version list of the key Parameters

   $url: the get API call end point
   $key: the key to be get
   $opts: a map[string]stirng, which contains:
			"olderthan": an version_id
			"maxcount": how many version returned
			"withtimestamp": whether return timestamp for each version_id

Return

'code': the HTTP status code.
'response': the data of string or the error message string.

func Put

func Put(url, key, value, pass string) Result

Do Put request Parameters

$url: the get API call end point
$key: the key to be get
$value: the value of string
$pass: the pass phrase for the key space in key

Return

'code': the HTTP status code.
'response': the data of string or the error message string.

type VersionRecord

type VersionRecord struct {
	VersionNumber string
	// contains filtered or unexported fields
}

Directories

Path Synopsis
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL