markdown

package
v0.0.0-...-73eed44 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Collection = "MarkdownTemplate"

Variables

This section is empty.

Functions

This section is empty.

Types

type IMarkdownHelper

type IMarkdownHelper interface {
	MarkdownToHtml(input string) string
	TemplateMarkdownToHtml(templateName string) string
}

type MarkdownHelper

type MarkdownHelper struct {
	Client *mongo.Client
	// contains filtered or unexported fields
}

func NewIMarkdownHelper

func NewIMarkdownHelper(client *mongo.Client, tt *template.TemplateText) *MarkdownHelper

func (*MarkdownHelper) CreateTemplateMarkdown

func (mh *MarkdownHelper) CreateTemplateMarkdown(markdownTemplate *MarkdownTemplate) (*MarkdownTemplate, error)

func (*MarkdownHelper) MarkdownToHtml

func (mh *MarkdownHelper) MarkdownToHtml(input string) string

func (*MarkdownHelper) TemplateMarkdownToHtml

func (mh *MarkdownHelper) TemplateMarkdownToHtml(templateName string, keyValuePair map[string]string) []byte

type MarkdownTemplate

type MarkdownTemplate struct {
	Id        primitive.ObjectID `bson:"_id"`
	Name      string
	Content   string
	CreatedAt time.Time
	UpdatedAt time.Time
	IsActive  bool
}

Jump to

Keyboard shortcuts

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