sdk

package
v0.9.6-beta Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginFn

type PluginFn func(context.Context, []string) error

type PluginGetter

type PluginGetter interface {
	GetPlugin() *plugin.Plugin
}

func LoadSDKPlugin

func LoadSDKPlugin(elfModule string) (plug PluginGetter, err error)

type SDKPlugin

type SDKPlugin interface {
	SetStdout(io.Writer) error
	PluginName() string
	Install(ctx context.Context, args []string) error
	Download(ctx context.Context, args []string) error
	List(ctx context.Context, args []string) error
	Current(ctx context.Context, args []string) error
	Use(ctx context.Context, args []string) error
}

func Bind

func Bind(plug *plugin.Plugin) (sdkPlugin SDKPlugin, err error)

type SDKPluginBinder

type SDKPluginBinder interface {
	Bind(p *plugin.Plugin) (plugin SDKPlugin, err error)
}

type SDKPluginBinderFn

type SDKPluginBinderFn func(p *plugin.Plugin) (plugin SDKPlugin, err error)

SDKPluginBinderFn already implements interface SDKPluginBinder

func (*SDKPluginBinderFn) Bind

func (binderFnP *SDKPluginBinderFn) Bind(plug *plugin.Plugin) (sdkPlugin SDKPlugin, err error)

type SDKPluginLoader

type SDKPluginLoader interface {
	LoadSDKPlugin(elfModule string) (plug PluginGetter, err error)
}

type SDKPluginLoaderFn

type SDKPluginLoaderFn func(elfModule string) (plug PluginGetter, err error)

func (*SDKPluginLoaderFn) LoadSDKPlugin

func (loaderFnP *SDKPluginLoaderFn) LoadSDKPlugin(elfModule string) (plug PluginGetter, err error)

type SdkPluginW

type SdkPluginW struct {
	Plug       plugin.Plugin
	NameFn     func() string
	InstallFn  PluginFn
	DownloadFn PluginFn
	ListFn     PluginFn
	CurrentFn  PluginFn
	UseFn      PluginFn
	OutFn      func(writer io.Writer) error
}

func (*SdkPluginW) Current

func (w *SdkPluginW) Current(ctx context.Context, args []string) error

func (*SdkPluginW) Download

func (w *SdkPluginW) Download(ctx context.Context, args []string) error

func (*SdkPluginW) GetPlugin

func (w *SdkPluginW) GetPlugin() *plugin.Plugin

func (*SdkPluginW) Install

func (w *SdkPluginW) Install(ctx context.Context, args []string) error

func (*SdkPluginW) List

func (w *SdkPluginW) List(ctx context.Context, args []string) error

func (*SdkPluginW) Lookup

func (w *SdkPluginW) Lookup(symName string) (sym plugin.Symbol, err error)

func (*SdkPluginW) PluginName

func (w *SdkPluginW) PluginName() string

func (*SdkPluginW) SetStdout

func (w *SdkPluginW) SetStdout(writer io.Writer) error

func (*SdkPluginW) Use

func (w *SdkPluginW) Use(ctx context.Context, args []string) error

type SymbolLoader

type SymbolLoader interface {
	Lookup(symName string) (plugin.Symbol, error)
}

Jump to

Keyboard shortcuts

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