sdk

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TaskNames = map[string]string{
	"zebedee":     "zebedee",
	"dataset-api": "dataset-api",
}

TaskNames is list of possible tasks associated with a job

Functions

This section is empty.

Types

type Client

type Client interface {
	Checker(ctx context.Context, check *health.CheckState) error
	Health() *healthcheck.Client
	PostJob(ctx context.Context, reqHeaders Headers) (*RespHeaders, *models.Job, error)
	PatchJob(ctx context.Context, reqHeaders Headers, jobID string, patchList []PatchOperation) (*RespHeaders, error)
	PostTask(ctx context.Context, reqHeaders Headers, jobID string, taskToCreate models.TaskToCreate) (*RespHeaders, *models.Task, error)
	GetJob(ctx context.Context, reqheader Headers, jobID string) (*RespHeaders, *models.Job, error)
	GetJobs(ctx context.Context, reqheader Headers, options Options) (*RespHeaders, *models.Jobs, error)
	GetTask(ctx context.Context, reqHeaders Headers, jobID, taskName string) (*RespHeaders, *models.Task, error)
	GetTasks(ctx context.Context, reqHeaders Headers, jobID string) (*RespHeaders, *models.Tasks, error)
	PutJobNumberOfTasks(ctx context.Context, reqHeaders Headers, jobID, numTasks string) (*RespHeaders, error)
	PutTaskNumberOfDocs(ctx context.Context, reqHeaders Headers, jobID, taskName, docCount string) (*RespHeaders, error)
	URL() string
}

type Headers

type Headers struct {
	IfMatch          string
	ServiceAuthToken string
	UserAuthToken    string
}

func (*Headers) Add

func (h *Headers) Add(req *http.Request) error

type Options

type Options struct {
	Offset int
	Limit  int
	Sort   string
}

type PatchOperation added in v0.17.0

type PatchOperation struct {
	Op    string
	Path  string
	Value interface{}
}

type RespHeaders added in v0.18.0

type RespHeaders struct {
	ETag string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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