GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — cli package - github.com/wendigo/go-bind-plugin/cli - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • unchecked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

github.com/wendigo/go-bind-plugin

Links

  • Open Source Insights Logo Open Source Insights

Documentation ¶

Index ¶

  • type BenchmarkPlugin
    • func BindBenchmarkPlugin(path string) (*BenchmarkPlugin, error)
    • func (p *BenchmarkPlugin) String() string
    • func (p *BenchmarkPlugin) Sum(in0 []uint64) uint64
  • type Cli
    • func New(config Config, logger *log.Logger) (*Cli, error)
    • func (c *Cli) GenerateFile() error
  • type Config
    • func (c Config) String() string

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type BenchmarkPlugin ¶

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

BenchmarkPlugin wraps symbols (functions and variables) exported by plugin github.com/wendigo/go-bind-plugin/cli/internal/test_fixtures/benchmark_plugin

See docs at https://pkg.go.dev/github.com/wendigo/go-bind-plugin/cli/internal/test_fixtures/benchmark_plugin

func BindBenchmarkPlugin ¶

func BindBenchmarkPlugin(path string) (*BenchmarkPlugin, error)

BindBenchmarkPlugin loads plugin from the given path and binds symbols (variables and functions) to the BenchmarkPlugin struct.

func (*BenchmarkPlugin) String ¶

func (p *BenchmarkPlugin) String() string

String returns textual representation of the wrapper. It provides info on exported symbols and variables.

func (*BenchmarkPlugin) Sum ¶

func (p *BenchmarkPlugin) Sum(in0 []uint64) uint64

Sum function was exported from plugin github.com/wendigo/go-bind-plugin/cli/internal/test_fixtures/benchmark_plugin symbol 'Sum'

See docs at https://pkg.go.dev/github.com/wendigo/go-bind-plugin/cli/internal/test_fixtures/benchmark_plugin#Sum

type Cli ¶

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

Cli is responsible for generating plugin wrapper, can be initialized with New()

func New ¶

func New(config Config, logger *log.Logger) (*Cli, error)

New creates new plugin wrapper generator

func (*Cli) GenerateFile ¶

func (c *Cli) GenerateFile() error

GenerateFile generates wrapper file for plugin

type Config ¶

type Config struct {
	// Path to the plugin
	PluginPath string
	// Plugin's package (will be used to compile plugin when PluginPath does not exist)
	PluginPackage string
	// Path where generated wrapper will be written
	OutputPath string

	// Name of the struct/interface that will be generated
	OutputName string

	// Dereference variables exported by plugin
	DereferenceVariables bool

	// Generate SHA256 for existing/compiled plugin and write it to the Bind* function
	CheckSha256 bool

	// Format generated code using gofmt -s -w
	FormatCode bool

	// Rebuild plugin from sources even if *.so exists at PluginPath
	ForcePluginRebuild bool

	// Package name of the generated file
	OutputPackage string

	// Do not export plugin's variables
	HideVariables bool

	// Generate interface and return it in Bind* function instead of struct (enables HideVariables)
	AsInterface bool
}

Config for Cli

func (Config) String ¶

func (c Config) String() string

String formats config as command line arguments, omitting unset options

Source Files ¶

View all Source files
  • cli.go
  • cli_test_plugin.go
  • function.go
  • plugin.go
  • reflect.go
  • source.go
  • symbols.go
  • template.go
  • utils.go
  • variables.go

Directories ¶

Path Synopsis
internal
test_fixtures/basic_plugin command
test_fixtures/benchmark_plugin command
test_fixtures/complex_plugin command
test_fixtures/complex_plugin/http
test_fixtures/plugin_as_interface command
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.