Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterBotServiceServer(s grpc.ServiceRegistrar, srv BotServiceServer)
- type BotServiceClient
- type BotServiceServer
- type GetMediaRequest
- type GetMediaResponse
- func (*GetMediaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMediaResponse) GetCaption() string
- func (x *GetMediaResponse) GetItems() []*MediaItem
- func (x *GetMediaResponse) GetSource() string
- func (x *GetMediaResponse) GetTitle() string
- func (*GetMediaResponse) ProtoMessage()
- func (x *GetMediaResponse) ProtoReflect() protoreflect.Message
- func (x *GetMediaResponse) Reset()
- func (x *GetMediaResponse) String() string
- type MediaItem
- type UnimplementedBotServiceServer
- type UnsafeBotServiceServer
Constants ¶
const (
BotService_GetMedia_FullMethodName = "/bot.BotService/GetMedia"
)
Variables ¶
var BotService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bot.BotService", HandlerType: (*BotServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMedia", Handler: _BotService_GetMedia_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/bot.proto", }
BotService_ServiceDesc is the grpc.ServiceDesc for BotService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_bot_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBotServiceServer ¶
func RegisterBotServiceServer(s grpc.ServiceRegistrar, srv BotServiceServer)
Types ¶
type BotServiceClient ¶
type BotServiceClient interface {
GetMedia(ctx context.Context, in *GetMediaRequest, opts ...grpc.CallOption) (*GetMediaResponse, error)
}
BotServiceClient is the client API for BotService 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 NewBotServiceClient ¶
func NewBotServiceClient(cc grpc.ClientConnInterface) BotServiceClient
type BotServiceServer ¶
type BotServiceServer interface {
GetMedia(context.Context, *GetMediaRequest) (*GetMediaResponse, error)
// contains filtered or unexported methods
}
BotServiceServer is the server API for BotService service. All implementations must embed UnimplementedBotServiceServer for forward compatibility.
type GetMediaRequest ¶
type GetMediaRequest struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// contains filtered or unexported fields
}
Get
func (*GetMediaRequest) Descriptor
deprecated
func (*GetMediaRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMediaRequest.ProtoReflect.Descriptor instead.
func (*GetMediaRequest) GetUrl ¶
func (x *GetMediaRequest) GetUrl() string
func (*GetMediaRequest) ProtoMessage ¶
func (*GetMediaRequest) ProtoMessage()
func (*GetMediaRequest) ProtoReflect ¶
func (x *GetMediaRequest) ProtoReflect() protoreflect.Message
func (*GetMediaRequest) Reset ¶
func (x *GetMediaRequest) Reset()
func (*GetMediaRequest) String ¶
func (x *GetMediaRequest) String() string
type GetMediaResponse ¶
type GetMediaResponse struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Caption string `protobuf:"bytes,2,opt,name=caption,proto3" json:"caption,omitempty"`
Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
Items []*MediaItem `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
func (*GetMediaResponse) Descriptor
deprecated
func (*GetMediaResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMediaResponse.ProtoReflect.Descriptor instead.
func (*GetMediaResponse) GetCaption ¶
func (x *GetMediaResponse) GetCaption() string
func (*GetMediaResponse) GetItems ¶
func (x *GetMediaResponse) GetItems() []*MediaItem
func (*GetMediaResponse) GetSource ¶
func (x *GetMediaResponse) GetSource() string
func (*GetMediaResponse) GetTitle ¶
func (x *GetMediaResponse) GetTitle() string
func (*GetMediaResponse) ProtoMessage ¶
func (*GetMediaResponse) ProtoMessage()
func (*GetMediaResponse) ProtoReflect ¶
func (x *GetMediaResponse) ProtoReflect() protoreflect.Message
func (*GetMediaResponse) Reset ¶
func (x *GetMediaResponse) Reset()
func (*GetMediaResponse) String ¶
func (x *GetMediaResponse) String() string
type MediaItem ¶
type MediaItem struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// contains filtered or unexported fields
}
func (*MediaItem) Descriptor
deprecated
func (*MediaItem) ProtoMessage ¶
func (*MediaItem) ProtoMessage()
func (*MediaItem) ProtoReflect ¶
func (x *MediaItem) ProtoReflect() protoreflect.Message
type UnimplementedBotServiceServer ¶
type UnimplementedBotServiceServer struct{}
UnimplementedBotServiceServer 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.
func (UnimplementedBotServiceServer) GetMedia ¶
func (UnimplementedBotServiceServer) GetMedia(context.Context, *GetMediaRequest) (*GetMediaResponse, error)
type UnsafeBotServiceServer ¶
type UnsafeBotServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBotServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BotServiceServer will result in compilation errors.