storage

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID        int    `json:"id"`
	ArticleID int    `json:"article_id"`
	ParentID  int    `json:"parent_id"`
	Author    string `json:"author"`
	Text      string `json:"text"`
	PubTime   int64  `json:"pub_time"`
}

type Storage

type Storage interface {
	AddComment(ctx context.Context, comment Comment) (int, error)
	GetCommentsByArticleID(ctx context.Context, articleID int) ([]Comment, error)
	DeleteComment(ctx context.Context, commentID int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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