article

package
v0.0.0-...-533e1e5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadArticleN = `SELECT 
		id,
		author,
		title,
		body,
		created_at
	FROM article`

	ReadArticle1 = `SELECT 
		id,
		author,
		title,
		body,
		created_at
	FROM article
	WHERE id=?;`
)
View Source
const (
	ArticleByID = `article:id:%d`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainItf

type DomainItf interface {
	CreateArticle(v entity.Article) (entity.Article, error)
	GetArticle(c entity.CacheControl, p entity.ArticleParam) ([]entity.Article, error)
	GetArticleByID(c entity.CacheControl, vid int64) (entity.Article, error)
}

func InitArticleDomain

func InitArticleDomain(logger log.Logger, sql sql.DB, redis redis.Client) DomainItf

Jump to

Keyboard shortcuts

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