go-bind-plugin: github.com/wendigo/go-bind-plugin/cli Index | Files

package cli

import "github.com/wendigo/go-bind-plugin/cli"

Index

Package Files

cli.go cli_test_plugin.go function.go plugin.go reflect.go template.go utils.go variables.go

type BenchmarkPlugin Uses

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

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

See docs at https://godoc.org/github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin

func BindBenchmarkPlugin Uses

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 Uses

func (p *BenchmarkPlugin) String() string

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

func (*BenchmarkPlugin) Sum Uses

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

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

See docs at https://godoc.org/github.com/wendigo/go-bind-plugin/internal/test_fixtures/benchmark_plugin#Sum

type Cli Uses

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

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

func New Uses

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

New creates new plugin wrapper generator

func (*Cli) GenerateFile Uses

func (c *Cli) GenerateFile() error

GenerateFile generates wrapper file for plugin

type Config Uses

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 Uses

func (c Config) String() string

String formats config as command line arguments

Package cli imports 15 packages (graph) and is imported by 1 packages. Updated 2017-09-19. Refresh now. Tools for package owners.