// Code generated by protoc-gen-go-plugin. DO NOT EDIT. // versions: // protoc-gen-go-plugin v0.1.0 // protoc v5.29.3 // source: host/http/http.proto package http import ( context "context" 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) ) type HttpRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Headers map[string]string `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` TimeoutMs int32 `protobuf:"varint,3,opt,name=timeout_ms,json=timeoutMs,proto3" json:"timeout_ms,omitempty"` Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // Ignored for GET/DELETE/HEAD/OPTIONS } func (x *HttpRequest) ProtoReflect() protoreflect.Message { panic(`not implemented`) } func (x *HttpRequest) GetUrl() string { if x != nil { return x.Url } return "" } func (x *HttpRequest) GetHeaders() map[string]string { if x != nil { return x.Headers } return nil } func (x *HttpRequest) GetTimeoutMs() int32 { if x != nil { return x.TimeoutMs } return 0 } func (x *HttpRequest) GetBody() []byte { if x != nil { return x.Body } return nil } type HttpResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // Non-empty if network/protocol error } func (x *HttpResponse) ProtoReflect() protoreflect.Message { panic(`not implemented`) } func (x *HttpResponse) GetStatus() int32 { if x != nil { return x.Status } return 0 } func (x *HttpResponse) GetBody() []byte { if x != nil { return x.Body } return nil } func (x *HttpResponse) GetHeaders() map[string]string { if x != nil { return x.Headers } return nil } func (x *HttpResponse) GetError() string { if x != nil { return x.Error } return "" } // go:plugin type=host version=1 type HttpService interface { Get(context.Context, *HttpRequest) (*HttpResponse, error) Post(context.Context, *HttpRequest) (*HttpResponse, error) Put(context.Context, *HttpRequest) (*HttpResponse, error) Delete(context.Context, *HttpRequest) (*HttpResponse, error) Patch(context.Context, *HttpRequest) (*HttpResponse, error) Head(context.Context, *HttpRequest) (*HttpResponse, error) Options(context.Context, *HttpRequest) (*HttpResponse, error) }