article_service

package
v0.0.0-...-c7ddeeb Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPosterFlag

func GetPosterFlag() string

Types

type Article

type Article struct {
	ID            int
	TagID         int
	Title         string
	Desc          string
	Content       string
	CoverImageUrl string

	State      int
	CreatedBy  string
	ModifiedBy string

	PageNum  int
	PageSize int
}

func (*Article) Add

func (a *Article) Add() error

func (*Article) Count

func (a *Article) Count() (int, error)

func (*Article) Delete

func (a *Article) Delete() error

func (*Article) Edit

func (a *Article) Edit() error

func (*Article) ExistByID

func (a *Article) ExistByID() bool

func (*Article) Get

func (a *Article) Get() (*models.Article, error)

func (*Article) GetAll

func (a *Article) GetAll() ([]*models.Article, error)

type ArticlePoster

type ArticlePoster struct {
	PosterName string
	*Article
	Qr *qrcode.QrCode
}

func NewArticlePoser

func NewArticlePoser(posterName string, article *Article, qr *qrcode.QrCode) *ArticlePoster

func (*ArticlePoster) CheckMergedImage

func (a *ArticlePoster) CheckMergedImage(path string) bool

func (*ArticlePoster) OpenMergedImage

func (a *ArticlePoster) OpenMergedImage(path string) (*os.File, error)

type ArticlePosterBg

type ArticlePosterBg struct {
	Name string
	*ArticlePoster
	*Rect
	*Pt
}

func NewArticlePosterBg

func NewArticlePosterBg(name string, ap *ArticlePoster, rect *Rect, pt *Pt) *ArticlePosterBg

func (*ArticlePosterBg) Generate

func (a *ArticlePosterBg) Generate() (string, string, error)

type Pt

type Pt struct {
	X int
	Y int
}

type Rect

type Rect struct {
	Name string
	X0   int
	Y0   int
	X1   int
	Y1   int
}

Jump to

Keyboard shortcuts

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