mark2web

package
v1.0.2-0...-14ad975 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Logger *log.Logger
	DB     db.DB
}

Service implements core logic for converting markdown to URL

func NewService

func NewService(opts ...func(*Service) error) (*Service, error)

func (*Service) HTMLFor

func (s *Service) HTMLFor(ID string) ([]byte, error)

HTMLFor returns the corresponding HTML for the ID

func (*Service) MarkdownToURL

func (s *Service) MarkdownToURL(md []byte, host string) (string, error)

MarkdownToURL generates a URL for the markdown, creates a mapping of the URL to the markdown and returns the URL

Jump to

Keyboard shortcuts

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