Files
grafana/pkg/models/user_auth.go

73 lines
1.0 KiB
Go
Raw Normal View History

package models
2018-03-19 17:09:49 -04:00
import (
"time"
)
type UserAuth struct {
Id int64
UserId int64
AuthModule string
AuthId string
2018-03-19 17:09:49 -04:00
Created time.Time
}
type ExternalUserInfo struct {
AuthModule string
AuthId string
UserId int64
Email string
Login string
Name string
OrgRoles map[int64]RoleType
}
// ---------------------
// COMMANDS
type UpsertUserCommand struct {
ReqContext *ReqContext
ExternalUser *ExternalUserInfo
SignupAllowed bool
2018-03-23 11:16:11 -04:00
Result *User
}
type SetAuthInfoCommand struct {
AuthModule string
AuthId string
UserId int64
}
type DeleteAuthInfoCommand struct {
UserAuth *UserAuth
}
// ----------------------
// QUERIES
type LoginUserQuery struct {
ReqContext *ReqContext
Username string
Password string
User *User
IpAddress string
}
type GetUserByAuthInfoQuery struct {
AuthModule string
AuthId string
UserId int64
Email string
Login string
2018-03-28 21:26:35 -04:00
Result *User
}
type GetAuthInfoQuery struct {
AuthModule string
AuthId string
2018-03-28 18:06:22 -04:00
Result *UserAuth
}