Documentation ¶
Index ¶
Constants ¶
View Source
const ( // WriteJSONURL is the url for the write json handler WriteJSONURL = handler.RoutePrefixV1 + "/json/write" // JSONWriteHTTPMethod is the HTTP method used with this resource. JSONWriteHTTPMethod = http.MethodPost )
Variables ¶
This section is empty.
Functions ¶
func NewWriteJSONHandler ¶
func NewWriteJSONHandler(opts options.HandlerOptions) http.Handler
NewWriteJSONHandler returns a new instance of handler.
Types ¶
type WriteJSONHandler ¶
type WriteJSONHandler struct {
// contains filtered or unexported fields
}
WriteJSONHandler represents a handler for the write json endpoint
func (*WriteJSONHandler) ServeHTTP ¶
func (h *WriteJSONHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WriteQuery ¶
type WriteQuery struct { Tags map[string]string `json:"tags" validate:"nonzero"` Timestamp string `json:"timestamp" validate:"nonzero"` Value float64 `json:"value" validate:"nonzero"` }
WriteQuery represents the write request from the user NB(braskin): support only writing one datapoint for now TODO: build this out to be a legitimate batched endpoint, change Tags to take a list of tag structs
Click to show internal directories.
Click to hide internal directories.