landscape

package
v0.0.0-...-67bbec9 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(options ...Option) *Client

func (*Client) SignRequest

func (c *Client) SignRequest() (string, error)

SignRequest creates the signature for a given request. API requests are HTTPS requests that use the HTTP verb GET or POST and a query parameter named action. To be able to make a request, you’ll need to know which endpoint to use, what the action is, and what parameters it takes. All methods take a list of mandatory arguments which you need to pass every time: action: The name of the method you want to call access_key_id: The access key given to you in the Landscape Web UI. You need to go to your settings section in Landscape to be able to generate it along with the secret key. signature_method: The method used to signed the request, always HmacSHA256 for now. signature_version: The version of the signature mechanism, always 2 for now. timestamp: The time in UTC in ISO 8601 format, used to indicate the validity of the signature. version: The version of the API, 2011-08-01 being the current one. It’s in the form of a date.

type Option

type Option func(*Client)

Option is the type for functional options.

func WithAPIEndpoint

func WithAPIEndpoint(url string) Option

func WithAuthInfo

func WithAuthInfo(key string, secret string) Option

Jump to

Keyboard shortcuts

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