Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApiVersion = "v2" ApiBase = "/api/v2" ApiEventRoute = ApiBase + "/event" ApiAllEventRoute = ApiEventRoute + "/" + All ApiEventIdRoute = ApiEventRoute + "/" + Id + "/{" + Id + "}" ApiEventPushRoute = ApiEventRoute + "/" + Pushed ApiEventCountRoute = ApiEventRoute + "/" + Count ApiEventCountByDeviceRoute = ApiEventCountRoute + "/" + Device + "/{" + DeviceIdParam + "}" ApiEventByDeviceRoute = ApiEventRoute + "/" + Device + "/{" + DeviceIdParam + "}" ApiAllEventByDeviceRoute = ApiEventByDeviceRoute + "/" + All ApiEventByTimeRangeRoute = ApiEventRoute + "/" + Start + "/{" + Start + "}/" + End + "/{" + End + "}" ApiEventByAgeRoute = ApiEventRoute + "/" + Age + "/{" + Age + "}" ApiEventScrubRoute = ApiEventRoute + "/" + Scrub ApiReadingRoute = ApiBase + "/reading" ApiAllReadingRoute = ApiReadingRoute + "/" + All ApiReadingCountRoute = ApiReadingRoute + "/" + Count ApiReadingIdRoute = ApiReadingRoute + "/" + Id + "/{" + Id + "}" ApiAllReadingByDeviceRoute = ApiReadingRoute + "/" + Device + "/{" + DeviceIdParam + "}/" + All ApiReadingByTypeRoute = ApiReadingRoute + "/" + Type + "/{" + Type + "}" ApiReadingByTimeRangeRoute = ApiReadingRoute + "/" + Start + "/{" + Start + "}/" + End + "/{" + End + "}" ApiConfigRoute = ApiBase + "/config" ApiMetricsRoute = ApiBase + "/metrics" ApiPingRoute = ApiBase + "/ping" ApiVersionRoute = ApiBase + "/version" )
Constants related to defined routes in the v2 service APIs
View Source
const ( All = "all" Id = "id" Pushed = "pushed" Count = "count" Device = "device" DeviceIdParam = "deviceId" Start = "start" End = "end" Age = "age" Scrub = "scrub" Type = "type" )
Constants related to defined url path names and parameters in the v2 service APIs
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(a interface{}) error
Validate function will use the validator package to validate the struct annotation
func ValidateAutoEventFrequency ¶ added in v0.1.67
func ValidateAutoEventFrequency(fl validator.FieldLevel) bool
ValidateAutoEventFrequency validate AutoEvent's Frequency field which should follow the ISO 8601 Durations format
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.