extension

package
v0.0.0-...-7b27a3b Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalExtension

type LocalExtension struct {
	RemoteExtension

	FullPath string       `json:"fullPath"`
	DirName  string       `json:"dirName"`
	Shortcut string       `json:"shortcut"`
	Action   RemoteAction `json:"action"`
	RunCount int64        `json:"runCount"`
}

type Manager

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

func NewManager

func NewManager(shortManager ShortManager) *Manager

func (*Manager) ChangeExtension

func (e *Manager) ChangeExtension(path string)

func (*Manager) CurrentExt

func (e *Manager) CurrentExt() *LocalExtension

func (*Manager) Exit

func (e *Manager) Exit()

func (*Manager) InstallExtension

func (e *Manager) InstallExtension(extension RemoteExtension, override bool) error

func (*Manager) ListLocalExtension

func (e *Manager) ListLocalExtension() []*LocalExtension

func (*Manager) ListLocalExtensionWithoutAction

func (e *Manager) ListLocalExtensionWithoutAction() []*LocalExtension

func (*Manager) ListRemoteExtension

func (e *Manager) ListRemoteExtension() []*RemoteExtensionResp

func (*Manager) Refresh

func (e *Manager) Refresh()

func (*Manager) RefreshExtension

func (e *Manager) RefreshExtension()

func (*Manager) RefreshLocal

func (e *Manager) RefreshLocal()

func (*Manager) Upgrade

func (e *Manager) Upgrade(ext *LocalExtension) (*object.Commit, error)

type RemoteAction

type RemoteAction struct {
	Name    string `json:"name"`
	Command string `json:"command"`
}

type RemoteExtension

type RemoteExtension struct {
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Author      string         `json:"author"`
	Icon        string         `json:"icon"`
	Github      string         `json:"github"`
	Actions     []RemoteAction `json:"actions"`
}

type RemoteExtensionResp

type RemoteExtensionResp struct {
	RemoteExtension
	Installed bool   `json:"installed"`
	FullPath  string `json:"fullPath"`
}

type ShortManager

type ShortManager interface {
	GetShortCut(kind, name string) string
}

Jump to

Keyboard shortcuts

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