conn

package
v0.0.0-...-b7efc31 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package conn holds the connection to the Keyvault server and provides a single RPC call type.

Index

Constants

View Source
const Version = "0.0.1"

Version is the current version of the SDK.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallType

type CallType string
const (
	Get    CallType = "GET"
	Put    CallType = "PUT"
	Post   CallType = "POST"
	Patch  CallType = "PATCH"
	Delete CallType = "DELETE"
)

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn provides connectivity to a Keyvault instance.

func New

func New(endpoint string, auth autorest.Authorizer) (*Conn, error)

New returns a new conn object.

func (*Conn) Call

func (c *Conn) Call(ctx context.Context, ct CallType, path string, queryValues url.Values, body interface{}, resp interface{}) error

Call connects to the REST endpoint at path (the REST RPC path) passing the HTTP query values and JSON conversion of body in the HTTP body. It automatically handles compression and decompression with gzip. The response is JSON unmarshalled into resp. resp must be a pointer to a struct.

Jump to

Keyboard shortcuts

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