package known

import "github.com/knqyf263/go-plugin/examples/known-types/known"

Index

Constants

const WellKnownPluginAPIVersion = 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 DiffReply

type DiffReply struct {
	Duration *durationpb.Duration `protobuf:"bytes,1,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func (*DiffReply) GetDuration

func (x *DiffReply) GetDuration() *durationpb.Duration

func (*DiffReply) MarshalToSizedBufferVT

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

func (*DiffReply) MarshalToVT

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

func (*DiffReply) MarshalVT

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

func (*DiffReply) ProtoReflect

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

func (*DiffReply) SizeVT

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

func (*DiffReply) UnmarshalVT

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

type DiffRequest

type DiffRequest struct {
	Value *structpb.Value        `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
	End   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

func (*DiffRequest) GetEnd

func (x *DiffRequest) GetEnd() *timestamppb.Timestamp

func (*DiffRequest) GetStart

func (x *DiffRequest) GetStart() *timestamppb.Timestamp

func (*DiffRequest) GetValue

func (x *DiffRequest) GetValue() *structpb.Value

func (*DiffRequest) MarshalToSizedBufferVT

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

func (*DiffRequest) MarshalToVT

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

func (*DiffRequest) MarshalVT

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

func (*DiffRequest) ProtoReflect

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

func (*DiffRequest) SizeVT

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

func (*DiffRequest) UnmarshalVT

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

type WellKnown

type WellKnown interface {
	Diff(context.Context, DiffRequest) (DiffReply, error)
}

The greeting service definition. go:plugin type=plugin

type WellKnownPlugin

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

func NewWellKnownPlugin

func NewWellKnownPlugin(ctx context.Context, opt WellKnownPluginOption) (*WellKnownPlugin, error)

func (*WellKnownPlugin) Close

func (p *WellKnownPlugin) Close(ctx context.Context) (err error)

func (*WellKnownPlugin) Load

func (p *WellKnownPlugin) Load(ctx context.Context, pluginPath string) (WellKnown, error)

type WellKnownPluginOption

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

Source Files

known.pb.go known_host.pb.go known_vtproto.pb.go

Version
v0.4.0
Published
Dec 1, 2022
Platform
js/wasm
Imports
17 packages
Last checked
3 days ago

Tools for package owners.