/
greet.pb.go
134 lines (109 loc) · 3.22 KB
/
greet.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Code generated by protoc-gen-go-plugin. DO NOT EDIT.
// versions:
// protoc-gen-go-plugin v0.1.0
// protoc v4.25.2
// source: examples/host-functions/greeting/greet.proto
package greeting
import (
context "context"
emptypb "github.com/khulnasoft-lab/go-plugin/types/known/emptypb"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The request message containing the user's name.
type GreetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GreetRequest) ProtoReflect() protoreflect.Message {
panic(`not implemented`)
}
func (x *GreetRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// The response message containing the greetings
type GreetReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *GreetReply) ProtoReflect() protoreflect.Message {
panic(`not implemented`)
}
func (x *GreetReply) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
type HttpGetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
}
func (x *HttpGetRequest) ProtoReflect() protoreflect.Message {
panic(`not implemented`)
}
func (x *HttpGetRequest) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
type HttpGetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}
func (x *HttpGetResponse) ProtoReflect() protoreflect.Message {
panic(`not implemented`)
}
func (x *HttpGetResponse) GetResponse() []byte {
if x != nil {
return x.Response
}
return nil
}
type LogRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *LogRequest) ProtoReflect() protoreflect.Message {
panic(`not implemented`)
}
func (x *LogRequest) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// The greeting service definition.
// go:plugin type=plugin version=1
type Greeter interface {
// Sends a greeting
Greet(context.Context, *GreetRequest) (*GreetReply, error)
}
// The host functions embedded into the plugin
// go:plugin type=host
type HostFunctions interface {
// Sends a HTTP GET request
HttpGet(context.Context, *HttpGetRequest) (*HttpGetResponse, error)
// Shows a log message
Log(context.Context, *LogRequest) (*emptypb.Empty, error)
}