Documentation
¶
Index ¶
- func IsErrPgxNoRows(err error) bool
- func PointerToPgTypeInt4(num *int32) pgtype.Int4
- func ToPgTypeInt4(num int32) pgtype.Int4
- func ToPgTypeText(str string) pgtype.Text
- func ToPgTypeTimestamp(t time.Time) pgtype.Timestamp
- func ToPgTypeTimestamptz(t time.Time) pgtype.Timestamptz
- func UseTransaction(ctx context.Context, db *Service, ...) error
- type ActiveGuestLoginIdentity
- type ActiveLoginIdentity
- type ActiveOauthConnection
- type ActiveOauthIntegration
- type ActiveOauthProvider
- type ActiveOauthToken
- type ActiveOidcLoginIdentity
- type ActiveOidcUserIntegrationDatum
- type ActivePasswordLoginIdentity
- type ActiveSession
- type ActiveSystemIntegration
- type ActiveUserIntegration
- type GuestLoginIdentity
- type Installation
- type LoginIdentity
- type NotDeletedUser
- type OauthConnection
- type OauthIntegration
- type OauthProvider
- type OauthToken
- type OidcLoginIdentity
- type OidcUserIntegrationDatum
- type PasswordLoginIdentity
- type Permission
- type Role
- type RolePermission
- type Service
- type Session
- type SystemIntegration
- type Todo
- type User
- type UserIntegration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrPgxNoRows ¶
func PointerToPgTypeInt4 ¶
func ToPgTypeInt4 ¶
func ToPgTypeText ¶
func ToPgTypeTimestamptz ¶
func ToPgTypeTimestamptz(t time.Time) pgtype.Timestamptz
func UseTransaction ¶
Types ¶
type ActiveGuestLoginIdentity ¶
type ActiveGuestLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
DeviceID string `json:"device_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveLoginIdentity ¶
type ActiveLoginIdentity struct {
ID int32 `json:"id"`
UserID int32 `json:"user_id"`
IdentityType string `json:"identity_type"`
IsPrimary pgtype.Bool `json:"is_primary"`
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveOauthConnection ¶
type ActiveOauthIntegration ¶
type ActiveOauthIntegration struct {
ID int32 `json:"id"`
OauthConnectionID int32 `json:"oauth_connection_id"`
IntegrationType string `json:"integration_type"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveOauthProvider ¶
type ActiveOauthToken ¶
type ActiveOauthToken struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
AccessToken string `json:"access_token"`
RefreshToken pgtype.Text `json:"refresh_token"`
TokenType string `json:"token_type"`
ExpiresAt pgtype.Timestamp `json:"expires_at"`
IssuedAt pgtype.Timestamp `json:"issued_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveOidcLoginIdentity ¶
type ActiveOidcLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
OidcUserIntegrationDataID int32 `json:"oidc_user_integration_data_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveOidcUserIntegrationDatum ¶
type ActiveOidcUserIntegrationDatum struct {
ID int32 `json:"id"`
UserIntegrationID int32 `json:"user_integration_id"`
Sub string `json:"sub"`
Email pgtype.Text `json:"email"`
Iss string `json:"iss"`
Aud string `json:"aud"`
GivenName pgtype.Text `json:"given_name"`
FamilyName pgtype.Text `json:"family_name"`
Name pgtype.Text `json:"name"`
Picture pgtype.Text `json:"picture"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActivePasswordLoginIdentity ¶
type ActivePasswordLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
Email pgtype.Text `json:"email"`
Phone pgtype.Text `json:"phone"`
HashedPass string `json:"hashed_pass"`
PassSalt string `json:"pass_salt"`
VerifiedAt pgtype.Timestamptz `json:"verified_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveSession ¶
type ActiveSession struct {
ID int32 `json:"id"`
Token string `json:"token"`
IpAddress netip.Addr `json:"ip_address"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
OriginatedFrom int32 `json:"originated_from"`
UsedInstallation int32 `json:"used_installation"`
}
type ActiveSystemIntegration ¶
type ActiveSystemIntegration struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type ActiveUserIntegration ¶
type ActiveUserIntegration struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
UserID int32 `json:"user_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type GuestLoginIdentity ¶
type GuestLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
DeviceID string `json:"device_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type Installation ¶
type Installation struct {
ID int32 `json:"id"`
InstallationToken string `json:"installation_token"`
NotificationToken pgtype.Text `json:"notification_token"`
Locale string `json:"locale"`
TimezoneOffsetInMinutes int32 `json:"timezone_offset_in_minutes"`
DeviceManufacturer pgtype.Text `json:"device_manufacturer"`
DeviceOs pgtype.Text `json:"device_os"`
DeviceOsVersion pgtype.Text `json:"device_os_version"`
AppVersion string `json:"app_version"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
AttachTo pgtype.Int4 `json:"attach_to"`
LastAttachTo pgtype.Int4 `json:"last_attach_to"`
}
type LoginIdentity ¶
type LoginIdentity struct {
ID int32 `json:"id"`
UserID int32 `json:"user_id"`
IdentityType string `json:"identity_type"`
IsPrimary pgtype.Bool `json:"is_primary"`
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type NotDeletedUser ¶
type NotDeletedUser struct {
ID int32 `json:"id"`
Username string `json:"username"`
ProfileImage pgtype.Text `json:"profile_image"`
FirstName string `json:"first_name"`
MiddleName pgtype.Text `json:"middle_name"`
LastName pgtype.Text `json:"last_name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
BlockedAt pgtype.Timestamptz `json:"blocked_at"`
BlockedUntil pgtype.Timestamptz `json:"blocked_until"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
RoleID pgtype.Int4 `json:"role_id"`
}
type OauthConnection ¶
type OauthIntegration ¶
type OauthIntegration struct {
ID int32 `json:"id"`
OauthConnectionID int32 `json:"oauth_connection_id"`
IntegrationType string `json:"integration_type"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type OauthProvider ¶
type OauthToken ¶
type OauthToken struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
AccessToken string `json:"access_token"`
RefreshToken pgtype.Text `json:"refresh_token"`
TokenType string `json:"token_type"`
ExpiresAt pgtype.Timestamp `json:"expires_at"`
IssuedAt pgtype.Timestamp `json:"issued_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type OidcLoginIdentity ¶
type OidcLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
OidcUserIntegrationDataID int32 `json:"oidc_user_integration_data_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type OidcUserIntegrationDatum ¶
type OidcUserIntegrationDatum struct {
ID int32 `json:"id"`
UserIntegrationID int32 `json:"user_integration_id"`
Sub string `json:"sub"`
Email pgtype.Text `json:"email"`
Iss string `json:"iss"`
Aud string `json:"aud"`
GivenName pgtype.Text `json:"given_name"`
FamilyName pgtype.Text `json:"family_name"`
Name pgtype.Text `json:"name"`
Picture pgtype.Text `json:"picture"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type PasswordLoginIdentity ¶
type PasswordLoginIdentity struct {
ID int32 `json:"id"`
LoginIdentityID int32 `json:"login_identity_id"`
Email pgtype.Text `json:"email"`
Phone pgtype.Text `json:"phone"`
HashedPass string `json:"hashed_pass"`
PassSalt string `json:"pass_salt"`
VerifiedAt pgtype.Timestamptz `json:"verified_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type Permission ¶
type Permission struct {
ID int32 `json:"id"`
Name string `json:"name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type Role ¶
type Role struct {
ID int32 `json:"id"`
Name string `json:"name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type RolePermission ¶
type RolePermission struct {
RoleID int32 `json:"role_id"`
PermissionID int32 `json:"permission_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type Service ¶
type Service struct {
ConnPool *pgxpool.Pool
Queries *database_queries.Queries
}
func NewConnection ¶
type Session ¶
type Session struct {
ID int32 `json:"id"`
Token string `json:"token"`
IpAddress netip.Addr `json:"ip_address"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
OriginatedFrom int32 `json:"originated_from"`
UsedInstallation int32 `json:"used_installation"`
}
type SystemIntegration ¶
type SystemIntegration struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type Todo ¶
type Todo struct {
ID int32 `json:"id"`
Title string `json:"title"`
Body string `json:"body"`
Status string `json:"status"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
UserID int32 `json:"user_id"`
}
type User ¶
type User struct {
ID int32 `json:"id"`
Username string `json:"username"`
ProfileImage pgtype.Text `json:"profile_image"`
FirstName string `json:"first_name"`
MiddleName pgtype.Text `json:"middle_name"`
LastName pgtype.Text `json:"last_name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
BlockedAt pgtype.Timestamptz `json:"blocked_at"`
BlockedUntil pgtype.Timestamptz `json:"blocked_until"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
RoleID pgtype.Int4 `json:"role_id"`
}
type UserIntegration ¶
type UserIntegration struct {
ID int32 `json:"id"`
OauthIntegrationID int32 `json:"oauth_integration_id"`
UserID int32 `json:"user_id"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
Click to show internal directories.
Click to hide internal directories.