client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C struct {
	User      string
	Password  string
	Host      string
	Scheme    string
	Transport *http.Transport
}

C is a Lair API client.

func New

func New(opts *COptions) (*C, error)

New sets up and returns a new C.

func (*C) ExportProject

func (c *C) ExportProject(id string) (lair.Project, error)

ExportProject sends an HTTP request to Lair API Server to import a project.

func (*C) ImportProject

func (c *C) ImportProject(opts *DOptions, project *lair.Project) (*http.Response, error)

ImportProject sends an HTTP request to Lair API Server to import a project.

type COptions

type COptions struct {
	User               string
	Password           string
	Host               string
	Scheme             string
	InsecureSkipVerify bool
}

COptions are used to pass options for setting up a new C.

type DOptions

type DOptions struct {
	ForcePorts bool
	LimitHosts bool
}

DOptions are used to pass options to various request to the Lair API.

type Response

type Response struct {
	Status  string
	Message string
}

Response used to represent unmarshaled response from drone API server.

Jump to

Keyboard shortcuts

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