Documentation ¶
Index ¶
- Constants
- type BarsValues
- type ChartAxes
- type ChartElementColor
- type ChartID
- type ChartMargins
- type ChartReply
- type ChartScale
- type ChartSizes
- type ChartStatus
- type ChartView
- type ChartViewBarsColors
- type ChartViewColors
- type CreateChartRequest
- type DomainCategories
- type DomainNumeric
- type Error
- type GetChartRequest
- type NotFoundError
- type PointsValues
- type RGB
- type ScalarValues
Constants ¶
const ParamChartID = "chart_id"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarsValues ¶
type BarsValues struct { // Values contains bars values. // // required: true Values []float32 `json:"values,omitempty"` Colors *ChartViewBarsColors `json:"colors,omitempty"` }
BarsValues represents options for bar values. nolint: govet
type ChartAxes ¶
type ChartAxes struct { // Top represents configured scale for top axis. Top *ChartScale `json:"top,omitempty"` // TopLabel represents label for top axis. TopLabel string `json:"top_label,omitempty"` // Bottom represents configured scale for botom axis. Bottom *ChartScale `json:"bottom,omitempty"` // BottomLabel represents label for bottom axis. BottomLabel string `json:"bottom_label,omitempty"` // Left represents configured scale for left axis. Left *ChartScale `json:"left,omitempty"` // LeftLabel represents label for left axis. LeftLabel string `json:"left_label,omitempty"` // Right represents configured scale for right axis. Right *ChartScale `json:"right,omitempty"` // RightLabel represents label for right axis. RightLabel string `json:"right_label,omitempty"` }
ChartAxes represents options to configure chart axes.
type ChartElementColor ¶
type ChartElementColor struct { // Hex represents hex color value. Hex string `json:"hex,omitempty"` // RGB represents RGB color value. RGB *RGB `json:"rgb,omitempty"` }
ChartElementColor represents options to configure color for chart elements. nolint: govet
type ChartID ¶
type ChartID struct { // Chart identifier. // // in: path // type: string ChartID string `json:"chart_id"` }
ChartID represents chart ID from URL.
swagger:parameters getChart
type ChartMargins ¶
type ChartMargins struct { // Top represents chart top margin. Top *int `json:"top,omitempty"` // Bottom represents chart bottom margin. Bottom *int `json:"bottom,omitempty"` // Left represents chart left margin. Left *int `json:"left,omitempty"` // Right represents chart right margin. Right *int `json:"right,omitempty"` }
ChartMargins represents options to configure chart margins.
type ChartReply ¶
type ChartReply struct { // ID of the request. // // swagger:strfmt uuid4 RequestID string `json:"request_id"` // ID of the chart. // // swagger:strfmt uuid4 ChartID string `json:"chart_id"` // Chart status. // Can be one of: // - CREATED // - ERROR ChartStatus string `json:"chart_status"` // CreatedAt contains chart creation timestamp. CreatedAt *time.Time `json:"created_at"` // DeletedAt contains chart deletion timestamp. DeletedAt *time.Time `json:"deleted_at"` // ChartData contains base64 chart representation. ChartData string `json:"chart_data"` }
ChartReply represents a reply from create or get requests. swagger:model chartReply
type ChartScale ¶
type ChartScale struct { // Kind represents scale kind. // Can be one of: // - linear // - band // // required: true Kind string `json:"kind"` // RangeStart represents start of the scale range. RangeStart *int `json:"range_start,omitempty"` // RangeEnd represents end of the scale range. RangeEnd *int `json:"range_end,omitempty"` // DomainNumeric represents configured numeric domain. DomainNumeric *DomainNumeric `json:"domain_numeric,omitempty"` // DomainCategories represents configured categories domain. DomainCategories *DomainCategories `json:"domain_categories,omitempty"` // NoBoundariesOffset disables an offset from the start and end of an axis. // This is usually need for an area or line views. NoBoundariesOffset bool `json:"no_boundaries_offset,omitempty"` // InnerPadding represents inner padding for categories. InnerPadding *float32 `json:"inner_padding,omitempty"` // OuterPadding represents outer padding for categories. OuterPadding *float32 `json:"outer_padding,omitempty"` }
ChartScale represents options to configure chart scale. nolint: govet
type ChartSizes ¶
type ChartSizes struct { // Width represents chart width. Width *int `json:"width,omitempty"` // Height represents chart height. Height *int `json:"height,omitempty"` }
ChartSizes represents options to configure chart sizes.
type ChartStatus ¶
type ChartStatus string
ChartStatus represents one of available chart statuses.
const ( // ChartStatusCreated represents a created chart. ChartStatusCreated ChartStatus = "CREATED" // ChartStatusError represents some error. ChartStatusError ChartStatus = "ERROR" )
func (ChartStatus) String ¶
func (c ChartStatus) String() string
type ChartView ¶
type ChartView struct { // Kind represents view kind. // Can be one of: // - area // - horizontal_bar // - line // - scatter // - vertical_bar // // required: true Kind string `json:"kind"` // BarsValues represents bars values. // It can be used with horizontal or vertical bar view. BarsValues []*BarsValues `json:"bars_values,omitempty"` // PointsValues represents points values. // It can be used with scatter view only. PointsValues *PointsValues `json:"points_values,omitempty"` // ScalarValues represents scalar values. // It can be used with area or line view. ScalarValues *ScalarValues `json:"scalar_values,omitempty"` // Colors represents view colors. Colors *ChartViewColors `json:"colors,omitempty"` // BarLabelVisible represents bar visibility. BarLabelVisible *bool `json:"bar_label_visible,omitempty"` // BarLabelPosition represents bar label position. // Can be one of: // - start_outside // - start_inside // - center // - end_inside // - end_outside BarLabelPosition string `json:"bar_label_position,omitempty"` // PointVisible represents point visibility. PointVisible *bool `json:"point_visible,omitempty"` // PointType represents view point type. // Can be one of: // - circle // - square // - x PointType string `json:"point_type,omitempty"` // PointLabelVisible represents point visibility. PointLabelVisible *bool `json:"point_label_visible,omitempty"` // PointLabelPosition represents point label position. // Can be one of: // - top // - top_right // - top_left // - left // - right // - bottom // - bottom_left // - bottom_right PointLabelPosition string `json:"point_label_position,omitempty"` }
ChartView represents options to configure chart view. nolint: govet
type ChartViewBarsColors ¶
type ChartViewBarsColors struct { // Fill represents bars fill color. Fill *ChartElementColor `json:"fill,omitempty"` // Stroke represents bars stroke color. Stroke *ChartElementColor `json:"stroke,omitempty"` }
ChartViewBarsColors represents options to configure bars values colors.
type ChartViewColors ¶
type ChartViewColors struct { // Fill represents view fill color. Fill *ChartElementColor `json:"fill,omitempty"` // Stroke represents view stroke color. Stroke *ChartElementColor `json:"stroke,omitempty"` // PointFill represents view point fill color. PointFill *ChartElementColor `json:"point_fill,omitempty"` // PointStroke represents view point stroke color. PointStroke *ChartElementColor `json:"point_stroke,omitempty"` }
ChartViewColors represents view colors parameters.
type CreateChartRequest ¶
type CreateChartRequest struct { // Chart create request body. // // in: body // required: true Chart struct { // Title represents chart title. Title string `json:"title"` // Sizes represents chart sizes. Sizes *ChartSizes `json:"sizes"` // Margins represents chart margins. Margins *ChartMargins `json:"margins"` // Axes represents chart axes. // // required: true Axes *ChartAxes `json:"axes"` // Views represents chart views // // required: true Views []*ChartView `json:"views"` } `json:"chart"` }
CreateChartRequest represents a request to create chart. swagger:parameters createChart
type DomainCategories ¶
type DomainCategories struct {
Categories []string `json:"categories,omitempty"`
}
DomainCategories represents string scale domain categories.
type DomainNumeric ¶
DomainNumeric represents numeric scale domain.
type Error ¶
type Error struct { // Error message. // // in: body Body struct { Error struct { // Message of the error. Message string `json:"message"` } `json:"error"` } }
Error represents error message.
swagger:response error
func (*Error) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface.
type GetChartRequest ¶
type GetChartRequest struct { // ChartID represents id of the chart. // // required: true // swagger:strfmt uuid4 ChartID string `json:"chat_id"` }
GetChartRequest represents a request to get chart. swagger:parameters getChart
type NotFoundError ¶
type NotFoundError struct { // Error message // // in: body Body struct { Error struct { // Resource ID. // // swagger:strfmt uuid4 ID string `json:"id"` // Message of the error. Message string `json:"message"` } `json:"error"` } }
NotFoundError represents not found error for any resource.
swagger:response notFoundError
func NewNotFoundError ¶
func NewNotFoundError(resourceType string, id string) *NotFoundError
NewNotFoundError returns a NotFoundError.
func (*NotFoundError) MarshalJSON ¶
func (r *NotFoundError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface.
type PointsValues ¶
type PointsValues struct { // Values contains points values. // // required: true Values [][]float32 `json:"values,omitempty"` }
PointsValues represents options for point values.
type ScalarValues ¶
type ScalarValues struct { // Values contains scalar values. // // required: true Values []float32 `json:"values,omitempty"` }
ScalarValues represents options for scalar values.