proto

package
v0.0.0-...-fe55c91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 9 Imported by: 0

README

Generate code

protoc -I . --go_out=plugins=grpc:. event.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventHeader_EventType_name = map[int32]string{
	0: "UNKNOWN",
	1: "Event1",
	2: "Event2",
	3: "Event3",
	4: "Event4",
	5: "Event5",
}
View Source
var EventHeader_EventType_value = map[string]int32{
	"UNKNOWN": 0,
	"Event1":  1,
	"Event2":  2,
	"Event3":  3,
	"Event4":  4,
	"Event5":  5,
}

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)

Types

type DebugMessage

type DebugMessage struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DebugMessage) Descriptor

func (*DebugMessage) Descriptor() ([]byte, []int)

func (*DebugMessage) GetMessage

func (m *DebugMessage) GetMessage() string

func (*DebugMessage) ProtoMessage

func (*DebugMessage) ProtoMessage()

func (*DebugMessage) Reset

func (m *DebugMessage) Reset()

func (*DebugMessage) String

func (m *DebugMessage) String() string

func (*DebugMessage) XXX_DiscardUnknown

func (m *DebugMessage) XXX_DiscardUnknown()

func (*DebugMessage) XXX_Marshal

func (m *DebugMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DebugMessage) XXX_Merge

func (m *DebugMessage) XXX_Merge(src proto.Message)

func (*DebugMessage) XXX_Size

func (m *DebugMessage) XXX_Size() int

func (*DebugMessage) XXX_Unmarshal

func (m *DebugMessage) XXX_Unmarshal(b []byte) error

type Event

type Event struct {
	Header               *EventHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Body                 *EventBody   `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Event) Descriptor

func (*Event) Descriptor() ([]byte, []int)

func (*Event) GetBody

func (m *Event) GetBody() *EventBody

func (*Event) GetHeader

func (m *Event) GetHeader() *EventHeader

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type EventBody

type EventBody struct {
	Files                []*File  `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EventBody) Descriptor

func (*EventBody) Descriptor() ([]byte, []int)

func (*EventBody) GetFiles

func (m *EventBody) GetFiles() []*File

func (*EventBody) ProtoMessage

func (*EventBody) ProtoMessage()

func (*EventBody) Reset

func (m *EventBody) Reset()

func (*EventBody) String

func (m *EventBody) String() string

func (*EventBody) XXX_DiscardUnknown

func (m *EventBody) XXX_DiscardUnknown()

func (*EventBody) XXX_Marshal

func (m *EventBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventBody) XXX_Merge

func (m *EventBody) XXX_Merge(src proto.Message)

func (*EventBody) XXX_Size

func (m *EventBody) XXX_Size() int

func (*EventBody) XXX_Unmarshal

func (m *EventBody) XXX_Unmarshal(b []byte) error

type EventHeader

type EventHeader struct {
	Version              int32                 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	DeviceCode           string                `protobuf:"bytes,2,opt,name=device_code,json=deviceCode,proto3" json:"device_code,omitempty"`
	Date                 *timestamp.Timestamp  `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"`
	EventType            EventHeader_EventType `protobuf:"varint,4,opt,name=eventType,proto3,enum=proto.EventHeader_EventType" json:"eventType,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*EventHeader) Descriptor

func (*EventHeader) Descriptor() ([]byte, []int)

func (*EventHeader) GetDate

func (m *EventHeader) GetDate() *timestamp.Timestamp

func (*EventHeader) GetDeviceCode

func (m *EventHeader) GetDeviceCode() string

func (*EventHeader) GetEventType

func (m *EventHeader) GetEventType() EventHeader_EventType

func (*EventHeader) GetVersion

func (m *EventHeader) GetVersion() int32

func (*EventHeader) ProtoMessage

func (*EventHeader) ProtoMessage()

func (*EventHeader) Reset

func (m *EventHeader) Reset()

func (*EventHeader) String

func (m *EventHeader) String() string

func (*EventHeader) XXX_DiscardUnknown

func (m *EventHeader) XXX_DiscardUnknown()

func (*EventHeader) XXX_Marshal

func (m *EventHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventHeader) XXX_Merge

func (m *EventHeader) XXX_Merge(src proto.Message)

func (*EventHeader) XXX_Size

func (m *EventHeader) XXX_Size() int

func (*EventHeader) XXX_Unmarshal

func (m *EventHeader) XXX_Unmarshal(b []byte) error

type EventHeader_EventType

type EventHeader_EventType int32
const (
	EventHeader_UNKNOWN EventHeader_EventType = 0
	EventHeader_Event1  EventHeader_EventType = 1
	EventHeader_Event2  EventHeader_EventType = 2
	EventHeader_Event3  EventHeader_EventType = 3
	EventHeader_Event4  EventHeader_EventType = 4
	EventHeader_Event5  EventHeader_EventType = 5
)

func (EventHeader_EventType) EnumDescriptor

func (EventHeader_EventType) EnumDescriptor() ([]byte, []int)

func (EventHeader_EventType) String

func (x EventHeader_EventType) String() string

type EventServiceClient

type EventServiceClient interface {
	Send(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Response, error)
	SendHeader(ctx context.Context, in *EventHeader, opts ...grpc.CallOption) (*Response, error)
	ResetDebug(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	GetServerStats(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ServerStats, error)
}

EventServiceClient is the client API for EventService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type EventServiceServer

type EventServiceServer interface {
	Send(context.Context, *Event) (*Response, error)
	SendHeader(context.Context, *EventHeader) (*Response, error)
	ResetDebug(context.Context, *empty.Empty) (*empty.Empty, error)
	GetServerStats(context.Context, *empty.Empty) (*ServerStats, error)
}

EventServiceServer is the server API for EventService service.

type File

type File struct {
	ContentType          int32                `protobuf:"varint,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Time                 *timestamp.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	Category             int32                `protobuf:"varint,3,opt,name=category,proto3" json:"category,omitempty"`
	Data                 []byte               `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*File) Descriptor

func (*File) Descriptor() ([]byte, []int)

func (*File) GetCategory

func (m *File) GetCategory() int32

func (*File) GetContentType

func (m *File) GetContentType() int32

func (*File) GetData

func (m *File) GetData() []byte

func (*File) GetTime

func (m *File) GetTime() *timestamp.Timestamp

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) String

func (m *File) String() string

func (*File) XXX_DiscardUnknown

func (m *File) XXX_DiscardUnknown()

func (*File) XXX_Marshal

func (m *File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*File) XXX_Merge

func (m *File) XXX_Merge(src proto.Message)

func (*File) XXX_Size

func (m *File) XXX_Size() int

func (*File) XXX_Unmarshal

func (m *File) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type ServerStats

type ServerStats struct {
	StartTimeUnixNano     int64    `protobuf:"varint,1,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"`
	EndTimeUnixNano       int64    `protobuf:"varint,2,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"`
	Count                 int64    `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	Size                  int64    `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	Worker                int32    `protobuf:"varint,5,opt,name=worker,proto3" json:"worker,omitempty"`
	TotalWorkingTimeMilli int64    `` /* 129-byte string literal not displayed */
	Meta                  string   `protobuf:"bytes,7,opt,name=meta,proto3" json:"meta,omitempty"`
	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
	XXX_unrecognized      []byte   `json:"-"`
	XXX_sizecache         int32    `json:"-"`
}

func (*ServerStats) Descriptor

func (*ServerStats) Descriptor() ([]byte, []int)

func (*ServerStats) GetCount

func (m *ServerStats) GetCount() int64

func (*ServerStats) GetEndTimeUnixNano

func (m *ServerStats) GetEndTimeUnixNano() int64

func (*ServerStats) GetMeta

func (m *ServerStats) GetMeta() string

func (*ServerStats) GetSize

func (m *ServerStats) GetSize() int64

func (*ServerStats) GetStartTimeUnixNano

func (m *ServerStats) GetStartTimeUnixNano() int64

func (*ServerStats) GetTotalWorkingTimeMilli

func (m *ServerStats) GetTotalWorkingTimeMilli() int64

func (*ServerStats) GetWorker

func (m *ServerStats) GetWorker() int32

func (*ServerStats) ProtoMessage

func (*ServerStats) ProtoMessage()

func (*ServerStats) Reset

func (m *ServerStats) Reset()

func (*ServerStats) String

func (m *ServerStats) String() string

func (*ServerStats) XXX_DiscardUnknown

func (m *ServerStats) XXX_DiscardUnknown()

func (*ServerStats) XXX_Marshal

func (m *ServerStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerStats) XXX_Merge

func (m *ServerStats) XXX_Merge(src proto.Message)

func (*ServerStats) XXX_Size

func (m *ServerStats) XXX_Size() int

func (*ServerStats) XXX_Unmarshal

func (m *ServerStats) XXX_Unmarshal(b []byte) error

type UnimplementedEventServiceServer

type UnimplementedEventServiceServer struct {
}

UnimplementedEventServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventServiceServer) GetServerStats

func (*UnimplementedEventServiceServer) ResetDebug

func (*UnimplementedEventServiceServer) Send

func (*UnimplementedEventServiceServer) SendHeader

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL