pkg

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTemplateCommand

func LoadTemplateCommand(path string) (*cmds.TemplateCommand, bool)

Types

type FileType

type FileType int
const (
	Plain FileType = iota
	Executable
	TemplateCommand
)

type Prompto added in v0.1.2

type Prompto struct {
	Name       string
	Group      string
	Type       FileType
	Command    *cmds.TemplateCommand
	FilePath   string // New field to store absolute file path
	Repository string // New field to store repository
}

func (*Prompto) Render added in v0.1.2

func (p *Prompto) Render(repo string, restArgs []string) (string, error)

type Repository added in v0.1.2

type Repository struct {
	Path     string
	Promptos map[string]Prompto
}

func NewRepository added in v0.1.2

func NewRepository(path string) *Repository

func (*Repository) AddPrompto added in v0.1.4

func (r *Repository) AddPrompto(path string) error

func (*Repository) GetGroups added in v0.1.2

func (r *Repository) GetGroups() []string

func (*Repository) GetPromptos added in v0.1.4

func (r *Repository) GetPromptos() []Prompto

func (*Repository) GetPromptosByGroup added in v0.1.2

func (r *Repository) GetPromptosByGroup(group string) []Prompto

func (*Repository) GroupPromptos added in v0.1.2

func (r *Repository) GroupPromptos() map[string][]Prompto

func (*Repository) LoadPromptos added in v0.1.2

func (r *Repository) LoadPromptos() error

func (*Repository) Refresh added in v0.1.2

func (r *Repository) Refresh() error

func (*Repository) RemovePrompto added in v0.1.4

func (r *Repository) RemovePrompto(path string) error

func (*Repository) Watch added in v0.1.2

func (r *Repository) Watch(ctx context.Context, options ...watcher.Option) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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