Initial implementation of mcq — document reading queue
Single-binary service: push raw markdown via REST/gRPC API, read rendered HTML through mobile-friendly web UI. MCIAS auth on all endpoints, SQLite storage, goldmark rendering with GFM and syntax highlighting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
869
gen/mcq/v1/mcq.pb.go
Normal file
869
gen/mcq/v1/mcq.pb.go
Normal file
@@ -0,0 +1,869 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.32.1
|
||||
// source: proto/mcq/v1/mcq.proto
|
||||
|
||||
package mcqv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
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 Document struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
|
||||
PushedBy string `protobuf:"bytes,5,opt,name=pushed_by,json=pushedBy,proto3" json:"pushed_by,omitempty"`
|
||||
PushedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=pushed_at,json=pushedAt,proto3" json:"pushed_at,omitempty"`
|
||||
Read bool `protobuf:"varint,7,opt,name=read,proto3" json:"read,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Document) Reset() {
|
||||
*x = Document{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Document) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Document) ProtoMessage() {}
|
||||
|
||||
func (x *Document) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 Document.ProtoReflect.Descriptor instead.
|
||||
func (*Document) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Document) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Document) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetBody() string {
|
||||
if x != nil {
|
||||
return x.Body
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetPushedBy() string {
|
||||
if x != nil {
|
||||
return x.PushedBy
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetPushedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.PushedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Document) GetRead() bool {
|
||||
if x != nil {
|
||||
return x.Read
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ListDocumentsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListDocumentsRequest) Reset() {
|
||||
*x = ListDocumentsRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDocumentsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListDocumentsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 ListDocumentsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListDocumentsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type ListDocumentsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Documents []*Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListDocumentsResponse) Reset() {
|
||||
*x = ListDocumentsResponse{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDocumentsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListDocumentsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 ListDocumentsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListDocumentsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListDocumentsResponse) GetDocuments() []*Document {
|
||||
if x != nil {
|
||||
return x.Documents
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetDocumentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetDocumentRequest) Reset() {
|
||||
*x = GetDocumentRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetDocumentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetDocumentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 GetDocumentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetDocumentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetDocumentRequest) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type PutDocumentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PutDocumentRequest) Reset() {
|
||||
*x = PutDocumentRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PutDocumentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PutDocumentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PutDocumentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 PutDocumentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PutDocumentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *PutDocumentRequest) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PutDocumentRequest) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PutDocumentRequest) GetBody() string {
|
||||
if x != nil {
|
||||
return x.Body
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteDocumentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) Reset() {
|
||||
*x = DeleteDocumentRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteDocumentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 DeleteDocumentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteDocumentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteDocumentResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) Reset() {
|
||||
*x = DeleteDocumentResponse{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteDocumentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDocumentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 DeleteDocumentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteDocumentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type MarkReadRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MarkReadRequest) Reset() {
|
||||
*x = MarkReadRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MarkReadRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MarkReadRequest) ProtoMessage() {}
|
||||
|
||||
func (x *MarkReadRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 MarkReadRequest.ProtoReflect.Descriptor instead.
|
||||
func (*MarkReadRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MarkReadRequest) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MarkUnreadRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MarkUnreadRequest) Reset() {
|
||||
*x = MarkUnreadRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MarkUnreadRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MarkUnreadRequest) ProtoMessage() {}
|
||||
|
||||
func (x *MarkUnreadRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_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 MarkUnreadRequest.ProtoReflect.Descriptor instead.
|
||||
func (*MarkUnreadRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *MarkUnreadRequest) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // security: never logged
|
||||
TotpCode string `protobuf:"bytes,3,opt,name=totp_code,json=totpCode,proto3" json:"totp_code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LoginRequest) Reset() {
|
||||
*x = LoginRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LoginRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LoginRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[9]
|
||||
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 LoginRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LoginRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetTotpCode() string {
|
||||
if x != nil {
|
||||
return x.TotpCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // security: never logged
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LoginResponse) Reset() {
|
||||
*x = LoginResponse{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LoginResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginResponse) ProtoMessage() {}
|
||||
|
||||
func (x *LoginResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[10]
|
||||
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 LoginResponse.ProtoReflect.Descriptor instead.
|
||||
func (*LoginResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *LoginResponse) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LogoutRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // security: never logged
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LogoutRequest) Reset() {
|
||||
*x = LogoutRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogoutRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LogoutRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LogoutRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[11]
|
||||
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 LogoutRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LogoutRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *LogoutRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LogoutResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LogoutResponse) Reset() {
|
||||
*x = LogoutResponse{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogoutResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LogoutResponse) ProtoMessage() {}
|
||||
|
||||
func (x *LogoutResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[12]
|
||||
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 LogoutResponse.ProtoReflect.Descriptor instead.
|
||||
func (*LogoutResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
type HealthRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthRequest) Reset() {
|
||||
*x = HealthRequest{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HealthRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[13]
|
||||
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 HealthRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HealthRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
type HealthResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthResponse) Reset() {
|
||||
*x = HealthResponse{}
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HealthResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_mcq_v1_mcq_proto_msgTypes[14]
|
||||
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 HealthResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HealthResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *HealthResponse) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_proto_mcq_v1_mcq_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_proto_mcq_v1_mcq_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x16proto/mcq/v1/mcq.proto\x12\x06mcq.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x01\n" +
|
||||
"\bDocument\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
|
||||
"\x04slug\x18\x02 \x01(\tR\x04slug\x12\x14\n" +
|
||||
"\x05title\x18\x03 \x01(\tR\x05title\x12\x12\n" +
|
||||
"\x04body\x18\x04 \x01(\tR\x04body\x12\x1b\n" +
|
||||
"\tpushed_by\x18\x05 \x01(\tR\bpushedBy\x127\n" +
|
||||
"\tpushed_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\bpushedAt\x12\x12\n" +
|
||||
"\x04read\x18\a \x01(\bR\x04read\"\x16\n" +
|
||||
"\x14ListDocumentsRequest\"G\n" +
|
||||
"\x15ListDocumentsResponse\x12.\n" +
|
||||
"\tdocuments\x18\x01 \x03(\v2\x10.mcq.v1.DocumentR\tdocuments\"(\n" +
|
||||
"\x12GetDocumentRequest\x12\x12\n" +
|
||||
"\x04slug\x18\x01 \x01(\tR\x04slug\"R\n" +
|
||||
"\x12PutDocumentRequest\x12\x12\n" +
|
||||
"\x04slug\x18\x01 \x01(\tR\x04slug\x12\x14\n" +
|
||||
"\x05title\x18\x02 \x01(\tR\x05title\x12\x12\n" +
|
||||
"\x04body\x18\x03 \x01(\tR\x04body\"+\n" +
|
||||
"\x15DeleteDocumentRequest\x12\x12\n" +
|
||||
"\x04slug\x18\x01 \x01(\tR\x04slug\"\x18\n" +
|
||||
"\x16DeleteDocumentResponse\"%\n" +
|
||||
"\x0fMarkReadRequest\x12\x12\n" +
|
||||
"\x04slug\x18\x01 \x01(\tR\x04slug\"'\n" +
|
||||
"\x11MarkUnreadRequest\x12\x12\n" +
|
||||
"\x04slug\x18\x01 \x01(\tR\x04slug\"c\n" +
|
||||
"\fLoginRequest\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x1b\n" +
|
||||
"\ttotp_code\x18\x03 \x01(\tR\btotpCode\"%\n" +
|
||||
"\rLoginResponse\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"%\n" +
|
||||
"\rLogoutRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"\x10\n" +
|
||||
"\x0eLogoutResponse\"\x0f\n" +
|
||||
"\rHealthRequest\"(\n" +
|
||||
"\x0eHealthResponse\x12\x16\n" +
|
||||
"\x06status\x18\x01 \x01(\tR\x06status2\x9c\x03\n" +
|
||||
"\x0fDocumentService\x12L\n" +
|
||||
"\rListDocuments\x12\x1c.mcq.v1.ListDocumentsRequest\x1a\x1d.mcq.v1.ListDocumentsResponse\x12;\n" +
|
||||
"\vGetDocument\x12\x1a.mcq.v1.GetDocumentRequest\x1a\x10.mcq.v1.Document\x12;\n" +
|
||||
"\vPutDocument\x12\x1a.mcq.v1.PutDocumentRequest\x1a\x10.mcq.v1.Document\x12O\n" +
|
||||
"\x0eDeleteDocument\x12\x1d.mcq.v1.DeleteDocumentRequest\x1a\x1e.mcq.v1.DeleteDocumentResponse\x125\n" +
|
||||
"\bMarkRead\x12\x17.mcq.v1.MarkReadRequest\x1a\x10.mcq.v1.Document\x129\n" +
|
||||
"\n" +
|
||||
"MarkUnread\x12\x19.mcq.v1.MarkUnreadRequest\x1a\x10.mcq.v1.Document2|\n" +
|
||||
"\vAuthService\x124\n" +
|
||||
"\x05Login\x12\x14.mcq.v1.LoginRequest\x1a\x15.mcq.v1.LoginResponse\x127\n" +
|
||||
"\x06Logout\x12\x15.mcq.v1.LogoutRequest\x1a\x16.mcq.v1.LogoutResponse2G\n" +
|
||||
"\fAdminService\x127\n" +
|
||||
"\x06Health\x12\x15.mcq.v1.HealthRequest\x1a\x16.mcq.v1.HealthResponseB*Z(git.wntrmute.dev/mc/mcq/gen/mcq/v1;mcqv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_proto_mcq_v1_mcq_proto_rawDescOnce sync.Once
|
||||
file_proto_mcq_v1_mcq_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_proto_mcq_v1_mcq_proto_rawDescGZIP() []byte {
|
||||
file_proto_mcq_v1_mcq_proto_rawDescOnce.Do(func() {
|
||||
file_proto_mcq_v1_mcq_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_mcq_v1_mcq_proto_rawDesc), len(file_proto_mcq_v1_mcq_proto_rawDesc)))
|
||||
})
|
||||
return file_proto_mcq_v1_mcq_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_mcq_v1_mcq_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_proto_mcq_v1_mcq_proto_goTypes = []any{
|
||||
(*Document)(nil), // 0: mcq.v1.Document
|
||||
(*ListDocumentsRequest)(nil), // 1: mcq.v1.ListDocumentsRequest
|
||||
(*ListDocumentsResponse)(nil), // 2: mcq.v1.ListDocumentsResponse
|
||||
(*GetDocumentRequest)(nil), // 3: mcq.v1.GetDocumentRequest
|
||||
(*PutDocumentRequest)(nil), // 4: mcq.v1.PutDocumentRequest
|
||||
(*DeleteDocumentRequest)(nil), // 5: mcq.v1.DeleteDocumentRequest
|
||||
(*DeleteDocumentResponse)(nil), // 6: mcq.v1.DeleteDocumentResponse
|
||||
(*MarkReadRequest)(nil), // 7: mcq.v1.MarkReadRequest
|
||||
(*MarkUnreadRequest)(nil), // 8: mcq.v1.MarkUnreadRequest
|
||||
(*LoginRequest)(nil), // 9: mcq.v1.LoginRequest
|
||||
(*LoginResponse)(nil), // 10: mcq.v1.LoginResponse
|
||||
(*LogoutRequest)(nil), // 11: mcq.v1.LogoutRequest
|
||||
(*LogoutResponse)(nil), // 12: mcq.v1.LogoutResponse
|
||||
(*HealthRequest)(nil), // 13: mcq.v1.HealthRequest
|
||||
(*HealthResponse)(nil), // 14: mcq.v1.HealthResponse
|
||||
(*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
|
||||
}
|
||||
var file_proto_mcq_v1_mcq_proto_depIdxs = []int32{
|
||||
15, // 0: mcq.v1.Document.pushed_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 1: mcq.v1.ListDocumentsResponse.documents:type_name -> mcq.v1.Document
|
||||
1, // 2: mcq.v1.DocumentService.ListDocuments:input_type -> mcq.v1.ListDocumentsRequest
|
||||
3, // 3: mcq.v1.DocumentService.GetDocument:input_type -> mcq.v1.GetDocumentRequest
|
||||
4, // 4: mcq.v1.DocumentService.PutDocument:input_type -> mcq.v1.PutDocumentRequest
|
||||
5, // 5: mcq.v1.DocumentService.DeleteDocument:input_type -> mcq.v1.DeleteDocumentRequest
|
||||
7, // 6: mcq.v1.DocumentService.MarkRead:input_type -> mcq.v1.MarkReadRequest
|
||||
8, // 7: mcq.v1.DocumentService.MarkUnread:input_type -> mcq.v1.MarkUnreadRequest
|
||||
9, // 8: mcq.v1.AuthService.Login:input_type -> mcq.v1.LoginRequest
|
||||
11, // 9: mcq.v1.AuthService.Logout:input_type -> mcq.v1.LogoutRequest
|
||||
13, // 10: mcq.v1.AdminService.Health:input_type -> mcq.v1.HealthRequest
|
||||
2, // 11: mcq.v1.DocumentService.ListDocuments:output_type -> mcq.v1.ListDocumentsResponse
|
||||
0, // 12: mcq.v1.DocumentService.GetDocument:output_type -> mcq.v1.Document
|
||||
0, // 13: mcq.v1.DocumentService.PutDocument:output_type -> mcq.v1.Document
|
||||
6, // 14: mcq.v1.DocumentService.DeleteDocument:output_type -> mcq.v1.DeleteDocumentResponse
|
||||
0, // 15: mcq.v1.DocumentService.MarkRead:output_type -> mcq.v1.Document
|
||||
0, // 16: mcq.v1.DocumentService.MarkUnread:output_type -> mcq.v1.Document
|
||||
10, // 17: mcq.v1.AuthService.Login:output_type -> mcq.v1.LoginResponse
|
||||
12, // 18: mcq.v1.AuthService.Logout:output_type -> mcq.v1.LogoutResponse
|
||||
14, // 19: mcq.v1.AdminService.Health:output_type -> mcq.v1.HealthResponse
|
||||
11, // [11:20] is the sub-list for method output_type
|
||||
2, // [2:11] 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_proto_mcq_v1_mcq_proto_init() }
|
||||
func file_proto_mcq_v1_mcq_proto_init() {
|
||||
if File_proto_mcq_v1_mcq_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_mcq_v1_mcq_proto_rawDesc), len(file_proto_mcq_v1_mcq_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 15,
|
||||
NumExtensions: 0,
|
||||
NumServices: 3,
|
||||
},
|
||||
GoTypes: file_proto_mcq_v1_mcq_proto_goTypes,
|
||||
DependencyIndexes: file_proto_mcq_v1_mcq_proto_depIdxs,
|
||||
MessageInfos: file_proto_mcq_v1_mcq_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_mcq_v1_mcq_proto = out.File
|
||||
file_proto_mcq_v1_mcq_proto_goTypes = nil
|
||||
file_proto_mcq_v1_mcq_proto_depIdxs = nil
|
||||
}
|
||||
565
gen/mcq/v1/mcq_grpc.pb.go
Normal file
565
gen/mcq/v1/mcq_grpc.pb.go
Normal file
@@ -0,0 +1,565 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc v6.32.1
|
||||
// source: proto/mcq/v1/mcq.proto
|
||||
|
||||
package mcqv1
|
||||
|
||||
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 (
|
||||
DocumentService_ListDocuments_FullMethodName = "/mcq.v1.DocumentService/ListDocuments"
|
||||
DocumentService_GetDocument_FullMethodName = "/mcq.v1.DocumentService/GetDocument"
|
||||
DocumentService_PutDocument_FullMethodName = "/mcq.v1.DocumentService/PutDocument"
|
||||
DocumentService_DeleteDocument_FullMethodName = "/mcq.v1.DocumentService/DeleteDocument"
|
||||
DocumentService_MarkRead_FullMethodName = "/mcq.v1.DocumentService/MarkRead"
|
||||
DocumentService_MarkUnread_FullMethodName = "/mcq.v1.DocumentService/MarkUnread"
|
||||
)
|
||||
|
||||
// DocumentServiceClient is the client API for DocumentService 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.
|
||||
//
|
||||
// DocumentService manages queued documents for reading.
|
||||
type DocumentServiceClient interface {
|
||||
ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error)
|
||||
GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error)
|
||||
PutDocument(ctx context.Context, in *PutDocumentRequest, opts ...grpc.CallOption) (*Document, error)
|
||||
DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error)
|
||||
MarkRead(ctx context.Context, in *MarkReadRequest, opts ...grpc.CallOption) (*Document, error)
|
||||
MarkUnread(ctx context.Context, in *MarkUnreadRequest, opts ...grpc.CallOption) (*Document, error)
|
||||
}
|
||||
|
||||
type documentServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDocumentServiceClient(cc grpc.ClientConnInterface) DocumentServiceClient {
|
||||
return &documentServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListDocumentsResponse)
|
||||
err := c.cc.Invoke(ctx, DocumentService_ListDocuments_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Document)
|
||||
err := c.cc.Invoke(ctx, DocumentService_GetDocument_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) PutDocument(ctx context.Context, in *PutDocumentRequest, opts ...grpc.CallOption) (*Document, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Document)
|
||||
err := c.cc.Invoke(ctx, DocumentService_PutDocument_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteDocumentResponse)
|
||||
err := c.cc.Invoke(ctx, DocumentService_DeleteDocument_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) MarkRead(ctx context.Context, in *MarkReadRequest, opts ...grpc.CallOption) (*Document, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Document)
|
||||
err := c.cc.Invoke(ctx, DocumentService_MarkRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *documentServiceClient) MarkUnread(ctx context.Context, in *MarkUnreadRequest, opts ...grpc.CallOption) (*Document, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Document)
|
||||
err := c.cc.Invoke(ctx, DocumentService_MarkUnread_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DocumentServiceServer is the server API for DocumentService service.
|
||||
// All implementations must embed UnimplementedDocumentServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// DocumentService manages queued documents for reading.
|
||||
type DocumentServiceServer interface {
|
||||
ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error)
|
||||
GetDocument(context.Context, *GetDocumentRequest) (*Document, error)
|
||||
PutDocument(context.Context, *PutDocumentRequest) (*Document, error)
|
||||
DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error)
|
||||
MarkRead(context.Context, *MarkReadRequest) (*Document, error)
|
||||
MarkUnread(context.Context, *MarkUnreadRequest) (*Document, error)
|
||||
mustEmbedUnimplementedDocumentServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedDocumentServiceServer 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 UnimplementedDocumentServiceServer struct{}
|
||||
|
||||
func (UnimplementedDocumentServiceServer) ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListDocuments not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) GetDocument(context.Context, *GetDocumentRequest) (*Document, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetDocument not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) PutDocument(context.Context, *PutDocumentRequest) (*Document, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PutDocument not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteDocument not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) MarkRead(context.Context, *MarkReadRequest) (*Document, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkRead not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) MarkUnread(context.Context, *MarkUnreadRequest) (*Document, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkUnread not implemented")
|
||||
}
|
||||
func (UnimplementedDocumentServiceServer) mustEmbedUnimplementedDocumentServiceServer() {}
|
||||
func (UnimplementedDocumentServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDocumentServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DocumentServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDocumentServiceServer interface {
|
||||
mustEmbedUnimplementedDocumentServiceServer()
|
||||
}
|
||||
|
||||
func RegisterDocumentServiceServer(s grpc.ServiceRegistrar, srv DocumentServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedDocumentServiceServer 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(&DocumentService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DocumentService_ListDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListDocumentsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).ListDocuments(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_ListDocuments_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).ListDocuments(ctx, req.(*ListDocumentsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DocumentService_GetDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDocumentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).GetDocument(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_GetDocument_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).GetDocument(ctx, req.(*GetDocumentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DocumentService_PutDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PutDocumentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).PutDocument(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_PutDocument_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).PutDocument(ctx, req.(*PutDocumentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DocumentService_DeleteDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteDocumentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).DeleteDocument(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_DeleteDocument_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).DeleteDocument(ctx, req.(*DeleteDocumentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DocumentService_MarkRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkReadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).MarkRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_MarkRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).MarkRead(ctx, req.(*MarkReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DocumentService_MarkUnread_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkUnreadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DocumentServiceServer).MarkUnread(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DocumentService_MarkUnread_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DocumentServiceServer).MarkUnread(ctx, req.(*MarkUnreadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DocumentService_ServiceDesc is the grpc.ServiceDesc for DocumentService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DocumentService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "mcq.v1.DocumentService",
|
||||
HandlerType: (*DocumentServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListDocuments",
|
||||
Handler: _DocumentService_ListDocuments_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDocument",
|
||||
Handler: _DocumentService_GetDocument_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PutDocument",
|
||||
Handler: _DocumentService_PutDocument_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDocument",
|
||||
Handler: _DocumentService_DeleteDocument_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkRead",
|
||||
Handler: _DocumentService_MarkRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkUnread",
|
||||
Handler: _DocumentService_MarkUnread_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/mcq/v1/mcq.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AuthService_Login_FullMethodName = "/mcq.v1.AuthService/Login"
|
||||
AuthService_Logout_FullMethodName = "/mcq.v1.AuthService/Logout"
|
||||
)
|
||||
|
||||
// AuthServiceClient is the client API for AuthService 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.
|
||||
//
|
||||
// AuthService handles MCIAS login and logout.
|
||||
type AuthServiceClient interface {
|
||||
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||||
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
||||
}
|
||||
|
||||
type authServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
|
||||
return &authServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LoginResponse)
|
||||
err := c.cc.Invoke(ctx, AuthService_Login_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LogoutResponse)
|
||||
err := c.cc.Invoke(ctx, AuthService_Logout_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthServiceServer is the server API for AuthService service.
|
||||
// All implementations must embed UnimplementedAuthServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// AuthService handles MCIAS login and logout.
|
||||
type AuthServiceServer interface {
|
||||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||||
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
||||
mustEmbedUnimplementedAuthServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAuthServiceServer 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 UnimplementedAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
||||
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAuthServiceServer interface {
|
||||
mustEmbedUnimplementedAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAuthServiceServer 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(&AuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoginRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServiceServer).Login(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_Login_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).Login(ctx, req.(*LoginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LogoutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServiceServer).Logout(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_Logout_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).Logout(ctx, req.(*LogoutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "mcq.v1.AuthService",
|
||||
HandlerType: (*AuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Login",
|
||||
Handler: _AuthService_Login_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Logout",
|
||||
Handler: _AuthService_Logout_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/mcq/v1/mcq.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AdminService_Health_FullMethodName = "/mcq.v1.AdminService/Health"
|
||||
)
|
||||
|
||||
// AdminServiceClient is the client API for AdminService 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.
|
||||
//
|
||||
// AdminService provides health checks.
|
||||
type AdminServiceClient interface {
|
||||
Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
|
||||
}
|
||||
|
||||
type adminServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAdminServiceClient(cc grpc.ClientConnInterface) AdminServiceClient {
|
||||
return &adminServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *adminServiceClient) Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(HealthResponse)
|
||||
err := c.cc.Invoke(ctx, AdminService_Health_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AdminServiceServer is the server API for AdminService service.
|
||||
// All implementations must embed UnimplementedAdminServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// AdminService provides health checks.
|
||||
type AdminServiceServer interface {
|
||||
Health(context.Context, *HealthRequest) (*HealthResponse, error)
|
||||
mustEmbedUnimplementedAdminServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAdminServiceServer 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 UnimplementedAdminServiceServer struct{}
|
||||
|
||||
func (UnimplementedAdminServiceServer) Health(context.Context, *HealthRequest) (*HealthResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Health not implemented")
|
||||
}
|
||||
func (UnimplementedAdminServiceServer) mustEmbedUnimplementedAdminServiceServer() {}
|
||||
func (UnimplementedAdminServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AdminServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAdminServiceServer interface {
|
||||
mustEmbedUnimplementedAdminServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAdminServiceServer 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(&AdminService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AdminService_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(HealthRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AdminServiceServer).Health(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdminService_Health_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdminServiceServer).Health(ctx, req.(*HealthRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AdminService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "mcq.v1.AdminService",
|
||||
HandlerType: (*AdminServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Health",
|
||||
Handler: _AdminService_Health_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/mcq/v1/mcq.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user