package bar

import "github.com/knqyf263/go-plugin/tests/import/proto/bar"

Index

Constants

const BarPluginAPIVersion = 1

Variables

var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

Types

type Bar

type Bar interface {
	Hello(context.Context, Request) (Reply, error)
}

go:plugin type=plugin version=1

type BarPlugin

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

func NewBarPlugin

func NewBarPlugin(ctx context.Context, opt BarPluginOption) (*BarPlugin, error)

func (*BarPlugin) Load

func (p *BarPlugin) Load(ctx context.Context, pluginPath string) (Bar, error)

type BarPluginOption

type BarPluginOption struct {
	Stdout io.Writer
	Stderr io.Writer
	FS     fs.FS
}

type Reply

type Reply struct {
	A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
	// contains filtered or unexported fields
}

func (*Reply) GetA

func (x *Reply) GetA() string

func (*Reply) MarshalToSizedBufferVT

func (m *Reply) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Reply) MarshalToVT

func (m *Reply) MarshalToVT(dAtA []byte) (int, error)

func (*Reply) MarshalVT

func (m *Reply) MarshalVT() (dAtA []byte, err error)

func (*Reply) ProtoReflect

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) SizeVT

func (m *Reply) SizeVT() (n int)

func (*Reply) UnmarshalVT

func (m *Reply) UnmarshalVT(dAtA []byte) error

type Request

type Request struct {
	A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) GetA

func (x *Request) GetA() string

func (*Request) MarshalToSizedBufferVT

func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Request) MarshalToVT

func (m *Request) MarshalToVT(dAtA []byte) (int, error)

func (*Request) MarshalVT

func (m *Request) MarshalVT() (dAtA []byte, err error)

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) SizeVT

func (m *Request) SizeVT() (n int)

func (*Request) UnmarshalVT

func (m *Request) UnmarshalVT(dAtA []byte) error

Source Files

bar.pb.go bar_host.pb.go bar_vtproto.pb.go

Version
v0.2.0
Published
Nov 5, 2022
Platform
js/wasm
Imports
13 packages
Last checked
3 days ago

Tools for package owners.