diff options
Diffstat (limited to 'internal/gtsmodel/admin.go')
-rw-r--r-- | internal/gtsmodel/admin.go | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/internal/gtsmodel/admin.go b/internal/gtsmodel/admin.go index f6f32a9a3..22a38f32c 100644 --- a/internal/gtsmodel/admin.go +++ b/internal/gtsmodel/admin.go @@ -17,7 +17,10 @@ package gtsmodel -import "time" +import ( + "net" + "time" +) // AdminAccountAction models an action taken by an instance administrator on an account. type AdminAccountAction struct { @@ -45,3 +48,23 @@ const ( // AdminActionSuspend -- the account or application etc has been deleted. AdminActionSuspend AdminActionType = "suspend" ) + +// NewSignup models parameters for the creation +// of a new user + account on this instance. +// +// Aside from username, email, and password, it is +// fine to use zero values on fields of this struct. +type NewSignup struct { + Username string // Username of the new account. + Email string // Email address of the user. + Password string // Plaintext (not yet hashed) password for the user. + + Reason string // Reason given by the user when submitting a sign up request (optional). + PreApproved bool // Mark the new user/account as preapproved (optional) + SignUpIP net.IP // IP address from which the sign up request occurred (optional). + Locale string // Locale code for the new account/user (optional). + AppID string // ID of the application used to create this account (optional). + EmailVerified bool // Mark submitted email address as already verified (optional). + ExternalID string // ID of this user in external OIDC system (optional). + Admin bool // Mark new user as an admin user (optional). +} |