article_service

package
v0.0.0-...-4caec29 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 12 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

	State         int
	Title         string
	Desc          string
	Content       string
	CreatedBy     string
	ModifiedBy    string
	CoverImageUrl string

	PageNum  int
	PageSize int
}

func (*Article) Add

func (a *Article) Add() 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, error)

func (*Article) Get

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

func (*Article) GetAll

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

func (*Article) GetCount

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

type ArticlePoster

type ArticlePoster struct {
	*Article
	Name   string
	QRCode *qrcode.QRCode
}

func NewArticlePoster

func NewArticlePoster(posterName string, article *Article, q *qrcode.QRCode) *ArticlePoster

func (*ArticlePoster) CheckNotExistMergedImg

func (ap *ArticlePoster) CheckNotExistMergedImg(path string) bool

func (*ArticlePoster) OpenMergedImg

func (ap *ArticlePoster) OpenMergedImg(path string) (*os.File, error)

type ArticlePosterBG

type ArticlePosterBG struct {
	Name string
	*ArticlePoster
	*Rect
	*Point
}

func NewArticlePosterBG

func NewArticlePosterBG(name string, ap *ArticlePoster, rect *Rect, p *Point) *ArticlePosterBG

func (*ArticlePosterBG) Generate

func (apb *ArticlePosterBG) Generate() (string, string, error)

func (*ArticlePosterBG) OpenBackGroundImg

func (apb *ArticlePosterBG) OpenBackGroundImg(path string) (*os.File, error)

type Point

type Point struct {
	X, Y int
}

type Rect

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

Jump to

Keyboard shortcuts

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