protobufs

package
v0.0.0-...-4d6a655 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var API_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.API",
	HandlerType: (*APIServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListAll",
			Handler:       _API_ListAll_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListStories",
			Handler:       _API_ListStories_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListJobs",
			Handler:       _API_ListJobs_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api.proto",
}

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

Functions

func RegisterAPIServer

func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)

Types

type APIClient

type APIClient interface {
	ListAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (API_ListAllClient, error)
	ListStories(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (API_ListStoriesClient, error)
	ListJobs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (API_ListJobsClient, error)
}

APIClient is the client API for API 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 NewAPIClient

func NewAPIClient(cc grpc.ClientConnInterface) APIClient

type APIServer

type APIServer interface {
	ListAll(*emptypb.Empty, API_ListAllServer) error
	ListStories(*emptypb.Empty, API_ListStoriesServer) error
	ListJobs(*emptypb.Empty, API_ListJobsServer) error
	// contains filtered or unexported methods
}

APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility

type API_ListAllClient

type API_ListAllClient interface {
	Recv() (*Item, error)
	grpc.ClientStream
}

type API_ListAllServer

type API_ListAllServer interface {
	Send(*Item) error
	grpc.ServerStream
}

type API_ListJobsClient

type API_ListJobsClient interface {
	Recv() (*Item, error)
	grpc.ClientStream
}

type API_ListJobsServer

type API_ListJobsServer interface {
	Send(*Item) error
	grpc.ServerStream
}

type API_ListStoriesClient

type API_ListStoriesClient interface {
	Recv() (*Item, error)
	grpc.ClientStream
}

type API_ListStoriesServer

type API_ListStoriesServer interface {
	Send(*Item) error
	grpc.ServerStream
}

type Item

type Item struct {
	Id        int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type      string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Content   string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	Url       string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	Score     int32  `protobuf:"zigzag32,5,opt,name=score,proto3" json:"score,omitempty"`
	Title     string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
	CreatedAt int64  `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	CreatedBy string `protobuf:"bytes,8,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetContent

func (x *Item) GetContent() string

func (*Item) GetCreatedAt

func (x *Item) GetCreatedAt() int64

func (*Item) GetCreatedBy

func (x *Item) GetCreatedBy() string

func (*Item) GetId

func (x *Item) GetId() int32

func (*Item) GetScore

func (x *Item) GetScore() int32

func (*Item) GetTitle

func (x *Item) GetTitle() string

func (*Item) GetType

func (x *Item) GetType() string

func (*Item) GetUrl

func (x *Item) GetUrl() string

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type UnimplementedAPIServer

type UnimplementedAPIServer struct {
}

UnimplementedAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIServer) ListAll

func (UnimplementedAPIServer) ListJobs

func (UnimplementedAPIServer) ListStories

type UnsafeAPIServer

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

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

Jump to

Keyboard shortcuts

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