article

package
v0.0.0-...-cad48ee Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTitleIsEmpty           = errors.New("article title is empty")
	ErrContentIsEmpty         = errors.New("article content is empty")
	ErrNoViewArticlePrivilege = errors.New("no view article privilege")
)

Functions

This section is empty.

Types

type Article

type Article struct {
	ID      ID
	UserID  user.ID
	Title   Title
	Content Content
}

func Post

func Post(
	title Title,
	content Content,
	usr user.User,
) (Article, error)

type Content

type Content string

func (Content) Validate

func (c Content) Validate() error

type ID

type ID string

type Title

type Title string

func (Title) Validate

func (t Title) Validate() error

Jump to

Keyboard shortcuts

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