entity

package
v0.0.0-...-3c15023 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ArticleKind = "Article"

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID          int64
	UserId      int64  `datastore:"user_id"`
	Title       string `datastore:"title"`
	Number      int64
	Message     string
	Category    string
	Url         string
	MdGcsPath   string
	Attachments []*Attachment
	MDBody      string `datastore:",noindex"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func NewArticle

func NewArticle(id int64, title, body string, createdAt time.Time, attachments []*Attachment) *Article

type ArticleRepository

type ArticleRepository interface {
	Get(id int64) (*Article, error)
	Put(*Article) (int64, error)
	Delete(id int64) error
}

func NewArticleRepository

func NewArticleRepository(dsClient *datastore.Client) ArticleRepository

type Attachment

type Attachment struct {
	ID        string
	Name      string
	Content   []byte
	OriginURL string
	URL       string
}

func NewAttachment

func NewAttachment(id, name string, url string) *Attachment

Directories

Path Synopsis
Package mock_entity is a generated GoMock package.
Package mock_entity is a generated GoMock package.

Jump to

Keyboard shortcuts

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