Versions in this module Expand all Collapse all v0 v0.0.7 May 20, 2022 Changes in this version type SeriesOverride + Points *bool v0.0.6 May 19, 2022 Changes in this version type TextPanel + Targets []Target v0.0.5 Apr 6, 2022 Changes in this version type Target + QueryDisplay string v0.0.4 Apr 4, 2022 Changes in this version type Target + MinPeriod string v0.0.3 Feb 11, 2022 v0.0.2 Jan 20, 2022 v0.0.1 Aug 17, 2021 Changes in this version + const AlertlistType + const BarGaugeType + const CustomType + const DashlistType + const DefaultFolderId + const GraphType + const HeatmapType + const MixedSource + const PluginlistType + const RowType + const SinglestatType + const StatType + const TableType + const TemplatingHideLabel + const TemplatingHideNone + const TemplatingHideVariable + const TextType + var DefaultHTTPClient = http.DefaultClient + type Address struct + Address1 string + Address2 string + City string + Country string + State string + ZipCode string + type Alert struct + AlertRuleTags map[string]string + Conditions []AlertCondition + ExecutionErrorState string + For string + Frequency string + Handler int + Message string + Name string + NoDataState string + Notifications []AlertNotification + type AlertCondition struct + Evaluator AlertEvaluator + Operator AlertOperator + Query AlertQuery + Reducer AlertReducer + Type string + type AlertEvaluator struct + Params []float64 + Type string + type AlertNotification struct + DisableResolveMessage bool + Frequency string + ID int64 + IsDefault bool + Name string + SendReminder bool + Settings interface{} + Type string + UID string + type AlertOperator struct + Type string + type AlertQuery struct + Params []string + type AlertReducer struct + Params []string + Type string + type AlertlistPanel struct + DashboardTags []string + Limit int + NameFilter string + OnlyAlertsOnDashboard bool + Show string + SortOrder int + StateFilter []string + type Annotation struct + Datasource *string + Enable bool + Expr string + IconColor string + IconSize uint + LineColor string + Name string + Query string + ShowLine bool + Step string + TagKeys string + Tags []string + TagsField string + TextField string + TextFormat string + TitleFormat string + Type string + type AnnotationResponse struct + AlertID uint + DashboardID uint + Data map[string]interface{} + ID uint + NewState string + PanelID uint + PrevState string + Tags []string + Text string + Time int64 + TimeEnd int64 + Type string + UserID uint + UserName string + type Axis struct + Decimals int + Format string + Label string + LogBase int + Max *FloatString + Min *FloatString + Show bool + type BarGaugePanel struct + FieldConfig FieldConfig + Options Options + Targets []Target + type Board struct + Annotations struct{ ... } + Editable bool + GraphTooltip int + HideControls bool + ID uint + Links []Link + OriginalTitle string + Panels []*Panel + Refresh *BoolString + Rows []*Row + SchemaVersion uint + SharedCrosshair bool + Slug string + Style string + Tags []string + Templating Templating + Time Time + Timepicker Timepicker + Timezone string + Title string + UID string + Version uint + func NewBoard(title string) *Board + func (b *Board) AddLink(link Link) + func (b *Board) AddRow(title string) *Row + func (b *Board) AddTags(tags ...string) + func (b *Board) HasTag(tag string) bool + func (b *Board) RemoveTags(tags ...string) + func (b *Board) UpdateSlug() string + type BoardProperties struct + CanEdit bool + CanSave bool + CanStar bool + Created time.Time + CreatedBy string + Expires time.Time + FolderID int + FolderTitle string + FolderURL string + IsHome bool + IsSnapshot bool + IsStarred bool + Provisioned bool + ProvisionedExternalID string + Slug string + Type string + Updated time.Time + UpdatedBy string + Version int + type BoolInt struct + Flag bool + Value *int64 + func (s *BoolInt) UnmarshalJSON(raw []byte) error + func (s BoolInt) MarshalJSON() ([]byte, error) + type BoolString struct + Flag bool + Value string + func (s *BoolString) UnmarshalJSON(raw []byte) error + func (s BoolString) MarshalJSON() ([]byte, error) + type Client struct + func NewClient(apiURL, apiKeyOrBasicAuth string, client *http.Client, debug bool) *Client + func (c *Client) CreateAlertNotification(ctx context.Context, an AlertNotification) (int64, error) + func (c *Client) DeleteAlertNotificationID(ctx context.Context, id uint) error + func (c *Client) DeleteAlertNotificationUID(ctx context.Context, uid string) error + func (c *Client) GetAlertNotificationID(ctx context.Context, id uint) (AlertNotification, error) + func (c *Client) GetAlertNotificationUID(ctx context.Context, uid string) (AlertNotification, error) + func (c *Client) GetAllAlertNotifications(ctx context.Context) ([]AlertNotification, error) + func (c *Client) UpdateAlertNotificationID(ctx context.Context, an AlertNotification, id uint) error + func (c *Client) UpdateAlertNotificationUID(ctx context.Context, an AlertNotification, uid string) error + func (r *Client) AddActualOrgUser(ctx context.Context, userRole UserRole) (StatusMessage, error) + func (r *Client) AddOrgUser(ctx context.Context, user UserRole, oid uint) (StatusMessage, error) + func (r *Client) CreateAnnotation(ctx context.Context, a CreateAnnotationRequest) (StatusMessage, error) + func (r *Client) CreateDatasource(ctx context.Context, ds Datasource) (StatusMessage, error) + func (r *Client) CreateFolder(ctx context.Context, f Folder) (Folder, error) + func (r *Client) CreateOrg(ctx context.Context, org Org) (StatusMessage, error) + func (r *Client) CreateSnapshot(ctx context.Context, a CreateSnapshotRequest) (StatusMessage, error) + func (r *Client) CreateUser(ctx context.Context, user User) (StatusMessage, error) + func (r *Client) DeleteActualOrgUser(ctx context.Context, uid uint) (StatusMessage, error) + func (r *Client) DeleteAnnotation(ctx context.Context, id uint) (StatusMessage, error) + func (r *Client) DeleteDashboard(ctx context.Context, slug string) (StatusMessage, error) + func (r *Client) DeleteDashboardByUID(ctx context.Context, uid string) (StatusMessage, error) + func (r *Client) DeleteDatasource(ctx context.Context, id uint) (StatusMessage, error) + func (r *Client) DeleteDatasourceByName(ctx context.Context, name string) (StatusMessage, error) + func (r *Client) DeleteFolderByUID(ctx context.Context, UID string) (bool, error) + func (r *Client) DeleteOrg(ctx context.Context, oid uint) (StatusMessage, error) + func (r *Client) DeleteOrgUser(ctx context.Context, oid, uid uint) (StatusMessage, error) + func (r *Client) GetActualOrg(ctx context.Context) (Org, error) + func (r *Client) GetActualOrgPreferences(ctx context.Context) (Preferences, error) + func (r *Client) GetActualOrgUsers(ctx context.Context) ([]OrgUser, error) + func (r *Client) GetActualUser(ctx context.Context) (User, error) + func (r *Client) GetAllDatasources(ctx context.Context) ([]Datasource, error) + func (r *Client) GetAllFolders(ctx context.Context, params ...GetFolderParams) ([]Folder, error) + func (r *Client) GetAllOrgs(ctx context.Context) ([]Org, error) + func (r *Client) GetAllUsers(ctx context.Context) ([]User, error) + func (r *Client) GetAnnotations(ctx context.Context, params ...GetAnnotationsParams) ([]AnnotationResponse, error) + func (r *Client) GetDashboardBySlug(ctx context.Context, slug string) (Board, BoardProperties, error) + func (r *Client) GetDashboardByUID(ctx context.Context, uid string) (Board, BoardProperties, error) + func (r *Client) GetDatasource(ctx context.Context, id uint) (Datasource, error) + func (r *Client) GetDatasourceByName(ctx context.Context, name string) (Datasource, error) + func (r *Client) GetDatasourceTypes(ctx context.Context) (map[string]DatasourceType, error) + func (r *Client) GetFolderByID(ctx context.Context, ID int) (Folder, error) + func (r *Client) GetFolderByUID(ctx context.Context, UID string) (Folder, error) + func (r *Client) GetHealth(ctx context.Context) (HealthResponse, error) + func (r *Client) GetOrgById(ctx context.Context, oid uint) (Org, error) + func (r *Client) GetOrgByOrgName(ctx context.Context, name string) (Org, error) + func (r *Client) GetOrgUsers(ctx context.Context, oid uint) ([]OrgUser, error) + func (r *Client) GetRawDashboardBySlug(ctx context.Context, slug string) ([]byte, BoardProperties, error) + func (r *Client) GetRawDashboardByUID(ctx context.Context, uid string) ([]byte, BoardProperties, error) + func (r *Client) GetUser(ctx context.Context, id uint) (User, error) + func (r *Client) PatchAnnotation(ctx context.Context, id uint, a PatchAnnotationRequest) (StatusMessage, error) + func (r *Client) Search(ctx context.Context, params ...SearchParam) ([]FoundBoard, error) + func (r *Client) SearchDashboards(ctx context.Context, query string, starred bool, tags ...string) ([]FoundBoard, error) + func (r *Client) SearchUsersWithPaging(ctx context.Context, query *string, perpage, page *int) (PageUsers, error) + func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashboardParams) (StatusMessage, error) + func (r *Client) SetRawDashboard(ctx context.Context, raw []byte) (StatusMessage, error) + func (r *Client) SwitchActualUserContext(ctx context.Context, oid uint) (StatusMessage, error) + func (r *Client) SwitchUserContext(ctx context.Context, uid uint, oid uint) (StatusMessage, error) + func (r *Client) UpdateActualOrg(ctx context.Context, org Org) (StatusMessage, error) + func (r *Client) UpdateActualOrgAddress(ctx context.Context, address Address) (StatusMessage, error) + func (r *Client) UpdateActualOrgPreferences(ctx context.Context, prefs Preferences) (StatusMessage, error) + func (r *Client) UpdateActualOrgUser(ctx context.Context, user UserRole, uid uint) (StatusMessage, error) + func (r *Client) UpdateDatasource(ctx context.Context, ds Datasource) (StatusMessage, error) + func (r *Client) UpdateFolderByUID(ctx context.Context, f Folder) (Folder, error) + func (r *Client) UpdateOrg(ctx context.Context, org Org, oid uint) (StatusMessage, error) + func (r *Client) UpdateOrgAddress(ctx context.Context, address Address, oid uint) (StatusMessage, error) + func (r *Client) UpdateOrgUser(ctx context.Context, user UserRole, oid, uid uint) (StatusMessage, error) + func (r *Client) UpdateUserPermissions(ctx context.Context, permissions UserPermissions, uid uint) (StatusMessage, error) + type Column struct + TextType string + Value string + type ColumnStyle struct + Alias *string + ColorMode *string + Colors *[]string + DateFormat *string + Decimals *uint + Link bool + LinkTargetBlank bool + LinkTooltip *string + LinkUrl *string + MappingType int + Pattern string + Thresholds *[]string + Type string + Unit *string + ValueMaps []ValueMap + type CommonPanel struct + Alert *Alert + Datasource *string + Description *string + Editable bool + Error bool + GridPos struct{ ... } + Height interface{} + HideTimeOverride *bool + ID uint + IsNew bool + Links []Link + MinSpan *float32 + OfType panelType + Renderer *string + Repeat *string + RepeatPanelID *uint + ScopedVars map[string]struct{ ... } + Span float32 + Title string + Transparent bool + Type string + type CreateAnnotationRequest struct + DashboardID uint + PanelID uint + Tags []string + Text string + Time int64 + TimeEnd int64 + type CreateSnapshotRequest struct + Dashboard Board + Expires uint + type Current struct + Tags []*string + Text *StringSliceString + Value interface{} + type CustomPanel map[string]interface + type DashlistPanel struct + FolderID int + Headings bool + Limit int + Mode string + Query string + Recent bool + Search bool + Starred bool + Tags []string + type Datasource struct + Access string + BasicAuth *bool + BasicAuthPassword *string + BasicAuthUser *string + Database *string + ID uint + IsDefault bool + JSONData interface{} + Name string + OrgID uint + Password *string + SecureJSONData interface{} + Type string + URL string + User *string + type DatasourceType struct + Metrics bool + Module string + Name string + Partials struct{ ... } + PluginType string + ServiceName string + Type string + type FieldConfig struct + Defaults struct{ ... } + type FloatString struct + Valid bool + Value float64 + func NewFloatString(i float64) *FloatString + func (v *FloatString) MarshalJSON() ([]byte, error) + func (v *FloatString) UnmarshalJSON(raw []byte) error + type Folder struct + CanAdmin bool + CanEdit bool + CanSave bool + Created string + CreatedBy string + HasAcl bool + ID int + Overwrite bool + Title string + UID string + URL string + Updated string + UpdatedBy string + Version int + type FoundBoard struct + FolderID int + FolderTitle string + FolderUID string + FolderURL string + ID uint + IsStarred bool + Slug string + Tags []string + Title string + Type string + UID string + URI string + URL string + type Gauge struct + MaxValue float32 + MinValue float32 + Show bool + ThresholdLabels bool + ThresholdMarkers bool + type GetAnnotationsParams func(values url.Values) + func WithAlertType() GetAnnotationsParams + func WithAnnotationType() GetAnnotationsParams + func WithDashboard(id uint) GetAnnotationsParams + func WithEndTime(t time.Time) GetAnnotationsParams + func WithLimit(limit uint) GetAnnotationsParams + func WithPanel(id uint) GetAnnotationsParams + func WithStartTime(t time.Time) GetAnnotationsParams + func WithTag(tag string) GetAnnotationsParams + func WithUser(id uint) GetAnnotationsParams + type GetFolderParams func(values url.Values) + func Limit(limit uint) GetFolderParams + type GraphPanel struct + AliasColors interface{} + Bars bool + DashLength *uint + Dashes *bool + Decimals *uint + Fill int + LeftYAxisLabel *string + Legend Legend + Lines bool + Linewidth uint + NullPointMode string + Percentage bool + Pointradius float32 + Points bool + RightYAxisLabel *string + SeriesOverrides []SeriesOverride + SpaceLength *uint + Stack bool + SteppedLine bool + Targets []Target + Thresholds []Threshold + TimeFrom *string + TimeShift *string + Tooltip Tooltip + XAxis bool + Xaxis Axis + YAxis bool + YFormats []string + Yaxes []Axis + type HealthResponse struct + Commit string + Database string + Version string + type HeatmapPanel struct + Cards struct{ ... } + Color struct{ ... } + DataFormat string + HideZeroBuckets bool + HighlightCards bool + Legend struct{ ... } + ReverseYBuckets bool + Targets []Target + Tooltip struct{ ... } + TooltipDecimals int + XAxis struct{ ... } + XBucketNumber *float64 + XBucketSize *string + YAxis struct{ ... } + YBucketBound string + YBucketNumber *float64 + YBucketSize *float64 + type Height string + func (h *Height) UnmarshalJSON(raw []byte) error + type IntString struct + Valid bool + Value int64 + func NewIntString(i int64) *IntString + func (v *IntString) MarshalJSON() ([]byte, error) + func (v *IntString) UnmarshalJSON(raw []byte) error + type Legend struct + AlignAsTable bool + Avg bool + Current bool + HideEmpty bool + HideZero bool + Max bool + Min bool + RightSide bool + Show bool + SideWidth *uint + Total bool + Values bool + type Link struct + AsDropdown *bool + DashURI *string + Dashboard *string + Icon *string + IncludeVars bool + KeepTime *bool + Params *string + Tags []string + TargetBlank *bool + Title string + Tooltip *string + Type string + URL *string + type MapType struct + Name *string + Value *int + type Option struct + Selected bool + Text string + Value string + type Options struct + ColorMode string + Content string + DisplayMode string + GraphMode string + JustifyMode string + Mode string + Orientation string + ReduceOptions struct{ ... } + TextMode string + type Org struct + Address Address + ID uint + Name string + type OrgUser struct + Email string + ID uint + Login string + OrgId uint + Role string + type PageUsers struct + Page int + PerPage int + TotalCount int + Users []User + type Panel struct + func NewAlertlist(title string) *Panel + func NewCustom(title string) *Panel + func NewDashlist(title string) *Panel + func NewGraph(title string) *Panel + func NewHeatmap(title string) *Panel + func NewPluginlist(title string) *Panel + func NewSinglestat(title string) *Panel + func NewStat(title string) *Panel + func NewTable(title string) *Panel + func NewText(title string) *Panel + func (p *Panel) AddTarget(t *Target) + func (p *Panel) GetTargets() *[]Target + func (p *Panel) MarshalJSON() ([]byte, error) + func (p *Panel) RepeatDatasourcesForEachTarget(dsNames ...string) + func (p *Panel) RepeatTargetsForDatasources(dsNames ...string) + func (p *Panel) ResetTargets() + func (p *Panel) SetTarget(t *Target) + func (p *Panel) UnmarshalJSON(b []byte) (err error) + type PatchAnnotationRequest struct + Tags []string + Text string + Time int64 + TimeEnd int64 + type PluginlistPanel struct + Limit int + type Preferences struct + HomeDashboardId uint + Theme string + Timezone string + type RangeMap struct + From *string + Text *string + To *string + type Row struct + Collapse bool + Editable bool + Height Height + Panels []Panel + Repeat *string + ShowTitle bool + Title string + func (r *Row) Add(panel *Panel) + func (r *Row) AddCustom(data *CustomPanel) + func (r *Row) AddDashlist(data *DashlistPanel) + func (r *Row) AddGraph(data *GraphPanel) + func (r *Row) AddSinglestat(data *SinglestatPanel) + func (r *Row) AddStat(data *StatPanel) + func (r *Row) AddTable(data *TablePanel) + func (r *Row) AddText(data *TextPanel) + type RowPanel struct + Collapsed bool + Panels []Panel + type SearchParam func(*url.Values) + func SearchDashboardID(dashboardID int) SearchParam + func SearchFolderID(folderID int) SearchParam + func SearchLimit(limit uint) SearchParam + func SearchPage(page uint) SearchParam + func SearchQuery(query string) SearchParam + func SearchStarred(starred bool) SearchParam + func SearchTag(tag string) SearchParam + func SearchType(searchType SearchParamType) SearchParam + type SearchParamType string + const SearchTypeDashboard + const SearchTypeFolder + type SeriesOverride struct + Alias string + Bars *bool + Color *string + Dashes *bool + Fill *int + FillBelowTo *string + Legend *bool + LineWidth *int + Lines *bool + NullPointMode *string + Stack *BoolString + Transform *string + YAxis *int + ZIndex *int + type SetDashboardParams struct + FolderID int + Overwrite bool + type SinglestatPanel struct + ColorBackground bool + ColorValue bool + Colors []string + Decimals int + Format string + Gauge Gauge + MappingType *uint + MappingTypes []*MapType + MaxDataPoints *IntString + NullPointMode string + Postfix *string + PostfixFontSize *string + Prefix *string + PrefixFontSize *string + RangeMaps []*RangeMap + SparkLine SparkLine + Targets []Target + Thresholds string + ValueFontSize string + ValueMaps []ValueMap + ValueName string + type Sort struct + Col int + Desc bool + type SparkLine struct + FillColor *string + Full bool + LineColor *string + Show bool + YMax *float64 + YMin *float64 + type StackdriverAlignOption struct + Label string + MetricKinds []string + Text string + Value string + ValueTypes []string + type StackdriverAlignOptions struct + Expanded bool + Label string + Options []StackdriverAlignOption + type StatPanel struct + ColorBackground bool + ColorValue bool + Colors []string + Decimals int + Format string + Gauge Gauge + MappingType *uint + MappingTypes []*MapType + MaxDataPoints *IntString + NullPointMode string + Options Options + Postfix *string + PostfixFontSize *string + Prefix *string + PrefixFontSize *string + RangeMaps []*RangeMap + SparkLine SparkLine + Targets []Target + Thresholds string + ValueFontSize string + ValueMaps []ValueMap + ValueName string + type StatusMessage struct + ID *uint + Message *string + OrgID *uint + Slug *string + Status *string + UID *string + URL *string + Version *int + type StringSliceString struct + Valid bool + Value []string + func (v *StringSliceString) MarshalJSON() ([]byte, error) + func (v *StringSliceString) UnmarshalJSON(raw []byte) error + type TablePanel struct + Columns []Column + Scroll bool + Sort *Sort + Styles []ColumnStyle + Targets []Target + Transform string + type Target struct + Alias string + AliasBy string + AlignOptions []StackdriverAlignOptions + AlignmentPeriod string + BucketAggs []struct{ ... } + CrossSeriesReducer string + Datasource string + Dimensions map[string]string + DsType *string + Expr string + Filters []string + Format string + Group []struct{ ... } + GroupBys []string + Hide bool + Instant bool + Interval string + IntervalFactor int + LegendFormat string + Measurement string + MetricColumn string + MetricKind string + MetricName string + MetricType string + Metrics []struct{ ... } + Namespace string + PerSeriesAligner string + Period string + ProjectName string + Query string + QueryType string + RawQuery bool + RawSql string + RefID string + Region string + Segments []string + Select [][]struct{ ... } + Statistics []string + Step int + Table string + Target string + TargetFull string + TimeColumn string + TimeField string + ValueType string + Where []struct{ ... } + type TemplateVar struct + AllFormat string + AllValue string + Auto bool + AutoCount *int + Current Current + Datasource *string + Hide uint8 + IncludeAll bool + Label string + Multi bool + MultiFormat string + Name string + Options []Option + Query string + Refresh BoolInt + Regex string + Sort int + Type string + type Templating struct + List []TemplateVar + type TextPanel struct + Content string + FieldConfig FieldConfig + Mode string + Options struct{ ... } + PageSize uint + Scroll bool + ShowHeader bool + Sort Sort + Styles []ColumnStyle + type Threshold struct + ColorMode string + Fill bool + FillColor string + Line bool + LineColor string + Op string + Value float32 + Yaxis string + type Time struct + From string + To string + type Timepicker struct + Now *bool + RefreshIntervals []string + TimeOptions []string + type Tooltip struct + MsResolution bool + Shared bool + Sort int + ValueType string + type User struct + Email string + ID uint + IsGrafanaAdmin bool + Login string + Name string + OrgID uint + Password string + Theme string + type UserPermissions struct + IsGrafanaAdmin bool + type UserRole struct + LoginOrEmail string + Role string + type ValueMap struct + Op string + TextType string + Value string