Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTempUserNotFound = errors.New("user not found")
)
Typed errors
Functions ¶
This section is empty.
Types ¶
type CreateTempUserCommand ¶
type ExpireTempUsersCommand ¶
type GetTempUserByCodeQuery ¶
type GetTempUserByCodeQuery struct {
Code string
}
type GetTempUsersQuery ¶
type GetTempUsersQuery struct { OrgID int64 `xorm:"org_id"` Email string Status TempUserStatus }
type Service ¶
type Service interface { UpdateTempUserStatus(ctx context.Context, cmd *UpdateTempUserStatusCommand) error CreateTempUser(ctx context.Context, cmd *CreateTempUserCommand) (*TempUser, error) UpdateTempUserWithEmailSent(ctx context.Context, cmd *UpdateTempUserWithEmailSentCommand) error GetTempUsersQuery(ctx context.Context, query *GetTempUsersQuery) ([]*TempUserDTO, error) GetTempUserByCode(ctx context.Context, query *GetTempUserByCodeQuery) (*TempUserDTO, error) ExpireOldUserInvites(ctx context.Context, cmd *ExpireTempUsersCommand) error }
type TempUser ¶
type TempUser struct { ID int64 `xorm:"pk autoincr 'id'"` OrgID int64 `xorm:"org_id"` Version int Email string Name string Role org.RoleType InvitedByUserID int64 `xorm:"invited_by_user_id"` Status TempUserStatus EmailSent bool EmailSentOn time.Time Code string RemoteAddr string Created int64 Updated int64 }
TempUser holds data for org invites and unconfirmed sign ups
type TempUserDTO ¶
type TempUserDTO struct { ID int64 `json:"id" xorm:"id"` OrgID int64 `json:"orgId" xorm:"org_id"` Name string `json:"name"` Email string `json:"email"` Role org.RoleType `json:"role"` InvitedByLogin string `json:"invitedByLogin"` InvitedByEmail string `json:"invitedByEmail"` InvitedByName string `json:"invitedByName"` Code string `json:"code"` Status TempUserStatus `json:"status"` URL string `json:"url"` EmailSent bool `json:"emailSent"` EmailSentOn time.Time `json:"emailSentOn"` Created time.Time `json:"createdOn"` }
type TempUserStatus ¶
type TempUserStatus string
const ( TmpUserSignUpStarted TempUserStatus = "SignUpStarted" TmpUserInvitePending TempUserStatus = "InvitePending" TmpUserCompleted TempUserStatus = "Completed" TmpUserRevoked TempUserStatus = "Revoked" TmpUserExpired TempUserStatus = "Expired" )
type UpdateTempUserStatusCommand ¶
type UpdateTempUserStatusCommand struct { Code string Status TempUserStatus }
type UpdateTempUserWithEmailSentCommand ¶
type UpdateTempUserWithEmailSentCommand struct {
Code string
}
Click to show internal directories.
Click to hide internal directories.