utils

package
v0.0.0-...-34898ab Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGrafargPluginDir

func GetGrafargPluginDir(currentOS string) string

Types

type ApiClient

type ApiClient interface {
	GetPlugin(pluginId, repoUrl string) (models.Plugin, error)
	DownloadFile(pluginName string, tmpFile *os.File, url string, checksum string) (err error)
	ListAllPlugins(repoUrl string) (models.PluginRepo, error)
}

type CommandLine

type CommandLine interface {
	ShowHelp() error
	ShowVersion()
	Application() *cli.App
	Args() cli.Args
	Bool(name string) bool
	Int(name string) int
	String(name string) string
	StringSlice(name string) []string
	FlagNames() (names []string)
	Generic(name string) interface{}

	PluginDirectory() string
	RepoDirectory() string
	PluginURL() string
}

type ContextCommandLine

type ContextCommandLine struct {
	*cli.Context
}

func (*ContextCommandLine) Application

func (c *ContextCommandLine) Application() *cli.App

func (*ContextCommandLine) ConfigFile

func (c *ContextCommandLine) ConfigFile() string

func (*ContextCommandLine) HomePath

func (c *ContextCommandLine) HomePath() string

func (*ContextCommandLine) PluginDirectory

func (c *ContextCommandLine) PluginDirectory() string

func (*ContextCommandLine) PluginURL

func (c *ContextCommandLine) PluginURL() string

func (*ContextCommandLine) RepoDirectory

func (c *ContextCommandLine) RepoDirectory() string

func (*ContextCommandLine) ShowHelp

func (c *ContextCommandLine) ShowHelp() error

func (*ContextCommandLine) ShowVersion

func (c *ContextCommandLine) ShowVersion()

Jump to

Keyboard shortcuts

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