diff --git a/go.mod b/go.mod index 1c50f7d..70822dd 100644 --- a/go.mod +++ b/go.mod @@ -20,8 +20,10 @@ require ( github.com/rs/zerolog v1.33.0 github.com/samber/lo v1.47.0 github.com/schollz/progressbar/v3 v3.14.4 + github.com/spf13/cast v1.7.0 github.com/spf13/viper v1.19.0 google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 gopkg.in/vansante/go-ffprobe.v2 v2.2.0 gorm.io/datatypes v1.2.4 gorm.io/driver/postgres v1.5.9 @@ -78,7 +80,6 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tinylib/msgp v1.2.4 // indirect @@ -96,7 +97,6 @@ require ( golang.org/x/term v0.25.0 // indirect golang.org/x/text v0.19.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect - google.golang.org/protobuf v1.35.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/driver/mysql v1.5.7 // indirect diff --git a/go.sum b/go.sum index 78bf588..bd82c61 100644 --- a/go.sum +++ b/go.sum @@ -33,10 +33,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -git.solsynth.dev/hypernet/nexus v0.0.0-20241103161217-e1207a8deb28 h1:ZNPw/7qWd3FvpMuIbQzz7AbfZEUpbiV1dRFDT9frP2Q= -git.solsynth.dev/hypernet/nexus v0.0.0-20241103161217-e1207a8deb28/go.mod h1:PhLCv2lsNoscPVJbkWnxwQnJ141lc4RIEkVffrHwl4s= -git.solsynth.dev/hypernet/nexus v0.0.0-20241103165336-3e68cea0d783 h1:Jzi1zWmUFlUl/u/OLwQ3rUKI7OUvSPMXW0tfxPSXLUY= -git.solsynth.dev/hypernet/nexus v0.0.0-20241103165336-3e68cea0d783/go.mod h1:PhLCv2lsNoscPVJbkWnxwQnJ141lc4RIEkVffrHwl4s= git.solsynth.dev/hypernet/nexus v0.0.0-20241103165538-c0fec1084611 h1:ZEzUDsO88X+amOaEKZOpnQHHNYm5iw3hCBdy138sQro= git.solsynth.dev/hypernet/nexus v0.0.0-20241103165538-c0fec1084611/go.mod h1:PhLCv2lsNoscPVJbkWnxwQnJ141lc4RIEkVffrHwl4s= git.solsynth.dev/hypernet/passport v0.0.0-20241102174750-808e7998dd1c h1:RVY0xsYGpb22ZuITxS+xpFu76XpPDrOpbIuSMDjW1+Q= diff --git a/pkg/proto/attachment.pb.go b/pkg/proto/attachment.pb.go new file mode 100644 index 0000000..7753476 --- /dev/null +++ b/pkg/proto/attachment.pb.go @@ -0,0 +1,670 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v5.28.3 +// source: attachment.proto + +package proto + +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 AttachmentInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Rid string `protobuf:"bytes,2,opt,name=rid,proto3" json:"rid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Size string `protobuf:"bytes,5,opt,name=size,proto3" json:"size,omitempty"` + Hash string `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"` + Mime string `protobuf:"bytes,7,opt,name=mime,proto3" json:"mime,omitempty"` + IsIndexable bool `protobuf:"varint,8,opt,name=is_indexable,json=isIndexable,proto3" json:"is_indexable,omitempty"` +} + +func (x *AttachmentInfo) Reset() { + *x = AttachmentInfo{} + mi := &file_attachment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AttachmentInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachmentInfo) ProtoMessage() {} + +func (x *AttachmentInfo) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachmentInfo.ProtoReflect.Descriptor instead. +func (*AttachmentInfo) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{0} +} + +func (x *AttachmentInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AttachmentInfo) GetRid() string { + if x != nil { + return x.Rid + } + return "" +} + +func (x *AttachmentInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AttachmentInfo) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *AttachmentInfo) GetSize() string { + if x != nil { + return x.Size + } + return "" +} + +func (x *AttachmentInfo) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *AttachmentInfo) GetMime() string { + if x != nil { + return x.Mime + } + return "" +} + +func (x *AttachmentInfo) GetIsIndexable() bool { + if x != nil { + return x.IsIndexable + } + return false +} + +type GetAttachmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *uint64 `protobuf:"varint,1,opt,name=id,proto3,oneof" json:"id,omitempty"` + Rid *string `protobuf:"bytes,2,opt,name=rid,proto3,oneof" json:"rid,omitempty"` +} + +func (x *GetAttachmentRequest) Reset() { + *x = GetAttachmentRequest{} + mi := &file_attachment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAttachmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAttachmentRequest) ProtoMessage() {} + +func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAttachmentRequest.ProtoReflect.Descriptor instead. +func (*GetAttachmentRequest) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAttachmentRequest) GetId() uint64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *GetAttachmentRequest) GetRid() string { + if x != nil && x.Rid != nil { + return *x.Rid + } + return "" +} + +type GetAttachmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attachment *AttachmentInfo `protobuf:"bytes,1,opt,name=attachment,proto3,oneof" json:"attachment,omitempty"` +} + +func (x *GetAttachmentResponse) Reset() { + *x = GetAttachmentResponse{} + mi := &file_attachment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAttachmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAttachmentResponse) ProtoMessage() {} + +func (x *GetAttachmentResponse) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAttachmentResponse.ProtoReflect.Descriptor instead. +func (*GetAttachmentResponse) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{2} +} + +func (x *GetAttachmentResponse) GetAttachment() *AttachmentInfo { + if x != nil { + return x.Attachment + } + return nil +} + +type ListAttachmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []uint64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` + Rid []string `protobuf:"bytes,2,rep,name=rid,proto3" json:"rid,omitempty"` +} + +func (x *ListAttachmentRequest) Reset() { + *x = ListAttachmentRequest{} + mi := &file_attachment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAttachmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAttachmentRequest) ProtoMessage() {} + +func (x *ListAttachmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAttachmentRequest.ProtoReflect.Descriptor instead. +func (*ListAttachmentRequest) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAttachmentRequest) GetId() []uint64 { + if x != nil { + return x.Id + } + return nil +} + +func (x *ListAttachmentRequest) GetRid() []string { + if x != nil { + return x.Rid + } + return nil +} + +type ListAttachmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attachments []*AttachmentInfo `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty"` +} + +func (x *ListAttachmentResponse) Reset() { + *x = ListAttachmentResponse{} + mi := &file_attachment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAttachmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAttachmentResponse) ProtoMessage() {} + +func (x *ListAttachmentResponse) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAttachmentResponse.ProtoReflect.Descriptor instead. +func (*ListAttachmentResponse) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{4} +} + +func (x *ListAttachmentResponse) GetAttachments() []*AttachmentInfo { + if x != nil { + return x.Attachments + } + return nil +} + +type UpdateVisibilityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []uint64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` + Rid []string `protobuf:"bytes,2,rep,name=rid,proto3" json:"rid,omitempty"` + IsIndexable bool `protobuf:"varint,3,opt,name=is_indexable,json=isIndexable,proto3" json:"is_indexable,omitempty"` +} + +func (x *UpdateVisibilityRequest) Reset() { + *x = UpdateVisibilityRequest{} + mi := &file_attachment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateVisibilityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVisibilityRequest) ProtoMessage() {} + +func (x *UpdateVisibilityRequest) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVisibilityRequest.ProtoReflect.Descriptor instead. +func (*UpdateVisibilityRequest) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateVisibilityRequest) GetId() []uint64 { + if x != nil { + return x.Id + } + return nil +} + +func (x *UpdateVisibilityRequest) GetRid() []string { + if x != nil { + return x.Rid + } + return nil +} + +func (x *UpdateVisibilityRequest) GetIsIndexable() bool { + if x != nil { + return x.IsIndexable + } + return false +} + +type UpdateVisibilityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *UpdateVisibilityResponse) Reset() { + *x = UpdateVisibilityResponse{} + mi := &file_attachment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateVisibilityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVisibilityResponse) ProtoMessage() {} + +func (x *UpdateVisibilityResponse) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVisibilityResponse.ProtoReflect.Descriptor instead. +func (*UpdateVisibilityResponse) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateVisibilityResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type DeleteAttachmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []uint64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` + Rid []string `protobuf:"bytes,2,rep,name=rid,proto3" json:"rid,omitempty"` +} + +func (x *DeleteAttachmentRequest) Reset() { + *x = DeleteAttachmentRequest{} + mi := &file_attachment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAttachmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAttachmentRequest) ProtoMessage() {} + +func (x *DeleteAttachmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAttachmentRequest.ProtoReflect.Descriptor instead. +func (*DeleteAttachmentRequest) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAttachmentRequest) GetId() []uint64 { + if x != nil { + return x.Id + } + return nil +} + +func (x *DeleteAttachmentRequest) GetRid() []string { + if x != nil { + return x.Rid + } + return nil +} + +type DeleteAttachmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *DeleteAttachmentResponse) Reset() { + *x = DeleteAttachmentResponse{} + mi := &file_attachment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAttachmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAttachmentResponse) ProtoMessage() {} + +func (x *DeleteAttachmentResponse) ProtoReflect() protoreflect.Message { + mi := &file_attachment_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAttachmentResponse.ProtoReflect.Descriptor instead. +func (*DeleteAttachmentResponse) Descriptor() ([]byte, []int) { + return file_attachment_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteAttachmentResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +var File_attachment_proto protoreflect.FileDescriptor + +var file_attachment_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x0e, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x69, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x03, 0x72, 0x69, 0x64, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x72, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x15, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5e, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x30, 0x0a, 0x18, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x17, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x18, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe0, 0x02, 0x0a, 0x11, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, + 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4f, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x55, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, + 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_attachment_proto_rawDescOnce sync.Once + file_attachment_proto_rawDescData = file_attachment_proto_rawDesc +) + +func file_attachment_proto_rawDescGZIP() []byte { + file_attachment_proto_rawDescOnce.Do(func() { + file_attachment_proto_rawDescData = protoimpl.X.CompressGZIP(file_attachment_proto_rawDescData) + }) + return file_attachment_proto_rawDescData +} + +var file_attachment_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_attachment_proto_goTypes = []any{ + (*AttachmentInfo)(nil), // 0: proto.AttachmentInfo + (*GetAttachmentRequest)(nil), // 1: proto.GetAttachmentRequest + (*GetAttachmentResponse)(nil), // 2: proto.GetAttachmentResponse + (*ListAttachmentRequest)(nil), // 3: proto.ListAttachmentRequest + (*ListAttachmentResponse)(nil), // 4: proto.ListAttachmentResponse + (*UpdateVisibilityRequest)(nil), // 5: proto.UpdateVisibilityRequest + (*UpdateVisibilityResponse)(nil), // 6: proto.UpdateVisibilityResponse + (*DeleteAttachmentRequest)(nil), // 7: proto.DeleteAttachmentRequest + (*DeleteAttachmentResponse)(nil), // 8: proto.DeleteAttachmentResponse +} +var file_attachment_proto_depIdxs = []int32{ + 0, // 0: proto.GetAttachmentResponse.attachment:type_name -> proto.AttachmentInfo + 0, // 1: proto.ListAttachmentResponse.attachments:type_name -> proto.AttachmentInfo + 1, // 2: proto.AttachmentService.GetAttachment:input_type -> proto.GetAttachmentRequest + 3, // 3: proto.AttachmentService.ListAttachment:input_type -> proto.ListAttachmentRequest + 5, // 4: proto.AttachmentService.UpdateVisibility:input_type -> proto.UpdateVisibilityRequest + 7, // 5: proto.AttachmentService.DeleteAttachment:input_type -> proto.DeleteAttachmentRequest + 2, // 6: proto.AttachmentService.GetAttachment:output_type -> proto.GetAttachmentResponse + 4, // 7: proto.AttachmentService.ListAttachment:output_type -> proto.ListAttachmentResponse + 6, // 8: proto.AttachmentService.UpdateVisibility:output_type -> proto.UpdateVisibilityResponse + 8, // 9: proto.AttachmentService.DeleteAttachment:output_type -> proto.DeleteAttachmentResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_attachment_proto_init() } +func file_attachment_proto_init() { + if File_attachment_proto != nil { + return + } + file_attachment_proto_msgTypes[1].OneofWrappers = []any{} + file_attachment_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_attachment_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_attachment_proto_goTypes, + DependencyIndexes: file_attachment_proto_depIdxs, + MessageInfos: file_attachment_proto_msgTypes, + }.Build() + File_attachment_proto = out.File + file_attachment_proto_rawDesc = nil + file_attachment_proto_goTypes = nil + file_attachment_proto_depIdxs = nil +} diff --git a/pkg/proto/attachment_grpc.pb.go b/pkg/proto/attachment_grpc.pb.go new file mode 100644 index 0000000..b46edae --- /dev/null +++ b/pkg/proto/attachment_grpc.pb.go @@ -0,0 +1,235 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 +// source: attachment.proto + +package proto + +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 ( + AttachmentService_GetAttachment_FullMethodName = "/proto.AttachmentService/GetAttachment" + AttachmentService_ListAttachment_FullMethodName = "/proto.AttachmentService/ListAttachment" + AttachmentService_UpdateVisibility_FullMethodName = "/proto.AttachmentService/UpdateVisibility" + AttachmentService_DeleteAttachment_FullMethodName = "/proto.AttachmentService/DeleteAttachment" +) + +// AttachmentServiceClient is the client API for AttachmentService 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. +type AttachmentServiceClient interface { + GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) + ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentResponse, error) + UpdateVisibility(ctx context.Context, in *UpdateVisibilityRequest, opts ...grpc.CallOption) (*UpdateVisibilityResponse, error) + DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*DeleteAttachmentResponse, error) +} + +type attachmentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAttachmentServiceClient(cc grpc.ClientConnInterface) AttachmentServiceClient { + return &attachmentServiceClient{cc} +} + +func (c *attachmentServiceClient) GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAttachmentResponse) + err := c.cc.Invoke(ctx, AttachmentService_GetAttachment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attachmentServiceClient) ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAttachmentResponse) + err := c.cc.Invoke(ctx, AttachmentService_ListAttachment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attachmentServiceClient) UpdateVisibility(ctx context.Context, in *UpdateVisibilityRequest, opts ...grpc.CallOption) (*UpdateVisibilityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateVisibilityResponse) + err := c.cc.Invoke(ctx, AttachmentService_UpdateVisibility_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attachmentServiceClient) DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*DeleteAttachmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteAttachmentResponse) + err := c.cc.Invoke(ctx, AttachmentService_DeleteAttachment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AttachmentServiceServer is the server API for AttachmentService service. +// All implementations must embed UnimplementedAttachmentServiceServer +// for forward compatibility. +type AttachmentServiceServer interface { + GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error) + ListAttachment(context.Context, *ListAttachmentRequest) (*ListAttachmentResponse, error) + UpdateVisibility(context.Context, *UpdateVisibilityRequest) (*UpdateVisibilityResponse, error) + DeleteAttachment(context.Context, *DeleteAttachmentRequest) (*DeleteAttachmentResponse, error) + mustEmbedUnimplementedAttachmentServiceServer() +} + +// UnimplementedAttachmentServiceServer 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 UnimplementedAttachmentServiceServer struct{} + +func (UnimplementedAttachmentServiceServer) GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttachment not implemented") +} +func (UnimplementedAttachmentServiceServer) ListAttachment(context.Context, *ListAttachmentRequest) (*ListAttachmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAttachment not implemented") +} +func (UnimplementedAttachmentServiceServer) UpdateVisibility(context.Context, *UpdateVisibilityRequest) (*UpdateVisibilityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateVisibility not implemented") +} +func (UnimplementedAttachmentServiceServer) DeleteAttachment(context.Context, *DeleteAttachmentRequest) (*DeleteAttachmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachment not implemented") +} +func (UnimplementedAttachmentServiceServer) mustEmbedUnimplementedAttachmentServiceServer() {} +func (UnimplementedAttachmentServiceServer) testEmbeddedByValue() {} + +// UnsafeAttachmentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AttachmentServiceServer will +// result in compilation errors. +type UnsafeAttachmentServiceServer interface { + mustEmbedUnimplementedAttachmentServiceServer() +} + +func RegisterAttachmentServiceServer(s grpc.ServiceRegistrar, srv AttachmentServiceServer) { + // If the following call pancis, it indicates UnimplementedAttachmentServiceServer 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(&AttachmentService_ServiceDesc, srv) +} + +func _AttachmentService_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAttachmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentServiceServer).GetAttachment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttachmentService_GetAttachment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentServiceServer).GetAttachment(ctx, req.(*GetAttachmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttachmentService_ListAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAttachmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentServiceServer).ListAttachment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttachmentService_ListAttachment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentServiceServer).ListAttachment(ctx, req.(*ListAttachmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttachmentService_UpdateVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateVisibilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentServiceServer).UpdateVisibility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttachmentService_UpdateVisibility_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentServiceServer).UpdateVisibility(ctx, req.(*UpdateVisibilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttachmentService_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAttachmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttachmentServiceServer).DeleteAttachment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttachmentService_DeleteAttachment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttachmentServiceServer).DeleteAttachment(ctx, req.(*DeleteAttachmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AttachmentService_ServiceDesc is the grpc.ServiceDesc for AttachmentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AttachmentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.AttachmentService", + HandlerType: (*AttachmentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAttachment", + Handler: _AttachmentService_GetAttachment_Handler, + }, + { + MethodName: "ListAttachment", + Handler: _AttachmentService_ListAttachment_Handler, + }, + { + MethodName: "UpdateVisibility", + Handler: _AttachmentService_UpdateVisibility_Handler, + }, + { + MethodName: "DeleteAttachment", + Handler: _AttachmentService_DeleteAttachment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "attachment.proto", +}