diff --git a/Makefile b/Makefile index a62eef8..3b9031a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ APPLICATION_BRAND := vanilla -APPLICATION_VERSION := 2.0-alpha +APPLICATION_VERSION := 2.0-alpha.1 APPLICATION_COMMIT_HASH := `git log -1 --pretty=format:"%H"` APPLICATION_TIMESTAMP := `date --utc "+%s"` diff --git a/rpc/common.pb.go b/rpc/common.pb.go index 68e1be6..e60407d 100644 --- a/rpc/common.pb.go +++ b/rpc/common.pb.go @@ -1,6 +1,38 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: common.proto +/* +Package rpc is a generated protocol buffer package. + +It is generated from these files: + common.proto + events.proto + profile.proto + server.proto + system.proto + +It has these top-level messages: + Profile + ProfileProperty + ProfileTextures + Event + ProfileIdKey + IdKey + IdRequest + GetIdRequest + ProfileId + NameHistory + NameHistoryEntry + BulkIdRequest + BulkIdResponse + Blacklist + CheckBlacklistRequest + CheckBlacklistResponse + LoginRequest + Status + PluginList + Plugin +*/ package rpc import proto "github.com/golang/protobuf/proto" @@ -21,38 +53,16 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // * // Represents a complete user profile. type Profile struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Properties []*ProfileProperty `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"` - Textures *ProfileTextures `protobuf:"bytes,4,opt,name=textures,proto3" json:"textures,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Properties []*ProfileProperty `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty"` + Textures *ProfileTextures `protobuf:"bytes,4,opt,name=textures" json:"textures,omitempty"` } -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_common_88bcea5c92f8250d, []int{0} -} -func (m *Profile) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Profile.Unmarshal(m, b) -} -func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Profile.Marshal(b, m, deterministic) -} -func (dst *Profile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Profile.Merge(dst, src) -} -func (m *Profile) XXX_Size() int { - return xxx_messageInfo_Profile.Size(m) -} -func (m *Profile) XXX_DiscardUnknown() { - xxx_messageInfo_Profile.DiscardUnknown(m) -} - -var xxx_messageInfo_Profile proto.InternalMessageInfo +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (m *Profile) GetId() string { if m != nil { @@ -83,37 +93,15 @@ func (m *Profile) GetTextures() *ProfileTextures { } type ProfileProperty struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Signature string `protobuf:"bytes,3,opt,name=signature" json:"signature,omitempty"` } -func (m *ProfileProperty) Reset() { *m = ProfileProperty{} } -func (m *ProfileProperty) String() string { return proto.CompactTextString(m) } -func (*ProfileProperty) ProtoMessage() {} -func (*ProfileProperty) Descriptor() ([]byte, []int) { - return fileDescriptor_common_88bcea5c92f8250d, []int{1} -} -func (m *ProfileProperty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProfileProperty.Unmarshal(m, b) -} -func (m *ProfileProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProfileProperty.Marshal(b, m, deterministic) -} -func (dst *ProfileProperty) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfileProperty.Merge(dst, src) -} -func (m *ProfileProperty) XXX_Size() int { - return xxx_messageInfo_ProfileProperty.Size(m) -} -func (m *ProfileProperty) XXX_DiscardUnknown() { - xxx_messageInfo_ProfileProperty.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfileProperty proto.InternalMessageInfo +func (m *ProfileProperty) Reset() { *m = ProfileProperty{} } +func (m *ProfileProperty) String() string { return proto.CompactTextString(m) } +func (*ProfileProperty) ProtoMessage() {} +func (*ProfileProperty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (m *ProfileProperty) GetName() string { if m != nil { @@ -137,39 +125,17 @@ func (m *ProfileProperty) GetSignature() string { } type ProfileTextures struct { - ProfileId string `protobuf:"bytes,1,opt,name=profileId,proto3" json:"profileId,omitempty"` - ProfileName string `protobuf:"bytes,2,opt,name=profileName,proto3" json:"profileName,omitempty"` - SkinUrl string `protobuf:"bytes,3,opt,name=skinUrl,proto3" json:"skinUrl,omitempty"` - CapeUrl string `protobuf:"bytes,4,opt,name=capeUrl,proto3" json:"capeUrl,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProfileTextures) Reset() { *m = ProfileTextures{} } -func (m *ProfileTextures) String() string { return proto.CompactTextString(m) } -func (*ProfileTextures) ProtoMessage() {} -func (*ProfileTextures) Descriptor() ([]byte, []int) { - return fileDescriptor_common_88bcea5c92f8250d, []int{2} -} -func (m *ProfileTextures) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProfileTextures.Unmarshal(m, b) -} -func (m *ProfileTextures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProfileTextures.Marshal(b, m, deterministic) -} -func (dst *ProfileTextures) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfileTextures.Merge(dst, src) -} -func (m *ProfileTextures) XXX_Size() int { - return xxx_messageInfo_ProfileTextures.Size(m) -} -func (m *ProfileTextures) XXX_DiscardUnknown() { - xxx_messageInfo_ProfileTextures.DiscardUnknown(m) + ProfileId string `protobuf:"bytes,1,opt,name=profileId" json:"profileId,omitempty"` + ProfileName string `protobuf:"bytes,2,opt,name=profileName" json:"profileName,omitempty"` + SkinUrl string `protobuf:"bytes,3,opt,name=skinUrl" json:"skinUrl,omitempty"` + CapeUrl string `protobuf:"bytes,4,opt,name=capeUrl" json:"capeUrl,omitempty"` + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp" json:"timestamp,omitempty"` } -var xxx_messageInfo_ProfileTextures proto.InternalMessageInfo +func (m *ProfileTextures) Reset() { *m = ProfileTextures{} } +func (m *ProfileTextures) String() string { return proto.CompactTextString(m) } +func (*ProfileTextures) ProtoMessage() {} +func (*ProfileTextures) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func (m *ProfileTextures) GetProfileId() string { if m != nil { @@ -212,26 +178,26 @@ func init() { proto.RegisterType((*ProfileTextures)(nil), "rpc.ProfileTextures") } -func init() { proto.RegisterFile("common.proto", fileDescriptor_common_88bcea5c92f8250d) } +func init() { proto.RegisterFile("common.proto", fileDescriptor0) } -var fileDescriptor_common_88bcea5c92f8250d = []byte{ - // 277 bytes of a gzipped FileDescriptorProto +var fileDescriptor0 = []byte{ + // 283 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xbf, 0x4e, 0xc3, 0x30, - 0x10, 0xc6, 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xd8, 0x44, 0xf1, 0x32, 0xdd, 0x63, 0x6e, - 0x51, 0x06, 0x2b, 0xbf, 0x57, 0xed, 0x9b, 0x6b, 0xe2, 0xbc, 0x41, 0x06, 0x22, 0xb8, 0x95, 0x81, - 0xa4, 0x3d, 0x89, 0x32, 0xcc, 0x44, 0xa5, 0xa5, 0x47, 0xae, 0x2d, 0x5b, 0x66, 0xa4, 0x48, 0xaa, - 0xc9, 0x78, 0xba, 0x81, 0x6b, 0x3c, 0x96, 0xb5, 0x41, 0x8f, 0xdc, 0x61, 0xe9, 0xd1, 0x88, 0xbd, - 0x55, 0x8d, 0xfc, 0x38, 0xeb, 0x7e, 0xef, 0xe1, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x36, 0xfb, 0xa5, - 0xe8, 0xcd, 0x01, 0x00, 0x00, + 0x10, 0xc6, 0xe5, 0x24, 0xa5, 0xf4, 0x8a, 0x40, 0xb2, 0x3a, 0x78, 0x60, 0xb0, 0x32, 0x65, 0xb2, + 0x10, 0xf0, 0x04, 0x6c, 0x2c, 0xa8, 0x8a, 0x60, 0x60, 0x74, 0x13, 0x53, 0xac, 0x26, 0xb1, 0x65, + 0x5f, 0x10, 0x3c, 0x08, 0x4f, 0xc0, 0x8b, 0x22, 0xe7, 0xbf, 0xba, 0xf9, 0xfb, 0x7e, 0x77, 0xdf, + 0x9d, 0xce, 0x70, 0x55, 0x98, 0xba, 0x36, 0x8d, 0xb0, 0xce, 0xa0, 0xa1, 0xb1, 0xb3, 0x45, 0xfa, + 0x4b, 0x60, 0xbd, 0x77, 0xe6, 0x43, 0x57, 0x8a, 0x5e, 0x43, 0xa4, 0x4b, 0x46, 0x38, 0xc9, 0x36, + 0x79, 0xa4, 0x4b, 0x4a, 0x21, 0x69, 0x64, 0xad, 0x58, 0xd4, 0x39, 0xdd, 0x9b, 0x3e, 0x02, 0x58, + 0x67, 0xac, 0x72, 0xa8, 0x95, 0x67, 0x31, 0x8f, 0xb3, 0xed, 0xfd, 0x4e, 0x38, 0x5b, 0x88, 0x21, + 0x65, 0xdf, 0xd3, 0x9f, 0x7c, 0x51, 0x47, 0xef, 0xe0, 0x12, 0xd5, 0x37, 0xb6, 0x4e, 0x79, 0x96, + 0x70, 0x72, 0xde, 0xf3, 0x3a, 0xb0, 0x7c, 0xaa, 0x4a, 0xdf, 0xe1, 0xe6, 0x2c, 0x70, 0x5a, 0x87, + 0x2c, 0xd6, 0xd9, 0xc1, 0xea, 0x4b, 0x56, 0xed, 0xb8, 0x63, 0x2f, 0xe8, 0x2d, 0x6c, 0xbc, 0x3e, + 0x36, 0x32, 0x44, 0xb1, 0xb8, 0x23, 0xb3, 0x91, 0xfe, 0x91, 0x29, 0x7b, 0x1c, 0x1c, 0x3a, 0x6c, + 0x6f, 0x3d, 0x8f, 0x17, 0x98, 0x0d, 0xca, 0x61, 0x3b, 0x88, 0x97, 0xf9, 0x1e, 0x4b, 0x8b, 0x32, + 0x58, 0xfb, 0x93, 0x6e, 0xde, 0x5c, 0x35, 0xcc, 0x1b, 0x65, 0x20, 0x85, 0xb4, 0x2a, 0x90, 0xa4, + 0x27, 0x83, 0x0c, 0x33, 0x51, 0xd7, 0xca, 0xa3, 0xac, 0x2d, 0x5b, 0x71, 0x92, 0xc5, 0xf9, 0x6c, + 0x3c, 0xa5, 0xc0, 0xb5, 0x11, 0x47, 0x8d, 0x9f, 0xed, 0x41, 0x94, 0x06, 0x3d, 0x4a, 0x87, 0xc2, + 0xa3, 0x29, 0x4e, 0x56, 0x57, 0x2a, 0x9c, 0xef, 0x70, 0xd1, 0x7d, 0xe4, 0xc3, 0x7f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xb9, 0x29, 0x12, 0x2a, 0xd8, 0x01, 0x00, 0x00, } diff --git a/rpc/common.proto b/rpc/common.proto index d513810..e16bdb7 100644 --- a/rpc/common.proto +++ b/rpc/common.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package rpc; -option java_package = "tv.dotstart.stockpile"; +option java_package = "io.github.dotstart.stockpile.rpc"; /** * Represents a complete user profile. diff --git a/rpc/events.pb.go b/rpc/events.pb.go index 555daae..3b68ecb 100644 --- a/rpc/events.pb.go +++ b/rpc/events.pb.go @@ -6,8 +6,8 @@ package rpc import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import any "github.com/golang/protobuf/ptypes/any" -import empty "github.com/golang/protobuf/ptypes/empty" +import google_protobuf "github.com/golang/protobuf/ptypes/any" +import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" import ( context "golang.org/x/net/context" @@ -19,12 +19,6 @@ 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.ProtoPackageIsVersion2 // please upgrade the proto package - type EventType int32 const ( @@ -50,9 +44,7 @@ var EventType_value = map[string]int32{ func (x EventType) String() string { return proto.EnumName(EventType_name, int32(x)) } -func (EventType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_events_7995d0535b215243, []int{0} -} +func (EventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } type EventAction int32 @@ -73,43 +65,19 @@ var EventAction_value = map[string]int32{ func (x EventAction) String() string { return proto.EnumName(EventAction_name, int32(x)) } -func (EventAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_events_7995d0535b215243, []int{1} -} +func (EventAction) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } type Event struct { - Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=rpc.EventType" json:"type,omitempty"` - Action EventAction `protobuf:"varint,2,opt,name=action,proto3,enum=rpc.EventAction" json:"action,omitempty"` - Key *any.Any `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Object *any.Any `protobuf:"bytes,4,opt,name=object,proto3" json:"object,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) { - return fileDescriptor_events_7995d0535b215243, []int{0} -} -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) -} -func (dst *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(dst, src) -} -func (m *Event) XXX_Size() int { - return xxx_messageInfo_Event.Size(m) -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) + Type EventType `protobuf:"varint,1,opt,name=type,enum=rpc.EventType" json:"type,omitempty"` + Action EventAction `protobuf:"varint,2,opt,name=action,enum=rpc.EventAction" json:"action,omitempty"` + Key *google_protobuf.Any `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"` + Object *google_protobuf.Any `protobuf:"bytes,4,opt,name=object" json:"object,omitempty"` } -var xxx_messageInfo_Event proto.InternalMessageInfo +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } func (m *Event) GetType() EventType { if m != nil { @@ -125,14 +93,14 @@ func (m *Event) GetAction() EventAction { return EventAction_POPULATED } -func (m *Event) GetKey() *any.Any { +func (m *Event) GetKey() *google_protobuf.Any { if m != nil { return m.Key } return nil } -func (m *Event) GetObject() *any.Any { +func (m *Event) GetObject() *google_protobuf.Any { if m != nil { return m.Object } @@ -140,36 +108,14 @@ func (m *Event) GetObject() *any.Any { } type ProfileIdKey struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - At int64 `protobuf:"varint,2,opt,name=at,proto3" json:"at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + At int64 `protobuf:"varint,2,opt,name=at" json:"at,omitempty"` } -func (m *ProfileIdKey) Reset() { *m = ProfileIdKey{} } -func (m *ProfileIdKey) String() string { return proto.CompactTextString(m) } -func (*ProfileIdKey) ProtoMessage() {} -func (*ProfileIdKey) Descriptor() ([]byte, []int) { - return fileDescriptor_events_7995d0535b215243, []int{1} -} -func (m *ProfileIdKey) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProfileIdKey.Unmarshal(m, b) -} -func (m *ProfileIdKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProfileIdKey.Marshal(b, m, deterministic) -} -func (dst *ProfileIdKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfileIdKey.Merge(dst, src) -} -func (m *ProfileIdKey) XXX_Size() int { - return xxx_messageInfo_ProfileIdKey.Size(m) -} -func (m *ProfileIdKey) XXX_DiscardUnknown() { - xxx_messageInfo_ProfileIdKey.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfileIdKey proto.InternalMessageInfo +func (m *ProfileIdKey) Reset() { *m = ProfileIdKey{} } +func (m *ProfileIdKey) String() string { return proto.CompactTextString(m) } +func (*ProfileIdKey) ProtoMessage() {} +func (*ProfileIdKey) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } func (m *ProfileIdKey) GetName() string { if m != nil { @@ -186,35 +132,13 @@ func (m *ProfileIdKey) GetAt() int64 { } type IdKey struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` } -func (m *IdKey) Reset() { *m = IdKey{} } -func (m *IdKey) String() string { return proto.CompactTextString(m) } -func (*IdKey) ProtoMessage() {} -func (*IdKey) Descriptor() ([]byte, []int) { - return fileDescriptor_events_7995d0535b215243, []int{2} -} -func (m *IdKey) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IdKey.Unmarshal(m, b) -} -func (m *IdKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IdKey.Marshal(b, m, deterministic) -} -func (dst *IdKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdKey.Merge(dst, src) -} -func (m *IdKey) XXX_Size() int { - return xxx_messageInfo_IdKey.Size(m) -} -func (m *IdKey) XXX_DiscardUnknown() { - xxx_messageInfo_IdKey.DiscardUnknown(m) -} - -var xxx_messageInfo_IdKey proto.InternalMessageInfo +func (m *IdKey) Reset() { *m = IdKey{} } +func (m *IdKey) String() string { return proto.CompactTextString(m) } +func (*IdKey) ProtoMessage() {} +func (*IdKey) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } func (m *IdKey) GetId() string { if m != nil { @@ -239,11 +163,10 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// 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. +// Client API for EventService service + type EventServiceClient interface { - StreamEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (EventService_StreamEventsClient, error) + StreamEvents(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (EventService_StreamEventsClient, error) } type eventServiceClient struct { @@ -254,8 +177,8 @@ func NewEventServiceClient(cc *grpc.ClientConn) EventServiceClient { return &eventServiceClient{cc} } -func (c *eventServiceClient) StreamEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (EventService_StreamEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_EventService_serviceDesc.Streams[0], "/rpc.EventService/StreamEvents", opts...) +func (c *eventServiceClient) StreamEvents(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (EventService_StreamEventsClient, error) { + stream, err := grpc.NewClientStream(ctx, &_EventService_serviceDesc.Streams[0], c.cc, "/rpc.EventService/StreamEvents", opts...) if err != nil { return nil, err } @@ -286,9 +209,10 @@ func (x *eventServiceStreamEventsClient) Recv() (*Event, error) { return m, nil } -// EventServiceServer is the server API for EventService service. +// Server API for EventService service + type EventServiceServer interface { - StreamEvents(*empty.Empty, EventService_StreamEventsServer) error + StreamEvents(*google_protobuf1.Empty, EventService_StreamEventsServer) error } func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer) { @@ -296,7 +220,7 @@ func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer) { } func _EventService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(google_protobuf1.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -330,32 +254,32 @@ var _EventService_serviceDesc = grpc.ServiceDesc{ Metadata: "events.proto", } -func init() { proto.RegisterFile("events.proto", fileDescriptor_events_7995d0535b215243) } - -var fileDescriptor_events_7995d0535b215243 = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x6e, 0x9b, 0x40, - 0x14, 0x85, 0x0b, 0xf8, 0x47, 0xbe, 0x50, 0x84, 0x46, 0x6d, 0x4d, 0xdd, 0x8d, 0xc5, 0xa2, 0x72, - 0xad, 0x6a, 0x5c, 0xd1, 0xbe, 0x00, 0xae, 0x89, 0x82, 0x4c, 0x62, 0x04, 0x78, 0x91, 0x95, 0x85, - 0x61, 0x6c, 0x11, 0xdb, 0x0c, 0x82, 0x89, 0x25, 0x9e, 0x29, 0x2f, 0x19, 0x31, 0x90, 0x38, 0x4a, - 0xa4, 0xec, 0xe0, 0x7e, 0xdf, 0x5c, 0x9d, 0x39, 0x03, 0x0a, 0x39, 0x93, 0x8c, 0x95, 0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, 0xf9, 0x77, 0x9a, 0x80, 0x64, 0xe8, 0xb7, 0x86, 0x26, 0xa2, 0xcf, - 0x30, 0x98, 0xbb, 0xd6, 0xff, 0xa5, 0xeb, 0x04, 0xa1, 0x26, 0x4d, 0x7f, 0x81, 0xfc, 0xaa, 0x84, - 0x9a, 0x7a, 0x2b, 0x6f, 0xed, 0x5a, 0xa1, 0x5d, 0xef, 0x92, 0xa1, 0xbf, 0xf6, 0x16, 0xfc, 0x47, - 0x30, 0x17, 0xa0, 0x70, 0x35, 0x20, 0xc5, 0x39, 0x8d, 0x09, 0xfa, 0x07, 0x4a, 0xc0, 0x0a, 0x12, - 0x9d, 0xf8, 0xb4, 0x44, 0xdf, 0xde, 0x15, 0x60, 0xd7, 0xcf, 0x35, 0x82, 0x4b, 0xd5, 0x7f, 0x84, - 0xf9, 0x10, 0xbe, 0xb2, 0x33, 0x4e, 0x28, 0x2b, 0x59, 0x54, 0x30, 0x5c, 0x32, 0x1a, 0x1f, 0xf2, - 0xf4, 0x48, 0xb6, 0x3d, 0x7e, 0xec, 0xef, 0x53, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xd2, 0xd8, - 0x3e, 0x23, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("events.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x5d, 0xcf, 0x93, 0x30, + 0x18, 0x86, 0x05, 0xf6, 0x91, 0x3d, 0x20, 0x21, 0x8d, 0x51, 0x9c, 0x27, 0x0b, 0x07, 0x66, 0x2e, + 0xa6, 0x33, 0xe8, 0x1f, 0x60, 0x0e, 0x23, 0x19, 0x3a, 0x02, 0xec, 0xc0, 0xa3, 0x85, 0x8f, 0x6e, + 0xd6, 0x6d, 0x94, 0x40, 0xb7, 0x84, 0xdf, 0xe4, 0x9f, 0x34, 0x14, 0x74, 0xe6, 0x7d, 0x93, 0xf7, + 0xac, 0x7d, 0xae, 0x2b, 0x4f, 0xee, 0xde, 0x05, 0x8d, 0xdc, 0x48, 0xc1, 0x6b, 0x5c, 0x56, 0x8c, + 0x33, 0xa4, 0x54, 0x65, 0x36, 0x7d, 0x7d, 0x64, 0xec, 0x78, 0x26, 0x4b, 0x31, 0x4a, 0xaf, 0x87, + 0x65, 0x52, 0x34, 0x1d, 0x9f, 0xbe, 0x79, 0x88, 0xc8, 0xa5, 0xe4, 0x3d, 0xb4, 0x7e, 0x4b, 0x30, + 0x74, 0xdb, 0x6d, 0xc8, 0x82, 0x01, 0x6f, 0x4a, 0x62, 0x4a, 0x33, 0x69, 0xae, 0xdb, 0x3a, 0xae, + 0xca, 0x0c, 0x0b, 0x12, 0x37, 0x25, 0x09, 0x05, 0x43, 0x73, 0x18, 0x25, 0x19, 0xa7, 0xac, 0x30, + 0x65, 0x61, 0x19, 0x77, 0xcb, 0x11, 0xf3, 0xb0, 0xe7, 0xe8, 0x2d, 0x28, 0x27, 0xd2, 0x98, 0xca, + 0x4c, 0x9a, 0xab, 0xf6, 0x0b, 0xdc, 0x45, 0xc0, 0x7f, 0x23, 0x60, 0xa7, 0x68, 0xc2, 0x56, 0x40, + 0xef, 0x61, 0xc4, 0xd2, 0x5f, 0x24, 0xe3, 0xe6, 0xe0, 0x09, 0xb5, 0x77, 0x2c, 0x1b, 0xb4, 0xa0, + 0x62, 0x07, 0x7a, 0x26, 0x5e, 0xbe, 0x21, 0x0d, 0x42, 0x30, 0x28, 0x92, 0x4b, 0x97, 0x79, 0x12, + 0x8a, 0x33, 0xd2, 0x41, 0x4e, 0xb8, 0xc8, 0xa7, 0x84, 0x72, 0xc2, 0xad, 0x57, 0x30, 0xec, 0x64, + 0x1d, 0x64, 0x9a, 0xf7, 0xaa, 0x4c, 0xf3, 0x85, 0x07, 0x93, 0x7f, 0xef, 0x43, 0x3a, 0x40, 0x10, + 0x6e, 0xbf, 0x78, 0xbe, 0xbb, 0xf7, 0xd6, 0xc6, 0x33, 0x64, 0x80, 0xf6, 0xdd, 0xf9, 0xe6, 0xee, + 0xbf, 0x7a, 0x51, 0xbc, 0x0d, 0x7f, 0x18, 0x12, 0x52, 0x61, 0xdc, 0x1b, 0x86, 0x8c, 0x9e, 0xc3, + 0x64, 0xe5, 0x3b, 0x9f, 0x37, 0xbe, 0x17, 0xc5, 0x86, 0xb2, 0x78, 0x07, 0xea, 0x7f, 0x25, 0xb4, + 0x34, 0xd8, 0x06, 0x3b, 0xdf, 0x89, 0xdd, 0x76, 0x97, 0x0a, 0xe3, 0x5d, 0xb0, 0x16, 0x17, 0xc9, + 0x5e, 0x83, 0x26, 0xd4, 0x88, 0x54, 0x37, 0x9a, 0x11, 0xf4, 0x09, 0xb4, 0x88, 0x57, 0x24, 0xb9, + 0x88, 0x69, 0x8d, 0x5e, 0x3e, 0x2a, 0xc0, 0x6d, 0xbf, 0x6b, 0x0a, 0xf7, 0xaa, 0x3f, 0x48, 0x2b, + 0x0b, 0x66, 0x94, 0xe1, 0x23, 0xe5, 0x3f, 0xaf, 0x29, 0xce, 0x19, 0xaf, 0x79, 0x52, 0x71, 0x5c, + 0x73, 0x96, 0x9d, 0x4a, 0x7a, 0x26, 0xad, 0x9b, 0x8e, 0xc4, 0x86, 0x8f, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x60, 0x8e, 0xe6, 0x95, 0x2e, 0x02, 0x00, 0x00, } diff --git a/rpc/events.proto b/rpc/events.proto index 90d306f..ccaaded 100644 --- a/rpc/events.proto +++ b/rpc/events.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package rpc; -option java_package = "tv.dotstart.stockpile"; +option java_package = "io.github.dotstart.stockpile.rpc"; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; diff --git a/rpc/profile.pb.go b/rpc/profile.pb.go index b28c25e..926bb48 100644 --- a/rpc/profile.pb.go +++ b/rpc/profile.pb.go @@ -17,44 +17,16 @@ 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.ProtoPackageIsVersion2 // please upgrade the proto package - // * // Used to transmit Mojang or RFC formatted UUIDs as the sole parameter. type IdRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IdRequest) Reset() { *m = IdRequest{} } -func (m *IdRequest) String() string { return proto.CompactTextString(m) } -func (*IdRequest) ProtoMessage() {} -func (*IdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{0} -} -func (m *IdRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IdRequest.Unmarshal(m, b) -} -func (m *IdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IdRequest.Marshal(b, m, deterministic) -} -func (dst *IdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdRequest.Merge(dst, src) -} -func (m *IdRequest) XXX_Size() int { - return xxx_messageInfo_IdRequest.Size(m) -} -func (m *IdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IdRequest.DiscardUnknown(m) + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` } -var xxx_messageInfo_IdRequest proto.InternalMessageInfo +func (m *IdRequest) Reset() { *m = IdRequest{} } +func (m *IdRequest) String() string { return proto.CompactTextString(m) } +func (*IdRequest) ProtoMessage() {} +func (*IdRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } func (m *IdRequest) GetId() string { if m != nil { @@ -66,36 +38,14 @@ func (m *IdRequest) GetId() string { // * // Stores the parameters for id requests (based on the respective display name and timestamp) type GetIdRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` } -func (m *GetIdRequest) Reset() { *m = GetIdRequest{} } -func (m *GetIdRequest) String() string { return proto.CompactTextString(m) } -func (*GetIdRequest) ProtoMessage() {} -func (*GetIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{1} -} -func (m *GetIdRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIdRequest.Unmarshal(m, b) -} -func (m *GetIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIdRequest.Marshal(b, m, deterministic) -} -func (dst *GetIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIdRequest.Merge(dst, src) -} -func (m *GetIdRequest) XXX_Size() int { - return xxx_messageInfo_GetIdRequest.Size(m) -} -func (m *GetIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetIdRequest proto.InternalMessageInfo +func (m *GetIdRequest) Reset() { *m = GetIdRequest{} } +func (m *GetIdRequest) String() string { return proto.CompactTextString(m) } +func (*GetIdRequest) ProtoMessage() {} +func (*GetIdRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } func (m *GetIdRequest) GetName() string { if m != nil { @@ -114,39 +64,17 @@ func (m *GetIdRequest) GetTimestamp() int64 { // * // Represents a profile <-> name mapping at a specified time. type ProfileId struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - ValidUntil int64 `protobuf:"varint,5,opt,name=validUntil,proto3" json:"validUntil,omitempty"` - FirstSeenAt int64 `protobuf:"varint,6,opt,name=firstSeenAt,proto3" json:"firstSeenAt,omitempty"` - LastSeenAt int64 `protobuf:"varint,7,opt,name=lastSeenAt,proto3" json:"lastSeenAt,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + ValidUntil int64 `protobuf:"varint,5,opt,name=validUntil" json:"validUntil,omitempty"` + FirstSeenAt int64 `protobuf:"varint,6,opt,name=firstSeenAt" json:"firstSeenAt,omitempty"` + LastSeenAt int64 `protobuf:"varint,7,opt,name=lastSeenAt" json:"lastSeenAt,omitempty"` } -func (m *ProfileId) Reset() { *m = ProfileId{} } -func (m *ProfileId) String() string { return proto.CompactTextString(m) } -func (*ProfileId) ProtoMessage() {} -func (*ProfileId) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{2} -} -func (m *ProfileId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProfileId.Unmarshal(m, b) -} -func (m *ProfileId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProfileId.Marshal(b, m, deterministic) -} -func (dst *ProfileId) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfileId.Merge(dst, src) -} -func (m *ProfileId) XXX_Size() int { - return xxx_messageInfo_ProfileId.Size(m) -} -func (m *ProfileId) XXX_DiscardUnknown() { - xxx_messageInfo_ProfileId.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfileId proto.InternalMessageInfo +func (m *ProfileId) Reset() { *m = ProfileId{} } +func (m *ProfileId) String() string { return proto.CompactTextString(m) } +func (*ProfileId) ProtoMessage() {} +func (*ProfileId) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } func (m *ProfileId) GetId() string { if m != nil { @@ -186,36 +114,14 @@ func (m *ProfileId) GetLastSeenAt() int64 { // * // Represents a complete name history. type NameHistory struct { - History []*NameHistoryEntry `protobuf:"bytes,1,rep,name=history,proto3" json:"history,omitempty"` - ValidUntil int64 `protobuf:"varint,2,opt,name=validUntil,proto3" json:"validUntil,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + History []*NameHistoryEntry `protobuf:"bytes,1,rep,name=history" json:"history,omitempty"` + ValidUntil int64 `protobuf:"varint,2,opt,name=validUntil" json:"validUntil,omitempty"` } -func (m *NameHistory) Reset() { *m = NameHistory{} } -func (m *NameHistory) String() string { return proto.CompactTextString(m) } -func (*NameHistory) ProtoMessage() {} -func (*NameHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{3} -} -func (m *NameHistory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameHistory.Unmarshal(m, b) -} -func (m *NameHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameHistory.Marshal(b, m, deterministic) -} -func (dst *NameHistory) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameHistory.Merge(dst, src) -} -func (m *NameHistory) XXX_Size() int { - return xxx_messageInfo_NameHistory.Size(m) -} -func (m *NameHistory) XXX_DiscardUnknown() { - xxx_messageInfo_NameHistory.DiscardUnknown(m) -} - -var xxx_messageInfo_NameHistory proto.InternalMessageInfo +func (m *NameHistory) Reset() { *m = NameHistory{} } +func (m *NameHistory) String() string { return proto.CompactTextString(m) } +func (*NameHistory) ProtoMessage() {} +func (*NameHistory) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } func (m *NameHistory) GetHistory() []*NameHistoryEntry { if m != nil { @@ -234,37 +140,15 @@ func (m *NameHistory) GetValidUntil() int64 { // * // Represents a single entry in the name history. type NameHistoryEntry struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ChangedToAt int64 `protobuf:"varint,2,opt,name=changedToAt,proto3" json:"changedToAt,omitempty"` - ValidUntil int64 `protobuf:"varint,3,opt,name=validUntil,proto3" json:"validUntil,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + ChangedToAt int64 `protobuf:"varint,2,opt,name=changedToAt" json:"changedToAt,omitempty"` + ValidUntil int64 `protobuf:"varint,3,opt,name=validUntil" json:"validUntil,omitempty"` } -func (m *NameHistoryEntry) Reset() { *m = NameHistoryEntry{} } -func (m *NameHistoryEntry) String() string { return proto.CompactTextString(m) } -func (*NameHistoryEntry) ProtoMessage() {} -func (*NameHistoryEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{4} -} -func (m *NameHistoryEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameHistoryEntry.Unmarshal(m, b) -} -func (m *NameHistoryEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameHistoryEntry.Marshal(b, m, deterministic) -} -func (dst *NameHistoryEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameHistoryEntry.Merge(dst, src) -} -func (m *NameHistoryEntry) XXX_Size() int { - return xxx_messageInfo_NameHistoryEntry.Size(m) -} -func (m *NameHistoryEntry) XXX_DiscardUnknown() { - xxx_messageInfo_NameHistoryEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_NameHistoryEntry proto.InternalMessageInfo +func (m *NameHistoryEntry) Reset() { *m = NameHistoryEntry{} } +func (m *NameHistoryEntry) String() string { return proto.CompactTextString(m) } +func (*NameHistoryEntry) ProtoMessage() {} +func (*NameHistoryEntry) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} } func (m *NameHistoryEntry) GetName() string { if m != nil { @@ -290,35 +174,13 @@ func (m *NameHistoryEntry) GetValidUntil() int64 { // * // Stores the parameters for bulk id requests. type BulkIdRequest struct { - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BulkIdRequest) Reset() { *m = BulkIdRequest{} } -func (m *BulkIdRequest) String() string { return proto.CompactTextString(m) } -func (*BulkIdRequest) ProtoMessage() {} -func (*BulkIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{5} -} -func (m *BulkIdRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BulkIdRequest.Unmarshal(m, b) -} -func (m *BulkIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BulkIdRequest.Marshal(b, m, deterministic) -} -func (dst *BulkIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BulkIdRequest.Merge(dst, src) -} -func (m *BulkIdRequest) XXX_Size() int { - return xxx_messageInfo_BulkIdRequest.Size(m) -} -func (m *BulkIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BulkIdRequest.DiscardUnknown(m) + Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` } -var xxx_messageInfo_BulkIdRequest proto.InternalMessageInfo +func (m *BulkIdRequest) Reset() { *m = BulkIdRequest{} } +func (m *BulkIdRequest) String() string { return proto.CompactTextString(m) } +func (*BulkIdRequest) ProtoMessage() {} +func (*BulkIdRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} } func (m *BulkIdRequest) GetNames() []string { if m != nil { @@ -330,35 +192,13 @@ func (m *BulkIdRequest) GetNames() []string { // * // Represents a list of bulk id responses. type BulkIdResponse struct { - Ids []*ProfileId `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Ids []*ProfileId `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"` } -func (m *BulkIdResponse) Reset() { *m = BulkIdResponse{} } -func (m *BulkIdResponse) String() string { return proto.CompactTextString(m) } -func (*BulkIdResponse) ProtoMessage() {} -func (*BulkIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_profile_1c41a6ce651c232c, []int{6} -} -func (m *BulkIdResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BulkIdResponse.Unmarshal(m, b) -} -func (m *BulkIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BulkIdResponse.Marshal(b, m, deterministic) -} -func (dst *BulkIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BulkIdResponse.Merge(dst, src) -} -func (m *BulkIdResponse) XXX_Size() int { - return xxx_messageInfo_BulkIdResponse.Size(m) -} -func (m *BulkIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BulkIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BulkIdResponse proto.InternalMessageInfo +func (m *BulkIdResponse) Reset() { *m = BulkIdResponse{} } +func (m *BulkIdResponse) String() string { return proto.CompactTextString(m) } +func (*BulkIdResponse) ProtoMessage() {} +func (*BulkIdResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} } func (m *BulkIdResponse) GetIds() []*ProfileId { if m != nil { @@ -385,9 +225,8 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// ProfileServiceClient is the client API for ProfileService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for ProfileService service + type ProfileServiceClient interface { // * // Resolves the profile identifier and correct casing of a given name. @@ -437,7 +276,7 @@ func NewProfileServiceClient(cc *grpc.ClientConn) ProfileServiceClient { func (c *profileServiceClient) GetId(ctx context.Context, in *GetIdRequest, opts ...grpc.CallOption) (*ProfileId, error) { out := new(ProfileId) - err := c.cc.Invoke(ctx, "/rpc.ProfileService/GetId", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ProfileService/GetId", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -446,7 +285,7 @@ func (c *profileServiceClient) GetId(ctx context.Context, in *GetIdRequest, opts func (c *profileServiceClient) GetNameHistory(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*NameHistory, error) { out := new(NameHistory) - err := c.cc.Invoke(ctx, "/rpc.ProfileService/GetNameHistory", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ProfileService/GetNameHistory", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -455,7 +294,7 @@ func (c *profileServiceClient) GetNameHistory(ctx context.Context, in *IdRequest func (c *profileServiceClient) BulkGetId(ctx context.Context, in *BulkIdRequest, opts ...grpc.CallOption) (*BulkIdResponse, error) { out := new(BulkIdResponse) - err := c.cc.Invoke(ctx, "/rpc.ProfileService/BulkGetId", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ProfileService/BulkGetId", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -464,14 +303,15 @@ func (c *profileServiceClient) BulkGetId(ctx context.Context, in *BulkIdRequest, func (c *profileServiceClient) GetProfile(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Profile, error) { out := new(Profile) - err := c.cc.Invoke(ctx, "/rpc.ProfileService/GetProfile", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ProfileService/GetProfile", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// ProfileServiceServer is the server API for ProfileService service. +// Server API for ProfileService service + type ProfileServiceServer interface { // * // Resolves the profile identifier and correct casing of a given name. @@ -612,34 +452,34 @@ var _ProfileService_serviceDesc = grpc.ServiceDesc{ Metadata: "profile.proto", } -func init() { proto.RegisterFile("profile.proto", fileDescriptor_profile_1c41a6ce651c232c) } - -var fileDescriptor_profile_1c41a6ce651c232c = []byte{ - // 406 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0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x19, 0x9b, - 0x73, 0x2d, 0x5f, 0xc1, 0x04, 0x8f, 0x31, 0x15, 0xa8, 0x30, 0x93, 0x18, 0x2b, 0x14, 0xf9, 0xbe, - 0xe6, 0x05, 0xfb, 0x75, 0xa7, 0x7f, 0x86, 0x0f, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xa9, - 0x6f, 0xab, 0x30, 0x03, 0x00, 0x00, +func init() { proto.RegisterFile("profile.proto", fileDescriptor2) } + +var fileDescriptor2 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xd1, 0x8a, 0x9b, 0x40, + 0x14, 0x45, 0x6d, 0x76, 0xf1, 0x9a, 0x95, 0xed, 0xb4, 0x05, 0x49, 0x4b, 0x11, 0xa1, 0x10, 0xf6, + 0xc1, 0x82, 0xed, 0x07, 0x74, 0x17, 0x4a, 0xba, 0x2f, 0xa5, 0xb8, 0xed, 0x6b, 0xc1, 0x75, 0x66, + 0xe3, 0x10, 0x75, 0xa6, 0x33, 0x37, 0x81, 0x7c, 0x46, 0x7f, 0xad, 0x5f, 0x54, 0x1c, 0x4d, 0x9c, + 0x98, 0x7d, 0xd3, 0x73, 0xcf, 0x3d, 0xe7, 0x9e, 0x3b, 0x33, 0x70, 0x25, 0x95, 0x78, 0xe2, 0x35, + 0x4b, 0xa5, 0x12, 0x28, 0x88, 0xa7, 0x64, 0xb9, 0x98, 0x97, 0xa2, 0x69, 0x44, 0xdb, 0x43, 0xc9, + 0x5b, 0xf0, 0xef, 0x69, 0xce, 0xfe, 0x6c, 0x99, 0x46, 0x12, 0x82, 0xcb, 0x69, 0xe4, 0xc4, 0xce, + 0xd2, 0xcf, 0x5d, 0x4e, 0x93, 0x2f, 0x30, 0x5f, 0x31, 0x1c, 0xeb, 0x04, 0x5e, 0xb4, 0x45, 0xc3, + 0x06, 0x86, 0xf9, 0x26, 0x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x4b, 0x46, 0x6e, 0x60, 0x66, + 0x6e, 0x03, 0x79, 0x69, 0x1a, 0xec, 0x9b, 0xb1, 0x98, 0x68, 0x90, 0x0c, 0xc2, 0x15, 0x43, 0x7b, + 0xcd, 0x3d, 0x63, 0xec, 0xb8, 0x9e, 0x6e, 0x99, 0x7c, 0x06, 0xbf, 0x1b, 0xb3, 0xf7, 0x20, 0xa6, + 0x7c, 0x92, 0x6e, 0xf1, 0xea, 0x04, 0x1b, 0xa2, 0xdc, 0x00, 0xac, 0x18, 0x0e, 0xce, 0x67, 0x2e, + 0x73, 0x7b, 0xae, 0xbb, 0x04, 0x62, 0x2e, 0xd2, 0x35, 0xc7, 0x6a, 0xfb, 0x98, 0x52, 0x81, 0x1a, + 0x0b, 0x85, 0xa9, 0x46, 0x51, 0x6e, 0x64, 0xf7, 0x4a, 0x94, 0x2c, 0x1f, 0x2f, 0xcc, 0xbb, 0xf8, + 0xf4, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x70, 0xdf, 0x90, 0x3b, 0x03, 0x00, 0x00, } diff --git a/rpc/profile.proto b/rpc/profile.proto index c963e42..b396bf7 100644 --- a/rpc/profile.proto +++ b/rpc/profile.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package rpc; -option java_package = "tv.dotstart.stockpile"; +option java_package = "io.github.dotstart.stockpile.rpc"; import "common.proto"; diff --git a/rpc/server.pb.go b/rpc/server.pb.go index fbad3b6..660ced1 100644 --- a/rpc/server.pb.go +++ b/rpc/server.pb.go @@ -6,7 +6,7 @@ package rpc import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import empty "github.com/golang/protobuf/ptypes/empty" +import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" import ( context "golang.org/x/net/context" @@ -18,44 +18,16 @@ 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.ProtoPackageIsVersion2 // please upgrade the proto package - // * // Represents the current server blacklist. type Blacklist struct { - Hashes []string `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Blacklist) Reset() { *m = Blacklist{} } -func (m *Blacklist) String() string { return proto.CompactTextString(m) } -func (*Blacklist) ProtoMessage() {} -func (*Blacklist) Descriptor() ([]byte, []int) { - return fileDescriptor_server_3837898c7939836d, []int{0} -} -func (m *Blacklist) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Blacklist.Unmarshal(m, b) -} -func (m *Blacklist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Blacklist.Marshal(b, m, deterministic) -} -func (dst *Blacklist) XXX_Merge(src proto.Message) { - xxx_messageInfo_Blacklist.Merge(dst, src) -} -func (m *Blacklist) XXX_Size() int { - return xxx_messageInfo_Blacklist.Size(m) -} -func (m *Blacklist) XXX_DiscardUnknown() { - xxx_messageInfo_Blacklist.DiscardUnknown(m) + Hashes []string `protobuf:"bytes,1,rep,name=hashes" json:"hashes,omitempty"` } -var xxx_messageInfo_Blacklist proto.InternalMessageInfo +func (m *Blacklist) Reset() { *m = Blacklist{} } +func (m *Blacklist) String() string { return proto.CompactTextString(m) } +func (*Blacklist) ProtoMessage() {} +func (*Blacklist) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } func (m *Blacklist) GetHashes() []string { if m != nil { @@ -68,35 +40,13 @@ func (m *Blacklist) GetHashes() []string { // Represents a request which evaluates whether the passed hostnames or ip // addresses match the server blacklist type CheckBlacklistRequest struct { - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckBlacklistRequest) Reset() { *m = CheckBlacklistRequest{} } -func (m *CheckBlacklistRequest) String() string { return proto.CompactTextString(m) } -func (*CheckBlacklistRequest) ProtoMessage() {} -func (*CheckBlacklistRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_server_3837898c7939836d, []int{1} -} -func (m *CheckBlacklistRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CheckBlacklistRequest.Unmarshal(m, b) -} -func (m *CheckBlacklistRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CheckBlacklistRequest.Marshal(b, m, deterministic) -} -func (dst *CheckBlacklistRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckBlacklistRequest.Merge(dst, src) -} -func (m *CheckBlacklistRequest) XXX_Size() int { - return xxx_messageInfo_CheckBlacklistRequest.Size(m) -} -func (m *CheckBlacklistRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CheckBlacklistRequest.DiscardUnknown(m) + Addresses []string `protobuf:"bytes,1,rep,name=addresses" json:"addresses,omitempty"` } -var xxx_messageInfo_CheckBlacklistRequest proto.InternalMessageInfo +func (m *CheckBlacklistRequest) Reset() { *m = CheckBlacklistRequest{} } +func (m *CheckBlacklistRequest) String() string { return proto.CompactTextString(m) } +func (*CheckBlacklistRequest) ProtoMessage() {} +func (*CheckBlacklistRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } func (m *CheckBlacklistRequest) GetAddresses() []string { if m != nil { @@ -108,35 +58,13 @@ func (m *CheckBlacklistRequest) GetAddresses() []string { // * // represents a response to a prior blacklist check type CheckBlacklistResponse struct { - MatchedAddresses []string `protobuf:"bytes,1,rep,name=matchedAddresses,proto3" json:"matchedAddresses,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + MatchedAddresses []string `protobuf:"bytes,1,rep,name=matchedAddresses" json:"matchedAddresses,omitempty"` } -func (m *CheckBlacklistResponse) Reset() { *m = CheckBlacklistResponse{} } -func (m *CheckBlacklistResponse) String() string { return proto.CompactTextString(m) } -func (*CheckBlacklistResponse) ProtoMessage() {} -func (*CheckBlacklistResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_server_3837898c7939836d, []int{2} -} -func (m *CheckBlacklistResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CheckBlacklistResponse.Unmarshal(m, b) -} -func (m *CheckBlacklistResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CheckBlacklistResponse.Marshal(b, m, deterministic) -} -func (dst *CheckBlacklistResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckBlacklistResponse.Merge(dst, src) -} -func (m *CheckBlacklistResponse) XXX_Size() int { - return xxx_messageInfo_CheckBlacklistResponse.Size(m) -} -func (m *CheckBlacklistResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CheckBlacklistResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckBlacklistResponse proto.InternalMessageInfo +func (m *CheckBlacklistResponse) Reset() { *m = CheckBlacklistResponse{} } +func (m *CheckBlacklistResponse) String() string { return proto.CompactTextString(m) } +func (*CheckBlacklistResponse) ProtoMessage() {} +func (*CheckBlacklistResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} } func (m *CheckBlacklistResponse) GetMatchedAddresses() []string { if m != nil { @@ -146,37 +74,15 @@ func (m *CheckBlacklistResponse) GetMatchedAddresses() []string { } type LoginRequest struct { - DisplayName string `protobuf:"bytes,1,opt,name=displayName,proto3" json:"displayName,omitempty"` - ServerId string `protobuf:"bytes,2,opt,name=serverId,proto3" json:"serverId,omitempty"` - Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoginRequest) Reset() { *m = LoginRequest{} } -func (m *LoginRequest) String() string { return proto.CompactTextString(m) } -func (*LoginRequest) ProtoMessage() {} -func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_server_3837898c7939836d, []int{3} -} -func (m *LoginRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LoginRequest.Unmarshal(m, b) -} -func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) -} -func (dst *LoginRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoginRequest.Merge(dst, src) -} -func (m *LoginRequest) XXX_Size() int { - return xxx_messageInfo_LoginRequest.Size(m) -} -func (m *LoginRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoginRequest.DiscardUnknown(m) + DisplayName string `protobuf:"bytes,1,opt,name=displayName" json:"displayName,omitempty"` + ServerId string `protobuf:"bytes,2,opt,name=serverId" json:"serverId,omitempty"` + Ip string `protobuf:"bytes,3,opt,name=ip" json:"ip,omitempty"` } -var xxx_messageInfo_LoginRequest proto.InternalMessageInfo +func (m *LoginRequest) Reset() { *m = LoginRequest{} } +func (m *LoginRequest) String() string { return proto.CompactTextString(m) } +func (*LoginRequest) ProtoMessage() {} +func (*LoginRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} } func (m *LoginRequest) GetDisplayName() string { if m != nil { @@ -214,13 +120,12 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// ServerServiceClient is the client API for ServerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for ServerService service + type ServerServiceClient interface { // * // Retrieves a cached version of the entire server blacklist. - GetBlacklist(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Blacklist, error) + GetBlacklist(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Blacklist, error) // * // Evaluates whether a given address has been blacklisted. // @@ -245,9 +150,9 @@ func NewServerServiceClient(cc *grpc.ClientConn) ServerServiceClient { return &serverServiceClient{cc} } -func (c *serverServiceClient) GetBlacklist(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Blacklist, error) { +func (c *serverServiceClient) GetBlacklist(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Blacklist, error) { out := new(Blacklist) - err := c.cc.Invoke(ctx, "/rpc.ServerService/GetBlacklist", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ServerService/GetBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -256,7 +161,7 @@ func (c *serverServiceClient) GetBlacklist(ctx context.Context, in *empty.Empty, func (c *serverServiceClient) CheckBlacklist(ctx context.Context, in *CheckBlacklistRequest, opts ...grpc.CallOption) (*CheckBlacklistResponse, error) { out := new(CheckBlacklistResponse) - err := c.cc.Invoke(ctx, "/rpc.ServerService/CheckBlacklist", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ServerService/CheckBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -265,18 +170,19 @@ func (c *serverServiceClient) CheckBlacklist(ctx context.Context, in *CheckBlack func (c *serverServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*Profile, error) { out := new(Profile) - err := c.cc.Invoke(ctx, "/rpc.ServerService/Login", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.ServerService/Login", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// ServerServiceServer is the server API for ServerService service. +// Server API for ServerService service + type ServerServiceServer interface { // * // Retrieves a cached version of the entire server blacklist. - GetBlacklist(context.Context, *empty.Empty) (*Blacklist, error) + GetBlacklist(context.Context, *google_protobuf1.Empty) (*Blacklist, error) // * // Evaluates whether a given address has been blacklisted. // @@ -298,7 +204,7 @@ func RegisterServerServiceServer(s *grpc.Server, srv ServerServiceServer) { } func _ServerService_GetBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(google_protobuf1.Empty) if err := dec(in); err != nil { return nil, err } @@ -310,7 +216,7 @@ func _ServerService_GetBlacklist_Handler(srv interface{}, ctx context.Context, d FullMethod: "/rpc.ServerService/GetBlacklist", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).GetBlacklist(ctx, req.(*empty.Empty)) + return srv.(ServerServiceServer).GetBlacklist(ctx, req.(*google_protobuf1.Empty)) } return interceptor(ctx, in, info, handler) } @@ -372,29 +278,29 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{ Metadata: "server.proto", } -func init() { proto.RegisterFile("server.proto", fileDescriptor_server_3837898c7939836d) } - -var fileDescriptor_server_3837898c7939836d = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x5f, 0x4b, 0xf3, 0x30, - 0x14, 0xc6, 0xe9, 0xc6, 0x3b, 0xde, 0x1e, 0xeb, 0xd0, 0xc0, 0x66, 0xc9, 0xbc, 0x18, 0xf5, 0x66, - 0x78, 0x91, 0x81, 0xa2, 0xf7, 0x4e, 0x45, 0x06, 0x22, 0x32, 0x6f, 0xbd, 0xc9, 0xd2, 0xb3, 0x35, - 0xac, 0x5d, 0x62, 0x92, 0x0d, 0xf6, 0xdd, 0xfc, 0x70, 0xb2, 0x74, 0x7f, 0xea, 0xdc, 0x4d, 0xe1, - 0xfc, 0xce, 0x73, 0x68, 0x9e, 0x1f, 0x44, 0x16, 0xcd, 0x12, 0x0d, 0xd3, 0x46, 0x39, 0x45, 0xea, - 0x46, 0x0b, 0xda, 0x99, 0x2a, 0x35, 0xcd, 0xb1, 0xef, 0xd1, 0x78, 0x31, 0xe9, 0x63, 0xa1, 0xdd, - 0xaa, 0x4c, 0xd0, 0x48, 0xa8, 0xa2, 0x50, 0xf3, 0x72, 0x4a, 0xae, 0x20, 0x1c, 0xe4, 0x5c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dc, 0x92, 0xa5, 0xca, 0x59, 0xc7, 0x8d, 0x63, 0xd6, 0x29, 0x31, 0xd3, 0x32, 0xc7, 0x71, - 0xc3, 0xbf, 0xf6, 0xf6, 0x27, 0x00, 0x00, 0xff, 0xff, 0xff, 0xb9, 0xad, 0x31, 0x1e, 0x02, 0x00, - 0x00, +func init() { proto.RegisterFile("server.proto", fileDescriptor3) } + +var fileDescriptor3 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xcf, 0x4b, 0xc3, 0x30, + 0x14, 0xc7, 0xe9, 0x86, 0xc3, 0x3e, 0xeb, 0xd0, 0x80, 0xa3, 0x64, 0x1e, 0x4a, 0xbd, 0x0c, 0x0f, + 0x19, 0x28, 0x7a, 0x77, 0x2a, 0x32, 0x10, 0x91, 0x79, 0xf5, 0x92, 0xa5, 0x6f, 0x6d, 0x58, 0xbb, + 0xc4, 0x24, 0x13, 0xf6, 0xbf, 0xf9, 0xc7, 0xc9, 0xd2, 0xfd, 0x72, 0xee, 0x52, 0x78, 0xdf, 0xf7, + 0x79, 0x34, 0xdf, 0x0f, 0x44, 0x16, 0xcd, 0x37, 0x1a, 0xa6, 0x8d, 0x72, 0x8a, 0x34, 0x8d, 0x16, + 0xb4, 0x9b, 0x2b, 0x95, 0x97, 0xd8, 0xf7, 0xd1, 0x78, 0x3e, 0xe9, 0x63, 0xa5, 0xdd, 0xa2, 0x26, + 0x68, 0x24, 0x54, 0x55, 0xa9, 0x59, 0x3d, 0xa5, 0x57, 0x10, 0x0e, 0x4a, 0x2e, 0xa6, 0xa5, 0xb4, + 0x8e, 0x74, 0xa0, 0x55, 0x70, 0x5b, 0xa0, 0x8d, 0x83, 0xa4, 0xd9, 0x0b, 0x47, 0xab, 0x29, 0xbd, + 0x83, 0x8b, 0xc7, 0x02, 0xc5, 0x74, 0x43, 0x8e, 0xf0, 0x6b, 0x8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0x29, 0x02, 0x00, 0x00, } diff --git a/rpc/server.proto b/rpc/server.proto index 4446ffd..16348f4 100644 --- a/rpc/server.proto +++ b/rpc/server.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package rpc; -option java_package = "tv.dotstart.stockpile"; +option java_package = "io.github.dotstart.stockpile.rpc"; import "google/protobuf/empty.proto"; import "common.proto"; diff --git a/rpc/system.pb.go b/rpc/system.pb.go index 3c63fc1..fd9e10d 100644 --- a/rpc/system.pb.go +++ b/rpc/system.pb.go @@ -6,7 +6,7 @@ package rpc import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import empty "github.com/golang/protobuf/ptypes/empty" +import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" import ( context "golang.org/x/net/context" @@ -18,46 +18,18 @@ 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.ProtoPackageIsVersion2 // please upgrade the proto package - type Status struct { - Brand string `protobuf:"bytes,1,opt,name=Brand,proto3" json:"Brand,omitempty"` - Version string `protobuf:"bytes,2,opt,name=Version,proto3" json:"Version,omitempty"` - VersionFull string `protobuf:"bytes,3,opt,name=VersionFull,proto3" json:"VersionFull,omitempty"` - CommitHash string `protobuf:"bytes,4,opt,name=CommitHash,proto3" json:"CommitHash,omitempty"` - BuildTimestamp int64 `protobuf:"varint,5,opt,name=BuildTimestamp,proto3" json:"BuildTimestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Brand string `protobuf:"bytes,1,opt,name=Brand,json=brand" json:"Brand,omitempty"` + Version string `protobuf:"bytes,2,opt,name=Version,json=version" json:"Version,omitempty"` + VersionFull string `protobuf:"bytes,3,opt,name=VersionFull,json=versionFull" json:"VersionFull,omitempty"` + CommitHash string `protobuf:"bytes,4,opt,name=CommitHash,json=commitHash" json:"CommitHash,omitempty"` + BuildTimestamp int64 `protobuf:"varint,5,opt,name=BuildTimestamp,json=buildTimestamp" json:"BuildTimestamp,omitempty"` } -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_system_00592df632489c93, []int{0} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Status.Unmarshal(m, b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) -} -func (dst *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(dst, src) -} -func (m *Status) XXX_Size() int { - return xxx_messageInfo_Status.Size(m) -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } func (m *Status) GetBrand() string { if m != nil { @@ -95,35 +67,13 @@ func (m *Status) GetBuildTimestamp() int64 { } type PluginList struct { - Plugins []*Plugin `protobuf:"bytes,1,rep,name=Plugins,proto3" json:"Plugins,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Plugins []*Plugin `protobuf:"bytes,1,rep,name=Plugins,json=plugins" json:"Plugins,omitempty"` } -func (m *PluginList) Reset() { *m = PluginList{} } -func (m *PluginList) String() string { return proto.CompactTextString(m) } -func (*PluginList) ProtoMessage() {} -func (*PluginList) Descriptor() ([]byte, []int) { - return fileDescriptor_system_00592df632489c93, []int{1} -} -func (m *PluginList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PluginList.Unmarshal(m, b) -} -func (m *PluginList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PluginList.Marshal(b, m, deterministic) -} -func (dst *PluginList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginList.Merge(dst, src) -} -func (m *PluginList) XXX_Size() int { - return xxx_messageInfo_PluginList.Size(m) -} -func (m *PluginList) XXX_DiscardUnknown() { - xxx_messageInfo_PluginList.DiscardUnknown(m) -} - -var xxx_messageInfo_PluginList proto.InternalMessageInfo +func (m *PluginList) Reset() { *m = PluginList{} } +func (m *PluginList) String() string { return proto.CompactTextString(m) } +func (*PluginList) ProtoMessage() {} +func (*PluginList) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } func (m *PluginList) GetPlugins() []*Plugin { if m != nil { @@ -133,38 +83,16 @@ func (m *PluginList) GetPlugins() []*Plugin { } type Plugin struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=Version,proto3" json:"Version,omitempty"` - Authors []string `protobuf:"bytes,3,rep,name=Authors,proto3" json:"Authors,omitempty"` - Website string `protobuf:"bytes,4,opt,name=Website,proto3" json:"Website,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Plugin) Reset() { *m = Plugin{} } -func (m *Plugin) String() string { return proto.CompactTextString(m) } -func (*Plugin) ProtoMessage() {} -func (*Plugin) Descriptor() ([]byte, []int) { - return fileDescriptor_system_00592df632489c93, []int{2} -} -func (m *Plugin) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Plugin.Unmarshal(m, b) -} -func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Plugin.Marshal(b, m, deterministic) -} -func (dst *Plugin) XXX_Merge(src proto.Message) { - xxx_messageInfo_Plugin.Merge(dst, src) -} -func (m *Plugin) XXX_Size() int { - return xxx_messageInfo_Plugin.Size(m) -} -func (m *Plugin) XXX_DiscardUnknown() { - xxx_messageInfo_Plugin.DiscardUnknown(m) + Name string `protobuf:"bytes,1,opt,name=Name,json=name" json:"Name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=Version,json=version" json:"Version,omitempty"` + Authors []string `protobuf:"bytes,3,rep,name=Authors,json=authors" json:"Authors,omitempty"` + Website string `protobuf:"bytes,4,opt,name=Website,json=website" json:"Website,omitempty"` } -var xxx_messageInfo_Plugin proto.InternalMessageInfo +func (m *Plugin) Reset() { *m = Plugin{} } +func (m *Plugin) String() string { return proto.CompactTextString(m) } +func (*Plugin) ProtoMessage() {} +func (*Plugin) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } func (m *Plugin) GetName() string { if m != nil { @@ -208,12 +136,11 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// SystemServiceClient is the client API for SystemService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for SystemService service + type SystemServiceClient interface { - GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Status, error) - GetPlugins(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginList, error) + GetStatus(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Status, error) + GetPlugins(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*PluginList, error) } type systemServiceClient struct { @@ -224,28 +151,29 @@ func NewSystemServiceClient(cc *grpc.ClientConn) SystemServiceClient { return &systemServiceClient{cc} } -func (c *systemServiceClient) GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Status, error) { +func (c *systemServiceClient) GetStatus(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Status, error) { out := new(Status) - err := c.cc.Invoke(ctx, "/rpc.SystemService/GetStatus", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.SystemService/GetStatus", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *systemServiceClient) GetPlugins(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginList, error) { +func (c *systemServiceClient) GetPlugins(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*PluginList, error) { out := new(PluginList) - err := c.cc.Invoke(ctx, "/rpc.SystemService/GetPlugins", in, out, opts...) + err := grpc.Invoke(ctx, "/rpc.SystemService/GetPlugins", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// SystemServiceServer is the server API for SystemService service. +// Server API for SystemService service + type SystemServiceServer interface { - GetStatus(context.Context, *empty.Empty) (*Status, error) - GetPlugins(context.Context, *empty.Empty) (*PluginList, error) + GetStatus(context.Context, *google_protobuf1.Empty) (*Status, error) + GetPlugins(context.Context, *google_protobuf1.Empty) (*PluginList, error) } func RegisterSystemServiceServer(s *grpc.Server, srv SystemServiceServer) { @@ -253,7 +181,7 @@ func RegisterSystemServiceServer(s *grpc.Server, srv SystemServiceServer) { } func _SystemService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(google_protobuf1.Empty) if err := dec(in); err != nil { return nil, err } @@ -265,13 +193,13 @@ func _SystemService_GetStatus_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/rpc.SystemService/GetStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SystemServiceServer).GetStatus(ctx, req.(*empty.Empty)) + return srv.(SystemServiceServer).GetStatus(ctx, req.(*google_protobuf1.Empty)) } return interceptor(ctx, in, info, handler) } func _SystemService_GetPlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(google_protobuf1.Empty) if err := dec(in); err != nil { return nil, err } @@ -283,7 +211,7 @@ func _SystemService_GetPlugins_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/rpc.SystemService/GetPlugins", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SystemServiceServer).GetPlugins(ctx, req.(*empty.Empty)) + return srv.(SystemServiceServer).GetPlugins(ctx, req.(*google_protobuf1.Empty)) } return interceptor(ctx, in, info, handler) } @@ -305,29 +233,30 @@ var _SystemService_serviceDesc = grpc.ServiceDesc{ Metadata: "system.proto", } -func init() { proto.RegisterFile("system.proto", fileDescriptor_system_00592df632489c93) } - -var fileDescriptor_system_00592df632489c93 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xdf, 0x4a, 0x2b, 0x31, - 0x10, 0xc6, 0xd9, 0xb3, 0xfd, 0x43, 0xa7, 0xe7, 0x0f, 0x84, 0xa3, 0x86, 0x0a, 0xb2, 0x14, 0x94, - 0x5e, 0xa5, 0xd2, 0xe2, 0x03, 0x58, 0xd1, 0x7a, 0x21, 0x22, 0xad, 0xe8, 0xf5, 0x76, 0x3b, 0xb6, - 0xd1, 0x4d, 0xb3, 0x24, 0xb3, 0xc5, 0xbe, 0x8e, 0x4f, 0x2a, 0x9b, 0x64, 0xa1, 0x08, 0x7a, 0x37, - 0xdf, 0xef, 0x9b, 0x81, 0xf9, 0x66, 0xe0, 0xb7, 0xdd, 0x59, 0x42, 0x25, 0x0a, 0xa3, 0x49, 0xb3, - 0xd8, 0x14, 0x59, 0xef, 0x78, 0xa5, 0xf5, 0x2a, 0xc7, 0xa1, 0x43, 0x8b, 0xf2, 0x65, 0x88, 0xaa, - 0xa0, 0x9d, 0xef, 0xe8, 0x7f, 0x44, 0xd0, 0x9a, 0x53, 0x4a, 0xa5, 0x65, 0xff, 0xa1, 0x39, 0x31, - 0xe9, 0x66, 0xc9, 0xa3, 0x24, 0x1a, 0x74, 0x66, 0x5e, 0x30, 0x0e, 0xed, 0x27, 0x34, 0x56, 0xea, - 0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9b, 0x1c, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf2, - 0x21, 0xfb, 0x70, 0x11, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("system.proto", fileDescriptor4) } + +var fileDescriptor4 = []byte{ + // 345 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x5f, 0x4b, 0xf3, 0x30, + 0x18, 0xc5, 0xe9, 0xdb, 0x6d, 0x65, 0x4f, 0x5f, 0x27, 0x04, 0x91, 0x30, 0x41, 0x4a, 0x41, 0xd9, + 0x55, 0x26, 0x1b, 0x7e, 0x00, 0x27, 0x3a, 0x2f, 0x44, 0x64, 0x13, 0xbd, 0x4e, 0xbb, 0xd8, 0x45, + 0x9b, 0xa6, 0x24, 0x4f, 0xa7, 0xfb, 0x3a, 0x7e, 0x52, 0x69, 0x53, 0xff, 0x5d, 0xe8, 0xe5, 0xf9, + 0x9d, 0xd3, 0x92, 0xf3, 0x1c, 0xf8, 0x6f, 0xb7, 0x16, 0x85, 0x62, 0xa5, 0xd1, 0xa8, 0x89, 0x6f, + 0xca, 0x74, 0x78, 0x90, 0x69, 0x9d, 0xe5, 0x62, 0xdc, 0xa0, 0xa4, 0x7a, 0x1c, 0x0b, 0x55, 0xe2, + 0xd6, 0x25, 0xe2, 0x37, 0x0f, 0x7a, 0x4b, 0xe4, 0x58, 0x59, 0xb2, 0x07, 0xdd, 0x99, 0xe1, 0xc5, + 0x8a, 0x7a, 0x91, 0x37, 0xea, 0x2f, 0xba, 0x49, 0x2d, 0x08, 0x85, 0xe0, 0x5e, 0x18, 0x2b, 0x75, + 0x41, 0xff, 0x35, 0x3c, 0xd8, 0x38, 0x49, 0x22, 0x08, 0x5b, 0xe7, 0xb2, 0xca, 0x73, 0xea, 0x37, + 0x6e, 0xb8, 0xf9, 0x42, 0xe4, 0x10, 0xe0, 0x5c, 0x2b, 0x25, 0xf1, 0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a, 0x72, 0x8d, 0x1c, 0x02, 0x00, 0x00, } diff --git a/rpc/system.proto b/rpc/system.proto index 5ad204c..84e4ad1 100644 --- a/rpc/system.proto +++ b/rpc/system.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package rpc; -option java_package = "tv.dotstart.stockpile"; +option java_package = "io.github.dotstart.stockpile.rpc"; import "google/protobuf/empty.proto"; diff --git a/stockpile/command/server.go b/stockpile/command/server.go index 2a64516..f41490b 100644 --- a/stockpile/command/server.go +++ b/stockpile/command/server.go @@ -158,15 +158,19 @@ func (c *ServerCommand) Execute(_ context.Context, f *flag.FlagSet, _ ...interfa // initialize the RPC server at all times (only differ between mux policies depending on whether the legacy API or UI // is enabled) - rpcPolicy := cmux.Any() - if *cfg.UiEnabled { - rpcPolicy = cmux.HTTP2HeaderField("content-type", "application/grpc") + var grpcListener net.Listener + if *cfg.UiEnabled || *cfg.LegacyApiEnabled { + grpcListener = mux.MatchWithWriters( + cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"), + ) + } else { + grpcListener = mux.Match(cmux.Any()) } rpcServer, err := service.NewServer(pluginManager, cacheImpl) if err != nil { log.Fatalf("failed to initialize grpc server: %s", err) } - go rpcServer.Listen(mux.Match(rpcPolicy)) + go rpcServer.Listen(grpcListener) defer rpcServer.Destroy() log.Info("grpc server enabled")