userPkg

package
v0.0.0-...-98a7bba Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrudUsecases

func CrudUsecases() crud.Usecases[usersRepoPkg.Users, User]

Types

type RegistrationInfo

type RegistrationInfo struct {
	Email    string
	Salt     decryptionKeyPkg.Salt
	Verifier string

	Name       string
	PublicKey  decryptionKeyPkg.Key
	PrivateKey decryptionKeyPkg.Key
	// These are still just encrypted private keys, but they're encrypted with what are essentially different passwords
	RecoveryKeys   []decryptionKeyPkg.Key
	PrivateKeySalt []byte
	Role           Role
}

type RegistrationInfoResponse

type RegistrationInfoResponse struct {
	Email string
	Salt  decryptionKeyPkg.Salt

	Name   string
	UserID app.ID
	Role   Role
}

func Register

func Register(ctx app.Context, registrationInfo RegistrationInfo) (RegistrationInfoResponse, error)

type Role

type Role string
const (
	System Role = "system"
	Admin  Role = "admin"
	Member Role = "member"
)

func (Role) String

func (r Role) String() string

type User

type User struct {
	entityPkg.Entity
	Name      string
	Role      Role
	PublicKey decryptionKeyPkg.Key
}

func FetchSystemUser

func FetchSystemUser(ctx app.Context) (User, error)

type UserSettings

type UserSettings struct {
	entityPkg.Entity
	UserID                      app.ID
	UserStorageFolderDocumentID app.ID
}

Jump to

Keyboard shortcuts

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