script

package
v0.0.0-...-83f3093 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(cfg *config.AppConfig, log *logger.Logger) *Manager

func (*Manager) Execute

func (m *Manager) Execute(script Script, callback OutputCallback) error

func (*Manager) GetScripts

func (m *Manager) GetScripts() []Script

func (*Manager) Load

func (m *Manager) Load() error

func (*Manager) Search

func (m *Manager) Search(keyword string) []Script

type OutputCallback

type OutputCallback func(string)

添加一个回调函数类型

type Script

type Script struct {
	Name        string    `json:"name"`
	Path        string    `json:"path"`
	Description string    `json:"description"`
	Keywords    string    `json:"keywords"`
	LastRunTime time.Time `json:"last_run_time"`
}

Jump to

Keyboard shortcuts

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