sqlstore

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 47 Imported by: 587

Documentation

Index

Constants

View Source
const MAX_VERSIONS_TO_DELETE_PER_BATCH = 100
View Source
const MAX_VERSION_DELETION_BATCHES = 50
View Source
const MainOrgName = "Main Org."

MainOrgName is the name of the main organization.

Variables

This section is empty.

Functions

func AddOrUpdateTeamMemberHook

func AddOrUpdateTeamMemberHook(sess *DBSession, userID, orgID, teamID int64, isExternal bool, permission models.PermissionType) error

AddOrUpdateTeamMemberHook is called from team resource permission service it adds user to a team or updates user permissions in a team within the given transaction session

func CreateOrg

func CreateOrg(ctx context.Context, cmd *models.CreateOrgCommand) error

func EnsureTagsExist

func EnsureTagsExist(sess *DBSession, tags []*models.Tag) ([]*models.Tag, error)

Will insert if needed any new key/value pars and return ids

func GetAlertsByDashboardId2

func GetAlertsByDashboardId2(dashboardId int64, sess *DBSession) ([]*models.Alert, error)

func IsAdminOfTeams

func IsAdminOfTeams(ctx context.Context, query *models.IsAdminOfTeamsQuery) error

func IsTestDBMSSQL

func IsTestDBMSSQL() bool

func IsTestDbMySQL

func IsTestDbMySQL() bool

func IsTestDbPostgres

func IsTestDbPostgres() bool

func RemoveTeamMemberHook

func RemoveTeamMemberHook(sess *DBSession, cmd *models.RemoveTeamMemberCommand) error

RemoveTeamMemberHook is called from team resource permission service it removes a member from a team within the given transaction session

func UserDeletions

func UserDeletions() []string

func WrapDatabaseDriverWithHooks

func WrapDatabaseDriverWithHooks(dbType string, tracer tracing.Tracer) string

WrapDatabaseDriverWithHooks creates a fake database driver that executes pre and post functions which we use to gather metrics about database queries. It also registers the metrics.

Types

type AlertNotificationStore

type AlertNotificationStore interface {
	DeleteAlertNotification(ctx context.Context, cmd *models.DeleteAlertNotificationCommand) error
	DeleteAlertNotificationWithUid(ctx context.Context, cmd *models.DeleteAlertNotificationWithUidCommand) error
	GetAlertNotifications(ctx context.Context, query *models.GetAlertNotificationsQuery) error
	GetAlertNotificationUidWithId(ctx context.Context, query *models.GetAlertNotificationUidQuery) error
	GetAlertNotificationsWithUid(ctx context.Context, query *models.GetAlertNotificationsWithUidQuery) error
	GetAllAlertNotifications(ctx context.Context, query *models.GetAllAlertNotificationsQuery) error
	GetAlertNotificationsWithUidToSend(ctx context.Context, query *models.GetAlertNotificationsWithUidToSendQuery) error
	CreateAlertNotificationCommand(ctx context.Context, cmd *models.CreateAlertNotificationCommand) error
	UpdateAlertNotification(ctx context.Context, cmd *models.UpdateAlertNotificationCommand) error
	UpdateAlertNotificationWithUid(ctx context.Context, cmd *models.UpdateAlertNotificationWithUidCommand) error
	SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToCompleteCommand) error
	SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToPendingCommand) error
	GetOrCreateAlertNotificationState(ctx context.Context, cmd *models.GetOrCreateNotificationStateQuery) error
}

type AnnotationCleanupService

type AnnotationCleanupService struct {
	// contains filtered or unexported fields
}

AnnotationCleanupService is responsible for cleaning old annotations.

func (*AnnotationCleanupService) CleanAnnotations

func (acs *AnnotationCleanupService) CleanAnnotations(ctx context.Context, cfg *setting.Cfg) (int64, int64, error)

CleanAnnotations deletes old annotations created by alert rules, API requests and human made in the UI. It subsequently deletes orphaned rows from the annotation_tag table. Cleanup actions are performed in batches so that no query takes too long to complete.

Returns the number of annotation and annotation_tag rows deleted. If an error occurs, it returns the number of rows affected so far.

type ContextSessionKey

type ContextSessionKey struct{}

ContextSessionKey is used as key to save values in `context.Context`

type DBSession

type DBSession struct {
	*xorm.Session
	// contains filtered or unexported fields
}

func (*DBSession) InsertId

func (sess *DBSession) InsertId(bean interface{}) (int64, error)

type DBTransactionFunc

type DBTransactionFunc func(sess *DBSession) error

type DashboardSearchProjection

type DashboardSearchProjection struct {
	ID          int64  `xorm:"id"`
	UID         string `xorm:"uid"`
	Title       string
	Slug        string
	Term        string
	IsFolder    bool
	FolderID    int64  `xorm:"folder_id"`
	FolderUID   string `xorm:"folder_uid"`
	FolderSlug  string
	FolderTitle string
	SortMeta    int64
}

type DashboardSlugDTO

type DashboardSlugDTO struct {
	Slug string
}

type DashboardTag

type DashboardTag struct {
	Id          int64
	DashboardId int64
	Term        string
}

type DatabaseConfig

type DatabaseConfig struct {
	Type                        string
	Host                        string
	Name                        string
	User                        string
	Pwd                         string
	Path                        string
	SslMode                     string
	CaCertPath                  string
	ClientKeyPath               string
	ClientCertPath              string
	ServerCertName              string
	ConnectionString            string
	IsolationLevel              string
	MaxOpenConn                 int
	MaxIdleConn                 int
	ConnMaxLifetime             int
	CacheMode                   string
	UrlQueryParams              map[string][]string
	SkipMigrations              bool
	MigrationLockAttemptTimeout int
}

type ITestDB

type ITestDB interface {
	Helper()
	Fatalf(format string, args ...interface{})
	Logf(format string, args ...interface{})
	Log(args ...interface{})
}

ITestDB is an interface of arguments for testing db

type InitTestDBOpt

type InitTestDBOpt struct {
	// EnsureDefaultOrgAndUser flags whether to ensure that default org and user exist.
	EnsureDefaultOrgAndUser bool
	FeatureFlags            []string
}

InitTestDBOpt contains options for InitTestDB.

type SQLAnnotationRepo

type SQLAnnotationRepo struct {
	// contains filtered or unexported fields
}

func NewSQLAnnotationRepo

func NewSQLAnnotationRepo(sql *SQLStore) SQLAnnotationRepo

func (*SQLAnnotationRepo) Delete

func (*SQLAnnotationRepo) Find

func (*SQLAnnotationRepo) FindTags

func (*SQLAnnotationRepo) Save

func (r *SQLAnnotationRepo) Save(item *annotations.Item) error

func (*SQLAnnotationRepo) Update

func (r *SQLAnnotationRepo) Update(ctx context.Context, 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) GetParams

func (sb *SQLBuilder) GetParams() []interface{}

func (*SQLBuilder) GetSQLString

func (sb *SQLBuilder) GetSQLString() string

func (*SQLBuilder) Write

func (sb *SQLBuilder) Write(sql string, params ...interface{})

func (*SQLBuilder) WriteDashboardPermissionFilter

func (sb *SQLBuilder) WriteDashboardPermissionFilter(user *models.SignedInUser, permission models.PermissionType)

type SQLStore

type SQLStore struct {
	Cfg          *setting.Cfg
	CacheService *localcache.CacheService

	Dialect migrator.Dialect
	// contains filtered or unexported fields
}

func InitTestDB

func InitTestDB(t ITestDB, opts ...InitTestDBOpt) *SQLStore

InitTestDB initializes the test DB.

func InitTestDBWithMigration

func InitTestDBWithMigration(t ITestDB, migration registry.DatabaseMigrator, opts ...InitTestDBOpt) *SQLStore

InitTestDBWithMigration initializes the test DB given custom migrations.

func ProvideService

func ProvideService(cfg *setting.Cfg, cacheService *localcache.CacheService, migrations registry.DatabaseMigrator, tracer tracing.Tracer) (*SQLStore, error)

func ProvideServiceForTests

func ProvideServiceForTests(migrations registry.DatabaseMigrator) (*SQLStore, error)

func (*SQLStore) AddAPIKey

func (ss *SQLStore) AddAPIKey(ctx context.Context, cmd *models.AddApiKeyCommand) error

AddAPIKey adds the API key to the database.

func (*SQLStore) AddDataSource

func (ss *SQLStore) AddDataSource(ctx context.Context, cmd *models.AddDataSourceCommand) error

func (*SQLStore) AddOrgUser

func (ss *SQLStore) AddOrgUser(ctx context.Context, cmd *models.AddOrgUserCommand) error

func (*SQLStore) AddTeamMember

func (ss *SQLStore) AddTeamMember(userID, orgID, teamID int64, isExternal bool, permission models.PermissionType) error

AddTeamMember adds a user to a team

func (*SQLStore) BatchDisableUsers

func (ss *SQLStore) BatchDisableUsers(ctx context.Context, cmd *models.BatchDisableUsersCommand) error

func (*SQLStore) ChangeUserPassword

func (ss *SQLStore) ChangeUserPassword(ctx context.Context, cmd *models.ChangeUserPasswordCommand) error

func (*SQLStore) CreateAlertNotificationCommand

func (ss *SQLStore) CreateAlertNotificationCommand(ctx context.Context, cmd *models.CreateAlertNotificationCommand) error

func (*SQLStore) CreateDashboardSnapshot

func (ss *SQLStore) CreateDashboardSnapshot(ctx context.Context, cmd *models.CreateDashboardSnapshotCommand) error

func (*SQLStore) CreateLoginAttempt

func (ss *SQLStore) CreateLoginAttempt(ctx context.Context, cmd *models.CreateLoginAttemptCommand) error

func (*SQLStore) CreateOrgWithMember

func (ss *SQLStore) CreateOrgWithMember(name string, userID int64) (models.Org, error)

CreateOrgWithMember creates an organization with a certain name and a certain user as member.

func (*SQLStore) CreatePlaylist

func (ss *SQLStore) CreatePlaylist(ctx context.Context, cmd *models.CreatePlaylistCommand) error

func (*SQLStore) CreateTeam

func (ss *SQLStore) CreateTeam(name, email string, orgID int64) (models.Team, error)

func (*SQLStore) CreateTempUser

func (ss *SQLStore) CreateTempUser(ctx context.Context, cmd *models.CreateTempUserCommand) error

func (*SQLStore) CreateUser

func (ss *SQLStore) CreateUser(ctx context.Context, cmd models.CreateUserCommand) (*models.User, error)

func (*SQLStore) DeleteAlertNotification

func (ss *SQLStore) DeleteAlertNotification(ctx context.Context, cmd *models.DeleteAlertNotificationCommand) error

func (*SQLStore) DeleteAlertNotificationWithUid

func (ss *SQLStore) DeleteAlertNotificationWithUid(ctx context.Context, cmd *models.DeleteAlertNotificationWithUidCommand) error

func (*SQLStore) DeleteApiKey

func (ss *SQLStore) DeleteApiKey(ctx context.Context, cmd *models.DeleteApiKeyCommand) error

func (*SQLStore) DeleteDashboardSnapshot

func (ss *SQLStore) DeleteDashboardSnapshot(ctx context.Context, cmd *models.DeleteDashboardSnapshotCommand) error

func (*SQLStore) DeleteDataSource

func (ss *SQLStore) DeleteDataSource(ctx context.Context, cmd *models.DeleteDataSourceCommand) error

DeleteDataSource removes a datasource by org_id as well as either uid (preferred), id, or name and is added to the bus. It also removes permissions related to the datasource.

func (*SQLStore) DeleteExpiredSnapshots

func (ss *SQLStore) DeleteExpiredSnapshots(ctx context.Context, cmd *models.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 (*SQLStore) DeleteExpiredVersions

func (ss *SQLStore) DeleteExpiredVersions(ctx context.Context, cmd *models.DeleteExpiredVersionsCommand) error

func (*SQLStore) DeleteOldLoginAttempts

func (ss *SQLStore) DeleteOldLoginAttempts(ctx context.Context, cmd *models.DeleteOldLoginAttemptsCommand) error

func (*SQLStore) DeleteOrg

func (ss *SQLStore) DeleteOrg(ctx context.Context, cmd *models.DeleteOrgCommand) error

func (*SQLStore) DeletePlaylist

func (ss *SQLStore) DeletePlaylist(ctx context.Context, cmd *models.DeletePlaylistCommand) error

func (*SQLStore) DeleteTeam

func (ss *SQLStore) DeleteTeam(ctx context.Context, cmd *models.DeleteTeamCommand) error

DeleteTeam will delete a team, its member and any permissions connected to the team

func (*SQLStore) DeleteUser

func (ss *SQLStore) DeleteUser(ctx context.Context, cmd *models.DeleteUserCommand) error

func (*SQLStore) DisableUser

func (ss *SQLStore) DisableUser(ctx context.Context, cmd *models.DisableUserCommand) error

func (*SQLStore) ExpireOldUserInvites

func (ss *SQLStore) ExpireOldUserInvites(ctx context.Context, cmd *models.ExpireTempUsersCommand) error

func (*SQLStore) FindDashboards

func (*SQLStore) FindThumbnailCount

func (ss *SQLStore) FindThumbnailCount(ctx context.Context, cmd *models.FindDashboardThumbnailCountCommand) (int64, error)

func (*SQLStore) GetAPIKeys

func (ss *SQLStore) GetAPIKeys(ctx context.Context, query *models.GetApiKeysQuery) error

GetAPIKeys queries the database based on input on GetApiKeysQuery

func (*SQLStore) GetAdminStats

func (ss *SQLStore) GetAdminStats(ctx context.Context, query *models.GetAdminStatsQuery) error

func (*SQLStore) GetAlertById

func (ss *SQLStore) GetAlertById(ctx context.Context, query *models.GetAlertByIdQuery) error

func (*SQLStore) GetAlertNotificationUidWithId

func (ss *SQLStore) GetAlertNotificationUidWithId(ctx context.Context, query *models.GetAlertNotificationUidQuery) error

func (*SQLStore) GetAlertNotifications

func (ss *SQLStore) GetAlertNotifications(ctx context.Context, query *models.GetAlertNotificationsQuery) error

func (*SQLStore) GetAlertNotificationsWithUid

func (ss *SQLStore) GetAlertNotificationsWithUid(ctx context.Context, query *models.GetAlertNotificationsWithUidQuery) error

func (*SQLStore) GetAlertNotificationsWithUidToSend

func (ss *SQLStore) GetAlertNotificationsWithUidToSend(ctx context.Context, query *models.GetAlertNotificationsWithUidToSendQuery) error

func (*SQLStore) GetAlertNotifiersUsageStats

func (ss *SQLStore) GetAlertNotifiersUsageStats(ctx context.Context, query *models.GetAlertNotifierUsageStatsQuery) error

func (*SQLStore) GetAlertStatesForDashboard

func (ss *SQLStore) GetAlertStatesForDashboard(ctx context.Context, query *models.GetAlertStatesForDashboardQuery) error

func (*SQLStore) GetAllAlertNotifications

func (ss *SQLStore) GetAllAlertNotifications(ctx context.Context, query *models.GetAllAlertNotificationsQuery) error

func (*SQLStore) GetAllAlertQueryHandler

func (ss *SQLStore) GetAllAlertQueryHandler(ctx context.Context, query *models.GetAllAlertsQuery) error

func (*SQLStore) GetAllOrgsAPIKeys

func (ss *SQLStore) GetAllOrgsAPIKeys(ctx context.Context) []*models.ApiKey

GetAllOrgsAPIKeys queries the database for valid non SA APIKeys across all orgs

func (*SQLStore) GetApiKeyById

func (ss *SQLStore) GetApiKeyById(ctx context.Context, query *models.GetApiKeyByIdQuery) error

func (*SQLStore) GetApiKeyByName

func (ss *SQLStore) GetApiKeyByName(ctx context.Context, query *models.GetApiKeyByNameQuery) error

func (*SQLStore) GetDBHealthQuery

func (ss *SQLStore) GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error

GetDBHealthQuery executes a query to check the availability of the database.

func (*SQLStore) GetDashboard

func (ss *SQLStore) GetDashboard(ctx context.Context, query *models.GetDashboardQuery) error

func (*SQLStore) GetDashboardAclInfoList

func (ss *SQLStore) GetDashboardAclInfoList(ctx context.Context, query *models.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 (*SQLStore) GetDashboardPermissionsForUser

func (ss *SQLStore) GetDashboardPermissionsForUser(ctx context.Context, query *models.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 (*SQLStore) GetDashboardSlugById

func (ss *SQLStore) GetDashboardSlugById(ctx context.Context, query *models.GetDashboardSlugByIdQuery) error

func (*SQLStore) GetDashboardSnapshot

func (ss *SQLStore) GetDashboardSnapshot(query *models.GetDashboardSnapshotQuery) error

func (*SQLStore) GetDashboardTags

func (ss *SQLStore) GetDashboardTags(ctx context.Context, query *models.GetDashboardTagsQuery) error

func (*SQLStore) GetDashboardUIDById

func (ss *SQLStore) GetDashboardUIDById(ctx context.Context, query *models.GetDashboardRefByIdQuery) error

func (*SQLStore) GetDashboardVersion

func (ss *SQLStore) GetDashboardVersion(ctx context.Context, query *models.GetDashboardVersionQuery) error

GetDashboardVersion gets the dashboard version for the given dashboard ID and version number.

func (*SQLStore) GetDashboardVersions

func (ss *SQLStore) GetDashboardVersions(ctx context.Context, query *models.GetDashboardVersionsQuery) error

GetDashboardVersions gets all dashboard versions for the given dashboard ID.

func (*SQLStore) GetDashboards

func (ss *SQLStore) GetDashboards(ctx context.Context, query *models.GetDashboardsQuery) error

func (*SQLStore) GetDataSource

func (ss *SQLStore) GetDataSource(ctx context.Context, query *models.GetDataSourceQuery) error

GetDataSource adds a datasource to the query model by querying by org_id as well as either uid (preferred), id, or name and is added to the bus.

func (*SQLStore) GetDataSourceAccessStats

func (ss *SQLStore) GetDataSourceAccessStats(ctx context.Context, query *models.GetDataSourceAccessStatsQuery) error

func (*SQLStore) GetDataSourceStats

func (ss *SQLStore) GetDataSourceStats(ctx context.Context, query *models.GetDataSourceStatsQuery) error

func (*SQLStore) GetDataSources

func (ss *SQLStore) GetDataSources(ctx context.Context, query *models.GetDataSourcesQuery) error

func (*SQLStore) GetDataSourcesByType

func (ss *SQLStore) GetDataSourcesByType(ctx context.Context, query *models.GetDataSourcesByTypeQuery) error

GetDataSourcesByType returns all datasources for a given type or an error if the specified type is an empty string

func (*SQLStore) GetDefaultDataSource

func (ss *SQLStore) GetDefaultDataSource(ctx context.Context, query *models.GetDefaultDataSourceQuery) error

GetDefaultDataSource is used to get the default datasource of organization

func (*SQLStore) GetDialect

func (ss *SQLStore) GetDialect() migrator.Dialect

GetDialect return the dialect

func (*SQLStore) GetGlobalQuotaByTarget

func (ss *SQLStore) GetGlobalQuotaByTarget(ctx context.Context, query *models.GetGlobalQuotaByTargetQuery) error

func (*SQLStore) GetOrCreateAlertNotificationState

func (ss *SQLStore) GetOrCreateAlertNotificationState(ctx context.Context, cmd *models.GetOrCreateNotificationStateQuery) error

func (*SQLStore) GetOrgById

func (ss *SQLStore) GetOrgById(ctx context.Context, query *models.GetOrgByIdQuery) error

func (*SQLStore) GetOrgByName

func (ss *SQLStore) GetOrgByName(name string) (*models.Org, error)

GetOrgByName gets an organization by name.

func (*SQLStore) GetOrgByNameHandler

func (ss *SQLStore) GetOrgByNameHandler(ctx context.Context, query *models.GetOrgByNameQuery) error

func (*SQLStore) GetOrgQuotaByTarget

func (ss *SQLStore) GetOrgQuotaByTarget(ctx context.Context, query *models.GetOrgQuotaByTargetQuery) error

func (*SQLStore) GetOrgQuotas

func (ss *SQLStore) GetOrgQuotas(ctx context.Context, query *models.GetOrgQuotasQuery) error

func (*SQLStore) GetOrgUsers

func (ss *SQLStore) GetOrgUsers(ctx context.Context, query *models.GetOrgUsersQuery) error

func (*SQLStore) GetPlaylist

func (ss *SQLStore) GetPlaylist(ctx context.Context, query *models.GetPlaylistByIdQuery) error

func (*SQLStore) GetPlaylistItem

func (ss *SQLStore) GetPlaylistItem(ctx context.Context, query *models.GetPlaylistItemsByIdQuery) error

func (*SQLStore) GetPluginSettingById

func (ss *SQLStore) GetPluginSettingById(ctx context.Context, query *models.GetPluginSettingByIdQuery) error

func (*SQLStore) GetPluginSettings

func (ss *SQLStore) GetPluginSettings(ctx context.Context, orgID int64) ([]*models.PluginSetting, error)

func (*SQLStore) GetPreferences

func (ss *SQLStore) GetPreferences(ctx context.Context, query *models.GetPreferencesQuery) error

func (*SQLStore) GetPreferencesWithDefaults

func (ss *SQLStore) GetPreferencesWithDefaults(ctx context.Context, query *models.GetPreferencesWithDefaultsQuery) error

func (*SQLStore) GetSignedInUser

func (ss *SQLStore) GetSignedInUser(ctx context.Context, query *models.GetSignedInUserQuery) error

func (*SQLStore) GetSignedInUserWithCacheCtx

func (ss *SQLStore) GetSignedInUserWithCacheCtx(ctx context.Context, query *models.GetSignedInUserQuery) error

func (*SQLStore) GetSystemStats

func (ss *SQLStore) GetSystemStats(ctx context.Context, query *models.GetSystemStatsQuery) error

func (*SQLStore) GetSystemUserCountStats

func (ss *SQLStore) GetSystemUserCountStats(ctx context.Context, query *models.GetSystemUserCountStatsQuery) error

func (*SQLStore) GetTeamById

func (ss *SQLStore) GetTeamById(ctx context.Context, query *models.GetTeamByIdQuery) error

func (*SQLStore) GetTeamMembers

func (ss *SQLStore) GetTeamMembers(ctx context.Context, query *models.GetTeamMembersQuery) error

GetTeamMembers return a list of members for the specified team filtered based on the user's permissions

func (*SQLStore) GetTeamsByUser

func (ss *SQLStore) GetTeamsByUser(ctx context.Context, query *models.GetTeamsByUserQuery) error

GetTeamsByUser is used by the Guardian when checking a users' permissions

func (*SQLStore) GetTempUserByCode

func (ss *SQLStore) GetTempUserByCode(ctx context.Context, query *models.GetTempUserByCodeQuery) error

func (*SQLStore) GetTempUsersQuery

func (ss *SQLStore) GetTempUsersQuery(ctx context.Context, query *models.GetTempUsersQuery) error

func (*SQLStore) GetThumbnail

func (*SQLStore) GetUserByEmail

func (ss *SQLStore) GetUserByEmail(ctx context.Context, query *models.GetUserByEmailQuery) error

func (*SQLStore) GetUserById

func (ss *SQLStore) GetUserById(ctx context.Context, query *models.GetUserByIdQuery) error

func (*SQLStore) GetUserByLogin

func (ss *SQLStore) GetUserByLogin(ctx context.Context, query *models.GetUserByLoginQuery) error

func (*SQLStore) GetUserLoginAttemptCount

func (ss *SQLStore) GetUserLoginAttemptCount(ctx context.Context, query *models.GetUserLoginAttemptCountQuery) error

func (*SQLStore) GetUserOrgList

func (ss *SQLStore) GetUserOrgList(ctx context.Context, query *models.GetUserOrgListQuery) error

func (*SQLStore) GetUserProfile

func (ss *SQLStore) GetUserProfile(ctx context.Context, query *models.GetUserProfileQuery) error

func (*SQLStore) GetUserQuotaByTarget

func (ss *SQLStore) GetUserQuotaByTarget(ctx context.Context, query *models.GetUserQuotaByTargetQuery) error

func (*SQLStore) GetUserQuotas

func (ss *SQLStore) GetUserQuotas(ctx context.Context, query *models.GetUserQuotasQuery) error

func (*SQLStore) GetUserStars

func (ss *SQLStore) GetUserStars(ctx context.Context, query *models.GetUserStarsQuery) error

func (*SQLStore) GetUserTeamMemberships

func (ss *SQLStore) GetUserTeamMemberships(ctx context.Context, orgID, userID int64, external bool) ([]*models.TeamMemberDTO, error)

GetUserTeamMemberships return a list of memberships to teams granted to a user If external is specified, only memberships provided by an external auth provider will be listed This function doesn't perform any accesscontrol filtering.

func (*SQLStore) HandleAlertsQuery

func (ss *SQLStore) HandleAlertsQuery(ctx context.Context, query *models.GetAlertsQuery) error

func (*SQLStore) HasAdminPermissionInDashboardsOrFolders

func (ss *SQLStore) HasAdminPermissionInDashboardsOrFolders(ctx context.Context, query *models.HasAdminPermissionInDashboardsOrFoldersQuery) error

func (*SQLStore) HasEditPermissionInFolders

func (ss *SQLStore) HasEditPermissionInFolders(ctx context.Context, query *models.HasEditPermissionInFoldersQuery) error

HasEditPermissionInFolders validates that an user have access to a certain folder

func (*SQLStore) InTransaction

func (ss *SQLStore) InTransaction(ctx context.Context, fn func(ctx context.Context) error) error

func (*SQLStore) IsStarredByUserCtx

func (ss *SQLStore) IsStarredByUserCtx(ctx context.Context, query *models.IsStarredByUserQuery) error

func (*SQLStore) IsTeamMember

func (ss *SQLStore) IsTeamMember(orgId int64, teamId int64, userId int64) (bool, error)

func (*SQLStore) Migrate

func (ss *SQLStore) Migrate(isDatabaseLockingEnabled bool) error

Migrate performs database migrations. Has to be done in a second phase (after initialization), since other services can register migrations during the initialization phase.

func (*SQLStore) NewSession

func (ss *SQLStore) NewSession(ctx context.Context) *DBSession

NewSession returns a new DBSession

func (*SQLStore) PatchPreferences

func (ss *SQLStore) PatchPreferences(ctx context.Context, cmd *models.PatchPreferencesCommand) error

func (*SQLStore) PauseAlert

func (ss *SQLStore) PauseAlert(ctx context.Context, cmd *models.PauseAlertCommand) error

func (*SQLStore) PauseAllAlerts

func (ss *SQLStore) PauseAllAlerts(ctx context.Context, cmd *models.PauseAllAlertCommand) error

func (*SQLStore) Quote

func (ss *SQLStore) Quote(value string) string

Quote quotes the value in the used SQL dialect

func (*SQLStore) RemoveOrgUser

func (ss *SQLStore) RemoveOrgUser(ctx context.Context, cmd *models.RemoveOrgUserCommand) error

func (*SQLStore) RemoveTeamMember

func (ss *SQLStore) RemoveTeamMember(ctx context.Context, cmd *models.RemoveTeamMemberCommand) error

RemoveTeamMember removes a member from a team

func (*SQLStore) Reset

func (ss *SQLStore) Reset() error

Reset resets database state. If default org and user creation is enabled, it will be ensured they exist in the database.

func (*SQLStore) SaveAlerts

func (ss *SQLStore) SaveAlerts(ctx context.Context, dashID int64, alerts []*models.Alert) error

func (*SQLStore) SavePreferences

func (ss *SQLStore) SavePreferences(ctx context.Context, cmd *models.SavePreferencesCommand) error

func (*SQLStore) SaveThumbnail

func (*SQLStore) SearchDashboardSnapshots

func (ss *SQLStore) SearchDashboardSnapshots(query *models.GetDashboardSnapshotsQuery) error

SearchDashboardSnapshots returns a list of all snapshots for admins for other roles, it returns snapshots created by the user

func (*SQLStore) SearchDashboards

func (ss *SQLStore) SearchDashboards(ctx context.Context, query *models.FindPersistedDashboardsQuery) error

func (*SQLStore) SearchOrgUsers

func (ss *SQLStore) SearchOrgUsers(ctx context.Context, query *models.SearchOrgUsersQuery) error

func (*SQLStore) SearchOrgs

func (ss *SQLStore) SearchOrgs(ctx context.Context, query *models.SearchOrgsQuery) error

func (*SQLStore) SearchPlaylists

func (ss *SQLStore) SearchPlaylists(ctx context.Context, query *models.GetPlaylistsQuery) error

func (*SQLStore) SearchTeams

func (ss *SQLStore) SearchTeams(ctx context.Context, query *models.SearchTeamsQuery) error

func (*SQLStore) SearchUsers

func (ss *SQLStore) SearchUsers(ctx context.Context, query *models.SearchUsersQuery) error

func (*SQLStore) SetAlertNotificationStateToCompleteCommand

func (ss *SQLStore) SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToCompleteCommand) error

func (*SQLStore) SetAlertNotificationStateToPendingCommand

func (ss *SQLStore) SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToPendingCommand) error

func (*SQLStore) SetAlertState

func (ss *SQLStore) SetAlertState(ctx context.Context, cmd *models.SetAlertStateCommand) error

func (*SQLStore) SetUserHelpFlag

func (ss *SQLStore) SetUserHelpFlag(ctx context.Context, cmd *models.SetUserHelpFlagCommand) error

func (*SQLStore) SetUsingOrg

func (ss *SQLStore) SetUsingOrg(ctx context.Context, cmd *models.SetUsingOrgCommand) error

func (*SQLStore) StarDashboard

func (ss *SQLStore) StarDashboard(ctx context.Context, cmd *models.StarDashboardCommand) error

func (*SQLStore) Sync

func (ss *SQLStore) Sync() error

Sync syncs changes to the database.

func (*SQLStore) UnstarDashboard

func (ss *SQLStore) UnstarDashboard(ctx context.Context, cmd *models.UnstarDashboardCommand) error

func (*SQLStore) UpdateAlertNotification

func (ss *SQLStore) UpdateAlertNotification(ctx context.Context, cmd *models.UpdateAlertNotificationCommand) error

func (*SQLStore) UpdateAlertNotificationWithUid

func (ss *SQLStore) UpdateAlertNotificationWithUid(ctx context.Context, cmd *models.UpdateAlertNotificationWithUidCommand) error

func (*SQLStore) UpdateDataSource

func (ss *SQLStore) UpdateDataSource(ctx context.Context, cmd *models.UpdateDataSourceCommand) error

func (*SQLStore) UpdateOrg

func (ss *SQLStore) UpdateOrg(ctx context.Context, cmd *models.UpdateOrgCommand) error

func (*SQLStore) UpdateOrgAddress

func (ss *SQLStore) UpdateOrgAddress(ctx context.Context, cmd *models.UpdateOrgAddressCommand) error

func (*SQLStore) UpdateOrgQuota

func (ss *SQLStore) UpdateOrgQuota(ctx context.Context, cmd *models.UpdateOrgQuotaCmd) error

func (*SQLStore) UpdateOrgUser

func (ss *SQLStore) UpdateOrgUser(ctx context.Context, cmd *models.UpdateOrgUserCommand) error

func (*SQLStore) UpdatePlaylist

func (ss *SQLStore) UpdatePlaylist(ctx context.Context, cmd *models.UpdatePlaylistCommand) error

func (*SQLStore) UpdatePluginSetting

func (ss *SQLStore) UpdatePluginSetting(ctx context.Context, cmd *models.UpdatePluginSettingCmd) error

func (*SQLStore) UpdatePluginSettingVersion

func (ss *SQLStore) UpdatePluginSettingVersion(ctx context.Context, cmd *models.UpdatePluginSettingVersionCmd) error

func (*SQLStore) UpdateTeam

func (ss *SQLStore) UpdateTeam(ctx context.Context, cmd *models.UpdateTeamCommand) error

func (*SQLStore) UpdateTeamMember

func (ss *SQLStore) UpdateTeamMember(ctx context.Context, cmd *models.UpdateTeamMemberCommand) error

UpdateTeamMember updates a team member

func (*SQLStore) UpdateTempUserStatus

func (ss *SQLStore) UpdateTempUserStatus(ctx context.Context, cmd *models.UpdateTempUserStatusCommand) error

func (*SQLStore) UpdateTempUserWithEmailSent

func (ss *SQLStore) UpdateTempUserWithEmailSent(ctx context.Context, cmd *models.UpdateTempUserWithEmailSentCommand) error

func (*SQLStore) UpdateThumbnailState

func (ss *SQLStore) UpdateThumbnailState(ctx context.Context, cmd *models.UpdateThumbnailStateCommand) error

func (*SQLStore) UpdateUser

func (ss *SQLStore) UpdateUser(ctx context.Context, cmd *models.UpdateUserCommand) error

func (*SQLStore) UpdateUserLastSeenAt

func (ss *SQLStore) UpdateUserLastSeenAt(ctx context.Context, cmd *models.UpdateUserLastSeenAtCommand) error

func (*SQLStore) UpdateUserPermissions

func (ss *SQLStore) UpdateUserPermissions(userID int64, isAdmin bool) error

UpdateUserPermissions sets the user Server Admin flag

func (*SQLStore) UpdateUserQuota

func (ss *SQLStore) UpdateUserQuota(ctx context.Context, cmd *models.UpdateUserQuotaCmd) error

func (*SQLStore) WithDbSession

func (ss *SQLStore) WithDbSession(ctx context.Context, callback DBTransactionFunc) error

WithDbSession calls the callback with a session.

func (*SQLStore) WithTransactionalDbSession

func (ss *SQLStore) WithTransactionalDbSession(ctx context.Context, callback DBTransactionFunc) error

WithTransactionalDbSession calls the callback with a session within a transaction.

type Store

type Store interface {
	GetAdminStats(ctx context.Context, query *models.GetAdminStatsQuery) error
	GetAlertNotifiersUsageStats(ctx context.Context, query *models.GetAlertNotifierUsageStatsQuery) error
	GetDataSourceStats(ctx context.Context, query *models.GetDataSourceStatsQuery) error
	GetDataSourceAccessStats(ctx context.Context, query *models.GetDataSourceAccessStatsQuery) error
	GetDialect() migrator.Dialect
	GetSystemStats(ctx context.Context, query *models.GetSystemStatsQuery) error
	DeleteExpiredSnapshots(ctx context.Context, cmd *models.DeleteExpiredSnapshotsCommand) error
	CreateDashboardSnapshot(ctx context.Context, cmd *models.CreateDashboardSnapshotCommand) error
	DeleteDashboardSnapshot(ctx context.Context, cmd *models.DeleteDashboardSnapshotCommand) error
	GetDashboardSnapshot(query *models.GetDashboardSnapshotQuery) error
	HasEditPermissionInFolders(ctx context.Context, query *models.HasEditPermissionInFoldersQuery) error
	SearchDashboardSnapshots(query *models.GetDashboardSnapshotsQuery) error
	GetOrgByName(name string) (*models.Org, error)
	CreateOrgWithMember(name string, userID int64) (models.Org, error)
	UpdateOrg(ctx context.Context, cmd *models.UpdateOrgCommand) error
	UpdateOrgAddress(ctx context.Context, cmd *models.UpdateOrgAddressCommand) error
	DeleteOrg(ctx context.Context, cmd *models.DeleteOrgCommand) error
	GetOrgById(context.Context, *models.GetOrgByIdQuery) error
	GetOrgByNameHandler(ctx context.Context, query *models.GetOrgByNameQuery) error
	CreateLoginAttempt(ctx context.Context, cmd *models.CreateLoginAttemptCommand) error
	GetUserLoginAttemptCount(ctx context.Context, query *models.GetUserLoginAttemptCountQuery) error
	DeleteOldLoginAttempts(ctx context.Context, cmd *models.DeleteOldLoginAttemptsCommand) error
	CreateUser(ctx context.Context, cmd models.CreateUserCommand) (*models.User, error)
	GetUserById(ctx context.Context, query *models.GetUserByIdQuery) error
	GetUserByLogin(ctx context.Context, query *models.GetUserByLoginQuery) error
	GetUserByEmail(ctx context.Context, query *models.GetUserByEmailQuery) error
	UpdateUser(ctx context.Context, cmd *models.UpdateUserCommand) error
	ChangeUserPassword(ctx context.Context, cmd *models.ChangeUserPasswordCommand) error
	UpdateUserLastSeenAt(ctx context.Context, cmd *models.UpdateUserLastSeenAtCommand) error
	SetUsingOrg(ctx context.Context, cmd *models.SetUsingOrgCommand) error
	GetUserProfile(ctx context.Context, query *models.GetUserProfileQuery) error
	GetUserOrgList(ctx context.Context, query *models.GetUserOrgListQuery) error
	GetSignedInUserWithCacheCtx(ctx context.Context, query *models.GetSignedInUserQuery) error
	GetSignedInUser(ctx context.Context, query *models.GetSignedInUserQuery) error
	SearchUsers(ctx context.Context, query *models.SearchUsersQuery) error
	DisableUser(ctx context.Context, cmd *models.DisableUserCommand) error
	BatchDisableUsers(ctx context.Context, cmd *models.BatchDisableUsersCommand) error
	DeleteUser(ctx context.Context, cmd *models.DeleteUserCommand) error
	UpdateUserPermissions(userID int64, isAdmin bool) error
	SetUserHelpFlag(ctx context.Context, cmd *models.SetUserHelpFlagCommand) error
	CreateTeam(name, email string, orgID int64) (models.Team, error)
	UpdateTeam(ctx context.Context, cmd *models.UpdateTeamCommand) error
	DeleteTeam(ctx context.Context, cmd *models.DeleteTeamCommand) error
	SearchTeams(ctx context.Context, query *models.SearchTeamsQuery) error
	GetTeamById(ctx context.Context, query *models.GetTeamByIdQuery) error
	GetTeamsByUser(ctx context.Context, query *models.GetTeamsByUserQuery) error
	AddTeamMember(userID, orgID, teamID int64, isExternal bool, permission models.PermissionType) error
	UpdateTeamMember(ctx context.Context, cmd *models.UpdateTeamMemberCommand) error
	IsTeamMember(orgId int64, teamId int64, userId int64) (bool, error)
	RemoveTeamMember(ctx context.Context, cmd *models.RemoveTeamMemberCommand) error
	GetUserTeamMemberships(ctx context.Context, orgID, userID int64, external bool) ([]*models.TeamMemberDTO, error)
	GetTeamMembers(ctx context.Context, query *models.GetTeamMembersQuery) error
	NewSession(ctx context.Context) *DBSession
	WithDbSession(ctx context.Context, callback DBTransactionFunc) error
	GetPreferencesWithDefaults(ctx context.Context, query *models.GetPreferencesWithDefaultsQuery) error
	GetPreferences(ctx context.Context, query *models.GetPreferencesQuery) error
	SavePreferences(ctx context.Context, cmd *models.SavePreferencesCommand) error
	PatchPreferences(ctx context.Context, cmd *models.PatchPreferencesCommand) error
	GetPluginSettings(ctx context.Context, orgID int64) ([]*models.PluginSetting, error)
	GetPluginSettingById(ctx context.Context, query *models.GetPluginSettingByIdQuery) error
	UpdatePluginSetting(ctx context.Context, cmd *models.UpdatePluginSettingCmd) error
	UpdatePluginSettingVersion(ctx context.Context, cmd *models.UpdatePluginSettingVersionCmd) error
	IsStarredByUserCtx(ctx context.Context, query *models.IsStarredByUserQuery) error
	StarDashboard(ctx context.Context, cmd *models.StarDashboardCommand) error
	UnstarDashboard(ctx context.Context, cmd *models.UnstarDashboardCommand) error
	GetUserStars(ctx context.Context, query *models.GetUserStarsQuery) error
	GetOrgQuotaByTarget(ctx context.Context, query *models.GetOrgQuotaByTargetQuery) error
	GetOrgQuotas(ctx context.Context, query *models.GetOrgQuotasQuery) error
	UpdateOrgQuota(ctx context.Context, cmd *models.UpdateOrgQuotaCmd) error
	GetUserQuotaByTarget(ctx context.Context, query *models.GetUserQuotaByTargetQuery) error
	GetUserQuotas(ctx context.Context, query *models.GetUserQuotasQuery) error
	UpdateUserQuota(ctx context.Context, cmd *models.UpdateUserQuotaCmd) error
	GetGlobalQuotaByTarget(ctx context.Context, query *models.GetGlobalQuotaByTargetQuery) error
	WithTransactionalDbSession(ctx context.Context, callback DBTransactionFunc) error
	InTransaction(ctx context.Context, fn func(ctx context.Context) error) error
	GetDashboardVersion(ctx context.Context, query *models.GetDashboardVersionQuery) error
	GetDashboardVersions(ctx context.Context, query *models.GetDashboardVersionsQuery) error
	DeleteExpiredVersions(ctx context.Context, cmd *models.DeleteExpiredVersionsCommand) error
	GetDashboardAclInfoList(ctx context.Context, query *models.GetDashboardAclInfoListQuery) error
	CreatePlaylist(ctx context.Context, cmd *models.CreatePlaylistCommand) error
	UpdatePlaylist(ctx context.Context, cmd *models.UpdatePlaylistCommand) error
	GetPlaylist(ctx context.Context, query *models.GetPlaylistByIdQuery) error
	DeletePlaylist(ctx context.Context, cmd *models.DeletePlaylistCommand) error
	SearchPlaylists(ctx context.Context, query *models.GetPlaylistsQuery) error
	GetPlaylistItem(ctx context.Context, query *models.GetPlaylistItemsByIdQuery) error
	GetAlertById(ctx context.Context, query *models.GetAlertByIdQuery) error
	GetAllAlertQueryHandler(ctx context.Context, query *models.GetAllAlertsQuery) error
	HandleAlertsQuery(ctx context.Context, query *models.GetAlertsQuery) error
	SetAlertState(ctx context.Context, cmd *models.SetAlertStateCommand) error
	PauseAlert(ctx context.Context, cmd *models.PauseAlertCommand) error
	PauseAllAlerts(ctx context.Context, cmd *models.PauseAllAlertCommand) error
	GetAlertStatesForDashboard(ctx context.Context, query *models.GetAlertStatesForDashboardQuery) error
	AddOrgUser(ctx context.Context, cmd *models.AddOrgUserCommand) error
	UpdateOrgUser(ctx context.Context, cmd *models.UpdateOrgUserCommand) error
	GetOrgUsers(ctx context.Context, query *models.GetOrgUsersQuery) error
	SearchOrgUsers(ctx context.Context, query *models.SearchOrgUsersQuery) error
	RemoveOrgUser(ctx context.Context, cmd *models.RemoveOrgUserCommand) error
	GetDashboard(ctx context.Context, query *models.GetDashboardQuery) error
	GetDashboardTags(ctx context.Context, query *models.GetDashboardTagsQuery) error
	SearchDashboards(ctx context.Context, query *models.FindPersistedDashboardsQuery) error
	GetDashboards(ctx context.Context, query *models.GetDashboardsQuery) error
	GetDashboardUIDById(ctx context.Context, query *models.GetDashboardRefByIdQuery) error
	GetDataSource(ctx context.Context, query *models.GetDataSourceQuery) error
	GetDataSources(ctx context.Context, query *models.GetDataSourcesQuery) error
	GetDataSourcesByType(ctx context.Context, query *models.GetDataSourcesByTypeQuery) error
	GetDefaultDataSource(ctx context.Context, query *models.GetDefaultDataSourceQuery) error
	DeleteDataSource(ctx context.Context, cmd *models.DeleteDataSourceCommand) error
	AddDataSource(ctx context.Context, cmd *models.AddDataSourceCommand) error
	UpdateDataSource(ctx context.Context, cmd *models.UpdateDataSourceCommand) error
	Migrate(bool) error
	Sync() error
	Reset() error
	Quote(value string) string
	DeleteAlertNotification(ctx context.Context, cmd *models.DeleteAlertNotificationCommand) error
	DeleteAlertNotificationWithUid(ctx context.Context, cmd *models.DeleteAlertNotificationWithUidCommand) error
	GetAlertNotifications(ctx context.Context, query *models.GetAlertNotificationsQuery) error
	GetAlertNotificationUidWithId(ctx context.Context, query *models.GetAlertNotificationUidQuery) error
	GetAlertNotificationsWithUid(ctx context.Context, query *models.GetAlertNotificationsWithUidQuery) error
	GetAllAlertNotifications(ctx context.Context, query *models.GetAllAlertNotificationsQuery) error
	GetAlertNotificationsWithUidToSend(ctx context.Context, query *models.GetAlertNotificationsWithUidToSendQuery) error
	CreateAlertNotificationCommand(ctx context.Context, cmd *models.CreateAlertNotificationCommand) error
	UpdateAlertNotification(ctx context.Context, cmd *models.UpdateAlertNotificationCommand) error
	UpdateAlertNotificationWithUid(ctx context.Context, cmd *models.UpdateAlertNotificationWithUidCommand) error
	SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToCompleteCommand) error
	SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToPendingCommand) error
	GetOrCreateAlertNotificationState(ctx context.Context, cmd *models.GetOrCreateNotificationStateQuery) error
	GetAPIKeys(ctx context.Context, query *models.GetApiKeysQuery) error
	GetAllOrgsAPIKeys(ctx context.Context) []*models.ApiKey
	DeleteApiKey(ctx context.Context, cmd *models.DeleteApiKeyCommand) error
	AddAPIKey(ctx context.Context, cmd *models.AddApiKeyCommand) error
	GetApiKeyById(ctx context.Context, query *models.GetApiKeyByIdQuery) error
	GetApiKeyByName(ctx context.Context, query *models.GetApiKeyByNameQuery) error
	UpdateTempUserStatus(ctx context.Context, cmd *models.UpdateTempUserStatusCommand) error
	CreateTempUser(ctx context.Context, cmd *models.CreateTempUserCommand) error
	UpdateTempUserWithEmailSent(ctx context.Context, cmd *models.UpdateTempUserWithEmailSentCommand) error
	GetTempUsersQuery(ctx context.Context, query *models.GetTempUsersQuery) error
	GetTempUserByCode(ctx context.Context, query *models.GetTempUserByCodeQuery) error
	ExpireOldUserInvites(ctx context.Context, cmd *models.ExpireTempUsersCommand) error
	GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error
	SearchOrgs(ctx context.Context, query *models.SearchOrgsQuery) error
	HasAdminPermissionInDashboardsOrFolders(ctx context.Context, query *models.HasAdminPermissionInDashboardsOrFoldersQuery) error
	GetDashboardPermissionsForUser(ctx context.Context, query *models.GetDashboardPermissionsForUserQuery) error
	GetDashboardSlugById(ctx context.Context, query *models.GetDashboardSlugByIdQuery) error
}

type TeamStore

type TeamStore interface {
	UpdateTeam(ctx context.Context, cmd *models.UpdateTeamCommand) error
	DeleteTeam(ctx context.Context, cmd *models.DeleteTeamCommand) error
	SearchTeams(ctx context.Context, query *models.SearchTeamsQuery) error
	GetTeamById(ctx context.Context, query *models.GetTeamByIdQuery) error
	UpdateTeamMember(ctx context.Context, cmd *models.UpdateTeamMemberCommand) error
	RemoveTeamMember(ctx context.Context, cmd *models.RemoveTeamMemberCommand) error
	GetTeamMembers(ctx context.Context, cmd *models.GetTeamMembersQuery) error
	GetUserTeamMemberships(ctx context.Context, orgID, userID int64, external bool) ([]*models.TeamMemberDTO, error)
	AddOrUpdateTeamMember(userID, orgID, teamID int64, isExternal bool, permission models.PermissionType) error
}

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) Info

func (s *XormLogger) Info(v ...interface{})

Info 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) Level

func (s *XormLogger) Level() core.LogLevel

Level 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) Warn

func (s *XormLogger) Warn(v ...interface{})

Warn implement core.ILogger

func (*XormLogger) Warnf

func (s *XormLogger) Warnf(format string, v ...interface{})

Warnf implement core.ILogger

Directories

Path Synopsis
db
Package searchstore converts search queries to SQL.
Package searchstore converts search queries to SQL.

Jump to

Keyboard shortcuts

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