Documentation ¶
Index ¶
- Constants
- type PublishCheck
- type Store
- func (s *Store) Add(w http.ResponseWriter, r *http.Request)
- func (s *Store) AddEvent(w http.ResponseWriter, r *http.Request)
- func (s *Store) Get(w http.ResponseWriter, r *http.Request)
- func (s *Store) GetList(w http.ResponseWriter, r *http.Request, limit, offset int) (results interface{}, totalCount int, err error)
- func (s *Store) Update(w http.ResponseWriter, r *http.Request)
- func (s *Store) UpdateDimension(w http.ResponseWriter, r *http.Request)
- func (s *Store) UpdateImportTask(w http.ResponseWriter, r *http.Request)
- func (s *Store) UpdateObservations(w http.ResponseWriter, r *http.Request)
Constants ¶
const AddInstanceEventAction = "addInstanceEvent"
AddInstanceEventAction represents the action to add event
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublishCheck ¶
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 ¶
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, offset int) (results interface{}, totalCount int, err 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 TODO: Refactor this to reduce the complexity
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 TODO: Refactor this to reduce the complexity
func (*Store) UpdateObservations ¶
func (s *Store) UpdateObservations(w http.ResponseWriter, r *http.Request)
UpdateObservations increments the count of inserted_observations against an instance