client

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignImage

func SignImage(hostname string, image reference.Canonical, check string) (voucher.Response, error)

SignImage takes an image URL (which includes the registry and the image digest) as well as the check to be performed and makes a call to Voucher to run the specified checks. It returns an error, or nil if no errors occur and the check was successful.

Types

type VoucherClient

type VoucherClient struct {
	Hostname *url.URL
	// contains filtered or unexported fields
}

VoucherClient is a client for the Voucher API.

func NewClient

func NewClient(hostname string, timeout time.Duration) (*VoucherClient, error)

NewClient creates a new VoucherClient set to connect to the passed hostname, and with the passed timeout.

func (*VoucherClient) Check

func (c *VoucherClient) Check(check string, image reference.Canonical) (voucher.Response, error)

Check executes a request to a Voucher server, to the appropriate check URI, and with the passed reference.Canonical. Returns a voucher.Response and an error.

func (*VoucherClient) SetBasicAuth

func (c *VoucherClient) SetBasicAuth(username, password string)

SetBasicAuth adds the username and password to the VoucherClient struct

Jump to

Keyboard shortcuts

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