template

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Template)

func WithContent

func WithContent(content string) Option

func WithID

func WithID(id int64) Option

func WithIsDelete

func WithIsDelete(isDelete bool) Option

func WithTitle

func WithTitle(title string) Option

type Template

type Template struct {
	ID         int64
	Title      string
	Content    string
	IsDelete   bool
	CreateTime time.Time
	UpdateTime time.Time
}

func New

func New(options ...Option) *Template

func NewWithModel

func NewWithModel(model *models.Template) *Template

func (*Template) GenerateId

func (t *Template) GenerateId()

func (*Template) ToDTO

func (t *Template) ToDTO() *api.Template

func (*Template) ToModel

func (t *Template) ToModel() *models.Template

func (*Template) Update

func (t *Template) Update(options ...Option)

Jump to

Keyboard shortcuts

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