annotation

package
v3.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Time    time.Time
	TimeEnd time.Time
	Title   string
	Text    string
	Tags    []string
	Request RequestDetails
}

Annotation response. The annotation endpoint returns a slice of these.

func (Annotation) MarshalJSON

func (annotation Annotation) MarshalJSON() (output []byte, err error)

MarshalJSON converts an Annotation to JSON.

type Args

type Args struct {
	common.Args
}

Args contains arguments for the Annotations endpoint.

type Request

type Request struct {
	Annotation RequestDetails `json:"annotation"`
	Args
}

Request is a query for annotation.

func (*Request) UnmarshalJSON added in v3.1.0

func (r *Request) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON unmarshalls a Request from JSON

type RequestDetails

type RequestDetails struct {
	Name       string `json:"name"`
	Datasource string `json:"datasource"`
	Enable     bool   `json:"enable"`
	Query      string `json:"query"`
}

RequestDetails specifies which annotation should be returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL