instance

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 17 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AddInstanceEventAction = "addInstanceEvent"

AddInstanceEventAction represents the action to add event

Variables

This section is empty.

Functions

This section is empty.

Types

type PublishCheck

type PublishCheck struct {
	Datastore store.Storer
}

PublishCheck Checks if an instance has been published

func (*PublishCheck) Check

func (d *PublishCheck) Check(handle func(http.ResponseWriter, *http.Request)) http.HandlerFunc

Check wraps a HTTP handle. Checks that the state is not published

type Store

type Store struct {
	store.Storer
	Host                string
	EnableDetachDataset bool
}

Store provides a backend for instances

func (*Store) Add

func (s *Store) Add(w http.ResponseWriter, r *http.Request)

Add an instance Note that this method doesn't need to acquire the instance lock because it creates a new instance, so it is not possible that any other call is concurrently trying to access the same instance

func (*Store) AddEvent

func (s *Store) AddEvent(w http.ResponseWriter, r *http.Request)

AddEvent details to an instance

func (*Store) Get

func (s *Store) Get(w http.ResponseWriter, r *http.Request)

Get a single instance by id Note that this method doesn't need to acquire the instance lock because it's a getter, which will fail if the ETag doesn't match, and cannot interfere with writers.

func (*Store) GetList

func (s *Store) GetList(w http.ResponseWriter, r *http.Request, limit int, offset int) (interface{}, int, error)

GetList returns a list of instances, the total count of instances that match the query parameters and an error

func (*Store) Update

func (s *Store) Update(w http.ResponseWriter, r *http.Request)

Update a specific instance

func (*Store) UpdateDimension

func (s *Store) UpdateDimension(w http.ResponseWriter, r *http.Request)

UpdateDimension updates label and/or description for a specific dimension within an instance

func (*Store) UpdateImportTask

func (s *Store) UpdateImportTask(w http.ResponseWriter, r *http.Request)

UpdateImportTask updates any task in the request body against an instance

func (*Store) UpdateObservations

func (s *Store) UpdateObservations(w http.ResponseWriter, r *http.Request)

UpdateObservations increments the count of inserted_observations against an instance

Jump to

Keyboard shortcuts

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