Documentation ¶
Index ¶
- func GetCodeBlocks(filepath string, allowUnknown bool, allowUnnamed bool, fs billy.Basic) (document.CodeBlocks, error)
- func GetCodeBlocksAndParseFrontmatter(filepath string, allowUnknown bool, allowUnnamed bool, fs billy.Basic) (document.CodeBlocks, document.Frontmatter, error)
- func GetCurrentGitEmail(cwd string) (string, error)
- func LoadProjectFiles(proj Project) ([]string, error)
- func ReadMarkdownFile(filepath string, fs billy.Basic) ([]byte, error)
- func WriteMarkdownFile(filename string, fs billy.Basic, data []byte) error
- type Branch
- type CodeBlock
- type CodeBlockFS
- type CodeBlocks
- func (blocks CodeBlocks) Lookup(queryName string) []CodeBlock
- func (blocks CodeBlocks) LookupByFile(queryFile string) ([]CodeBlock, error)
- func (blocks CodeBlocks) LookupByID(query string) ([]CodeBlock, error)
- func (blocks CodeBlocks) LookupWithFile(queryFile string, queryName string) ([]CodeBlock, error)
- func (blocks CodeBlocks) Names() []string
- type DirectoryProject
- func (p *DirectoryProject) Dir() string
- func (p *DirectoryProject) EnvLoadOrder() []string
- func (p *DirectoryProject) LoadEnvs() (map[string]string, error)
- func (p *DirectoryProject) LoadTasks(filesOnly bool, channel chan<- interface{})
- func (p *DirectoryProject) SetEnvLoadOrder(envLoadOrder []string)
- func (p *DirectoryProject) SetRespectGitignore(respectGitignore bool)
- type DirectoryProjectMatcher
- type ErrCodeBlockFileNotFound
- type ErrCodeBlockNameNotFound
- type FileCodeBlock
- type LoadTaskError
- type LoadTaskFoundFile
- type LoadTaskFoundTask
- type LoadTaskParsingFile
- type LoadTaskSearchingFolder
- type LoadTaskStatusParsingFiles
- type LoadTaskStatusSearchingFiles
- type Project
- type Resolver
- type SingleFileProject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCodeBlocks ¶ added in v1.2.0
func GetCodeBlocksAndParseFrontmatter ¶ added in v1.2.1
func GetCodeBlocksAndParseFrontmatter(filepath string, allowUnknown bool, allowUnnamed bool, fs billy.Basic) (document.CodeBlocks, document.Frontmatter, error)
func GetCurrentGitEmail ¶
func LoadProjectFiles ¶ added in v1.3.0
Load files, blocking until all projects are loaded
func ReadMarkdownFile ¶ added in v1.2.0
func WriteMarkdownFile ¶ added in v1.3.0
Types ¶
type CodeBlock ¶ added in v1.2.0
type CodeBlock struct { Block *document.CodeBlock /// Relative to `project.Root()` File string Frontmatter document.Frontmatter // contains filtered or unexported fields }
func (CodeBlock) GetFileRel ¶ added in v1.2.1
func (CodeBlock) GetFrontmatter ¶ added in v1.2.1
func (b CodeBlock) GetFrontmatter() document.Frontmatter
type CodeBlockFS ¶ added in v1.2.1
type CodeBlockFS interface { billy.Basic billy.Chroot }
type CodeBlocks ¶ added in v1.2.0
type CodeBlocks []CodeBlock
func LoadProjectTasks ¶ added in v1.3.0
func LoadProjectTasks(proj Project) (CodeBlocks, error)
Load tasks, blocking until all projects are loaded
func (CodeBlocks) Lookup ¶ added in v1.2.0
func (blocks CodeBlocks) Lookup(queryName string) []CodeBlock
func (CodeBlocks) LookupByFile ¶ added in v1.2.0
func (blocks CodeBlocks) LookupByFile(queryFile string) ([]CodeBlock, error)
func (CodeBlocks) LookupByID ¶ added in v1.2.0
func (blocks CodeBlocks) LookupByID(query string) ([]CodeBlock, error)
func (CodeBlocks) LookupWithFile ¶ added in v1.2.0
func (blocks CodeBlocks) LookupWithFile(queryFile string, queryName string) ([]CodeBlock, error)
func (CodeBlocks) Names ¶ added in v1.2.0
func (blocks CodeBlocks) Names() []string
type DirectoryProject ¶ added in v1.2.0
type DirectoryProject struct {
// contains filtered or unexported fields
}
func NewDirectoryProject ¶ added in v1.2.0
func (*DirectoryProject) Dir ¶ added in v1.2.0
func (p *DirectoryProject) Dir() string
func (*DirectoryProject) EnvLoadOrder ¶ added in v1.2.0
func (p *DirectoryProject) EnvLoadOrder() []string
func (*DirectoryProject) LoadEnvs ¶ added in v1.2.0
func (p *DirectoryProject) LoadEnvs() (map[string]string, error)
func (*DirectoryProject) LoadTasks ¶ added in v1.2.0
func (p *DirectoryProject) LoadTasks(filesOnly bool, channel chan<- interface{})
func (*DirectoryProject) SetEnvLoadOrder ¶ added in v1.2.0
func (p *DirectoryProject) SetEnvLoadOrder(envLoadOrder []string)
func (*DirectoryProject) SetRespectGitignore ¶ added in v1.2.0
func (p *DirectoryProject) SetRespectGitignore(respectGitignore bool)
type DirectoryProjectMatcher ¶ added in v1.2.0
type DirectoryProjectMatcher struct {
// contains filtered or unexported fields
}
TODO(mxs): support `.runmeignore` file
type ErrCodeBlockFileNotFound ¶ added in v1.2.0
type ErrCodeBlockFileNotFound struct {
// contains filtered or unexported fields
}
func (ErrCodeBlockFileNotFound) Error ¶ added in v1.2.0
func (e ErrCodeBlockFileNotFound) Error() string
func (ErrCodeBlockFileNotFound) FailedFileQuery ¶ added in v1.2.0
func (e ErrCodeBlockFileNotFound) FailedFileQuery() string
type ErrCodeBlockNameNotFound ¶ added in v1.2.0
type ErrCodeBlockNameNotFound struct {
// contains filtered or unexported fields
}
func (ErrCodeBlockNameNotFound) Error ¶ added in v1.2.0
func (e ErrCodeBlockNameNotFound) Error() string
func (ErrCodeBlockNameNotFound) FailedNameQuery ¶ added in v1.2.0
func (e ErrCodeBlockNameNotFound) FailedNameQuery() string
type FileCodeBlock ¶ added in v1.2.0
type LoadTaskError ¶ added in v1.3.0
type LoadTaskError struct {
Err error
}
type LoadTaskFoundFile ¶ added in v1.3.0
type LoadTaskFoundFile struct {
Filename string
}
type LoadTaskFoundTask ¶ added in v1.3.0
type LoadTaskFoundTask struct {
Task CodeBlock
}
type LoadTaskParsingFile ¶ added in v1.3.0
type LoadTaskParsingFile struct {
Filename string
}
type LoadTaskSearchingFolder ¶ added in v1.3.0
type LoadTaskSearchingFolder struct {
Folder string
}
type LoadTaskStatusParsingFiles ¶ added in v1.3.0
type LoadTaskStatusParsingFiles struct{}
type LoadTaskStatusSearchingFiles ¶ added in v1.3.0
type LoadTaskStatusSearchingFiles struct{}
type Project ¶
type Project interface { // Loads tasks in project, sending details to provided channel. Will block, but is thread-safe. // // Received messages for the channel will be of type `project.LoadTask*`. The // channel will be closed on finish or error. // // Use `filesOnly` to just find files, skipping markdown parsing LoadTasks(filesOnly bool, channel chan<- interface{}) LoadEnvs() (map[string]string, error) EnvLoadOrder() []string Dir() string }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
type SingleFileProject ¶ added in v1.2.0
type SingleFileProject struct {
// contains filtered or unexported fields
}
func NewSingleFileProject ¶ added in v1.2.0
func NewSingleFileProject(file string, allowUnknown bool, allowUnnamed bool) *SingleFileProject
func (*SingleFileProject) Dir ¶ added in v1.2.0
func (p *SingleFileProject) Dir() string
func (*SingleFileProject) EnvLoadOrder ¶ added in v1.2.0
func (p *SingleFileProject) EnvLoadOrder() []string
func (*SingleFileProject) LoadEnvs ¶ added in v1.2.0
func (p *SingleFileProject) LoadEnvs() (map[string]string, error)
func (*SingleFileProject) LoadTasks ¶ added in v1.2.0
func (p *SingleFileProject) LoadTasks(filesOnly bool, channel chan<- interface{})
Click to show internal directories.
Click to hide internal directories.