package cat

import "github.com/knqyf263/go-plugin/examples/wasi/cat"

Index

Constants

const FileCatPluginAPIVersion = 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 FileCat

type FileCat interface {
	Cat(context.Context, FileCatRequest) (FileCatReply, error)
}

go:plugin type=plugin

type FileCatPlugin

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

func NewFileCatPlugin

func NewFileCatPlugin(ctx context.Context, opt FileCatPluginOption) (*FileCatPlugin, error)

func (*FileCatPlugin) Load

func (p *FileCatPlugin) Load(ctx context.Context, pluginPath string) (FileCat, error)

type FileCatPluginOption

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

type FileCatReply

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

func (*FileCatReply) GetContent

func (x *FileCatReply) GetContent() string

func (*FileCatReply) MarshalToSizedBufferVT

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

func (*FileCatReply) MarshalToVT

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

func (*FileCatReply) MarshalVT

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

func (*FileCatReply) ProtoReflect

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

func (*FileCatReply) SizeVT

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

func (*FileCatReply) UnmarshalVT

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

type FileCatRequest

type FileCatRequest struct {
	FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	// contains filtered or unexported fields
}

func (*FileCatRequest) GetFilePath

func (x *FileCatRequest) GetFilePath() string

func (*FileCatRequest) MarshalToSizedBufferVT

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

func (*FileCatRequest) MarshalToVT

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

func (*FileCatRequest) MarshalVT

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

func (*FileCatRequest) ProtoReflect

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

func (*FileCatRequest) SizeVT

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

func (*FileCatRequest) UnmarshalVT

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

Source Files

cat.pb.go cat_host.pb.go cat_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.