client

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2016 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Sign returns a cryptographic signature for the input string.
	Sign(string, string, []byte) ([]byte, error)

	// SecretPost create or updates a repository secret.
	SecretPost(string, string, *model.Secret) error

	// SecretDel deletes a named repository secret.
	SecretDel(string, string, string) error

	// Pull pulls work from the server queue.
	Pull(os, arch string) (*queue.Work, error)

	// Push pushes an update to the server.
	Push(*queue.Work) error

	// Stream streams the build logs to the server.
	Stream(int64, io.ReadCloser) error

	// Wait waits for the job to the complete.
	Wait(int64) *Wait
}

Client is used to communicate with a Drone server.

func NewClient added in v0.4.2

func NewClient(uri string) Client

NewClient returns a client at the specified url.

func NewClientToken added in v0.4.2

func NewClientToken(uri, token string) Client

NewClientToken returns a client at the specified url that authenticates all outbound requests with the given token.

func NewClientTokenTLS added in v0.4.2

func NewClientTokenTLS(uri, token string, c *tls.Config) Client

NewClientTokenTLS returns a client at the specified url that authenticates all outbound requests with the given token and tls.Config if provided.

type Wait added in v0.4.2

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

func (*Wait) Cancel added in v0.4.2

func (w *Wait) Cancel()

func (*Wait) Done added in v0.4.2

func (w *Wait) Done() (*model.Job, error)

Jump to

Keyboard shortcuts

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