template

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltinTemplates embed.FS

Functions

func Delete

func Delete(db *gorm.DB, id int)

Types

type Template

type Template struct {
	ID           int          `gorm:"primary_key" json:"id"`
	Name         string       `gorm:"uniqueIndex" json:"name"`
	Content      string       `json:"content"`
	TemplateType TemplateType `json:"template_type"`
}

func All

func All(db *gorm.DB) []Template

func Upsert

func Upsert(db *gorm.DB, name string, content string) Template

type TemplateType

type TemplateType string
const (
	Builtin TemplateType = "builtin"
	Custom  TemplateType = "custom"
)

Jump to

Keyboard shortcuts

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