markdown

package
v0.0.0-...-e7971d2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDocFromMarkdownParsing

func NewDocFromMarkdownParsing(result ParseResult) model.NewDocumentOption

Types

type FileEnvironment

type FileEnvironment struct {
	Filepath string
}

type MarkdownOption

type MarkdownOption struct {
	// contains filtered or unexported fields
}

func FromLocalFile

func FromLocalFile(workingDir, searchname string) (MarkdownOption, error)

func (MarkdownOption) Filename

func (mo MarkdownOption) Filename() string

type ParseResult

type ParseResult struct {
	Title       string                  `json:"title"`
	Description string                  `json:"description"`
	Tasks       []ParseResultTask       `json:"tasks,omitempty"`
	Config      ParseResultGlobalConfig `json:"config,omitempty"`
}

func ParseMarkdown

func ParseMarkdown(ctx context.Context, markdown MarkdownOption) (ParseResult, error)

type ParseResultCommand

type ParseResultCommand struct {
	Lang string `json:"lang"`
	Code string `json:"code"`
}

type ParseResultGlobalConfig

type ParseResultGlobalConfig struct {
	Root    string                    `json:"root" yaml:"root"`
	Environ ParseResultTaskConfigEnvs `json:"environ" yaml:"environ"`
}

type ParseResultTask

type ParseResultTask struct {
	Title        string                `json:"title"`
	HeadingLevel int                   `json:"heading-level"`
	Description  string                `json:"description"`
	Config       ParseResultTaskConfig `json:"config,omitempty"`
	Commands     []ParseResultCommand  `json:"commands,omitempty"`
}

type ParseResultTaskConfig

type ParseResultTaskConfig struct {
	Environ  ParseResultTaskConfigEnvs     `json:"environ,omitempty" yaml:"environ"`
	Requires ParseResultTaskConfigRequires `json:"requires,omitempty" yaml:"requires"`
	Skips    ParseResultTaskConfigSkips    `json:"skips,omitempty" yaml:"skips"`
	Previous []string                      `json:"previous,omitempty" yaml:"previous"`
}

type ParseResultTaskConfigEnvs

type ParseResultTaskConfigEnvs struct {
	Dotenvs   []string          `json:"dotenv,omitempty" yaml:"dotenv"`
	Variables map[string]string `json:"vars,omitempty" yaml:"vars"`
}

type ParseResultTaskConfigFiles

type ParseResultTaskConfigFiles struct {
	Exists      []string `json:"exist,omitempty" yaml:"exist"`
	NotChangeds []string `json:"not-changed,omitempty" yaml:"not-changed"`
}

type ParseResultTaskConfigRequires

type ParseResultTaskConfigRequires struct {
	File ParseResultTaskConfigFiles `json:"file,omitempty" yaml:"file"`
}

type ParseResultTaskConfigSkips

type ParseResultTaskConfigSkips struct {
	File ParseResultTaskConfigFiles `json:"file,omitempty" yaml:"file"`
}

Jump to

Keyboard shortcuts

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