This breaks the dependency of libplugin on x/crypto, enabling people to use libplugin without having conflicts over the crypto module.
25 lines
624 B
Go
25 lines
624 B
Go
//go:build full || e2e
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/tg123/sshpiper/libplugin"
|
|
"github.com/tg123/sshpiper/libplugin/skel"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func main() {
|
|
libplugin.CreateAndRunPluginTemplate(&libplugin.PluginTemplate{
|
|
Name: "docker",
|
|
Usage: "sshpiperd docker plugin, see config in https://github.com/tg123/sshpiper/tree/master/plugin/docker",
|
|
CreateConfig: func(c *cli.Context) (*libplugin.SshPiperPluginConfig, error) {
|
|
plugin, err := newDockerPlugin()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
skel := skel.NewSkelPlugin(plugin.listPipe)
|
|
return skel.CreateConfig(), nil
|
|
},
|
|
})
|
|
}
|