mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
0f06120b56
* User: remove unused function * User: Remove UpdatePermissions and support IsGrafanaAdmin flag in Update function instead * User: Remove Disable function and use Update instead
34 lines
1.5 KiB
Go
34 lines
1.5 KiB
Go
package user
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/registry"
|
|
)
|
|
|
|
//go:generate mockery --name Service --structname MockService --outpkg usertest --filename mock.go --output ./usertest/
|
|
type Service interface {
|
|
registry.ProvidesUsageStats
|
|
Create(context.Context, *CreateUserCommand) (*User, error)
|
|
CreateServiceAccount(context.Context, *CreateUserCommand) (*User, error)
|
|
Delete(context.Context, *DeleteUserCommand) error
|
|
GetByID(context.Context, *GetUserByIDQuery) (*User, error)
|
|
GetByLogin(context.Context, *GetUserByLoginQuery) (*User, error)
|
|
GetByEmail(context.Context, *GetUserByEmailQuery) (*User, error)
|
|
Update(context.Context, *UpdateUserCommand) error
|
|
ChangePassword(context.Context, *ChangeUserPasswordCommand) error
|
|
UpdateLastSeenAt(context.Context, *UpdateUserLastSeenAtCommand) error
|
|
SetUsingOrg(context.Context, *SetUsingOrgCommand) error
|
|
GetSignedInUserWithCacheCtx(context.Context, *GetSignedInUserQuery) (*SignedInUser, error)
|
|
GetSignedInUser(context.Context, *GetSignedInUserQuery) (*SignedInUser, error)
|
|
Search(context.Context, *SearchUsersQuery) (*SearchUserQueryResult, error)
|
|
BatchDisableUsers(context.Context, *BatchDisableUsersCommand) error
|
|
SetUserHelpFlag(context.Context, *SetUserHelpFlagCommand) error
|
|
GetProfile(context.Context, *GetUserProfileQuery) (*UserProfileDTO, error)
|
|
}
|
|
|
|
type Verifier interface {
|
|
Start(ctx context.Context, cmd StartVerifyEmailCommand) error
|
|
Complete(ctx context.Context, cmd CompleteEmailVerifyCommand) error
|
|
}
|