Documentation ¶
Index ¶
- type Article
- type ArticleRepository
- type Resource
- type ResourceRepository
- func (r *ResourceRepository) Activate(ctx context.Context, urls []string, active bool) error
- func (r *ResourceRepository) Delete(ctx context.Context, urls []string) error
- func (r *ResourceRepository) Get(ctx context.Context, url string) (*Resource, error)
- func (r *ResourceRepository) List(ctx context.Context, active bool) ([]*Resource, error)
- func (r *ResourceRepository) Upsert(ctx context.Context, repoInfo *Resource) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Created time.Time `json:"created"` Published time.Time `json:"published"` ResourceId string `json:"resource_id"` Link string `json:"link" gorm:"primaryKey"` Title string `json:"title"` Description string `json:"description"` Content string `json:"content"` Author string `json:"author"` Image string `json:"image"` }
type ArticleRepository ¶
type ArticleRepository struct {
// contains filtered or unexported fields
}
func NewArticleRepository ¶
func NewArticleRepository(db *db.DB) (*ArticleRepository, error)
type ResourceRepository ¶
type ResourceRepository struct {
// contains filtered or unexported fields
}
func NewResourceRepository ¶
func NewResourceRepository(db *db.DB) (*ResourceRepository, error)
func (*ResourceRepository) Delete ¶
func (r *ResourceRepository) Delete(ctx context.Context, urls []string) error
Click to show internal directories.
Click to hide internal directories.