functionurl

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Overview

Package functionurl provides methods for working with AWS Lambda Function URLs.

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
}

Client is a struct that implements methods for signing and executing requests to AWS Lambda Function URLs.

func NewClient

func NewClient(ctx context.Context, uri string) (*Client, error)

NewClient returns a new `Client` instance which is used for signing and executing requests to AWS Lambda Function URLs, configured by 'uri' which is expected to take the form of:

functionurl://?credentials={CREDENTIALS}&region={AWS_REGION}

Where {CREDENTIALS} is a valid aaronland/go-aws-session credentials strings as described in https://github.com/aaronland/go-aws-session#credentials

func (*Client) Get

func (cl *Client) Get(ctx context.Context, uri string) (*http.Response, error)

Get will sign and execute an HTTP GET request to 'uri'.

func (*Client) Post

func (cl *Client) Post(ctx context.Context, uri string, body io.ReadSeeker) (*http.Response, error)

Get will sign and execute an HTTP POST request to 'uri' passing 'body' as the request body.

func (*Client) SignRequest

func (cl *Client) SignRequest(ctx context.Context, req *http.Request, body io.ReadSeeker) error

SignRequest will sign 'req' and 'body' and apply the necessary AWS Signature request headers to 'req'.

Jump to

Keyboard shortcuts

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