Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Database *gorm.DB
Functions ¶
Types ¶
type Analytic ¶
type Analytic struct { ID uint `gorm:"primaryKey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"` URL string `json:"url"` RedirectCode string `json:"redirect_code"` Referer string `json:"referer"` UserAgent string `json:"user_agent"` Country string `json:"country"` }
type Category ¶
type Category struct { ID uint `gorm:"primaryKey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"` Slug string `gorm:"unique" json:"slug"` Title string `json:"title"` Posts []Post `gorm:"many2many:post_categories" json:"posts"` }
type Post ¶
type Post struct { ID uint `gorm:"primaryKey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"` Link string `json:"link"` RedirectCode string `json:"redirect_code"` PostID string `gorm:"unique" json:"post_id"` Excerpt string `json:"excerpt"` Title string `json:"title"` PublishedAt time.Time `json:"published_at"` Cover string `json:"cover"` HaveCover bool `gorm:"default:false" json:"have_cover"` Categories []Category `gorm:"many2many:post_categories" json:"categories"` Tags pq.StringArray `gorm:"type:text[]" json:"tags"` LastFetched time.Time `gorm:"autoUpdateTime" json:"last_fetched"` ProviderID uint `json:"provider_id"` }
type Provider ¶
type Provider struct { ID uint `gorm:"primaryKey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"` Name string `gorm:"unique" json:"name"` AccountType string `json:"account_type"` ContactEmail string `json:"contact_email"` AuthorURL string `json:"author_url"` AuthorDefaultCover string `json:"author_default_cover"` AuthorDefaultTopics pq.StringArray `gorm:"type:text[]" json:"author_default_topics"` Posts []Post `gorm:"foreignKey:ProviderID" json:"posts"` }
Click to show internal directories.
Click to hide internal directories.