instance

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddInstanceAction                = "addInstance"
	CreateEditionAction              = "createEditionForInstance"
	GetInstanceAction                = "getInstance"
	GetInstancesAction               = "getInstances"
	UpdateInstanceAction             = "updateInstance"
	UpdateDimensionAction            = "updateDimension"
	UpdateEditionAction              = "updateEditionNextSubDocForInstance"
	UpdateInsertedObservationsAction = "updateInsertedObservations"
	UpdateImportTasksAction          = "updateImportTasks"
)

List of audit actions for instances

View Source
const AddInstanceEventAction = "addInstanceEvent"

AddInstanceEventAction represents the audit action to add event

Variables

This section is empty.

Functions

This section is empty.

Types

type PublishCheck

type PublishCheck struct {
	Datastore store.Storer
	Auditor   audit.AuditorService
}

PublishCheck Checks if an instance has been published

func (*PublishCheck) Check

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

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

type Store

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

Store provides a backend for instances

func (*Store) Add

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

Add an 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

func (*Store) GetList

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

GetList a list of all instances

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