libraries

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllLibraries = Libraries{
	{Key: "string", Name: "Rich String", Icon: "cog"},
	{Key: "filesystem", Name: "Filesystem", Icon: "file", Files: map[string]string{
		"module/filesystem/app/lib/filesystem": "./",
	}},
}

Functions

This section is empty.

Types

type Libraries

type Libraries []*Library

func (Libraries) Get

func (l Libraries) Get(key string) *Library

func (Libraries) Index

func (l Libraries) Index(key string) int

type Library

type Library struct {
	Key   string            `json:"key"`
	Name  string            `json:"name"`
	Icon  string            `json:"icon"`
	Files map[string]string `json:"files"`
}

func (*Library) String

func (l *Library) String() string

type Result

type Result struct {
	ID      uuid.UUID `json:"id,omitzero"`
	Library *Library  `json:"library,omitzero"`
	Action  string    `json:"action,omitzero"`
	Output  []any     `json:"output,omitzero"`
	Outcome string    `json:"outcome,omitzero"`
}

func NewResult

func NewResult(library *Library, action string) *Result

func Process

func Process(ctx context.Context, lib *Library, act string, logger util.Logger) (*Result, error)

func (*Result) AddMessage

func (r *Result) AddMessage(s string, args ...any)

func (*Result) String

func (r *Result) String() string

type Results

type Results []*Result

func (Results) Sort

func (r Results) Sort()

Jump to

Keyboard shortcuts

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