ggccmd

package
v0.0.10-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *redant.Command

Types

type AliasDef

type AliasDef struct {
	Single   string
	Sequence []string
}

func (AliasDef) MarshalYAML

func (a AliasDef) MarshalYAML() (interface{}, error)

func (AliasDef) MaxPlaceholderIndex

func (a AliasDef) MaxPlaceholderIndex() int

func (AliasDef) RequiredArgCount

func (a AliasDef) RequiredArgCount() int

func (AliasDef) Summary

func (a AliasDef) Summary() string

func (AliasDef) Templates

func (a AliasDef) Templates() []string

func (*AliasDef) UnmarshalYAML

func (a *AliasDef) UnmarshalYAML(value *yaml.Node) error

func (AliasDef) UsageSuffix

func (a AliasDef) UsageSuffix() string

type CommandEntry

type CommandEntry struct {
	Key         string
	Usage       string
	Description string
	Handler     CommandHandler
}

type CommandHandler

type CommandHandler func(ctx context.Context, rest []string) error

type GGCState

type GGCState struct {
	Workflows [][]string          `yaml:"workflows,omitempty"`
	Aliases   map[string]AliasDef `yaml:"aliases,omitempty"`
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Execute

func (r *Registry) Execute(ctx context.Context, args []string) error

func (*Registry) Get

func (r *Registry) Get(key string) (CommandEntry, bool)

func (*Registry) List

func (r *Registry) List() []CommandEntry

func (*Registry) Register

func (r *Registry) Register(entry CommandEntry)

type StateStore

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

func NewStateStore

func NewStateStore() *StateStore

func (*StateStore) Load

func (s *StateStore) Load() (*GGCState, error)

func (*StateStore) Path

func (s *StateStore) Path() string

func (*StateStore) Save

func (s *StateStore) Save(state *GGCState) error

Jump to

Keyboard shortcuts

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