Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
ID int `db:"id"`
Content string `db:"content"`
CreatedAt time.Time `db:"created_at"`
User *User `db:"user"`
Attachments []string `db:"attachment_bkeys"`
EditedAt dbx.NullTime `db:"edited_at"`
EditedBy *User `db:"edited_by"`
ReactionCounts dbx.NullString `db:"reaction_counts"`
IsApproved bool `db:"is_approved"`
}
type EmailVerification ¶
type EmailVerification struct {
ID int `db:"id"`
Name string `db:"name"`
Email string `db:"email"`
Key string `db:"key"`
Kind enum.EmailVerificationKind `db:"kind"`
UserID dbx.NullInt `db:"user_id"`
CreatedAt time.Time `db:"created_at"`
ExpiresAt time.Time `db:"expires_at"`
VerifiedAt dbx.NullTime `db:"verified_at"`
}
func (*EmailVerification) ToModel ¶
func (t *EmailVerification) ToModel() *entity.EmailVerification
type OAuthConfig ¶
type OAuthConfig struct {
ID int `db:"id"`
Provider string `db:"provider"`
DisplayName string `db:"display_name"`
LogoBlobKey string `db:"logo_bkey"`
Status int `db:"status"`
IsTrusted bool `db:"is_trusted"`
ClientID string `db:"client_id"`
ClientSecret string `db:"client_secret"`
AuthorizeURL string `db:"authorize_url"`
TokenURL string `db:"token_url"`
Scope string `db:"scope"`
ProfileURL string `db:"profile_url"`
JSONUserIDPath string `db:"json_user_id_path"`
JSONUserNamePath string `db:"json_user_name_path"`
JSONUserEmailPath string `db:"json_user_email_path"`
}
func (*OAuthConfig) ToModel ¶
func (m *OAuthConfig) ToModel() *entity.OAuthConfig
type Post ¶
type Post struct {
ID int `db:"id"`
Number int `db:"number"`
Title string `db:"title"`
Slug string `db:"slug"`
Description string `db:"description"`
CreatedAt time.Time `db:"created_at"`
Search []byte `db:"search"`
User *User `db:"user"`
HasVoted bool `db:"has_voted"`
VotesCount int `db:"votes_count"`
CommentsCount int `db:"comments_count"`
RecentVotes int `db:"recent_votes_count"`
RecentComments int `db:"recent_comments_count"`
Status int `db:"status"`
Response dbx.NullString `db:"response"`
RespondedAt dbx.NullTime `db:"response_date"`
ResponseUser *User `db:"response_user"`
OriginalNumber dbx.NullInt `db:"original_number"`
OriginalTitle dbx.NullString `db:"original_title"`
OriginalSlug dbx.NullString `db:"original_slug"`
OriginalStatus dbx.NullInt `db:"original_status"`
Tags pq.StringArray `db:"tags"`
IsApproved bool `db:"is_approved"`
}
type StripeBillingState ¶
type StripeBillingState struct {
StripeCustomerID dbx.NullString `db:"stripe_customer_id"`
StripeSubscriptionID dbx.NullString `db:"stripe_subscription_id"`
LicenseKey dbx.NullString `db:"license_key"`
PaddleSubscriptionID dbx.NullString `db:"paddle_subscription_id"`
}
type Tag ¶
type Tenant ¶
type Tenant struct {
ID int `db:"id"`
Name string `db:"name"`
Subdomain string `db:"subdomain"`
CNAME string `db:"cname"`
Invitation string `db:"invitation"`
WelcomeMessage string `db:"welcome_message"`
WelcomeHeader string `db:"welcome_header"`
Status int `db:"status"`
Locale string `db:"locale"`
IsPrivate bool `db:"is_private"`
LogoBlobKey string `db:"logo_bkey"`
CustomCSS string `db:"custom_css"`
AllowedSchemes string `db:"allowed_schemes"`
IsEmailAuthAllowed bool `db:"is_email_auth_allowed"`
IsFeedEnabled bool `db:"is_feed_enabled"`
PreventIndexing bool `db:"prevent_indexing"`
IsModerationEnabled bool `db:"is_moderation_enabled"`
IsPro bool `db:"is_pro"`
HasPaddleSubscription bool `db:"has_paddle_subscription"`
}
type User ¶
type User struct {
ID sql.NullInt64 `db:"id"`
Name sql.NullString `db:"name"`
Email sql.NullString `db:"email"`
Tenant *Tenant `db:"tenant"`
Role sql.NullInt64 `db:"role"`
Status sql.NullInt64 `db:"status"`
AvatarType sql.NullInt64 `db:"avatar_type"`
AvatarBlobKey sql.NullString `db:"avatar_bkey"`
IsTrusted sql.NullBool `db:"is_trusted"`
Providers []*UserProvider
}
User is the database mapping for users table
type UserProvider ¶
type UserProvider struct {
Name sql.NullString `db:"provider"`
UID sql.NullString `db:"provider_uid"`
}
type UserSetting ¶
Click to show internal directories.
Click to hide internal directories.