storage

package
v0.0.0-...-89805ac Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusObjectID

func StatusObjectID(opID string) string

StatusObjectID attempts to parse the submission id from the ID of the operation. This is done by taking the last word that results from splitting the id by "/". On failures, the empty string is returned.

Types

type Storage

type Storage interface {
	StoreOperation(op StoredOperation) error
	GetOperation(id string) (StoredOperation, error)
	GetOperations(parent string, filter filtering.Filter) ([]StoredOperation, error)
	DeleteOperation(id string) error
	CancelOperation(id string) (*StoredOperation, error)
}

type StoredOperation

type StoredOperation struct {
	ID string `json:"id"`

	// Whether this operation has finished.
	Done bool `json:"done"`

	// Populated when there was an error with the operation.
	Error string `json:"errorResult,omitempty"`

	// Populated only when Done == true and Error == ""
	Response []byte `json:"response,omitempty"`
}

func (StoredOperation) FilterVariablesMap

func (s StoredOperation) FilterVariablesMap() map[string]any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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