package
Version:
v0.0.0-...-129bed4
Opens a new window with list of versions in this module.
Published: Mar 20, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Account struct {
ID string `db:"id" json:"id"`
Email string `db:"email" json:"email"`
Password string `db:"password_hash" json:"-"`
RegistrationDate time.Time `db:"registration_date" json:"registration_date"`
}
type AccountCreatedDTO struct {
ID string `db:"id" json:"id"`
Username string `json:"username"`
Email string `db:"email" json:"email"`
RegistrationDate time.Time `db:"registration_date" json:"registration_date"`
}
const (
Unknown ErrorCode = iota
Internal
InvalidArgument
Unauthenticated
Conflict
NotFound
Canceled
DeadlineExceeded
PermissionDenied
)
type RegisteredAccount struct {
Username string `json:"username"`
Password string `json:"password"`
}
RegisteredAccount represents the account data in the registration database.
type Session struct {
SessionID string `json:"session_id"`
AccountID string `json:"account_id"`
MachineID string `json:"machine_id"`
ClientIP string `json:"client_ip"`
LastActivity time.Time `json:"last_activity"`
}
type SessionInfo struct {
ClientIP string `json:"client_ip"`
MachineID string `json:"machine_id"`
LastActivity time.Time `json:"last_activity"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.