client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: AGPL-3.0 Imports: 12 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
	WorkspaceID    string
	URLPrefix      string
	WorkspaceToken string
}

func (*JobAPI) Get

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

Get sends http request with workspaceID 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) 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