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: 0

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