client

package
v1.10.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobAPI

type JobAPI struct {
	Client    *http.Client
	URLPrefix string
	Identity  identity.Identifier
}

func (*JobAPI) Get

func (j *JobAPI) Get(ctx context.Context) (model.Job, error)

Get sends http request with ID in the url and receives a json payload which is decoded using schema and then mapped from schema to internal model.Job struct, which is actually returned.

func (*JobAPI) URL added in v1.5.0

func (j *JobAPI) URL() string

func (*JobAPI) UpdateStatus

func (j *JobAPI) UpdateStatus(ctx context.Context, status model.JobStatus, jobID int) error

UpdateStatus marshals status into appropriate status schema, and sent as payload checked for returned status code.

Jump to

Keyboard shortcuts

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