sla

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Overview

Package sla contains the sla service API client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIRoot

func APIRoot(apiRoot string) func(h *client) error

APIRoot sets the base url for the api client.

func HTTPClient

func HTTPClient(c httpClient) func(h *client) error

HTTPClient returns a function that sets the http client used by the API (e.g. if we want to use TLS).

func NewClient

func NewClient(options ...ClientOption) (*client, error)

NewClient returns a new client for the sla api.

Types

type AuthClient

type AuthClient interface {
	// Authorize returns the sla macaroon for the specified model
	Authorize(modelUUID, supportLevel, budget string) (*sla.SLAResponse, error)
}

AuthClient defines the interface available to clients of the support api.

type ClientOption

type ClientOption func(h *client) error

ClientOption defines a function which configures a Client.

Jump to

Keyboard shortcuts

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