2019-06-03 19:44:43 +02:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2020-01-30 13:39:00 +02:00
|
|
|
// source: github.com/micro/go-micro/v2/api/proto/api.proto
|
2019-06-03 19:44:43 +02:00
|
|
|
|
|
|
|
package go_api
|
|
|
|
|
2019-11-26 15:53:33 +02:00
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
math "math"
|
|
|
|
)
|
2019-06-03 19:44:43 +02:00
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2019-11-26 15:53:33 +02:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2019-06-03 19:44:43 +02:00
|
|
|
|
|
|
|
type Pair struct {
|
|
|
|
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Pair) Reset() { *m = Pair{} }
|
|
|
|
func (m *Pair) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Pair) ProtoMessage() {}
|
|
|
|
func (*Pair) Descriptor() ([]byte, []int) {
|
2019-11-26 15:53:33 +02:00
|
|
|
return fileDescriptor_7b6696ef87ec1943, []int{0}
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
|
2019-06-03 19:44:43 +02:00
|
|
|
func (m *Pair) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Pair.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Pair.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
func (m *Pair) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Pair.Merge(m, src)
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
|
|
|
func (m *Pair) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Pair.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Pair) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Pair.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Pair proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Pair) GetKey() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Pair) GetValues() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Values
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// A HTTP request as RPC
|
|
|
|
// Forward by the api handler
|
|
|
|
type Request struct {
|
|
|
|
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
|
|
|
|
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
|
|
|
|
Header map[string]*Pair `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
Get map[string]*Pair `protobuf:"bytes,4,rep,name=get,proto3" json:"get,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
Post map[string]*Pair `protobuf:"bytes,5,rep,name=post,proto3" json:"post,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
|
|
|
|
Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) Reset() { *m = Request{} }
|
|
|
|
func (m *Request) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Request) ProtoMessage() {}
|
|
|
|
func (*Request) Descriptor() ([]byte, []int) {
|
2019-11-26 15:53:33 +02:00
|
|
|
return fileDescriptor_7b6696ef87ec1943, []int{1}
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
|
2019-06-03 19:44:43 +02:00
|
|
|
func (m *Request) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Request.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Request.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
func (m *Request) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Request.Merge(m, src)
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
|
|
|
func (m *Request) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Request.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Request) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Request.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Request proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Request) GetMethod() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Method
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetPath() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Path
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetHeader() map[string]*Pair {
|
|
|
|
if m != nil {
|
|
|
|
return m.Header
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetGet() map[string]*Pair {
|
|
|
|
if m != nil {
|
|
|
|
return m.Get
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetPost() map[string]*Pair {
|
|
|
|
if m != nil {
|
|
|
|
return m.Post
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetBody() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Body
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Request) GetUrl() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Url
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// A HTTP response as RPC
|
|
|
|
// Expected response for the api handler
|
|
|
|
type Response struct {
|
|
|
|
StatusCode int32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"`
|
|
|
|
Header map[string]*Pair `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) Reset() { *m = Response{} }
|
|
|
|
func (m *Response) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Response) ProtoMessage() {}
|
|
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
2019-11-26 15:53:33 +02:00
|
|
|
return fileDescriptor_7b6696ef87ec1943, []int{2}
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
|
2019-06-03 19:44:43 +02:00
|
|
|
func (m *Response) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Response.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
func (m *Response) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Response.Merge(m, src)
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
|
|
|
func (m *Response) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Response.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Response.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Response proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Response) GetStatusCode() int32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.StatusCode
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) GetHeader() map[string]*Pair {
|
|
|
|
if m != nil {
|
|
|
|
return m.Header
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) GetBody() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Body
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// A HTTP event as RPC
|
|
|
|
// Forwarded by the event handler
|
|
|
|
type Event struct {
|
|
|
|
// e.g login
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
// uuid
|
|
|
|
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
// unix timestamp of event
|
|
|
|
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
|
|
// event headers
|
|
|
|
Header map[string]*Pair `protobuf:"bytes,4,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
// the event data
|
|
|
|
Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Event) Reset() { *m = Event{} }
|
|
|
|
func (m *Event) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Event) ProtoMessage() {}
|
|
|
|
func (*Event) Descriptor() ([]byte, []int) {
|
2019-11-26 15:53:33 +02:00
|
|
|
return fileDescriptor_7b6696ef87ec1943, []int{3}
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
|
2019-06-03 19:44:43 +02:00
|
|
|
func (m *Event) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Event.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Event.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-11-26 15:53:33 +02:00
|
|
|
func (m *Event) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Event.Merge(m, src)
|
2019-06-03 19:44:43 +02:00
|
|
|
}
|
|
|
|
func (m *Event) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Event.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Event) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Event.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Event proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Event) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Event) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Event) GetTimestamp() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Timestamp
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Event) GetHeader() map[string]*Pair {
|
|
|
|
if m != nil {
|
|
|
|
return m.Header
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Event) GetData() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Pair)(nil), "go.api.Pair")
|
|
|
|
proto.RegisterType((*Request)(nil), "go.api.Request")
|
|
|
|
proto.RegisterMapType((map[string]*Pair)(nil), "go.api.Request.GetEntry")
|
|
|
|
proto.RegisterMapType((map[string]*Pair)(nil), "go.api.Request.HeaderEntry")
|
|
|
|
proto.RegisterMapType((map[string]*Pair)(nil), "go.api.Request.PostEntry")
|
|
|
|
proto.RegisterType((*Response)(nil), "go.api.Response")
|
|
|
|
proto.RegisterMapType((map[string]*Pair)(nil), "go.api.Response.HeaderEntry")
|
|
|
|
proto.RegisterType((*Event)(nil), "go.api.Event")
|
|
|
|
proto.RegisterMapType((map[string]*Pair)(nil), "go.api.Event.HeaderEntry")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2020-01-30 13:39:00 +02:00
|
|
|
proto.RegisterFile("github.com/micro/go-micro/v2/api/proto/api.proto", fileDescriptor_7b6696ef87ec1943)
|
2019-11-26 15:53:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var fileDescriptor_7b6696ef87ec1943 = []byte{
|
|
|
|
// 408 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x4d, 0x8f, 0xd3, 0x30,
|
|
|
|
0x10, 0x55, 0xe2, 0x24, 0xbb, 0x99, 0x22, 0x84, 0x7c, 0x40, 0x66, 0x59, 0xa1, 0x2a, 0xa7, 0x0a,
|
|
|
|
0xa9, 0x29, 0xec, 0x72, 0x40, 0x5c, 0xa1, 0x5a, 0x8e, 0x2b, 0xff, 0x03, 0x77, 0x63, 0x25, 0x16,
|
|
|
|
0x4d, 0x1c, 0x62, 0xa7, 0x52, 0x7f, 0x1c, 0x07, 0x7e, 0x06, 0xff, 0x06, 0x79, 0xec, 0x7e, 0x50,
|
|
|
|
0x95, 0x0b, 0xf4, 0xf6, 0x62, 0xbf, 0x79, 0xf3, 0xe6, 0x8d, 0x03, 0xf3, 0x5a, 0xd9, 0x66, 0x5c,
|
|
|
|
0x95, 0x4f, 0xba, 0x5d, 0xb4, 0xea, 0x69, 0xd0, 0x8b, 0x5a, 0xcf, 0x3d, 0x10, 0xbd, 0x5a, 0xf4,
|
|
|
|
0x83, 0xb6, 0x88, 0x4a, 0x44, 0x34, 0xab, 0x75, 0x29, 0x7a, 0x55, 0xbc, 0x83, 0xe4, 0x51, 0xa8,
|
|
|
|
0x81, 0xbe, 0x00, 0xf2, 0x4d, 0x6e, 0x59, 0x34, 0x8d, 0x66, 0x39, 0x77, 0x90, 0xbe, 0x84, 0x6c,
|
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