plugin

package module
v2.0.0-...-bfe8e52 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompatV1

type CompatV1 struct {
	GetPluginInfo func() papiv1.Info
	GetInstance   func(user papiv1.UserContext) (papiv1.Plugin, error)
}

CompatV1 is an API interface that is compatible with the V1 API.

func NewCompatV1FromPlugin

func NewCompatV1FromPlugin(plugin *plugin.Plugin) (*CompatV1, error)

NewCompatV1FromPlugin creates a new CompatV1 from a native Go plugin.

type CompatV1Shim

type CompatV1Shim struct {
	http.Server
	// contains filtered or unexported fields
}

CompatV1Shim is a shim that acts like a plugin server and delegates request to something that implements a V1-style API interface.

func NewCompatV1Rpc

func NewCompatV1Rpc(compatV1 *CompatV1, cliArgs []string) (*CompatV1Shim, error)

NewCompatV1Rpc creates a new CompatV1Shim server.

func (*CompatV1Shim) ServeHTTP

func (h *CompatV1Shim) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GrpcDialer

type GrpcDialer interface {
	Dial(ctx context.Context) (*grpc.ClientConn, error)
}

type PluginCli

type PluginCli struct {
	KexReqFile  *os.File
	KexRespFile *os.File
	Debug       bool
	// contains filtered or unexported fields
}

/ PluginCli implements the CLI interface for a Gotify plugin.

func ParsePluginCli

func ParsePluginCli(args []string) (*PluginCli, error)

ParsePluginCli parses the CLI arguments and returns a PluginCli instance.

func (*PluginCli) Close

func (f *PluginCli) Close() error

Close closes any file descriptors associated with the PluginCli instance.

func (*PluginCli) Kex

func (f *PluginCli) Kex(modulePath string, certPool *x509.CertPool) (certChain []tls.Certificate, err error)

Kex performs the key exchange through secure file descriptors provided in the arguments.

Directories

Path Synopsis
examples_v1
echo command
minimal command
generated

Jump to

Keyboard shortcuts

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