user

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(ctx context.Context, db *mongo.Database, rTx, tx pgx.Tx, limit int) error

func ResolveUsers

func ResolveUsers(ctx context.Context, rTx pgx.Tx, ids map[primitive.ObjectID]bool, m map[primitive.ObjectID]pgtype.UUID) (map[primitive.ObjectID]pgtype.UUID, error)

Types

type AuditLogEntry

type AuditLogEntry struct {
	Info        bson.M             `bson:"info,omitempty"`
	InitiatorId primitive.ObjectID `bson:"initiatorId"`
	IPAddress   string             `bson:"ipAddress"`
	Operation   string             `bson:"operation"`
	Timestamp   time.Time          `bson:"timestamp"`
}

type AuditLogField

type AuditLogField struct {
	AuditLog []AuditLogEntry `bson:"auditLog"`
}

type BetaProgramField

type BetaProgramField struct {
	BetaProgram bool `bson:"betaProgram"`
}

type EditorConfig

type EditorConfig struct {
	FontFamily         string                           `bson:"fontFamily"`
	FontSize           int64                            `bson:"fontSize"`
	LineHeight         string                           `bson:"lineHeight"`
	Mode               string                           `bson:"mode"`
	OverallTheme       string                           `bson:"overallTheme"`
	PDFViewer          string                           `bson:"pdfViewer"`
	SpellCheckLanguage spellingTypes.SpellCheckLanguage `bson:"spellCheckLanguage"`
	Theme              string                           `bson:"theme"`
	AutoComplete       bool                             `bson:"autoComplete"`
	AutoPairDelimiters bool                             `bson:"autoPairDelimiters"`
	SyntaxValidation   bool                             `bson:"syntaxValidation"`
}

func (EditorConfig) Migrate

func (e EditorConfig) Migrate() user.EditorConfig

type EditorConfigField

type EditorConfigField struct {
	EditorConfig EditorConfig `bson:"ace"`
}

type EmailDetails

type EmailDetails struct {
	Id               primitive.ObjectID           `bson:"_id"`
	CreatedAt        time.Time                    `bson:"createdAt"`
	ConfirmedAt      *time.Time                   `bson:"confirmedAt"`
	ReconfirmedAt    *time.Time                   `bson:"reconfirmedAt"`
	Email            sharedTypes.Email            `bson:"email"`
	ReversedHostname sharedTypes.ReversedHostname `bson:"reversedHostname"`
}

type EmailField

type EmailField struct {
	Email sharedTypes.Email `bson:"email"`
}

type EmailsField

type EmailsField struct {
	Emails []EmailDetails `bson:"emails"`
}

type EpochField

type EpochField struct {
	Epoch int64 `bson:"epoch"`
}

type Features

type Features struct {
	Collaborators  int                        `bson:"collaborators"`
	CompileTimeout sharedTypes.ComputeTimeout `bson:"compileTimeout"`
	CompileGroup   sharedTypes.CompileGroup   `bson:"compileGroup"`
	Versioning     bool                       `bson:"versioning"`
}

func (Features) Migrate

func (f Features) Migrate() user.Features

type FeaturesField

type FeaturesField struct {
	Features Features `bson:"features"`
}

type FirstNameField

type FirstNameField struct {
	FirstName string `bson:"first_name"`
}

type ForPQ

type ForPQ struct {
	AuditLogField       `bson:"inline"`
	IdField             `bson:"inline"`
	BetaProgramField    `bson:"inline"`
	MustReconfirmField  `bson:"inline"`
	EditorConfigField   `bson:"inline"`
	EmailField          `bson:"inline"`
	EmailsField         `bson:"inline"`
	EpochField          `bson:"inline"`
	FeaturesField       `bson:"inline"`
	FirstNameField      `bson:"inline"`
	HashedPasswordField `bson:"inline"`
	LastLoggedInField   `bson:"inline"`
	LastLoginIPField    `bson:"inline"`
	LastNameField       `bson:"inline"`
	LoginCountField     `bson:"inline"`
	SignUpDateField     `bson:"inline"`
}

type HashedPasswordField

type HashedPasswordField struct {
	HashedPassword string `bson:"hashedPassword"`
}

type IdField

type IdField struct {
	Id primitive.ObjectID `bson:"_id"`
}

type LastLoggedInField

type LastLoggedInField struct {
	LastLoggedIn *time.Time `bson:"lastLoggedIn"`
}

type LastLoginIPField

type LastLoginIPField struct {
	LastLoginIP string `bson:"lastLoginIp"`
}

type LastNameField

type LastNameField struct {
	LastName string `bson:"last_name"`
}

type LoginCountField

type LoginCountField struct {
	LoginCount int64 `bson:"loginCount"`
}

type MustReconfirmField

type MustReconfirmField struct {
	MustReconfirm bool `bson:"must_reconfirm"`
}

type SignUpDateField

type SignUpDateField struct {
	SignUpDate time.Time `bson:"signUpDate"`
}

Jump to

Keyboard shortcuts

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