Documentation
¶
Index ¶
- func CreateErrorLogEntry(context *ctp.ApiContext, trigger *Trigger, errmsg string) *ctp.HttpError
- func CreateNormalLogEntry(context *ctp.ApiContext, trigger *Trigger, result *Result, tags []string) *ctp.HttpError
- func HandleDELETEAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETEAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETEAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETEMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETEMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETEServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleDELETETrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETBaseURI(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETCollection(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETLogEntry(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETTags(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandleGETTrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePOSTTrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePUTMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func HandlePUTTags(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
- func IterateChildrenDelete(context *ctp.ApiContext, category string, selectorkey string, ...) bool
- type Account
- type Asset
- type Attribute
- type BaseURI
- type Collection
- type CollectionItem
- type CtpApiHandlerMux
- type LogEntry
- type Measurement
- func (measurement *Measurement) BuildLinks(context *ctp.ApiContext)
- func (measurement *Measurement) Create(context *ctp.ApiContext) *ctp.HttpError
- func (measurement *Measurement) Delete(context *ctp.ApiContext) *ctp.HttpError
- func (measurement *Measurement) Load(context *ctp.ApiContext) *ctp.HttpError
- func (measurement *Measurement) Update(context *ctp.ApiContext, update ctp.ResourceUpdater) *ctp.HttpError
- type MeasurementParameter
- type Metric
- type Objective
- type Result
- type ResultColumnFormat
- type ResultRow
- type ServiceView
- func (serviceview *ServiceView) BuildLinks(context *ctp.ApiContext)
- func (serviceview *ServiceView) Create(context *ctp.ApiContext) *ctp.HttpError
- func (serviceview *ServiceView) Delete(context *ctp.ApiContext) *ctp.HttpError
- func (serviceview *ServiceView) Load(context *ctp.ApiContext) *ctp.HttpError
- type TaggedResource
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateErrorLogEntry ¶
func CreateNormalLogEntry ¶
func HandleDELETEAccount ¶
func HandleDELETEAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETEAsset ¶
func HandleDELETEAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETEAttribute ¶
func HandleDELETEAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETEMeasurement ¶
func HandleDELETEMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETEMetric ¶
func HandleDELETEMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETEServiceView ¶
func HandleDELETEServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleDELETETrigger ¶
func HandleDELETETrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETAccount ¶
func HandleGETAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETAsset ¶
func HandleGETAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETAttribute ¶
func HandleGETAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETBaseURI ¶
func HandleGETBaseURI(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
HandleGETBaseURI handles a request to the baseURI. It proceeds differently from other resources, which user the 'handler' paradigm.
func HandleGETCollection ¶
func HandleGETCollection(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETLogEntry ¶
func HandleGETLogEntry(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETMeasurement ¶
func HandleGETMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETMetric ¶
func HandleGETMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETServiceView ¶
func HandleGETServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETTags ¶
func HandleGETTags(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandleGETTrigger ¶
func HandleGETTrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTAccount ¶
func HandlePOSTAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTAsset ¶
func HandlePOSTAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTAttribute ¶
func HandlePOSTAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTMeasurement ¶
func HandlePOSTMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTMetric ¶
func HandlePOSTMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTServiceView ¶
func HandlePOSTServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePOSTTrigger ¶
func HandlePOSTTrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePUTMeasurement ¶
func HandlePUTMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func HandlePUTTags ¶
func HandlePUTTags(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext)
func IterateChildrenDelete ¶
Types ¶
type Account ¶
func (*Account) BuildLinks ¶
func (account *Account) BuildLinks(context *ctp.ApiContext)
type Asset ¶
type Asset struct { ctp.NamedResource `bson:",inline"` Attributes ctp.Link `json:"attributes" bson:"-"` AssetClass *string `json:"assetClass" bson:"assetClass"` }
func (*Asset) BuildLinks ¶
func (asset *Asset) BuildLinks(context *ctp.ApiContext)
type Attribute ¶
type Attribute struct { ctp.NamedResource `bson:",inline"` Measurements ctp.Link `json:"measurements" bson:"-"` }
func (*Attribute) BuildLinks ¶
func (attribute *Attribute) BuildLinks(context *ctp.ApiContext)
func (*Attribute) Create ¶
func (attribute *Attribute) Create(context *ctp.ApiContext) *ctp.HttpError
type BaseURI ¶
type BaseURI struct { ctp.NamedResource `bson:",inline"` Version string `json:"version"` Provider string `json:"provider"` ServiceViews ctp.Link `json:"serviceViews"` Metrics ctp.Link `json:"metrics"` }
func (*BaseURI) BuildLinks ¶
func (base *BaseURI) BuildLinks(context *ctp.ApiContext)
type Collection ¶
type CollectionItem ¶
type CtpApiHandlerMux ¶
type CtpApiHandlerMux struct {
Configuration ctp.Configuration
}
func NewCtpApiHandlerMux ¶
func NewCtpApiHandlerMux(conf ctp.Configuration) *CtpApiHandlerMux
func (*CtpApiHandlerMux) ServeHTTP ¶
func (mux *CtpApiHandlerMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
type LogEntry ¶
type LogEntry struct { ctp.Resource `bson:",inline"` Trigger ctp.Link `json:"trigger" bson:"trigger"` CreationTime ctp.Timestamp `json:"creationTime" bson:"creationTime"` Result *Result `json:"result,omitempty" bson:"result,omitempty"` Error *string `json:"error,omitempty" bson:"error,omitempty"` Tags []string `json:"tags" bson:"tags"` }
func (*LogEntry) BuildLinks ¶
func (log *LogEntry) BuildLinks(context *ctp.ApiContext)
type Measurement ¶
type Measurement struct { ctp.NamedResource `bson:",inline"` Metric ctp.Link `json:"metric" bson:"metric"` Result *Result `json:"result" bson:"result"` Objective *Objective `json:"objective" bson:"objective"` CreateTrigger *ctp.Link `json:"createTrigger" bson:"createTrigger,omitempty"` UserActivated bool `json:"userActivated" bson:"userActivated"` State ctp.MeasurementState `json:"state" bson:"state"` }
func (*Measurement) BuildLinks ¶
func (measurement *Measurement) BuildLinks(context *ctp.ApiContext)
func (*Measurement) Create ¶
func (measurement *Measurement) Create(context *ctp.ApiContext) *ctp.HttpError
func (*Measurement) Delete ¶
func (measurement *Measurement) Delete(context *ctp.ApiContext) *ctp.HttpError
func (*Measurement) Load ¶
func (measurement *Measurement) Load(context *ctp.ApiContext) *ctp.HttpError
func (*Measurement) Update ¶
func (measurement *Measurement) Update(context *ctp.ApiContext, update ctp.ResourceUpdater) *ctp.HttpError
type MeasurementParameter ¶
type Metric ¶
type Metric struct { ctp.NamedResource `bson:",inline"` BaseMetric string `json:"baseMetric" bson:"baseMetric"` MeasurementParameters []MeasurementParameter `json:"measurementParameters" bson:"measurementParameters"` ResultFormat []ResultColumnFormat `json:"resultFormat" bson:"resultFormat"` }
func (*Metric) BuildLinks ¶
func (metric *Metric) BuildLinks(context *ctp.ApiContext)
type ResultColumnFormat ¶
type ServiceView ¶
type ServiceView struct { ctp.NamedResource `bson:",inline"` Provider string `json:"provider" bson:"provider"` Dependencies ctp.Link `json:"dependencies" bson:"-"` Assets ctp.Link `json:"assets" bson:"-"` ServiceClass *string `json:"serviceClass" bosn:"serviceClass"` Logs ctp.Link `json:"logs"` Triggers ctp.Link `json:"triggers"` }
func (*ServiceView) BuildLinks ¶
func (serviceview *ServiceView) BuildLinks(context *ctp.ApiContext)
func (*ServiceView) Create ¶
func (serviceview *ServiceView) Create(context *ctp.ApiContext) *ctp.HttpError
func (*ServiceView) Delete ¶
func (serviceview *ServiceView) Delete(context *ctp.ApiContext) *ctp.HttpError
func (*ServiceView) Load ¶
func (serviceview *ServiceView) Load(context *ctp.ApiContext) *ctp.HttpError
type TaggedResource ¶
func (*TaggedResource) BuildLinks ¶
func (res *TaggedResource) BuildLinks(context *ctp.ApiContext)
func (*TaggedResource) Load ¶
func (res *TaggedResource) Load(context *ctp.ApiContext) *ctp.HttpError
func (*TaggedResource) Super ¶
func (res *TaggedResource) Super() *ctp.Resource
func (*TaggedResource) Update ¶
func (res *TaggedResource) Update(context *ctp.ApiContext, update ctp.ResourceUpdater) *ctp.HttpError
type Trigger ¶
type Trigger struct { ctp.NamedResource `bson:",inline"` Measurement ctp.Link `json:"measurement" bson:"measurement"` Condition string `json:"condition" bson:"condition"` Notification string `json:"notification" bson:"notification"` GuardTime uint `json:"guardTime" bson:"guardTime"` Tags []string `json:"tags" bson:"tags"` Status ctp.BoolErr `json:"status" bson:"status"` StatusUpdateTime ctp.Timestamp `json:"statusUpdateTime" bson:"statusUpdateTime"` }
func (*Trigger) BuildLinks ¶
func (trigger *Trigger) BuildLinks(context *ctp.ApiContext)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.