Documentation ¶
Index ¶
- Constants
- func AddApiKey(cmd *m.AddApiKeyCommand) error
- func AddDataSource(cmd *m.AddDataSourceCommand) error
- func AddOrgUser(cmd *m.AddOrgUserCommand) error
- func AddTeamMember(cmd *m.AddTeamMemberCommand) error
- func ChangeUserPassword(cmd *m.ChangeUserPasswordCommand) error
- func CreateAlertNotificationCommand(cmd *m.CreateAlertNotificationCommand) error
- func CreateDashboardSnapshot(cmd *m.CreateDashboardSnapshotCommand) error
- func CreateLoginAttempt(cmd *m.CreateLoginAttemptCommand) error
- func CreateOrg(cmd *m.CreateOrgCommand) error
- func CreatePlaylist(cmd *m.CreatePlaylistCommand) error
- func CreateTeam(cmd *m.CreateTeamCommand) error
- func CreateTempUser(cmd *m.CreateTempUserCommand) error
- func CreateUser(ctx context.Context, cmd *m.CreateUserCommand) error
- func DeleteAlertNotification(cmd *m.DeleteAlertNotificationCommand) error
- func DeleteApiKeyCtx(ctx context.Context, cmd *m.DeleteApiKeyCommand) error
- func DeleteAuthInfo(cmd *m.DeleteAuthInfoCommand) error
- func DeleteDashboard(cmd *m.DeleteDashboardCommand) error
- func DeleteDashboardSnapshot(cmd *m.DeleteDashboardSnapshotCommand) error
- func DeleteDataSourceById(cmd *m.DeleteDataSourceByIdCommand) error
- func DeleteDataSourceByName(cmd *m.DeleteDataSourceByNameCommand) error
- func DeleteExpiredSnapshots(cmd *m.DeleteExpiredSnapshotsCommand) error
- func DeleteExpiredVersions(cmd *m.DeleteExpiredVersionsCommand) error
- func DeleteOldLoginAttempts(cmd *m.DeleteOldLoginAttemptsCommand) error
- func DeleteOrg(cmd *m.DeleteOrgCommand) error
- func DeletePlaylist(cmd *m.DeletePlaylistCommand) error
- func DeleteTeam(cmd *m.DeleteTeamCommand) error
- func DeleteUser(cmd *m.DeleteUserCommand) error
- func GetAdminStats(query *m.GetAdminStatsQuery) error
- func GetAlertById(query *m.GetAlertByIdQuery) error
- func GetAlertNotifications(query *m.GetAlertNotificationsQuery) error
- func GetAlertNotificationsToSend(query *m.GetAlertNotificationsToSendQuery) error
- func GetAlertNotifiersUsageStats(ctx context.Context, query *m.GetAlertNotifierUsageStatsQuery) error
- func GetAlertStatesForDashboard(query *m.GetAlertStatesForDashboardQuery) error
- func GetAlertsByDashboardId2(dashboardId int64, sess *DBSession) ([]*m.Alert, error)
- func GetAllAlertNotifications(query *m.GetAllAlertNotificationsQuery) error
- func GetAllAlertQueryHandler(query *m.GetAllAlertsQuery) error
- func GetAllDataSources(query *m.GetAllDataSourcesQuery) error
- func GetApiKeyById(query *m.GetApiKeyByIdQuery) error
- func GetApiKeyByName(query *m.GetApiKeyByNameQuery) error
- func GetApiKeys(query *m.GetApiKeysQuery) error
- func GetAuthInfo(query *m.GetAuthInfoQuery) error
- func GetDBHealthQuery(query *m.GetDBHealthQuery) error
- func GetDashboard(query *m.GetDashboardQuery) error
- func GetDashboardAclInfoList(query *m.GetDashboardAclInfoListQuery) error
- func GetDashboardPermissionsForUser(query *m.GetDashboardPermissionsForUserQuery) error
- func GetDashboardSlugById(query *m.GetDashboardSlugByIdQuery) error
- func GetDashboardSnapshot(query *m.GetDashboardSnapshotQuery) error
- func GetDashboardTags(query *m.GetDashboardTagsQuery) error
- func GetDashboardUIDById(query *m.GetDashboardRefByIdQuery) error
- func GetDashboardVersion(query *m.GetDashboardVersionQuery) error
- func GetDashboardVersions(query *m.GetDashboardVersionsQuery) error
- func GetDashboards(query *m.GetDashboardsQuery) error
- func GetDashboardsByPluginId(query *m.GetDashboardsByPluginIdQuery) error
- func GetDashboardsBySlug(query *m.GetDashboardsBySlugQuery) error
- func GetDataSourceAccessStats(query *m.GetDataSourceAccessStatsQuery) error
- func GetDataSourceById(query *m.GetDataSourceByIdQuery) error
- func GetDataSourceByName(query *m.GetDataSourceByNameQuery) error
- func GetDataSourceStats(query *m.GetDataSourceStatsQuery) error
- func GetDataSources(query *m.GetDataSourcesQuery) error
- func GetGlobalQuotaByTarget(query *m.GetGlobalQuotaByTargetQuery) error
- func GetOrCreateAlertNotificationState(ctx context.Context, cmd *m.GetOrCreateNotificationStateQuery) error
- func GetOrgById(query *m.GetOrgByIdQuery) error
- func GetOrgByName(query *m.GetOrgByNameQuery) error
- func GetOrgQuotaByTarget(query *m.GetOrgQuotaByTargetQuery) error
- func GetOrgQuotas(query *m.GetOrgQuotasQuery) error
- func GetOrgUsers(query *m.GetOrgUsersQuery) error
- func GetPlaylist(query *m.GetPlaylistByIdQuery) error
- func GetPlaylistItem(query *m.GetPlaylistItemsByIdQuery) error
- func GetPluginSettingById(query *m.GetPluginSettingByIdQuery) error
- func GetPluginSettings(query *m.GetPluginSettingsQuery) error
- func GetPreferences(query *m.GetPreferencesQuery) error
- func GetPreferencesWithDefaults(query *m.GetPreferencesWithDefaultsQuery) error
- func GetProvisionedDashboardDataQuery(cmd *models.GetProvisionedDashboardDataQuery) error
- func GetProvisionedDataByDashboardId(cmd *models.IsDashboardProvisionedQuery) error
- func GetSignedInUser(query *m.GetSignedInUserQuery) error
- func GetSystemStats(query *m.GetSystemStatsQuery) error
- func GetSystemUserCountStats(ctx context.Context, query *m.GetSystemUserCountStatsQuery) error
- func GetTeamById(query *m.GetTeamByIdQuery) error
- func GetTeamMembers(query *m.GetTeamMembersQuery) error
- func GetTeamsByUser(query *m.GetTeamsByUserQuery) error
- func GetTempUserByCode(query *m.GetTempUserByCodeQuery) error
- func GetTempUsersQuery(query *m.GetTempUsersQuery) error
- func GetUserByAuthInfo(query *m.GetUserByAuthInfoQuery) error
- func GetUserByEmail(query *m.GetUserByEmailQuery) error
- func GetUserById(query *m.GetUserByIdQuery) error
- func GetUserByLogin(query *m.GetUserByLoginQuery) error
- func GetUserLoginAttemptCount(query *m.GetUserLoginAttemptCountQuery) error
- func GetUserOrgList(query *m.GetUserOrgListQuery) error
- func GetUserProfile(query *m.GetUserProfileQuery) error
- func GetUserQuotaByTarget(query *m.GetUserQuotaByTargetQuery) error
- func GetUserQuotas(query *m.GetUserQuotasQuery) error
- func GetUserStars(query *m.GetUserStarsQuery) error
- func HandleAlertsQuery(query *m.GetAlertsQuery) error
- func HasEditPermissionInFolders(query *m.HasEditPermissionInFoldersQuery) error
- func InsertSqlTestData(cmd *m.InsertSqlTestDataCommand) error
- func IsStarredByUser(query *m.IsStarredByUserQuery) error
- func IsTestDbMySql() bool
- func IsTestDbPostgres() bool
- func PauseAlert(cmd *m.PauseAlertCommand) error
- func PauseAllAlerts(cmd *m.PauseAllAlertCommand) error
- func RemoveOrgUser(cmd *m.RemoveOrgUserCommand) error
- func RemoveTeamMember(cmd *m.RemoveTeamMemberCommand) error
- func SaveAlerts(cmd *m.SaveAlertsCommand) error
- func SaveDashboard(cmd *m.SaveDashboardCommand) error
- func SavePreferences(cmd *m.SavePreferencesCommand) error
- func SaveProvisionedDashboard(cmd *models.SaveProvisionedDashboardCommand) error
- func SearchDashboardSnapshots(query *m.GetDashboardSnapshotsQuery) error
- func SearchDashboards(query *search.FindPersistedDashboardsQuery) error
- func SearchOrgs(query *m.SearchOrgsQuery) error
- func SearchPlaylists(query *m.GetPlaylistsQuery) error
- func SearchTeams(query *m.SearchTeamsQuery) error
- func SearchUsers(query *m.SearchUsersQuery) error
- func SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *m.SetAlertNotificationStateToCompleteCommand) error
- func SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *m.SetAlertNotificationStateToPendingCommand) error
- func SetAlertState(cmd *m.SetAlertStateCommand) error
- func SetAuthInfo(cmd *m.SetAuthInfoCommand) error
- func SetUserHelpFlag(cmd *m.SetUserHelpFlagCommand) error
- func SetUsingOrg(cmd *m.SetUsingOrgCommand) error
- func StarDashboard(cmd *m.StarDashboardCommand) error
- func UnstarDashboard(cmd *m.UnstarDashboardCommand) error
- func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error
- func UpdateDashboardAcl(cmd *m.UpdateDashboardAclCommand) error
- func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error
- func UpdateOrg(cmd *m.UpdateOrgCommand) error
- func UpdateOrgAddress(cmd *m.UpdateOrgAddressCommand) error
- func UpdateOrgQuota(cmd *m.UpdateOrgQuotaCmd) error
- func UpdateOrgUser(cmd *m.UpdateOrgUserCommand) error
- func UpdatePlaylist(cmd *m.UpdatePlaylistCommand) error
- func UpdatePluginSetting(cmd *m.UpdatePluginSettingCmd) error
- func UpdatePluginSettingVersion(cmd *m.UpdatePluginSettingVersionCmd) error
- func UpdateTeam(cmd *m.UpdateTeamCommand) error
- func UpdateTempUserStatus(cmd *m.UpdateTempUserStatusCommand) error
- func UpdateTempUserWithEmailSent(cmd *m.UpdateTempUserWithEmailSentCommand) error
- func UpdateUser(cmd *m.UpdateUserCommand) error
- func UpdateUserLastSeenAt(cmd *m.UpdateUserLastSeenAtCommand) error
- func UpdateUserPermissions(cmd *m.UpdateUserPermissionsCommand) error
- func UpdateUserQuota(cmd *m.UpdateUserQuotaCmd) error
- func ValidateDashboardBeforeSave(cmd *m.ValidateDashboardBeforeSaveCommand) (err error)
- type DBSession
- type DashboardExtras
- type DashboardSearchProjection
- type DashboardSlugDTO
- type DashboardTag
- type DatabaseConfig
- type SearchBuilder
- func (sb *SearchBuilder) IsStarred() *SearchBuilder
- func (sb *SearchBuilder) ToSql() (string, []interface{})
- func (sb *SearchBuilder) WithDashboardIdsIn(ids []int64) *SearchBuilder
- func (sb *SearchBuilder) WithFolderIds(folderIds []int64) *SearchBuilder
- func (sb *SearchBuilder) WithTags(tags []string) *SearchBuilder
- func (sb *SearchBuilder) WithTitle(title string) *SearchBuilder
- func (sb *SearchBuilder) WithType(queryType string) *SearchBuilder
- type SqlAnnotationRepo
- type SqlBuilder
- type SqlStore
- func (ss *SqlStore) InTransaction(ctx context.Context, fn func(ctx context.Context) error) error
- func (ss *SqlStore) Init() error
- func (ss *SqlStore) NewSession() *DBSession
- func (ss *SqlStore) WithDbSession(ctx context.Context, callback dbTransactionFunc) error
- func (ss *SqlStore) WithTransactionalDbSession(ctx context.Context, callback dbTransactionFunc) error
- type XormLogger
- func (s *XormLogger) Debug(v ...interface{})
- func (s *XormLogger) Debugf(format string, v ...interface{})
- func (s *XormLogger) Error(v ...interface{})
- func (s *XormLogger) Errorf(format string, v ...interface{})
- func (s *XormLogger) Info(v ...interface{})
- func (s *XormLogger) Infof(format string, v ...interface{})
- func (s *XormLogger) IsShowSQL() bool
- func (s *XormLogger) Level() core.LogLevel
- func (s *XormLogger) SetLevel(l core.LogLevel)
- func (s *XormLogger) ShowSQL(show ...bool)
- func (s *XormLogger) Warn(v ...interface{})
- func (s *XormLogger) Warnf(format string, v ...interface{})
Constants ¶
const ContextSessionName = "db-session"
const MAX_VERSIONS_TO_DELETE = 100
Variables ¶
This section is empty.
Functions ¶
func AddApiKey ¶
func AddApiKey(cmd *m.AddApiKeyCommand) error
func AddDataSource ¶
func AddDataSource(cmd *m.AddDataSourceCommand) error
func AddOrgUser ¶
func AddOrgUser(cmd *m.AddOrgUserCommand) error
func AddTeamMember ¶
func AddTeamMember(cmd *m.AddTeamMemberCommand) error
AddTeamMember adds a user to a team
func ChangeUserPassword ¶
func ChangeUserPassword(cmd *m.ChangeUserPasswordCommand) error
func CreateAlertNotificationCommand ¶
func CreateAlertNotificationCommand(cmd *m.CreateAlertNotificationCommand) error
func CreateDashboardSnapshot ¶
func CreateDashboardSnapshot(cmd *m.CreateDashboardSnapshotCommand) error
func CreateLoginAttempt ¶
func CreateLoginAttempt(cmd *m.CreateLoginAttemptCommand) error
func CreateOrg ¶
func CreateOrg(cmd *m.CreateOrgCommand) error
func CreatePlaylist ¶
func CreatePlaylist(cmd *m.CreatePlaylistCommand) error
func CreateTeam ¶
func CreateTeam(cmd *m.CreateTeamCommand) error
func CreateTempUser ¶
func CreateTempUser(cmd *m.CreateTempUserCommand) error
func CreateUser ¶
func CreateUser(ctx context.Context, cmd *m.CreateUserCommand) error
func DeleteAlertNotification ¶
func DeleteAlertNotification(cmd *m.DeleteAlertNotificationCommand) error
func DeleteApiKeyCtx ¶ added in v5.3.0
func DeleteApiKeyCtx(ctx context.Context, cmd *m.DeleteApiKeyCommand) error
func DeleteAuthInfo ¶ added in v5.1.0
func DeleteAuthInfo(cmd *m.DeleteAuthInfoCommand) error
func DeleteDashboard ¶
func DeleteDashboard(cmd *m.DeleteDashboardCommand) error
func DeleteDashboardSnapshot ¶
func DeleteDashboardSnapshot(cmd *m.DeleteDashboardSnapshotCommand) error
func DeleteDataSourceById ¶
func DeleteDataSourceById(cmd *m.DeleteDataSourceByIdCommand) error
func DeleteDataSourceByName ¶
func DeleteDataSourceByName(cmd *m.DeleteDataSourceByNameCommand) error
func DeleteExpiredSnapshots ¶
func DeleteExpiredSnapshots(cmd *m.DeleteExpiredSnapshotsCommand) error
DeleteExpiredSnapshots removes snapshots with old expiry dates. SnapShotRemoveExpired is deprecated and should be removed in the future. Snapshot expiry is decided by the user when they share the snapshot.
func DeleteExpiredVersions ¶
func DeleteExpiredVersions(cmd *m.DeleteExpiredVersionsCommand) error
func DeleteOldLoginAttempts ¶
func DeleteOldLoginAttempts(cmd *m.DeleteOldLoginAttemptsCommand) error
func DeleteOrg ¶
func DeleteOrg(cmd *m.DeleteOrgCommand) error
func DeletePlaylist ¶
func DeletePlaylist(cmd *m.DeletePlaylistCommand) error
func DeleteTeam ¶
func DeleteTeam(cmd *m.DeleteTeamCommand) error
DeleteTeam will delete a team, its member and any permissions connected to the team
func DeleteUser ¶
func DeleteUser(cmd *m.DeleteUserCommand) error
func GetAdminStats ¶
func GetAdminStats(query *m.GetAdminStatsQuery) error
func GetAlertById ¶
func GetAlertById(query *m.GetAlertByIdQuery) error
func GetAlertNotifications ¶
func GetAlertNotifications(query *m.GetAlertNotificationsQuery) error
func GetAlertNotificationsToSend ¶
func GetAlertNotificationsToSend(query *m.GetAlertNotificationsToSendQuery) error
func GetAlertNotifiersUsageStats ¶ added in v5.3.0
func GetAlertNotifiersUsageStats(ctx context.Context, query *m.GetAlertNotifierUsageStatsQuery) error
func GetAlertStatesForDashboard ¶
func GetAlertStatesForDashboard(query *m.GetAlertStatesForDashboardQuery) error
func GetAlertsByDashboardId2 ¶
func GetAllAlertNotifications ¶
func GetAllAlertNotifications(query *m.GetAllAlertNotificationsQuery) error
func GetAllAlertQueryHandler ¶
func GetAllAlertQueryHandler(query *m.GetAllAlertsQuery) error
func GetAllDataSources ¶
func GetAllDataSources(query *m.GetAllDataSourcesQuery) error
func GetApiKeyById ¶
func GetApiKeyById(query *m.GetApiKeyByIdQuery) error
func GetApiKeyByName ¶
func GetApiKeyByName(query *m.GetApiKeyByNameQuery) error
func GetApiKeys ¶
func GetApiKeys(query *m.GetApiKeysQuery) error
func GetAuthInfo ¶ added in v5.1.0
func GetAuthInfo(query *m.GetAuthInfoQuery) error
func GetDBHealthQuery ¶
func GetDBHealthQuery(query *m.GetDBHealthQuery) error
func GetDashboard ¶
func GetDashboard(query *m.GetDashboardQuery) error
func GetDashboardAclInfoList ¶
func GetDashboardAclInfoList(query *m.GetDashboardAclInfoListQuery) error
GetDashboardAclInfoList returns a list of permissions for a dashboard. They can be fetched from three different places. 1) Permissions for the dashboard 2) permissions for its parent folder 3) if no specific permissions have been set for the dashboard or its parent folder then get the default permissions
func GetDashboardPermissionsForUser ¶
func GetDashboardPermissionsForUser(query *m.GetDashboardPermissionsForUserQuery) error
GetDashboardPermissionsForUser returns the maximum permission the specified user has for a dashboard(s) The function takes in a list of dashboard ids and the user id and role
func GetDashboardSlugById ¶
func GetDashboardSlugById(query *m.GetDashboardSlugByIdQuery) error
func GetDashboardSnapshot ¶
func GetDashboardSnapshot(query *m.GetDashboardSnapshotQuery) error
func GetDashboardTags ¶
func GetDashboardTags(query *m.GetDashboardTagsQuery) error
func GetDashboardUIDById ¶
func GetDashboardUIDById(query *m.GetDashboardRefByIdQuery) error
func GetDashboardVersion ¶
func GetDashboardVersion(query *m.GetDashboardVersionQuery) error
GetDashboardVersion gets the dashboard version for the given dashboard ID and version number.
func GetDashboardVersions ¶
func GetDashboardVersions(query *m.GetDashboardVersionsQuery) error
GetDashboardVersions gets all dashboard versions for the given dashboard ID.
func GetDashboards ¶
func GetDashboards(query *m.GetDashboardsQuery) error
func GetDashboardsByPluginId ¶
func GetDashboardsByPluginId(query *m.GetDashboardsByPluginIdQuery) error
func GetDashboardsBySlug ¶
func GetDashboardsBySlug(query *m.GetDashboardsBySlugQuery) error
func GetDataSourceAccessStats ¶ added in v5.2.0
func GetDataSourceAccessStats(query *m.GetDataSourceAccessStatsQuery) error
func GetDataSourceById ¶
func GetDataSourceById(query *m.GetDataSourceByIdQuery) error
func GetDataSourceByName ¶
func GetDataSourceByName(query *m.GetDataSourceByNameQuery) error
func GetDataSourceStats ¶
func GetDataSourceStats(query *m.GetDataSourceStatsQuery) error
func GetDataSources ¶
func GetDataSources(query *m.GetDataSourcesQuery) error
func GetGlobalQuotaByTarget ¶
func GetGlobalQuotaByTarget(query *m.GetGlobalQuotaByTargetQuery) error
func GetOrCreateAlertNotificationState ¶ added in v5.3.0
func GetOrCreateAlertNotificationState(ctx context.Context, cmd *m.GetOrCreateNotificationStateQuery) error
func GetOrgById ¶
func GetOrgById(query *m.GetOrgByIdQuery) error
func GetOrgByName ¶
func GetOrgByName(query *m.GetOrgByNameQuery) error
func GetOrgQuotaByTarget ¶
func GetOrgQuotaByTarget(query *m.GetOrgQuotaByTargetQuery) error
func GetOrgQuotas ¶
func GetOrgQuotas(query *m.GetOrgQuotasQuery) error
func GetOrgUsers ¶
func GetOrgUsers(query *m.GetOrgUsersQuery) error
func GetPlaylist ¶
func GetPlaylist(query *m.GetPlaylistByIdQuery) error
func GetPlaylistItem ¶
func GetPlaylistItem(query *m.GetPlaylistItemsByIdQuery) error
func GetPluginSettingById ¶
func GetPluginSettingById(query *m.GetPluginSettingByIdQuery) error
func GetPluginSettings ¶
func GetPluginSettings(query *m.GetPluginSettingsQuery) error
func GetPreferences ¶
func GetPreferences(query *m.GetPreferencesQuery) error
func GetPreferencesWithDefaults ¶
func GetPreferencesWithDefaults(query *m.GetPreferencesWithDefaultsQuery) error
func GetProvisionedDashboardDataQuery ¶
func GetProvisionedDashboardDataQuery(cmd *models.GetProvisionedDashboardDataQuery) error
func GetProvisionedDataByDashboardId ¶ added in v5.1.0
func GetProvisionedDataByDashboardId(cmd *models.IsDashboardProvisionedQuery) error
func GetSignedInUser ¶
func GetSignedInUser(query *m.GetSignedInUserQuery) error
func GetSystemStats ¶
func GetSystemStats(query *m.GetSystemStatsQuery) error
func GetSystemUserCountStats ¶ added in v5.2.0
func GetSystemUserCountStats(ctx context.Context, query *m.GetSystemUserCountStatsQuery) error
func GetTeamById ¶
func GetTeamById(query *m.GetTeamByIdQuery) error
func GetTeamMembers ¶
func GetTeamMembers(query *m.GetTeamMembersQuery) error
GetTeamMembers return a list of members for the specified team
func GetTeamsByUser ¶
func GetTeamsByUser(query *m.GetTeamsByUserQuery) error
GetTeamsByUser is used by the Guardian when checking a users' permissions
func GetTempUserByCode ¶
func GetTempUserByCode(query *m.GetTempUserByCodeQuery) error
func GetTempUsersQuery ¶
func GetTempUsersQuery(query *m.GetTempUsersQuery) error
func GetUserByAuthInfo ¶ added in v5.1.0
func GetUserByAuthInfo(query *m.GetUserByAuthInfoQuery) error
func GetUserByEmail ¶
func GetUserByEmail(query *m.GetUserByEmailQuery) error
func GetUserById ¶
func GetUserById(query *m.GetUserByIdQuery) error
func GetUserByLogin ¶
func GetUserByLogin(query *m.GetUserByLoginQuery) error
func GetUserLoginAttemptCount ¶
func GetUserLoginAttemptCount(query *m.GetUserLoginAttemptCountQuery) error
func GetUserOrgList ¶
func GetUserOrgList(query *m.GetUserOrgListQuery) error
func GetUserProfile ¶
func GetUserProfile(query *m.GetUserProfileQuery) error
func GetUserQuotaByTarget ¶
func GetUserQuotaByTarget(query *m.GetUserQuotaByTargetQuery) error
func GetUserQuotas ¶
func GetUserQuotas(query *m.GetUserQuotasQuery) error
func GetUserStars ¶
func GetUserStars(query *m.GetUserStarsQuery) error
func HandleAlertsQuery ¶
func HandleAlertsQuery(query *m.GetAlertsQuery) error
func HasEditPermissionInFolders ¶ added in v5.2.0
func HasEditPermissionInFolders(query *m.HasEditPermissionInFoldersQuery) error
func InsertSqlTestData ¶
func InsertSqlTestData(cmd *m.InsertSqlTestDataCommand) error
func IsStarredByUser ¶
func IsStarredByUser(query *m.IsStarredByUserQuery) error
func IsTestDbMySql ¶ added in v5.1.0
func IsTestDbMySql() bool
func IsTestDbPostgres ¶ added in v5.1.0
func IsTestDbPostgres() bool
func PauseAlert ¶
func PauseAlert(cmd *m.PauseAlertCommand) error
func PauseAllAlerts ¶
func PauseAllAlerts(cmd *m.PauseAllAlertCommand) error
func RemoveOrgUser ¶
func RemoveOrgUser(cmd *m.RemoveOrgUserCommand) error
func RemoveTeamMember ¶
func RemoveTeamMember(cmd *m.RemoveTeamMemberCommand) error
RemoveTeamMember removes a member from a team
func SaveAlerts ¶
func SaveAlerts(cmd *m.SaveAlertsCommand) error
func SaveDashboard ¶
func SaveDashboard(cmd *m.SaveDashboardCommand) error
func SavePreferences ¶
func SavePreferences(cmd *m.SavePreferencesCommand) error
func SaveProvisionedDashboard ¶
func SaveProvisionedDashboard(cmd *models.SaveProvisionedDashboardCommand) error
func SearchDashboardSnapshots ¶
func SearchDashboardSnapshots(query *m.GetDashboardSnapshotsQuery) error
SearchDashboardSnapshots returns a list of all snapshots for admins for other roles, it returns snapshots created by the user
func SearchDashboards ¶
func SearchDashboards(query *search.FindPersistedDashboardsQuery) error
func SearchOrgs ¶
func SearchOrgs(query *m.SearchOrgsQuery) error
func SearchPlaylists ¶
func SearchPlaylists(query *m.GetPlaylistsQuery) error
func SearchTeams ¶
func SearchTeams(query *m.SearchTeamsQuery) error
func SearchUsers ¶
func SearchUsers(query *m.SearchUsersQuery) error
func SetAlertNotificationStateToCompleteCommand ¶ added in v5.3.0
func SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *m.SetAlertNotificationStateToCompleteCommand) error
func SetAlertNotificationStateToPendingCommand ¶ added in v5.3.0
func SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *m.SetAlertNotificationStateToPendingCommand) error
func SetAlertState ¶
func SetAlertState(cmd *m.SetAlertStateCommand) error
func SetAuthInfo ¶ added in v5.1.0
func SetAuthInfo(cmd *m.SetAuthInfoCommand) error
func SetUserHelpFlag ¶
func SetUserHelpFlag(cmd *m.SetUserHelpFlagCommand) error
func SetUsingOrg ¶
func SetUsingOrg(cmd *m.SetUsingOrgCommand) error
func StarDashboard ¶
func StarDashboard(cmd *m.StarDashboardCommand) error
func UnstarDashboard ¶
func UnstarDashboard(cmd *m.UnstarDashboardCommand) error
func UpdateAlertNotification ¶
func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error
func UpdateDashboardAcl ¶
func UpdateDashboardAcl(cmd *m.UpdateDashboardAclCommand) error
func UpdateDataSource ¶
func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error
func UpdateOrg ¶
func UpdateOrg(cmd *m.UpdateOrgCommand) error
func UpdateOrgAddress ¶
func UpdateOrgAddress(cmd *m.UpdateOrgAddressCommand) error
func UpdateOrgQuota ¶
func UpdateOrgQuota(cmd *m.UpdateOrgQuotaCmd) error
func UpdateOrgUser ¶
func UpdateOrgUser(cmd *m.UpdateOrgUserCommand) error
func UpdatePlaylist ¶
func UpdatePlaylist(cmd *m.UpdatePlaylistCommand) error
func UpdatePluginSetting ¶
func UpdatePluginSetting(cmd *m.UpdatePluginSettingCmd) error
func UpdatePluginSettingVersion ¶
func UpdatePluginSettingVersion(cmd *m.UpdatePluginSettingVersionCmd) error
func UpdateTeam ¶
func UpdateTeam(cmd *m.UpdateTeamCommand) error
func UpdateTempUserStatus ¶
func UpdateTempUserStatus(cmd *m.UpdateTempUserStatusCommand) error
func UpdateTempUserWithEmailSent ¶
func UpdateTempUserWithEmailSent(cmd *m.UpdateTempUserWithEmailSentCommand) error
func UpdateUser ¶
func UpdateUser(cmd *m.UpdateUserCommand) error
func UpdateUserLastSeenAt ¶
func UpdateUserLastSeenAt(cmd *m.UpdateUserLastSeenAtCommand) error
func UpdateUserPermissions ¶
func UpdateUserPermissions(cmd *m.UpdateUserPermissionsCommand) error
func UpdateUserQuota ¶
func UpdateUserQuota(cmd *m.UpdateUserQuotaCmd) error
func ValidateDashboardBeforeSave ¶
func ValidateDashboardBeforeSave(cmd *m.ValidateDashboardBeforeSaveCommand) (err error)
Types ¶
type DashboardExtras ¶
type DashboardSlugDTO ¶
type DashboardSlugDTO struct {
Slug string
}
type DashboardTag ¶
type DatabaseConfig ¶
type SearchBuilder ¶
type SearchBuilder struct { SqlBuilder // contains filtered or unexported fields }
SearchBuilder is a builder/object mother that builds a dashboard search query
func NewSearchBuilder ¶
func NewSearchBuilder(signedInUser *m.SignedInUser, limit int, permission m.PermissionType) *SearchBuilder
func (*SearchBuilder) IsStarred ¶
func (sb *SearchBuilder) IsStarred() *SearchBuilder
func (*SearchBuilder) ToSql ¶
func (sb *SearchBuilder) ToSql() (string, []interface{})
ToSql builds the sql and returns it as a string, together with the params.
func (*SearchBuilder) WithDashboardIdsIn ¶
func (sb *SearchBuilder) WithDashboardIdsIn(ids []int64) *SearchBuilder
func (*SearchBuilder) WithFolderIds ¶
func (sb *SearchBuilder) WithFolderIds(folderIds []int64) *SearchBuilder
func (*SearchBuilder) WithTags ¶
func (sb *SearchBuilder) WithTags(tags []string) *SearchBuilder
func (*SearchBuilder) WithTitle ¶
func (sb *SearchBuilder) WithTitle(title string) *SearchBuilder
func (*SearchBuilder) WithType ¶
func (sb *SearchBuilder) WithType(queryType string) *SearchBuilder
type SqlAnnotationRepo ¶
type SqlAnnotationRepo struct { }
func (*SqlAnnotationRepo) Delete ¶
func (r *SqlAnnotationRepo) Delete(params *annotations.DeleteParams) error
func (*SqlAnnotationRepo) Find ¶
func (r *SqlAnnotationRepo) Find(query *annotations.ItemQuery) ([]*annotations.ItemDTO, error)
func (*SqlAnnotationRepo) Save ¶
func (r *SqlAnnotationRepo) Save(item *annotations.Item) error
func (*SqlAnnotationRepo) Update ¶
func (r *SqlAnnotationRepo) Update(item *annotations.Item) error
type SqlBuilder ¶
type SqlBuilder struct {
// contains filtered or unexported fields
}
func (*SqlBuilder) AddParams ¶
func (sb *SqlBuilder) AddParams(params ...interface{})
func (*SqlBuilder) GetSqlString ¶
func (sb *SqlBuilder) GetSqlString() string
func (*SqlBuilder) Write ¶
func (sb *SqlBuilder) Write(sql string, params ...interface{})
type SqlStore ¶ added in v5.2.0
type SqlStore struct { Cfg *setting.Cfg `inject:""` Bus bus.Bus `inject:""` // contains filtered or unexported fields }
func InitTestDB ¶
func (*SqlStore) InTransaction ¶ added in v5.3.0
func (*SqlStore) NewSession ¶ added in v5.3.0
NewSession returns a new DBSession
func (*SqlStore) WithDbSession ¶ added in v5.3.0
WithDbSession calls the callback with an session attached to the context.
type XormLogger ¶
type XormLogger struct {
// contains filtered or unexported fields
}
func NewXormLogger ¶
func NewXormLogger(level glog.Lvl, grafanaLog glog.Logger) *XormLogger
func (*XormLogger) Debug ¶
func (s *XormLogger) Debug(v ...interface{})
Debug implement core.ILogger
func (*XormLogger) Debugf ¶
func (s *XormLogger) Debugf(format string, v ...interface{})
Debugf implement core.ILogger
func (*XormLogger) Error ¶
func (s *XormLogger) Error(v ...interface{})
Error implement core.ILogger
func (*XormLogger) Errorf ¶
func (s *XormLogger) Errorf(format string, v ...interface{})
Errorf implement core.ILogger
func (*XormLogger) Infof ¶
func (s *XormLogger) Infof(format string, v ...interface{})
Infof implement core.ILogger
func (*XormLogger) IsShowSQL ¶
func (s *XormLogger) IsShowSQL() bool
IsShowSQL implement core.ILogger
func (*XormLogger) SetLevel ¶
func (s *XormLogger) SetLevel(l core.LogLevel)
SetLevel implement core.ILogger
func (*XormLogger) ShowSQL ¶
func (s *XormLogger) ShowSQL(show ...bool)
ShowSQL implement core.ILogger
func (*XormLogger) Warnf ¶
func (s *XormLogger) Warnf(format string, v ...interface{})
Warnf implement core.ILogger
Source Files ¶
- alert.go
- alert_notification.go
- annotation.go
- apikey.go
- dashboard.go
- dashboard_acl.go
- dashboard_provisioning.go
- dashboard_snapshot.go
- dashboard_version.go
- datasource.go
- health.go
- logger.go
- login_attempt.go
- org.go
- org_users.go
- playlist.go
- plugin_setting.go
- preferences.go
- quota.go
- search_builder.go
- session.go
- sql_test_data.go
- sqlbuilder.go
- sqlstore.go
- star.go
- stats.go
- tables.go
- team.go
- temp_user.go
- tls_mysql.go
- transactions.go
- user.go
- user_auth.go