service

package
v0.0.0-...-d7d42ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_SaveEntry_FullMethodName  = "/DB/SaveEntry"
	DB_GetEntries_FullMethodName = "/DB/GetEntries"
)

Variables

View Source
var DB_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "DB",
	HandlerType: (*DBServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SaveEntry",
			Handler:    _DB_SaveEntry_Handler,
		},
		{
			MethodName: "GetEntries",
			Handler:    _DB_GetEntries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "db.proto",
}

DB_ServiceDesc is the grpc.ServiceDesc for DB service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterDBServer

func RegisterDBServer(s grpc.ServiceRegistrar, srv DBServer)

Types

type DBClient

type DBClient interface {
	SaveEntry(ctx context.Context, in *EntrySaveReq, opts ...grpc.CallOption) (*EntrySaveRes, error)
	GetEntries(ctx context.Context, in *None, opts ...grpc.CallOption) (*EntriesRes, error)
}

DBClient is the client API for DB 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.

func NewDBClient

func NewDBClient(cc grpc.ClientConnInterface) DBClient

type DBServer

type DBServer interface {
	SaveEntry(context.Context, *EntrySaveReq) (*EntrySaveRes, error)
	GetEntries(context.Context, *None) (*EntriesRes, error)
	// contains filtered or unexported methods
}

DBServer is the server API for DB service. All implementations must embed UnimplementedDBServer for forward compatibility

type EntriesRes

type EntriesRes struct {
	Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*EntriesRes) Descriptor deprecated

func (*EntriesRes) Descriptor() ([]byte, []int)

Deprecated: Use EntriesRes.ProtoReflect.Descriptor instead.

func (*EntriesRes) GetEntries

func (x *EntriesRes) GetEntries() []*Entry

func (*EntriesRes) ProtoMessage

func (*EntriesRes) ProtoMessage()

func (*EntriesRes) ProtoReflect

func (x *EntriesRes) ProtoReflect() protoreflect.Message

func (*EntriesRes) Reset

func (x *EntriesRes) Reset()

func (*EntriesRes) String

func (x *EntriesRes) String() string

type Entry

type Entry struct {
	EntryId   int64  `protobuf:"varint,1,opt,name=entryId,proto3" json:"entryId,omitempty"`
	PageId    string `protobuf:"bytes,2,opt,name=pageId,proto3" json:"pageId,omitempty"`
	PageLink  string `protobuf:"bytes,3,opt,name=pageLink,proto3" json:"pageLink,omitempty"`
	PageTitle string `protobuf:"bytes,4,opt,name=pageTitle,proto3" json:"pageTitle,omitempty"`
	// contains filtered or unexported fields
}

func (*Entry) Descriptor deprecated

func (*Entry) Descriptor() ([]byte, []int)

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetEntryId

func (x *Entry) GetEntryId() int64

func (*Entry) GetPageId

func (x *Entry) GetPageId() string
func (x *Entry) GetPageLink() string

func (*Entry) GetPageTitle

func (x *Entry) GetPageTitle() string

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

func (x *Entry) ProtoReflect() protoreflect.Message

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type EntrySaveReq

type EntrySaveReq struct {
	PageId    string `protobuf:"bytes,1,opt,name=pageId,proto3" json:"pageId,omitempty"`
	PageTitle string `protobuf:"bytes,2,opt,name=pageTitle,proto3" json:"pageTitle,omitempty"`
	PageLink  string `protobuf:"bytes,3,opt,name=pageLink,proto3" json:"pageLink,omitempty"`
	// contains filtered or unexported fields
}

func (*EntrySaveReq) Descriptor deprecated

func (*EntrySaveReq) Descriptor() ([]byte, []int)

Deprecated: Use EntrySaveReq.ProtoReflect.Descriptor instead.

func (*EntrySaveReq) GetPageId

func (x *EntrySaveReq) GetPageId() string
func (x *EntrySaveReq) GetPageLink() string

func (*EntrySaveReq) GetPageTitle

func (x *EntrySaveReq) GetPageTitle() string

func (*EntrySaveReq) ProtoMessage

func (*EntrySaveReq) ProtoMessage()

func (*EntrySaveReq) ProtoReflect

func (x *EntrySaveReq) ProtoReflect() protoreflect.Message

func (*EntrySaveReq) Reset

func (x *EntrySaveReq) Reset()

func (*EntrySaveReq) String

func (x *EntrySaveReq) String() string

type EntrySaveRes

type EntrySaveRes struct {
	EntryId string `protobuf:"bytes,1,opt,name=entryId,proto3" json:"entryId,omitempty"`
	// contains filtered or unexported fields
}

func (*EntrySaveRes) Descriptor deprecated

func (*EntrySaveRes) Descriptor() ([]byte, []int)

Deprecated: Use EntrySaveRes.ProtoReflect.Descriptor instead.

func (*EntrySaveRes) GetEntryId

func (x *EntrySaveRes) GetEntryId() string

func (*EntrySaveRes) ProtoMessage

func (*EntrySaveRes) ProtoMessage()

func (*EntrySaveRes) ProtoReflect

func (x *EntrySaveRes) ProtoReflect() protoreflect.Message

func (*EntrySaveRes) Reset

func (x *EntrySaveRes) Reset()

func (*EntrySaveRes) String

func (x *EntrySaveRes) String() string

type None

type None struct {
	// contains filtered or unexported fields
}

func (*None) Descriptor deprecated

func (*None) Descriptor() ([]byte, []int)

Deprecated: Use None.ProtoReflect.Descriptor instead.

func (*None) ProtoMessage

func (*None) ProtoMessage()

func (*None) ProtoReflect

func (x *None) ProtoReflect() protoreflect.Message

func (*None) Reset

func (x *None) Reset()

func (*None) String

func (x *None) String() string

type UnimplementedDBServer

type UnimplementedDBServer struct {
}

UnimplementedDBServer must be embedded to have forward compatible implementations.

func (UnimplementedDBServer) GetEntries

func (UnimplementedDBServer) SaveEntry

type UnsafeDBServer

type UnsafeDBServer interface {
	// contains filtered or unexported methods
}

UnsafeDBServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DBServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL