Initial QSfera import
This commit is contained in:
@@ -0,0 +1,335 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: qsfera/services/eventhistory/v0/eventhistory.proto
|
||||
|
||||
package v0
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
v0 "github.com/qsfera/server/protogen/gen/qsfera/messages/eventhistory/v0"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// A request to retrieve events
|
||||
type GetEventsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// the ids of the events we want to get
|
||||
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetEventsRequest) Reset() {
|
||||
*x = GetEventsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetEventsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEventsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetEventsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEventsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetEventsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetEventsRequest) GetIds() []string {
|
||||
if x != nil {
|
||||
return x.Ids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A request to retrieve events belonging to a userID
|
||||
type GetEventsForUserRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// the userID of the events we want to get
|
||||
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetEventsForUserRequest) Reset() {
|
||||
*x = GetEventsForUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetEventsForUserRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEventsForUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetEventsForUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEventsForUserRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetEventsForUserRequest) Descriptor() ([]byte, []int) {
|
||||
return file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetEventsForUserRequest) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The service response
|
||||
type GetEventsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Events []*v0.Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetEventsResponse) Reset() {
|
||||
*x = GetEventsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetEventsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEventsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetEventsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEventsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetEventsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetEventsResponse) GetEvents() []*v0.Event {
|
||||
if x != nil {
|
||||
return x.Events
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_qsfera_services_eventhistory_v0_eventhistory_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDesc = []byte{
|
||||
0x0a, 0x35, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x2f, 0x76, 0x30, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f,
|
||||
0x75, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x30, 0x1a, 0x35, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x30, 0x2f,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x24, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x31, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x11, 0x47,
|
||||
0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x41, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x79, 0x2e, 0x76, 0x30, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x32, 0x98, 0x02, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x09, 0x47,
|
||||
0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63,
|
||||
0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35,
|
||||
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
|
||||
0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x3b, 0x2e, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x30, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c,
|
||||
0x6f, 0x75, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x85,
|
||||
0x03, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63,
|
||||
0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65,
|
||||
0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x2f, 0x76, 0x30, 0x92, 0x41, 0xae, 0x02, 0x12, 0xbd, 0x01, 0x0a, 0x16, 0x4f, 0x70, 0x65,
|
||||
0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x79, 0x22, 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c,
|
||||
0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c,
|
||||
0x6f, 0x75, 0x64, 0x2e, 0x65, 0x75, 0x2a, 0x49, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65,
|
||||
0x2d, 0x32, 0x2e, 0x30, 0x12, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f,
|
||||
0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f,
|
||||
0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53,
|
||||
0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10,
|
||||
0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e,
|
||||
0x72, 0x44, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61,
|
||||
0x6e, 0x75, 0x61, 0x6c, 0x12, 0x30, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x6f,
|
||||
0x63, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x65, 0x75, 0x2f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x68, 0x69,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescOnce sync.Once
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescData = file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescGZIP() []byte {
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescOnce.Do(func() {
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescData = protoimpl.X.CompressGZIP(file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescData)
|
||||
})
|
||||
return file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_qsfera_services_eventhistory_v0_eventhistory_proto_goTypes = []interface{}{
|
||||
(*GetEventsRequest)(nil), // 0: qsfera.services.eventhistory.v0.GetEventsRequest
|
||||
(*GetEventsForUserRequest)(nil), // 1: qsfera.services.eventhistory.v0.GetEventsForUserRequest
|
||||
(*GetEventsResponse)(nil), // 2: qsfera.services.eventhistory.v0.GetEventsResponse
|
||||
(*v0.Event)(nil), // 3: qsfera.messages.eventhistory.v0.Event
|
||||
}
|
||||
var file_qsfera_services_eventhistory_v0_eventhistory_proto_depIdxs = []int32{
|
||||
3, // 0: qsfera.services.eventhistory.v0.GetEventsResponse.events:type_name -> qsfera.messages.eventhistory.v0.Event
|
||||
0, // 1: qsfera.services.eventhistory.v0.EventHistoryService.GetEvents:input_type -> qsfera.services.eventhistory.v0.GetEventsRequest
|
||||
1, // 2: qsfera.services.eventhistory.v0.EventHistoryService.GetEventsForUser:input_type -> qsfera.services.eventhistory.v0.GetEventsForUserRequest
|
||||
2, // 3: qsfera.services.eventhistory.v0.EventHistoryService.GetEvents:output_type -> qsfera.services.eventhistory.v0.GetEventsResponse
|
||||
2, // 4: qsfera.services.eventhistory.v0.EventHistoryService.GetEventsForUser:output_type -> qsfera.services.eventhistory.v0.GetEventsResponse
|
||||
3, // [3:5] is the sub-list for method output_type
|
||||
1, // [1:3] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_qsfera_services_eventhistory_v0_eventhistory_proto_init() }
|
||||
func file_qsfera_services_eventhistory_v0_eventhistory_proto_init() {
|
||||
if File_qsfera_services_eventhistory_v0_eventhistory_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetEventsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetEventsForUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetEventsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_qsfera_services_eventhistory_v0_eventhistory_proto_goTypes,
|
||||
DependencyIndexes: file_qsfera_services_eventhistory_v0_eventhistory_proto_depIdxs,
|
||||
MessageInfos: file_qsfera_services_eventhistory_v0_eventhistory_proto_msgTypes,
|
||||
}.Build()
|
||||
File_qsfera_services_eventhistory_v0_eventhistory_proto = out.File
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_rawDesc = nil
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_goTypes = nil
|
||||
file_qsfera_services_eventhistory_v0_eventhistory_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: qsfera/services/eventhistory/v0/eventhistory.proto
|
||||
|
||||
package v0
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "github.com/qsfera/server/protogen/gen/qsfera/messages/eventhistory/v0"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
import (
|
||||
context "context"
|
||||
api "go-micro.dev/v4/api"
|
||||
client "go-micro.dev/v4/client"
|
||||
server "go-micro.dev/v4/server"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ api.Endpoint
|
||||
var _ context.Context
|
||||
var _ client.Option
|
||||
var _ server.Option
|
||||
|
||||
// Api Endpoints for EventHistoryService service
|
||||
|
||||
func NewEventHistoryServiceEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{}
|
||||
}
|
||||
|
||||
// Client API for EventHistoryService service
|
||||
|
||||
type EventHistoryService interface {
|
||||
// returns the specified events
|
||||
GetEvents(ctx context.Context, in *GetEventsRequest, opts ...client.CallOption) (*GetEventsResponse, error)
|
||||
// returns all events for the specified userID
|
||||
GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...client.CallOption) (*GetEventsResponse, error)
|
||||
}
|
||||
|
||||
type eventHistoryService struct {
|
||||
c client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
func NewEventHistoryService(name string, c client.Client) EventHistoryService {
|
||||
return &eventHistoryService{
|
||||
c: c,
|
||||
name: name,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *eventHistoryService) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...client.CallOption) (*GetEventsResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "EventHistoryService.GetEvents", in)
|
||||
out := new(GetEventsResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eventHistoryService) GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...client.CallOption) (*GetEventsResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "EventHistoryService.GetEventsForUser", in)
|
||||
out := new(GetEventsResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for EventHistoryService service
|
||||
|
||||
type EventHistoryServiceHandler interface {
|
||||
// returns the specified events
|
||||
GetEvents(context.Context, *GetEventsRequest, *GetEventsResponse) error
|
||||
// returns all events for the specified userID
|
||||
GetEventsForUser(context.Context, *GetEventsForUserRequest, *GetEventsResponse) error
|
||||
}
|
||||
|
||||
func RegisterEventHistoryServiceHandler(s server.Server, hdlr EventHistoryServiceHandler, opts ...server.HandlerOption) error {
|
||||
type eventHistoryService interface {
|
||||
GetEvents(ctx context.Context, in *GetEventsRequest, out *GetEventsResponse) error
|
||||
GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, out *GetEventsResponse) error
|
||||
}
|
||||
type EventHistoryService struct {
|
||||
eventHistoryService
|
||||
}
|
||||
h := &eventHistoryServiceHandler{hdlr}
|
||||
return s.Handle(s.NewHandler(&EventHistoryService{h}, opts...))
|
||||
}
|
||||
|
||||
type eventHistoryServiceHandler struct {
|
||||
EventHistoryServiceHandler
|
||||
}
|
||||
|
||||
func (h *eventHistoryServiceHandler) GetEvents(ctx context.Context, in *GetEventsRequest, out *GetEventsResponse) error {
|
||||
return h.EventHistoryServiceHandler.GetEvents(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *eventHistoryServiceHandler) GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, out *GetEventsResponse) error {
|
||||
return h.EventHistoryServiceHandler.GetEventsForUser(ctx, in, out)
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "КуСфера eventhistory",
|
||||
"version": "1.0.0",
|
||||
"contact": {
|
||||
"name": "КуСфера",
|
||||
"url": "",
|
||||
"email": ""
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache-2.0",
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "EventHistoryService"
|
||||
}
|
||||
],
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0Event": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "REQUIRED."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "REQUIRED."
|
||||
},
|
||||
"event": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"title": "REQUIRED"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0GetEventsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v0Event"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "The service response"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
"description": "Developer Manual",
|
||||
"url": ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc (unknown)
|
||||
// source: qsfera/services/eventhistory/v0/eventhistory.proto
|
||||
|
||||
package v0
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
EventHistoryService_GetEvents_FullMethodName = "/qsfera.services.eventhistory.v0.EventHistoryService/GetEvents"
|
||||
EventHistoryService_GetEventsForUser_FullMethodName = "/qsfera.services.eventhistory.v0.EventHistoryService/GetEventsForUser"
|
||||
)
|
||||
|
||||
// EventHistoryServiceClient is the client API for EventHistoryService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// A Service for storing events
|
||||
type EventHistoryServiceClient interface {
|
||||
// returns the specified events
|
||||
GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
|
||||
// returns all events for the specified userID
|
||||
GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
|
||||
}
|
||||
|
||||
type eventHistoryServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewEventHistoryServiceClient(cc grpc.ClientConnInterface) EventHistoryServiceClient {
|
||||
return &eventHistoryServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *eventHistoryServiceClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetEventsResponse)
|
||||
err := c.cc.Invoke(ctx, EventHistoryService_GetEvents_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eventHistoryServiceClient) GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetEventsResponse)
|
||||
err := c.cc.Invoke(ctx, EventHistoryService_GetEventsForUser_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// EventHistoryServiceServer is the server API for EventHistoryService service.
|
||||
// All implementations must embed UnimplementedEventHistoryServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// A Service for storing events
|
||||
type EventHistoryServiceServer interface {
|
||||
// returns the specified events
|
||||
GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error)
|
||||
// returns all events for the specified userID
|
||||
GetEventsForUser(context.Context, *GetEventsForUserRequest) (*GetEventsResponse, error)
|
||||
mustEmbedUnimplementedEventHistoryServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedEventHistoryServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedEventHistoryServiceServer struct{}
|
||||
|
||||
func (UnimplementedEventHistoryServiceServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetEvents not implemented")
|
||||
}
|
||||
func (UnimplementedEventHistoryServiceServer) GetEventsForUser(context.Context, *GetEventsForUserRequest) (*GetEventsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetEventsForUser not implemented")
|
||||
}
|
||||
func (UnimplementedEventHistoryServiceServer) mustEmbedUnimplementedEventHistoryServiceServer() {}
|
||||
func (UnimplementedEventHistoryServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeEventHistoryServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to EventHistoryServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeEventHistoryServiceServer interface {
|
||||
mustEmbedUnimplementedEventHistoryServiceServer()
|
||||
}
|
||||
|
||||
func RegisterEventHistoryServiceServer(s grpc.ServiceRegistrar, srv EventHistoryServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedEventHistoryServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&EventHistoryService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _EventHistoryService_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetEventsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EventHistoryServiceServer).GetEvents(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EventHistoryService_GetEvents_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EventHistoryServiceServer).GetEvents(ctx, req.(*GetEventsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EventHistoryService_GetEventsForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetEventsForUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EventHistoryServiceServer).GetEventsForUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EventHistoryService_GetEventsForUser_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EventHistoryServiceServer).GetEventsForUser(ctx, req.(*GetEventsForUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// EventHistoryService_ServiceDesc is the grpc.ServiceDesc for EventHistoryService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var EventHistoryService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "qsfera.services.eventhistory.v0.EventHistoryService",
|
||||
HandlerType: (*EventHistoryServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetEvents",
|
||||
Handler: _EventHistoryService_GetEvents_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetEventsForUser",
|
||||
Handler: _EventHistoryService_GetEventsForUser_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "qsfera/services/eventhistory/v0/eventhistory.proto",
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
// Code generated by mockery; DO NOT EDIT.
|
||||
// github.com/vektra/mockery
|
||||
// template: testify
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qsfera/server/protogen/gen/qsfera/services/eventhistory/v0"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
"go-micro.dev/v4/client"
|
||||
)
|
||||
|
||||
// NewEventHistoryService creates a new instance of EventHistoryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
// The first argument is typically a *testing.T value.
|
||||
func NewEventHistoryService(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *EventHistoryService {
|
||||
mock := &EventHistoryService{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
// EventHistoryService is an autogenerated mock type for the EventHistoryService type
|
||||
type EventHistoryService struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
type EventHistoryService_Expecter struct {
|
||||
mock *mock.Mock
|
||||
}
|
||||
|
||||
func (_m *EventHistoryService) EXPECT() *EventHistoryService_Expecter {
|
||||
return &EventHistoryService_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// GetEvents provides a mock function for the type EventHistoryService
|
||||
func (_mock *EventHistoryService) GetEvents(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) {
|
||||
var tmpRet mock.Arguments
|
||||
if len(opts) > 0 {
|
||||
tmpRet = _mock.Called(ctx, in, opts)
|
||||
} else {
|
||||
tmpRet = _mock.Called(ctx, in)
|
||||
}
|
||||
ret := tmpRet
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetEvents")
|
||||
}
|
||||
|
||||
var r0 *v0.GetEventsResponse
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok {
|
||||
return returnFunc(ctx, in, opts...)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) *v0.GetEventsResponse); ok {
|
||||
r0 = returnFunc(ctx, in, opts...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*v0.GetEventsResponse)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) error); ok {
|
||||
r1 = returnFunc(ctx, in, opts...)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// EventHistoryService_GetEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEvents'
|
||||
type EventHistoryService_GetEvents_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetEvents is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - in *v0.GetEventsRequest
|
||||
// - opts ...client.CallOption
|
||||
func (_e *EventHistoryService_Expecter) GetEvents(ctx interface{}, in interface{}, opts ...interface{}) *EventHistoryService_GetEvents_Call {
|
||||
return &EventHistoryService_GetEvents_Call{Call: _e.mock.On("GetEvents",
|
||||
append([]interface{}{ctx, in}, opts...)...)}
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEvents_Call) Run(run func(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption)) *EventHistoryService_GetEvents_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *v0.GetEventsRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v0.GetEventsRequest)
|
||||
}
|
||||
var arg2 []client.CallOption
|
||||
var variadicArgs []client.CallOption
|
||||
if len(args) > 2 {
|
||||
variadicArgs = args[2].([]client.CallOption)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEvents_Call) Return(getEventsResponse *v0.GetEventsResponse, err error) *EventHistoryService_GetEvents_Call {
|
||||
_c.Call.Return(getEventsResponse, err)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEvents_Call) RunAndReturn(run func(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error)) *EventHistoryService_GetEvents_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GetEventsForUser provides a mock function for the type EventHistoryService
|
||||
func (_mock *EventHistoryService) GetEventsForUser(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) {
|
||||
var tmpRet mock.Arguments
|
||||
if len(opts) > 0 {
|
||||
tmpRet = _mock.Called(ctx, in, opts)
|
||||
} else {
|
||||
tmpRet = _mock.Called(ctx, in)
|
||||
}
|
||||
ret := tmpRet
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetEventsForUser")
|
||||
}
|
||||
|
||||
var r0 *v0.GetEventsResponse
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok {
|
||||
return returnFunc(ctx, in, opts...)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) *v0.GetEventsResponse); ok {
|
||||
r0 = returnFunc(ctx, in, opts...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*v0.GetEventsResponse)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) error); ok {
|
||||
r1 = returnFunc(ctx, in, opts...)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// EventHistoryService_GetEventsForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventsForUser'
|
||||
type EventHistoryService_GetEventsForUser_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// GetEventsForUser is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - in *v0.GetEventsForUserRequest
|
||||
// - opts ...client.CallOption
|
||||
func (_e *EventHistoryService_Expecter) GetEventsForUser(ctx interface{}, in interface{}, opts ...interface{}) *EventHistoryService_GetEventsForUser_Call {
|
||||
return &EventHistoryService_GetEventsForUser_Call{Call: _e.mock.On("GetEventsForUser",
|
||||
append([]interface{}{ctx, in}, opts...)...)}
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEventsForUser_Call) Run(run func(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption)) *EventHistoryService_GetEventsForUser_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *v0.GetEventsForUserRequest
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v0.GetEventsForUserRequest)
|
||||
}
|
||||
var arg2 []client.CallOption
|
||||
var variadicArgs []client.CallOption
|
||||
if len(args) > 2 {
|
||||
variadicArgs = args[2].([]client.CallOption)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEventsForUser_Call) Return(getEventsResponse *v0.GetEventsResponse, err error) *EventHistoryService_GetEventsForUser_Call {
|
||||
_c.Call.Return(getEventsResponse, err)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *EventHistoryService_GetEventsForUser_Call) RunAndReturn(run func(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error)) *EventHistoryService_GetEventsForUser_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
Reference in New Issue
Block a user