template

package
v0.4.1-beta Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CONTENT = `` /* 291-byte string literal not displayed */

DEFAULT_CONTENT the default content for the template

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomContentReader

type CustomContentReader interface {
	Read() (string, error)
}

CustomContentReader get the content of a template from a custom configured location

type Service

type Service interface {
	RenderCustomContent(data TemplateData) (string, error)
	RenderDefaultContent(data TemplateData) string
	RenderMetaContent(parameters []string) string
	RenderRelationLink(adrTitle string, adrFilename string, relationTitle string) string
}

Service service that renders the template content

func CreateService

func CreateService(
	customTemplateContentReader CustomContentReader,
) Service

CreateService creates a Service instance

type TemplateData

type TemplateData struct {
	Title  string
	Status string
	Date   string
	Meta   []string
}

TemplateData represents the data that will be render by the Service

type Writer

type Writer interface {
	Persist() error
}

Writer persist the content of the template

Jump to

Keyboard shortcuts

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