Documentation
¶
Index ¶
- func GetGravatarHash(text string) ([]byte, bool)
- func GetGravatarUrl(cfg *setting.Cfg, text string) string
- func GetGravatarUrlWithDefault(cfg *setting.Cfg, text string, defaultText string) string
- func IsHiddenUser(userLogin string, signedInUser identity.Requester, cfg *setting.Cfg) bool
- type AddInviteForm
- type AdminCreateUserForm
- type AdminUpdateUserPasswordForm
- type AdminUpdateUserPermissionsForm
- type AnalyticsSettings
- type AnyId
- type ApiKeyDTO
- type CalculateDiffOptions
- type CalculateDiffTarget
- type CompleteInviteForm
- type CreateShortURLCmd
- type CurrentUser
- type DashboardACLUpdateItem
- type DashboardFullWithMeta
- type DashboardMeta
- type DashboardRedirect
- type DataSource
- type DataSourceList
- type DataSourceListItemDTO
- type EntryPointAsset
- type EntryPointAssets
- type Folder
- type FolderSearchHit
- type FrontendSettingsAnalyticsDTO
- type FrontendSettingsAuthDTO
- type FrontendSettingsAzureDTO
- type FrontendSettingsBuildInfoDTO
- type FrontendSettingsCachingDTO
- type FrontendSettingsDTO
- type FrontendSettingsFooterConfigItemDTO
- type FrontendSettingsLicenseInfoDTO
- type FrontendSettingsLicensingDTO
- type FrontendSettingsPublicDashboardConfigDTO
- type FrontendSettingsRecordedQueriesDTO
- type FrontendSettingsReportingDTO
- type FrontendSettingsSqlConnectionLimitsDTO
- type FrontendSettingsUnifiedAlertingDTO
- type FrontendSettingsWhitelabelingDTO
- type IndexViewData
- type InstallPluginCommand
- type InviteInfo
- type LivePublishCmd
- type LivePublishResponse
- type LoginCommand
- type MassDeleteAnnotationsCmd
- type MetricRequest
- type NewApiKeyResult
- type PatchAnnotationsCmd
- type PatchPrefsCmd
- type PlaylistDashboard
- type PlaylistDashboardsSlice
- type PluginList
- type PluginListItem
- type PluginSetting
- type PostAnnotationsCmd
- type PostGraphiteAnnotationsCmd
- type ResetUserPasswordForm
- type RestoreDashboardVersionCommand
- type SendResetPasswordEmailForm
- type ShortURL
- type SignUpForm
- type SignUpStep2Form
- type UpdateAnnotationsCmd
- type UpdateDashboardACLCommand
- type UpdateOrgAddressForm
- type UpdateOrgForm
- type UpdatePrefsCmd
- type UserLookupDTO
- type UserPermissionsMap
- type UserToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGravatarHash ¶
Types ¶
type AddInviteForm ¶
type AdminCreateUserForm ¶
type AdminUpdateUserPermissionsForm ¶
type AdminUpdateUserPermissionsForm struct {
IsGrafanaAdmin bool `json:"isGrafanaAdmin"`
}
type AnalyticsSettings ¶
type CalculateDiffOptions ¶
type CalculateDiffOptions struct { Base CalculateDiffTarget `json:"base" binding:"Required"` New CalculateDiffTarget `json:"new" binding:"Required"` DiffType string `json:"diffType" binding:"Required"` }
type CalculateDiffTarget ¶
type CalculateDiffTarget struct { DashboardId int64 `json:"dashboardId"` Version int `json:"version"` UnsavedDashboard *simplejson.Json `json:"unsavedDashboard"` }
type CompleteInviteForm ¶
type CreateShortURLCmd ¶
type CreateShortURLCmd struct {
Path string `json:"path"`
}
type CurrentUser ¶
type CurrentUser struct { IsSignedIn bool `json:"isSignedIn"` Id int64 `json:"id"` UID string `json:"uid"` Login string `json:"login"` Email string `json:"email"` Name string `json:"name"` Theme string `json:"theme"` LightTheme bool `json:"lightTheme"` // deprecated, use theme instead OrgCount int `json:"orgCount"` OrgId int64 `json:"orgId"` OrgName string `json:"orgName"` OrgRole org.RoleType `json:"orgRole"` IsGrafanaAdmin bool `json:"isGrafanaAdmin"` GravatarUrl string `json:"gravatarUrl"` Timezone string `json:"timezone"` WeekStart string `json:"weekStart"` Locale string `json:"locale"` Language string `json:"language"` HelpFlags1 user.HelpFlags1 `json:"helpFlags1"` HasEditPermissionInFolders bool `json:"hasEditPermissionInFolders"` AuthenticatedBy string `json:"authenticatedBy"` Permissions UserPermissionsMap `json:"permissions,omitempty"` Analytics AnalyticsSettings `json:"analytics"` }
type DashboardACLUpdateItem ¶
type DashboardACLUpdateItem struct { UserID int64 `json:"userId"` TeamID int64 `json:"teamId"` Role *org.RoleType `json:"role,omitempty"` // Permission level // Description: // * `1` - View // * `2` - Edit // * `4` - Admin // Enum: 1,2,4 Permission dashboardaccess.PermissionType `json:"permission"` }
swagger:model
type DashboardFullWithMeta ¶
type DashboardFullWithMeta struct { Meta DashboardMeta `json:"meta"` Dashboard *simplejson.Json `json:"dashboard"` }
type DashboardMeta ¶
type DashboardMeta struct { IsStarred bool `json:"isStarred,omitempty"` IsSnapshot bool `json:"isSnapshot,omitempty"` Type string `json:"type,omitempty"` CanSave bool `json:"canSave"` CanEdit bool `json:"canEdit"` CanAdmin bool `json:"canAdmin"` CanStar bool `json:"canStar"` CanDelete bool `json:"canDelete"` Slug string `json:"slug"` Url string `json:"url"` Expires time.Time `json:"expires"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` UpdatedBy string `json:"updatedBy"` CreatedBy string `json:"createdBy"` Version int `json:"version"` HasACL bool `json:"hasAcl" xorm:"has_acl"` IsFolder bool `json:"isFolder"` // Deprecated: use FolderUID instead FolderId int64 `json:"folderId"` FolderUid string `json:"folderUid"` FolderTitle string `json:"folderTitle"` FolderUrl string `json:"folderUrl"` Provisioned bool `json:"provisioned"` ProvisionedExternalId string `json:"provisionedExternalId"` AnnotationsPermissions *dashboardsV0.AnnotationPermission `json:"annotationsPermissions"` PublicDashboardEnabled bool `json:"publicDashboardEnabled,omitempty"` }
type DashboardRedirect ¶
type DashboardRedirect struct {
RedirectUri string `json:"redirectUri"`
}
type DataSource ¶
type DataSource struct { Id int64 `json:"id"` UID string `json:"uid"` OrgId int64 `json:"orgId"` Name string `json:"name"` Type string `json:"type"` TypeLogoUrl string `json:"typeLogoUrl"` Access datasources.DsAccess `json:"access"` Url string `json:"url"` User string `json:"user"` Database string `json:"database"` BasicAuth bool `json:"basicAuth"` BasicAuthUser string `json:"basicAuthUser"` WithCredentials bool `json:"withCredentials"` IsDefault bool `json:"isDefault"` JsonData *simplejson.Json `json:"jsonData,omitempty"` SecureJsonFields map[string]bool `json:"secureJsonFields"` Version int `json:"version"` ReadOnly bool `json:"readOnly"` AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"` // swagger:ignore APIVersion string `json:"apiVersion"` }
type DataSourceList ¶
type DataSourceList []DataSourceListItemDTO
func (DataSourceList) Len ¶
func (slice DataSourceList) Len() int
func (DataSourceList) Less ¶
func (slice DataSourceList) Less(i, j int) bool
func (DataSourceList) Swap ¶
func (slice DataSourceList) Swap(i, j int)
type DataSourceListItemDTO ¶
type DataSourceListItemDTO struct { Id int64 `json:"id"` UID string `json:"uid"` OrgId int64 `json:"orgId"` Name string `json:"name"` Type string `json:"type"` TypeName string `json:"typeName"` TypeLogoUrl string `json:"typeLogoUrl"` Access datasources.DsAccess `json:"access"` Url string `json:"url"` User string `json:"user"` Database string `json:"database"` BasicAuth bool `json:"basicAuth"` IsDefault bool `json:"isDefault"` JsonData *simplejson.Json `json:"jsonData,omitempty"` ReadOnly bool `json:"readOnly"` }
type EntryPointAsset ¶
type EntryPointAssets ¶
type EntryPointAssets struct { ContentDeliveryURL string `json:"cdn,omitempty"` JSFiles []EntryPointAsset `json:"jsFiles"` Dark string `json:"dark"` Light string `json:"light"` }
func (*EntryPointAssets) SetContentDeliveryURL ¶
func (a *EntryPointAssets) SetContentDeliveryURL(prefix string)
type Folder ¶
type Folder struct { // Deprecated: use UID instead ID int64 `json:"id" xorm:"pk autoincr 'id'"` UID string `json:"uid" xorm:"uid"` OrgID int64 `json:"orgId" xorm:"org_id"` Title string `json:"title"` URL string `json:"url" xorm:"url"` HasACL bool `json:"hasAcl" xorm:"has_acl"` CanSave bool `json:"canSave"` CanEdit bool `json:"canEdit"` CanAdmin bool `json:"canAdmin"` CanDelete bool `json:"canDelete"` CreatedBy string `json:"createdBy"` Created time.Time `json:"created"` UpdatedBy string `json:"updatedBy"` Updated time.Time `json:"updated"` Version int `json:"version,omitempty"` AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"` // only used if nested folders are enabled ParentUID string `json:"parentUid,omitempty"` // the parent folders starting from the root going down Parents []Folder `json:"parents,omitempty"` }
type FolderSearchHit ¶
type FrontendSettingsAnalyticsDTO ¶
type FrontendSettingsAnalyticsDTO struct {
Enabled bool `json:"enabled"`
}
type FrontendSettingsAuthDTO ¶
type FrontendSettingsAuthDTO struct { AuthProxyEnableLoginToken bool `json:"AuthProxyEnableLoginToken"` // Deprecated: this is no longer used and will be removed in Grafana 11 OAuthSkipOrgRoleUpdateSync bool `json:"OAuthSkipOrgRoleUpdateSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 SAMLSkipOrgRoleSync bool `json:"SAMLSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 LDAPSkipOrgRoleSync bool `json:"LDAPSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 GoogleSkipOrgRoleSync bool `json:"GoogleSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 GenericOAuthSkipOrgRoleSync bool `json:"GenericOAuthSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 JWTAuthSkipOrgRoleSync bool `json:"JWTAuthSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 GrafanaComSkipOrgRoleSync bool `json:"GrafanaComSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 AzureADSkipOrgRoleSync bool `json:"AzureADSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 GithubSkipOrgRoleSync bool `json:"GithubSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 GitLabSkipOrgRoleSync bool `json:"GitLabSkipOrgRoleSync"` // Deprecated: this is no longer used and will be removed in Grafana 11 OktaSkipOrgRoleSync bool `json:"OktaSkipOrgRoleSync"` DisableLogin bool `json:"disableLogin"` BasicAuthStrongPasswordPolicy bool `json:"basicAuthStrongPasswordPolicy"` }
type FrontendSettingsAzureDTO ¶
type FrontendSettingsAzureDTO struct { Cloud string `json:"cloud"` Clouds []azsettings.AzureCloudInfo `json:"clouds"` ManagedIdentityEnabled bool `json:"managedIdentityEnabled"` WorkloadIdentityEnabled bool `json:"workloadIdentityEnabled"` UserIdentityEnabled bool `json:"userIdentityEnabled"` UserIdentityFallbackCredentialsEnabled bool `json:"userIdentityFallbackCredentialsEnabled"` }
type FrontendSettingsBuildInfoDTO ¶
type FrontendSettingsBuildInfoDTO struct { HideVersion bool `json:"hideVersion"` // A semver-ish version string, such as "11.0.0-12345" Version string `json:"version"` // A branded version string to show in the UI, such as "Grafana v11.0.0-12345" VersionString string `json:"versionString,omitempty"` Commit string `json:"commit"` CommitShort string `json:"commitShort"` Buildstamp int64 `json:"buildstamp"` Edition string `json:"edition"` LatestVersion string `json:"latestVersion"` HasUpdate bool `json:"hasUpdate"` Env string `json:"env"` }
type FrontendSettingsCachingDTO ¶
type FrontendSettingsCachingDTO struct {
Enabled bool `json:"enabled"`
}
type FrontendSettingsDTO ¶
type FrontendSettingsDTO struct { DefaultDatasource string `json:"defaultDatasource"` Datasources map[string]plugins.DataSourceDTO `json:"datasources"` MinRefreshInterval string `json:"minRefreshInterval"` Panels map[string]plugins.PanelDTO `json:"panels"` Apps map[string]*plugins.AppDTO `json:"apps"` AppUrl string `json:"appUrl"` AppSubUrl string `json:"appSubUrl"` AllowOrgCreate bool `json:"allowOrgCreate"` AuthProxyEnabled bool `json:"authProxyEnabled"` LdapEnabled bool `json:"ldapEnabled"` JwtHeaderName string `json:"jwtHeaderName"` JwtUrlLogin bool `json:"jwtUrlLogin"` LiveEnabled bool `json:"liveEnabled"` AutoAssignOrg bool `json:"autoAssignOrg"` VerifyEmailEnabled bool `json:"verifyEmailEnabled"` SigV4AuthEnabled bool `json:"sigV4AuthEnabled"` AzureAuthEnabled bool `json:"azureAuthEnabled"` RbacEnabled bool `json:"rbacEnabled"` ExploreEnabled bool `json:"exploreEnabled"` HelpEnabled bool `json:"helpEnabled"` ProfileEnabled bool `json:"profileEnabled"` NewsFeedEnabled bool `json:"newsFeedEnabled"` QueryHistoryEnabled bool `json:"queryHistoryEnabled"` GoogleAnalyticsId string `json:"googleAnalyticsId"` GoogleAnalytics4Id string `json:"googleAnalytics4Id"` GoogleAnalytics4SendManualPageViews bool `json:"GoogleAnalytics4SendManualPageViews"` RudderstackWriteKey string `json:"rudderstackWriteKey"` RudderstackDataPlaneUrl string `json:"rudderstackDataPlaneUrl"` RudderstackSdkUrl string `json:"rudderstackSdkUrl"` RudderstackConfigUrl string `json:"rudderstackConfigUrl"` RudderstackIntegrationsUrl string `json:"rudderstackIntegrationsUrl"` FeedbackLinksEnabled bool `json:"feedbackLinksEnabled"` ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString"` ApplicationInsightsEndpointUrl string `json:"applicationInsightsEndpointUrl"` DisableLoginForm bool `json:"disableLoginForm"` DisableUserSignUp bool `json:"disableUserSignUp"` LoginHint string `json:"loginHint"` PasswordHint string `json:"passwordHint"` ExternalUserMngInfo string `json:"externalUserMngInfo"` ExternalUserMngLinkUrl string `json:"externalUserMngLinkUrl"` ExternalUserMngLinkName string `json:"externalUserMngLinkName"` ViewersCanEdit bool `json:"viewersCanEdit"` AngularSupportEnabled bool `json:"angularSupportEnabled"` EditorsCanAdmin bool `json:"editorsCanAdmin"` DisableSanitizeHtml bool `json:"disableSanitizeHtml"` TrustedTypesDefaultPolicyEnabled bool `json:"trustedTypesDefaultPolicyEnabled"` CSPReportOnlyEnabled bool `json:"cspReportOnlyEnabled"` DisableFrontendSandboxForPlugins []string `json:"disableFrontendSandboxForPlugins"` Auth FrontendSettingsAuthDTO `json:"auth"` BuildInfo FrontendSettingsBuildInfoDTO `json:"buildInfo"` LicenseInfo FrontendSettingsLicenseInfoDTO `json:"licenseInfo"` FeatureToggles map[string]bool `json:"featureToggles"` AnonymousEnabled bool `json:"anonymousEnabled"` AnonymousDeviceLimit int64 `json:"anonymousDeviceLimit"` RendererAvailable bool `json:"rendererAvailable"` RendererVersion string `json:"rendererVersion"` RendererDefaultImageWidth int `json:"rendererDefaultImageWidth"` RendererDefaultImageHeight int `json:"rendererDefaultImageHeight"` RendererDefaultImageScale float64 `json:"rendererDefaultImageScale"` SecretsManagerPluginEnabled bool `json:"secretsManagerPluginEnabled"` Http2Enabled bool `json:"http2Enabled"` GrafanaJavascriptAgent setting.GrafanaJavascriptAgent `json:"grafanaJavascriptAgent"` PluginCatalogURL string `json:"pluginCatalogURL"` PluginAdminEnabled bool `json:"pluginAdminEnabled"` PluginAdminExternalManageEnabled bool `json:"pluginAdminExternalManageEnabled"` PluginCatalogHiddenPlugins []string `json:"pluginCatalogHiddenPlugins"` ExpressionsEnabled bool `json:"expressionsEnabled"` AwsAllowedAuthProviders []string `json:"awsAllowedAuthProviders"` AwsAssumeRoleEnabled bool `json:"awsAssumeRoleEnabled"` SupportBundlesEnabled bool `json:"supportBundlesEnabled"` SnapshotEnabled bool `json:"snapshotEnabled"` SecureSocksDSProxyEnabled bool `json:"secureSocksDSProxyEnabled"` Azure FrontendSettingsAzureDTO `json:"azure"` Caching FrontendSettingsCachingDTO `json:"caching"` RecordedQueries FrontendSettingsRecordedQueriesDTO `json:"recordedQueries"` Reporting FrontendSettingsReportingDTO `json:"reporting"` Analytics FrontendSettingsAnalyticsDTO `json:"analytics"` UnifiedAlertingEnabled bool `json:"unifiedAlertingEnabled"` UnifiedAlerting FrontendSettingsUnifiedAlertingDTO `json:"unifiedAlerting"` Oauth map[string]any `json:"oauth"` SamlEnabled bool `json:"samlEnabled"` SamlName string `json:"samlName"` TokenExpirationDayLimit int `json:"tokenExpirationDayLimit"` RootFolderUID string `json:"rootFolderUID"` GeomapDefaultBaseLayerConfig *map[string]any `json:"geomapDefaultBaseLayerConfig,omitempty"` GeomapDisableCustomBaseLayer bool `json:"geomapDisableCustomBaseLayer"` PublicDashboardAccessToken string `json:"publicDashboardAccessToken"` PublicDashboardsEnabled bool `json:"publicDashboardsEnabled"` CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"` DateFormats setting.DateFormats `json:"dateFormats,omitempty"` LoginError string `json:"loginError,omitempty"` // The K8s namespace to use for this user Namespace string `json:"namespace,omitempty"` PluginsCDNBaseURL string `json:"pluginsCDNBaseURL,omitempty"` SqlConnectionLimits FrontendSettingsSqlConnectionLimitsDTO `json:"sqlConnectionLimits"` // Enterprise Licensing *FrontendSettingsLicensingDTO `json:"licensing,omitempty"` Whitelabeling *FrontendSettingsWhitelabelingDTO `json:"whitelabeling,omitempty"` LocalFileSystemAvailable bool `json:"localFileSystemAvailable"` // Experimental Scope settings ListScopesEndpoint string `json:"listScopesEndpoint"` ListDashboardScopesEndpoint string `json:"listDashboardScopesEndpoint"` }
type FrontendSettingsFooterConfigItemDTO ¶
type FrontendSettingsFooterConfigItemDTO struct {}
Enterprise-only
type FrontendSettingsLicenseInfoDTO ¶
type FrontendSettingsLicenseInfoDTO struct { Expiry int64 `json:"expiry"` StateInfo string `json:"stateInfo"` LicenseUrl string `json:"licenseUrl"` Edition string `json:"edition"` EnabledFeatures map[string]bool `json:"enabledFeatures"` // Enterprise-only TrialExpiry *int64 `json:"trialExpiry,omitempty"` AppUrl *string `json:"appUrl,omitempty"` }
type FrontendSettingsLicensingDTO ¶
type FrontendSettingsLicensingDTO struct { Slug *string `json:"slug,omitempty"` LimitBy *string `json:"limitBy,omitempty"` IncludedUsers *int64 `json:"includedUsers,omitempty"` LicenseExpiry *int64 `json:"licenseExpiry,omitempty"` LicenseExpiryWarnDays *int64 `json:"licenseExpiryWarnDays,omitempty"` TokenExpiry *int64 `json:"tokenExpiry,omitempty"` IsTrial *bool `json:"isTrial,omitempty"` TokenExpiryWarnDays *int64 `json:"tokenExpiryWarnDays,omitempty"` UsageBilling *bool `json:"usageBilling,omitempty"` ActiveAdminsAndEditors *int64 `json:"activeAdminsAndEditors,omitempty"` ActiveViewers *int64 `json:"activeViewers,omitempty"` ActiveUsers *int64 `json:"ActiveUsers,omitempty"` }
Enterprise-only
type FrontendSettingsPublicDashboardConfigDTO ¶
type FrontendSettingsPublicDashboardConfigDTO struct { HeaderLogoHide bool `json:"headerLogoHide"` }
Enterprise-only
type FrontendSettingsRecordedQueriesDTO ¶
type FrontendSettingsRecordedQueriesDTO struct {
Enabled bool `json:"enabled"`
}
type FrontendSettingsReportingDTO ¶
type FrontendSettingsReportingDTO struct {
Enabled bool `json:"enabled"`
}
type FrontendSettingsWhitelabelingDTO ¶
type FrontendSettingsWhitelabelingDTO struct { Links []FrontendSettingsFooterConfigItemDTO `json:"links"` LoginTitle string `json:"loginTitle"` AppTitle *string `json:"appTitle,omitempty"` LoginLogo *string `json:"loginLogo,omitempty"` MenuLogo *string `json:"menuLogo,omitempty"` LoginBackground *string `json:"loginBackground,omitempty"` LoginSubtitle *string `json:"loginSubtitle,omitempty"` LoginBoxBackground *string `json:"loginBoxBackground,omitempty"` LoadingLogo *string `json:"loadingLogo,omitempty"` HideEdition *bool `json:"hideEdition,omitempty"` PublicDashboard *FrontendSettingsPublicDashboardConfigDTO `json:"publicDashboard,omitempty"` }
Enterprise-only
type IndexViewData ¶
type IndexViewData struct { User *CurrentUser Settings *FrontendSettingsDTO AppUrl string AppSubUrl string GoogleAnalyticsId string GoogleAnalytics4Id string GoogleAnalytics4SendManualPageViews bool GoogleTagManagerId string BuildVersion string BuildCommit string ThemeType string NewGrafanaVersionExists bool NewGrafanaVersion string AppName string AppNameBodyClass string FavIcon template.URL AppleTouchIcon template.URL AppTitle string LoadingLogo template.URL CSPContent string CSPEnabled bool IsDevelopmentEnv bool // Nonce is a cryptographic identifier for use with Content Security Policy. Nonce string NewsFeedEnabled bool Assets *EntryPointAssets // Includes CDN info }
type InstallPluginCommand ¶
type InstallPluginCommand struct {
Version string `json:"version"`
}
type InviteInfo ¶
type LivePublishCmd ¶
type LivePublishCmd struct { Channel string `json:"channel"` Data json.RawMessage `json:"data,omitempty"` }
type LivePublishResponse ¶
type LivePublishResponse struct { }
type LoginCommand ¶
type MetricRequest ¶
type MetricRequest struct { // From Start time in epoch timestamps in milliseconds or relative using Grafana time units. // required: true // example: now-1h From string `json:"from"` // To End time in epoch timestamps in milliseconds or relative using Grafana time units. // required: true // example: now To string `json:"to"` // queries.refId – Specifies an identifier of the query. Is optional and default to “A”. // queries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId. // queries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100. // queries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000. // required: true // example: [ { "refId": "A", "intervalMs": 86400000, "maxDataPoints": 1092, "datasource":{ "uid":"PD8C576611E62080A" }, "rawSql": "SELECT 1 as valueOne, 2 as valueTwo", "format": "table" } ] Queries []*simplejson.Json `json:"queries"` // required: false Debug bool `json:"debug"` }
swagger:model
func (*MetricRequest) CloneWithQueries ¶
func (mr *MetricRequest) CloneWithQueries(queries []*simplejson.Json) MetricRequest
func (*MetricRequest) GetUniqueDatasourceTypes ¶
func (mr *MetricRequest) GetUniqueDatasourceTypes() []string
type NewApiKeyResult ¶
type NewApiKeyResult struct { // example: 1 ID int64 `json:"id"` // example: grafana Name string `json:"name"` // example: glsa_yscW25imSKJIuav8zF37RZmnbiDvB05G_fcaaf58a Key string `json:"key"` }
swagger:model
type PatchAnnotationsCmd ¶
type PatchPrefsCmd ¶
type PatchPrefsCmd struct { // Enum: light,dark Theme *string `json:"theme,omitempty"` // The numerical :id of a favorited dashboard // Default:0 HomeDashboardID *int64 `json:"homeDashboardId,omitempty"` // Enum: utc,browser Timezone *string `json:"timezone,omitempty"` WeekStart *string `json:"weekStart,omitempty"` Language *string `json:"language,omitempty"` QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"` HomeDashboardUID *string `json:"homeDashboardUID,omitempty"` Cookies []pref.CookieType `json:"cookies,omitempty"` }
swagger:model
type PlaylistDashboard ¶
type PlaylistDashboardsSlice ¶
type PlaylistDashboardsSlice []PlaylistDashboard
func (PlaylistDashboardsSlice) Len ¶
func (slice PlaylistDashboardsSlice) Len() int
func (PlaylistDashboardsSlice) Less ¶
func (slice PlaylistDashboardsSlice) Less(i, j int) bool
func (PlaylistDashboardsSlice) Swap ¶
func (slice PlaylistDashboardsSlice) Swap(i, j int)
type PluginList ¶
type PluginList []PluginListItem
func (PluginList) Len ¶
func (slice PluginList) Len() int
func (PluginList) Less ¶
func (slice PluginList) Less(i, j int) bool
func (PluginList) Swap ¶
func (slice PluginList) Swap(i, j int)
type PluginListItem ¶
type PluginListItem struct { Name string `json:"name"` Type string `json:"type"` Id string `json:"id"` Enabled bool `json:"enabled"` Pinned bool `json:"pinned"` Info plugins.Info `json:"info"` Dependencies plugins.Dependencies `json:"dependencies"` LatestVersion string `json:"latestVersion"` HasUpdate bool `json:"hasUpdate"` Category string `json:"category"` State plugins.ReleaseState `json:"state"` Signature plugins.SignatureStatus `json:"signature"` SignatureType plugins.SignatureType `json:"signatureType"` SignatureOrg string `json:"signatureOrg"` AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"` AngularDetected bool `json:"angularDetected"` IAM *pfs.IAM `json:"iam,omitempty"` APIVersion string `json:"apiVersion"` }
type PluginSetting ¶
type PluginSetting struct { Name string `json:"name"` Type string `json:"type"` Id string `json:"id"` Enabled bool `json:"enabled"` Pinned bool `json:"pinned"` Module string `json:"module"` BaseUrl string `json:"baseUrl"` Info plugins.Info `json:"info"` Includes []*plugins.Includes `json:"includes"` Dependencies plugins.Dependencies `json:"dependencies"` JsonData map[string]any `json:"jsonData"` SecureJsonFields map[string]bool `json:"secureJsonFields"` LatestVersion string `json:"latestVersion"` HasUpdate bool `json:"hasUpdate"` State plugins.ReleaseState `json:"state"` Signature plugins.SignatureStatus `json:"signature"` SignatureType plugins.SignatureType `json:"signatureType"` SignatureOrg string `json:"signatureOrg"` AngularDetected bool `json:"angularDetected"` APIVersion string `json:"apiVersion"` }
type PostAnnotationsCmd ¶
type PostAnnotationsCmd struct { DashboardId int64 `json:"dashboardId"` DashboardUID string `json:"dashboardUID,omitempty"` PanelId int64 `json:"panelId"` Time int64 `json:"time"` TimeEnd int64 `json:"timeEnd,omitempty"` // Optional // required: true Text string `json:"text"` Tags []string `json:"tags"` Data *simplejson.Json `json:"data"` }
type ResetUserPasswordForm ¶
type RestoreDashboardVersionCommand ¶
type RestoreDashboardVersionCommand struct {
Version int `json:"version" binding:"Required"`
}
type SendResetPasswordEmailForm ¶
type SendResetPasswordEmailForm struct {
UserOrEmail string `json:"userOrEmail" binding:"Required"`
}
type SignUpForm ¶
type SignUpForm struct {
Email string `json:"email" binding:"Required"`
}
type SignUpStep2Form ¶
type UpdateAnnotationsCmd ¶
type UpdateDashboardACLCommand ¶
type UpdateDashboardACLCommand struct {
Items []DashboardACLUpdateItem `json:"items"`
}
swagger:model
type UpdateOrgAddressForm ¶
type UpdateOrgForm ¶
type UpdateOrgForm struct {
Name string `json:"name" binding:"Required"`
}
type UpdatePrefsCmd ¶
type UpdatePrefsCmd struct { // Enum: light,dark,system Theme string `json:"theme"` // The numerical :id of a favorited dashboard // Default:0 HomeDashboardID int64 `json:"homeDashboardId"` HomeDashboardUID *string `json:"homeDashboardUID,omitempty"` // Enum: utc,browser Timezone string `json:"timezone"` WeekStart string `json:"weekStart"` QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"` Language string `json:"language"` Cookies []pref.CookieType `json:"cookies,omitempty"` }
swagger:model
type UserLookupDTO ¶
type UserPermissionsMap ¶
type UserToken ¶
type UserToken struct { Id int64 `json:"id"` IsActive bool `json:"isActive"` ClientIp string `json:"clientIp"` Device string `json:"device"` OperatingSystem string `json:"os"` OperatingSystemVersion string `json:"osVersion"` Browser string `json:"browser"` BrowserVersion string `json:"browserVersion"` CreatedAt time.Time `json:"createdAt"` SeenAt time.Time `json:"seenAt"` }
Click to show internal directories.
Click to hide internal directories.