Merge pull request #5600 from kobergj/EventHistory

Eventhistory Service
This commit is contained in:
kobergj
2023-02-21 14:08:01 +01:00
committed by GitHub
40 changed files with 1721 additions and 29 deletions
@@ -0,0 +1,170 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc (unknown)
// source: ocis/messages/eventhistory/v0/eventhistory.proto
package v0
import (
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)
)
type Event struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// REQUIRED.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// REQUIRED.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// REQUIRED
Event []byte `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"`
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
mi := &file_ocis_messages_eventhistory_v0_eventhistory_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_ocis_messages_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 Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{0}
}
func (x *Event) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Event) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Event) GetEvent() []byte {
if x != nil {
return x.Event
}
return nil
}
var File_ocis_messages_eventhistory_v0_eventhistory_proto protoreflect.FileDescriptor
var file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDesc = []byte{
0x0a, 0x30, 0x6f, 0x63, 0x69, 0x73, 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, 0x12, 0x1d, 0x6f, 0x63, 0x69, 0x73, 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, 0x22, 0x41, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14,
0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73,
0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e,
0x2f, 0x6f, 0x63, 0x69, 0x73, 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, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescOnce sync.Once
file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescData = file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDesc
)
func file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescGZIP() []byte {
file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescOnce.Do(func() {
file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescData)
})
return file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDescData
}
var file_ocis_messages_eventhistory_v0_eventhistory_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_ocis_messages_eventhistory_v0_eventhistory_proto_goTypes = []interface{}{
(*Event)(nil), // 0: ocis.messages.eventhistory.v0.Event
}
var file_ocis_messages_eventhistory_v0_eventhistory_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_ocis_messages_eventhistory_v0_eventhistory_proto_init() }
func file_ocis_messages_eventhistory_v0_eventhistory_proto_init() {
if File_ocis_messages_eventhistory_v0_eventhistory_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_ocis_messages_eventhistory_v0_eventhistory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Event); 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_ocis_messages_eventhistory_v0_eventhistory_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_ocis_messages_eventhistory_v0_eventhistory_proto_goTypes,
DependencyIndexes: file_ocis_messages_eventhistory_v0_eventhistory_proto_depIdxs,
MessageInfos: file_ocis_messages_eventhistory_v0_eventhistory_proto_msgTypes,
}.Build()
File_ocis_messages_eventhistory_v0_eventhistory_proto = out.File
file_ocis_messages_eventhistory_v0_eventhistory_proto_rawDesc = nil
file_ocis_messages_eventhistory_v0_eventhistory_proto_goTypes = nil
file_ocis_messages_eventhistory_v0_eventhistory_proto_depIdxs = nil
}
@@ -0,0 +1,15 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: ocis/messages/eventhistory/v0/eventhistory.proto
package v0
import (
fmt "fmt"
proto "google.golang.org/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
@@ -0,0 +1,43 @@
{
"swagger": "2.0",
"info": {
"title": "ocis/messages/eventhistory/v0/eventhistory.proto",
"version": "version not set"
},
"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"
}
}
}
}
}
}
@@ -0,0 +1,256 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc (unknown)
// source: ocis/services/eventhistory/v0/eventhistory.proto
package v0
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/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_ocis_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_ocis_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_ocis_services_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{0}
}
func (x *GetEventsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
// 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_ocis_services_eventhistory_v0_eventhistory_proto_msgTypes[1]
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_ocis_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 GetEventsResponse.ProtoReflect.Descriptor instead.
func (*GetEventsResponse) Descriptor() ([]byte, []int) {
return file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescGZIP(), []int{1}
}
func (x *GetEventsResponse) GetEvents() []*v0.Event {
if x != nil {
return x.Events
}
return nil
}
var File_ocis_services_eventhistory_v0_eventhistory_proto protoreflect.FileDescriptor
var file_ocis_services_eventhistory_v0_eventhistory_proto_rawDesc = []byte{
0x0a, 0x30, 0x6f, 0x63, 0x69, 0x73, 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, 0x1d, 0x6f, 0x63, 0x69, 0x73, 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, 0x30, 0x6f, 0x63, 0x69, 0x73, 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, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c,
0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24,
0x2e, 0x6f, 0x63, 0x69, 0x73, 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, 0x85, 0x01, 0x0a,
0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 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, 0x30, 0x2e, 0x6f, 0x63, 0x69, 0x73, 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, 0xeb, 0x02, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69,
0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f,
0x63, 0x69, 0x73, 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, 0xa2, 0x02,
0x12, 0xb8, 0x01, 0x0a, 0x22, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e,
0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x75,
0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c,
0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e,
0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70,
0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d,
0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34,
0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73,
0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 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, 0x3d, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72,
0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f,
0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c,
0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescOnce sync.Once
file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescData = file_ocis_services_eventhistory_v0_eventhistory_proto_rawDesc
)
func file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescGZIP() []byte {
file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescOnce.Do(func() {
file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescData)
})
return file_ocis_services_eventhistory_v0_eventhistory_proto_rawDescData
}
var file_ocis_services_eventhistory_v0_eventhistory_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_ocis_services_eventhistory_v0_eventhistory_proto_goTypes = []interface{}{
(*GetEventsRequest)(nil), // 0: ocis.services.eventhistory.v0.GetEventsRequest
(*GetEventsResponse)(nil), // 1: ocis.services.eventhistory.v0.GetEventsResponse
(*v0.Event)(nil), // 2: ocis.messages.eventhistory.v0.Event
}
var file_ocis_services_eventhistory_v0_eventhistory_proto_depIdxs = []int32{
2, // 0: ocis.services.eventhistory.v0.GetEventsResponse.events:type_name -> ocis.messages.eventhistory.v0.Event
0, // 1: ocis.services.eventhistory.v0.EventHistoryService.GetEvents:input_type -> ocis.services.eventhistory.v0.GetEventsRequest
1, // 2: ocis.services.eventhistory.v0.EventHistoryService.GetEvents:output_type -> ocis.services.eventhistory.v0.GetEventsResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] 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_ocis_services_eventhistory_v0_eventhistory_proto_init() }
func file_ocis_services_eventhistory_v0_eventhistory_proto_init() {
if File_ocis_services_eventhistory_v0_eventhistory_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_ocis_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_ocis_services_eventhistory_v0_eventhistory_proto_msgTypes[1].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_ocis_services_eventhistory_v0_eventhistory_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ocis_services_eventhistory_v0_eventhistory_proto_goTypes,
DependencyIndexes: file_ocis_services_eventhistory_v0_eventhistory_proto_depIdxs,
MessageInfos: file_ocis_services_eventhistory_v0_eventhistory_proto_msgTypes,
}.Build()
File_ocis_services_eventhistory_v0_eventhistory_proto = out.File
file_ocis_services_eventhistory_v0_eventhistory_proto_rawDesc = nil
file_ocis_services_eventhistory_v0_eventhistory_proto_goTypes = nil
file_ocis_services_eventhistory_v0_eventhistory_proto_depIdxs = nil
}
@@ -0,0 +1,91 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: ocis/services/eventhistory/v0/eventhistory.proto
package v0
import (
fmt "fmt"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "github.com/owncloud/ocis/v2/protogen/gen/ocis/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)
}
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
}
// Server API for EventHistoryService service
type EventHistoryServiceHandler interface {
// returns the specified events
GetEvents(context.Context, *GetEventsRequest, *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
}
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)
}
@@ -0,0 +1,95 @@
{
"swagger": "2.0",
"info": {
"title": "ownCloud Infinite Scale thumbnails",
"version": "1.0.0",
"contact": {
"name": "ownCloud GmbH",
"url": "https://github.com/owncloud/ocis",
"email": "support@owncloud.com"
},
"license": {
"name": "Apache-2.0",
"url": "https://github.com/owncloud/ocis/blob/master/LICENSE"
}
},
"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": "https://owncloud.dev/services/thumbnails/"
}
}
+3 -1
View File
@@ -21,7 +21,9 @@ plugins:
ocis.services.thumbnails.v0;\
ocis.messages.thumbnails.v0;\
ocis.services.store.v0;\
ocis.messages.store.v0"
ocis.messages.store.v0;\
ocis.services.eventhistory.v0;\
ocis.messages.eventhistory.v0"
- name: openapiv2
path: ../../.bingo/protoc-gen-openapiv2
@@ -0,0 +1,16 @@
syntax = "proto3";
package ocis.messages.eventhistory.v0;
option go_package = "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/eventhistory/v0";
message Event {
// REQUIRED.
string type = 1;
// REQUIRED.
string id = 2;
// REQUIRED
bytes event = 3;
}
@@ -0,0 +1,50 @@
syntax = "proto3";
package ocis.services.eventhistory.v0;
option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/eventhistory/v0";
import "ocis/messages/eventhistory/v0/eventhistory.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "ownCloud Infinite Scale thumbnails";
version: "1.0.0";
contact: {
name: "ownCloud GmbH";
url: "https://github.com/owncloud/ocis";
email: "support@owncloud.com";
};
license: {
name: "Apache-2.0";
url: "https://github.com/owncloud/ocis/blob/master/LICENSE";
};
};
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
external_docs: {
description: "Developer Manual";
url: "https://owncloud.dev/services/thumbnails/";
};
};
// A Service for storing events
service EventHistoryService {
// returns the specified events
rpc GetEvents(GetEventsRequest) returns (GetEventsResponse);
}
// A request to retrieve events
message GetEventsRequest {
// the ids of the events we want to get
repeated string ids = 1;
}
// The service response
message GetEventsResponse {
repeated ocis.messages.eventhistory.v0.Event events = 1;
}