Skip to content

AnnotationQueryBuilder🔗

Constructor🔗

func NewAnnotationQueryBuilder() *AnnotationQueryBuilder

Methods🔗

Build🔗

Builds the object.

func (builder *AnnotationQueryBuilder) Build() (AnnotationQuery, error)

BuiltIn🔗

Set to 1 for the standard annotation query all dashboards have by default.

func (builder *AnnotationQueryBuilder) BuiltIn(builtIn float64) *AnnotationQueryBuilder

Datasource🔗

Datasource where the annotations data is

func (builder *AnnotationQueryBuilder) Datasource(datasource dashboard.DataSourceRef) *AnnotationQueryBuilder

Enable🔗

When enabled the annotation query is issued with every dashboard refresh

func (builder *AnnotationQueryBuilder) Enable(enable bool) *AnnotationQueryBuilder

Expr🔗

func (builder *AnnotationQueryBuilder) Expr(expr string) *AnnotationQueryBuilder

Filter🔗

Filters to apply when fetching annotations

func (builder *AnnotationQueryBuilder) Filter(filter cog.Builder[dashboard.AnnotationPanelFilter]) *AnnotationQueryBuilder

Hide🔗

Annotation queries can be toggled on or off at the top of the dashboard.

When hide is true, the toggle is not shown in the dashboard.

func (builder *AnnotationQueryBuilder) Hide(hide bool) *AnnotationQueryBuilder

IconColor🔗

Color to use for the annotation event markers

func (builder *AnnotationQueryBuilder) IconColor(iconColor string) *AnnotationQueryBuilder

Name🔗

Name of annotation.

func (builder *AnnotationQueryBuilder) Name(name string) *AnnotationQueryBuilder

Target🔗

TODO.. this should just be a normal query target

func (builder *AnnotationQueryBuilder) Target(target cog.Builder[dashboard.AnnotationTarget]) *AnnotationQueryBuilder

Type🔗

TODO -- this should not exist here, it is based on the --grafana-- datasource

func (builder *AnnotationQueryBuilder) Type(typeArg string) *AnnotationQueryBuilder

See also🔗