woodpecker/client/client.go

33 lines
790 B
Go
Raw Normal View History

2016-04-20 01:37:53 +00:00
package client
import (
"io"
2016-04-23 11:27:28 +00:00
"github.com/drone/drone/model"
2016-04-20 01:37:53 +00:00
"github.com/drone/drone/queue"
)
// Client is used to communicate with a Drone server.
type Client interface {
2016-04-23 11:27:28 +00:00
// 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)
2016-04-20 01:37:53 +00:00
// Push pushes an update to the server.
Push(*queue.Work) error
2016-04-20 01:37:53 +00:00
// Stream streams the build logs to the server.
Stream(int64, io.ReadCloser) error
2016-04-20 01:37:53 +00:00
// Wait waits for the job to the complete.
Wait(int64) *Wait
2016-04-20 01:37:53 +00:00
}