blog

package
v0.0.0-...-94fc6d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID          uint64 `json:"-"`
	Slug        string `json:"slug"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Body        string `json:"body"`

	Author   *org.Profile `json:"author" pg:"rel:has-one"`
	AuthorID uint64       `json:"-"`

	Tags    []ArticleTag `json:"-" pg:"rel:has-many"`
	TagList []string     `json:"tagList" pg:"-,array"`

	Favorited      bool `json:"favorited" pg:"-"`
	FavoritesCount int  `json:"favoritesCount" pg:"-"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

func SelectArticle

func SelectArticle(c context.Context, slug string) (*Article, error)

type ArticleFilter

type ArticleFilter struct {
	UserID    uint64
	Author    string
	Tag       string
	Favorited string
	Slug      string
	Feed      bool
	urlstruct.Pager
}

type ArticleTag

type ArticleTag struct {
	ArticleID uint64
	Tag       string
	// contains filtered or unexported fields
}

type Comment

type Comment struct {
	ID   uint64 `json:"id"`
	Body string `json:"body"`

	Author   *org.Profile `json:"author" pg:"rel:has-one"`
	AuthorID uint64       `json:"-"`

	ArticleID uint64 `json:"-"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

type FavoriteArticle

type FavoriteArticle struct {
	UserID    uint64
	ArticleID uint64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL