Add client_event.proto and compiled .go file

This commit is contained in:
Brian Hendriks
2019-08-20 15:28:46 -07:00
parent bcd81b6d7d
commit 8956845903
3 changed files with 698 additions and 1 deletions
@@ -0,0 +1,605 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dolt/services/eventsapi/v1alpha1/client_event.proto
package eventsapi
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// 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.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Platform int32
const (
Platform_PLATFORM_UNSPECIFIED Platform = 0
Platform_PLATFORM_LINUX Platform = 1
Platform_PLATFORM_WINDOWS Platform = 2
Platform_PLATFORM_DARWIN Platform = 3
)
var Platform_name = map[int32]string{
0: "PLATFORM_UNSPECIFIED",
1: "PLATFORM_LINUX",
2: "PLATFORM_WINDOWS",
3: "PLATFORM_DARWIN",
}
var Platform_value = map[string]int32{
"PLATFORM_UNSPECIFIED": 0,
"PLATFORM_LINUX": 1,
"PLATFORM_WINDOWS": 2,
"PLATFORM_DARWIN": 3,
}
func (x Platform) String() string {
return proto.EnumName(Platform_name, int32(x))
}
func (Platform) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{0}
}
type ClientEventType int32
const (
ClientEventType_CLIENT_EVENT_TYPE_UNSPECIFIED ClientEventType = 0
ClientEventType_CLIENT_EVENT_TYPE_CLONE ClientEventType = 1
ClientEventType_CLIENT_EVENT_TYPE_PUSH ClientEventType = 2
ClientEventType_CLIENT_EVENT_TYPE_PULL ClientEventType = 3
)
var ClientEventType_name = map[int32]string{
0: "CLIENT_EVENT_TYPE_UNSPECIFIED",
1: "CLIENT_EVENT_TYPE_CLONE",
2: "CLIENT_EVENT_TYPE_PUSH",
3: "CLIENT_EVENT_TYPE_PULL",
}
var ClientEventType_value = map[string]int32{
"CLIENT_EVENT_TYPE_UNSPECIFIED": 0,
"CLIENT_EVENT_TYPE_CLONE": 1,
"CLIENT_EVENT_TYPE_PUSH": 2,
"CLIENT_EVENT_TYPE_PULL": 3,
}
func (x ClientEventType) String() string {
return proto.EnumName(ClientEventType_name, int32(x))
}
func (ClientEventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{1}
}
type MetricID int32
const (
MetricID_METRIC_ID_UNSPECIFIED MetricID = 0
MetricID_METRIC_ID_BYTES_DOWNLOADED MetricID = 1
MetricID_METRIC_ID_DOWNLOAD_MS_ELAPSED MetricID = 2
)
var MetricID_name = map[int32]string{
0: "METRIC_ID_UNSPECIFIED",
1: "METRIC_ID_BYTES_DOWNLOADED",
2: "METRIC_ID_DOWNLOAD_MS_ELAPSED",
}
var MetricID_value = map[string]int32{
"METRIC_ID_UNSPECIFIED": 0,
"METRIC_ID_BYTES_DOWNLOADED": 1,
"METRIC_ID_DOWNLOAD_MS_ELAPSED": 2,
}
func (x MetricID) String() string {
return proto.EnumName(MetricID_name, int32(x))
}
func (MetricID) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{2}
}
type AttributeID int32
const (
AttributeID_ATTRIBUTE_ID_UNSPECIFIED AttributeID = 0
AttributeID_ATTRIBUTE_ID_REMOTEURL AttributeID = 1
)
var AttributeID_name = map[int32]string{
0: "ATTRIBUTE_ID_UNSPECIFIED",
1: "ATTRIBUTE_ID_REMOTEURL",
}
var AttributeID_value = map[string]int32{
"ATTRIBUTE_ID_UNSPECIFIED": 0,
"ATTRIBUTE_ID_REMOTEURL": 1,
}
func (x AttributeID) String() string {
return proto.EnumName(AttributeID_name, int32(x))
}
func (AttributeID) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{3}
}
type ClientEventAttribute struct {
Id AttributeID `protobuf:"varint,1,opt,name=id,proto3,enum=dolt.services.eventsapi.v1alpha1.AttributeID" json:"id,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientEventAttribute) Reset() { *m = ClientEventAttribute{} }
func (m *ClientEventAttribute) String() string { return proto.CompactTextString(m) }
func (*ClientEventAttribute) ProtoMessage() {}
func (*ClientEventAttribute) Descriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{0}
}
func (m *ClientEventAttribute) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClientEventAttribute.Unmarshal(m, b)
}
func (m *ClientEventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClientEventAttribute.Marshal(b, m, deterministic)
}
func (m *ClientEventAttribute) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientEventAttribute.Merge(m, src)
}
func (m *ClientEventAttribute) XXX_Size() int {
return xxx_messageInfo_ClientEventAttribute.Size(m)
}
func (m *ClientEventAttribute) XXX_DiscardUnknown() {
xxx_messageInfo_ClientEventAttribute.DiscardUnknown(m)
}
var xxx_messageInfo_ClientEventAttribute proto.InternalMessageInfo
func (m *ClientEventAttribute) GetId() AttributeID {
if m != nil {
return m.Id
}
return AttributeID_ATTRIBUTE_ID_UNSPECIFIED
}
func (m *ClientEventAttribute) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
type ClientEventMetric struct {
// Types that are valid to be assigned to MetricOneof:
// *ClientEventMetric_Duration
// *ClientEventMetric_Count
MetricOneof isClientEventMetric_MetricOneof `protobuf_oneof:"metric_oneof"`
MetricId MetricID `protobuf:"varint,100,opt,name=metric_id,json=metricId,proto3,enum=dolt.services.eventsapi.v1alpha1.MetricID" json:"metric_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientEventMetric) Reset() { *m = ClientEventMetric{} }
func (m *ClientEventMetric) String() string { return proto.CompactTextString(m) }
func (*ClientEventMetric) ProtoMessage() {}
func (*ClientEventMetric) Descriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{1}
}
func (m *ClientEventMetric) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClientEventMetric.Unmarshal(m, b)
}
func (m *ClientEventMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClientEventMetric.Marshal(b, m, deterministic)
}
func (m *ClientEventMetric) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientEventMetric.Merge(m, src)
}
func (m *ClientEventMetric) XXX_Size() int {
return xxx_messageInfo_ClientEventMetric.Size(m)
}
func (m *ClientEventMetric) XXX_DiscardUnknown() {
xxx_messageInfo_ClientEventMetric.DiscardUnknown(m)
}
var xxx_messageInfo_ClientEventMetric proto.InternalMessageInfo
type isClientEventMetric_MetricOneof interface {
isClientEventMetric_MetricOneof()
}
type ClientEventMetric_Duration struct {
Duration *duration.Duration `protobuf:"bytes,1,opt,name=duration,proto3,oneof"`
}
type ClientEventMetric_Count struct {
Count int32 `protobuf:"varint,2,opt,name=count,proto3,oneof"`
}
func (*ClientEventMetric_Duration) isClientEventMetric_MetricOneof() {}
func (*ClientEventMetric_Count) isClientEventMetric_MetricOneof() {}
func (m *ClientEventMetric) GetMetricOneof() isClientEventMetric_MetricOneof {
if m != nil {
return m.MetricOneof
}
return nil
}
func (m *ClientEventMetric) GetDuration() *duration.Duration {
if x, ok := m.GetMetricOneof().(*ClientEventMetric_Duration); ok {
return x.Duration
}
return nil
}
func (m *ClientEventMetric) GetCount() int32 {
if x, ok := m.GetMetricOneof().(*ClientEventMetric_Count); ok {
return x.Count
}
return 0
}
func (m *ClientEventMetric) GetMetricId() MetricID {
if m != nil {
return m.MetricId
}
return MetricID_METRIC_ID_UNSPECIFIED
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ClientEventMetric) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ClientEventMetric_Duration)(nil),
(*ClientEventMetric_Count)(nil),
}
}
type ClientEvent struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
Type ClientEventType `protobuf:"varint,4,opt,name=type,proto3,enum=dolt.services.eventsapi.v1alpha1.ClientEventType" json:"type,omitempty"`
Attributes []*ClientEventAttribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"`
Metrics []*ClientEventMetric `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientEvent) Reset() { *m = ClientEvent{} }
func (m *ClientEvent) String() string { return proto.CompactTextString(m) }
func (*ClientEvent) ProtoMessage() {}
func (*ClientEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{2}
}
func (m *ClientEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClientEvent.Unmarshal(m, b)
}
func (m *ClientEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClientEvent.Marshal(b, m, deterministic)
}
func (m *ClientEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientEvent.Merge(m, src)
}
func (m *ClientEvent) XXX_Size() int {
return xxx_messageInfo_ClientEvent.Size(m)
}
func (m *ClientEvent) XXX_DiscardUnknown() {
xxx_messageInfo_ClientEvent.DiscardUnknown(m)
}
var xxx_messageInfo_ClientEvent proto.InternalMessageInfo
func (m *ClientEvent) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientEvent) GetStartTime() *timestamp.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *ClientEvent) GetEndTime() *timestamp.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
func (m *ClientEvent) GetType() ClientEventType {
if m != nil {
return m.Type
}
return ClientEventType_CLIENT_EVENT_TYPE_UNSPECIFIED
}
func (m *ClientEvent) GetAttributes() []*ClientEventAttribute {
if m != nil {
return m.Attributes
}
return nil
}
func (m *ClientEvent) GetMetrics() []*ClientEventMetric {
if m != nil {
return m.Metrics
}
return nil
}
type LogEventsRequest struct {
MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
Extra string `protobuf:"bytes,2,opt,name=extra,proto3" json:"extra,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
Platform Platform `protobuf:"varint,4,opt,name=platform,proto3,enum=dolt.services.eventsapi.v1alpha1.Platform" json:"platform,omitempty"`
Events []*ClientEvent `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LogEventsRequest) Reset() { *m = LogEventsRequest{} }
func (m *LogEventsRequest) String() string { return proto.CompactTextString(m) }
func (*LogEventsRequest) ProtoMessage() {}
func (*LogEventsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{3}
}
func (m *LogEventsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogEventsRequest.Unmarshal(m, b)
}
func (m *LogEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogEventsRequest.Marshal(b, m, deterministic)
}
func (m *LogEventsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogEventsRequest.Merge(m, src)
}
func (m *LogEventsRequest) XXX_Size() int {
return xxx_messageInfo_LogEventsRequest.Size(m)
}
func (m *LogEventsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogEventsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogEventsRequest proto.InternalMessageInfo
func (m *LogEventsRequest) GetMachineId() string {
if m != nil {
return m.MachineId
}
return ""
}
func (m *LogEventsRequest) GetExtra() string {
if m != nil {
return m.Extra
}
return ""
}
func (m *LogEventsRequest) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *LogEventsRequest) GetPlatform() Platform {
if m != nil {
return m.Platform
}
return Platform_PLATFORM_UNSPECIFIED
}
func (m *LogEventsRequest) GetEvents() []*ClientEvent {
if m != nil {
return m.Events
}
return nil
}
type LogEventsResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LogEventsResponse) Reset() { *m = LogEventsResponse{} }
func (m *LogEventsResponse) String() string { return proto.CompactTextString(m) }
func (*LogEventsResponse) ProtoMessage() {}
func (*LogEventsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_2059ca7f76f8dca6, []int{4}
}
func (m *LogEventsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogEventsResponse.Unmarshal(m, b)
}
func (m *LogEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogEventsResponse.Marshal(b, m, deterministic)
}
func (m *LogEventsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogEventsResponse.Merge(m, src)
}
func (m *LogEventsResponse) XXX_Size() int {
return xxx_messageInfo_LogEventsResponse.Size(m)
}
func (m *LogEventsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_LogEventsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_LogEventsResponse proto.InternalMessageInfo
func init() {
proto.RegisterEnum("dolt.services.eventsapi.v1alpha1.Platform", Platform_name, Platform_value)
proto.RegisterEnum("dolt.services.eventsapi.v1alpha1.ClientEventType", ClientEventType_name, ClientEventType_value)
proto.RegisterEnum("dolt.services.eventsapi.v1alpha1.MetricID", MetricID_name, MetricID_value)
proto.RegisterEnum("dolt.services.eventsapi.v1alpha1.AttributeID", AttributeID_name, AttributeID_value)
proto.RegisterType((*ClientEventAttribute)(nil), "dolt.services.eventsapi.v1alpha1.ClientEventAttribute")
proto.RegisterType((*ClientEventMetric)(nil), "dolt.services.eventsapi.v1alpha1.ClientEventMetric")
proto.RegisterType((*ClientEvent)(nil), "dolt.services.eventsapi.v1alpha1.ClientEvent")
proto.RegisterType((*LogEventsRequest)(nil), "dolt.services.eventsapi.v1alpha1.LogEventsRequest")
proto.RegisterType((*LogEventsResponse)(nil), "dolt.services.eventsapi.v1alpha1.LogEventsResponse")
}
func init() {
proto.RegisterFile("dolt/services/eventsapi/v1alpha1/client_event.proto", fileDescriptor_2059ca7f76f8dca6)
}
var fileDescriptor_2059ca7f76f8dca6 = []byte{
// 746 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0xda, 0x48,
0x14, 0x8e, 0x21, 0x24, 0x70, 0x58, 0x11, 0x67, 0xc2, 0x66, 0x1d, 0x76, 0x93, 0xa5, 0x5c, 0x45,
0xa8, 0x31, 0x0a, 0xa8, 0xad, 0xaa, 0xaa, 0x17, 0x80, 0x27, 0x89, 0x25, 0xf3, 0xa3, 0xc1, 0x84,
0xa6, 0x37, 0x96, 0x83, 0x27, 0x89, 0x55, 0xb0, 0x5d, 0x7b, 0x40, 0xcd, 0x23, 0x54, 0x7d, 0xa6,
0xbe, 0x53, 0x5f, 0xa0, 0x52, 0xc5, 0x18, 0x3b, 0x14, 0x14, 0x51, 0x6e, 0x90, 0xce, 0xf9, 0xce,
0x77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xa7, 0xae, 0x60, 0x45,
0x14, 0x66, 0xed, 0x3f, 0xe1, 0x11, 0x62, 0xb4, 0x7a, 0x06, 0xd6, 0xea, 0xdd, 0x1e, 0x56, 0xc4,
0x44, 0xf9, 0x12, 0xb2, 0x0b, 0x6f, 0x19, 0xfa, 0x0f, 0xa4, 0xba, 0xae, 0x13, 0xb5, 0xd1, 0xd7,
0xf1, 0x6a, 0xbd, 0x02, 0x1c, 0xfe, 0x86, 0x12, 0xdc, 0xea, 0xe8, 0xb8, 0x4f, 0x34, 0x51, 0xa8,
0x7e, 0x13, 0xe0, 0x60, 0x61, 0x7d, 0x41, 0x2f, 0x3c, 0x3c, 0x62, 0x90, 0x89, 0x0f, 0x8a, 0xaa,
0xeb, 0x45, 0xb1, 0xac, 0xf7, 0x42, 0x6d, 0x23, 0x4e, 0xa8, 0x98, 0xc6, 0xcb, 0x8f, 0xe5, 0x67,
0x3e, 0x40, 0x46, 0xc4, 0x7a, 0x17, 0xbb, 0x6e, 0x77, 0xf8, 0x93, 0x53, 0xfb, 0x15, 0x00, 0x00,
0xff, 0xff, 0x39, 0x65, 0xef, 0x7a, 0xb5, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ClientEventsServiceClient is the client API for ClientEventsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ClientEventsServiceClient interface {
LogEvents(ctx context.Context, in *LogEventsRequest, opts ...grpc.CallOption) (*LogEventsResponse, error)
}
type clientEventsServiceClient struct {
cc *grpc.ClientConn
}
func NewClientEventsServiceClient(cc *grpc.ClientConn) ClientEventsServiceClient {
return &clientEventsServiceClient{cc}
}
func (c *clientEventsServiceClient) LogEvents(ctx context.Context, in *LogEventsRequest, opts ...grpc.CallOption) (*LogEventsResponse, error) {
out := new(LogEventsResponse)
err := c.cc.Invoke(ctx, "/dolt.services.eventsapi.v1alpha1.ClientEventsService/LogEvents", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ClientEventsServiceServer is the server API for ClientEventsService service.
type ClientEventsServiceServer interface {
LogEvents(context.Context, *LogEventsRequest) (*LogEventsResponse, error)
}
// UnimplementedClientEventsServiceServer can be embedded to have forward compatible implementations.
type UnimplementedClientEventsServiceServer struct {
}
func (*UnimplementedClientEventsServiceServer) LogEvents(ctx context.Context, req *LogEventsRequest) (*LogEventsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LogEvents not implemented")
}
func RegisterClientEventsServiceServer(s *grpc.Server, srv ClientEventsServiceServer) {
s.RegisterService(&_ClientEventsService_serviceDesc, srv)
}
func _ClientEventsService_LogEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LogEventsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientEventsServiceServer).LogEvents(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dolt.services.eventsapi.v1alpha1.ClientEventsService/LogEvents",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientEventsServiceServer).LogEvents(ctx, req.(*LogEventsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ClientEventsService_serviceDesc = grpc.ServiceDesc{
ServiceName: "dolt.services.eventsapi.v1alpha1.ClientEventsService",
HandlerType: (*ClientEventsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LogEvents",
Handler: _ClientEventsService_LogEvents_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dolt/services/eventsapi/v1alpha1/client_event.proto",
}
+7 -1
View File
@@ -9,12 +9,18 @@ PROTOC_FLAGS = --plugin=protoc-gen-go=$(PROTOC_GEN_GO) -I . -I $(GOOGLEAPIS) -I
pbgo_out := ../go/gen/proto
EVENTSAPI_protos := \
dolt/services/eventsapi/v1alpha1/client_event.proto
EVENTSAPI_pbgo_pkg_path := dolt/services/eventsapi_v1alpha1
REMOTESAPI_protos := \
dolt/services/remotesapi/v1alpha1/chunkstore.proto \
dolt/services/remotesapi/v1alpha1/credentials.proto
REMOTESAPI_pbgo_pkg_path := dolt/services/remotesapi_v1alpha1
PBGO_pkgs := REMOTESAPI
PBGO_pkgs := \
REMOTESAPI \
EVENTSAPI
all:
@@ -0,0 +1,86 @@
// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package dolt.services.eventsapi.v1alpha1;
option go_package = "dolt/services/eventsapi_v1alpha1;eventsapi";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
service ClientEventsService {
rpc LogEvents(LogEventsRequest) returns (LogEventsResponse);
}
enum Platform {
PLATFORM_UNSPECIFIED = 0;
PLATFORM_LINUX = 1;
PLATFORM_WINDOWS = 2;
PLATFORM_DARWIN = 3;
}
enum ClientEventType {
CLIENT_EVENT_TYPE_UNSPECIFIED = 0;
CLIENT_EVENT_TYPE_CLONE = 1;
CLIENT_EVENT_TYPE_PUSH = 2;
CLIENT_EVENT_TYPE_PULL = 3;
}
enum MetricID {
METRIC_ID_UNSPECIFIED = 0;
METRIC_ID_BYTES_DOWNLOADED = 1;
METRIC_ID_DOWNLOAD_MS_ELAPSED = 2;
}
enum AttributeID {
ATTRIBUTE_ID_UNSPECIFIED = 0;
ATTRIBUTE_ID_REMOTEURL = 1;
}
message ClientEventAttribute {
AttributeID id = 1;
string value = 2;
}
message ClientEventMetric {
oneof metric_oneof {
google.protobuf.Duration duration = 1;
int32 count = 2;
}
MetricID metric_id = 100;
}
message ClientEvent {
string id = 1;
google.protobuf.Timestamp start_time = 2;
google.protobuf.Timestamp end_time = 3;
ClientEventType type = 4;
repeated ClientEventAttribute attributes = 5;
repeated ClientEventMetric metrics = 6;
}
message LogEventsRequest {
string machine_id = 1;
string extra = 2;
string version = 3;
Platform platform = 4;
repeated ClientEvent events = 5;
}
message LogEventsResponse {
}