Documentation ¶
Index ¶
Constants ¶
View Source
const ( 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 NewErrContractInvalid ¶
NewErrContractInvalid returns an instance of the error interface with ErrContractInvalid as its implementation.
Types ¶
type ErrContractInvalid ¶
type ErrContractInvalid struct {
// contains filtered or unexported fields
}
ErrContractInvalid is a specific error type for handling model validation failures. Type checking within the calling application will facilitate more explicit error handling whereby it's clear that validation has failed as opposed to something unexpected happening.
func (ErrContractInvalid) Error ¶
func (e ErrContractInvalid) Error() string
Error fulfills the error interface and returns an error message assembled from the state of ErrContractInvalid.
Click to show internal directories.
Click to hide internal directories.