2022-12-20 21:45:52 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.8
2022-12-25 18:06:03 +08:00
// source: bili_api.proto
2022-12-20 21:45:52 +08:00
package pb
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.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// BiliAPIClient is the client API for BiliAPI 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 BiliAPIClient interface {
GetUserStat ( ctx context . Context , in * StatRequest , opts ... grpc . CallOption ) ( * StatReply , error )
GetUserBasicInfo ( ctx context . Context , in * InfoRequest , opts ... grpc . CallOption ) ( * InfoReply , error )
2022-12-25 18:06:03 +08:00
SearchVideo ( ctx context . Context , in * SearchVideoReq , opts ... grpc . CallOption ) ( * SearchVideoReply , error )
SearchLiveRoom ( ctx context . Context , in * SearchLiveRoomReq , opts ... grpc . CallOption ) ( * SearchLiveRoomReply , error )
2022-12-20 21:45:52 +08:00
}
type biliAPIClient struct {
cc grpc . ClientConnInterface
}
func NewBiliAPIClient ( cc grpc . ClientConnInterface ) BiliAPIClient {
return & biliAPIClient { cc }
}
func ( c * biliAPIClient ) GetUserStat ( ctx context . Context , in * StatRequest , opts ... grpc . CallOption ) ( * StatReply , error ) {
out := new ( StatReply )
err := c . cc . Invoke ( ctx , "/api.BiliAPI/GetUserStat" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * biliAPIClient ) GetUserBasicInfo ( ctx context . Context , in * InfoRequest , opts ... grpc . CallOption ) ( * InfoReply , error ) {
out := new ( InfoReply )
err := c . cc . Invoke ( ctx , "/api.BiliAPI/GetUserBasicInfo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-12-25 18:06:03 +08:00
func ( c * biliAPIClient ) SearchVideo ( ctx context . Context , in * SearchVideoReq , opts ... grpc . CallOption ) ( * SearchVideoReply , error ) {
out := new ( SearchVideoReply )
err := c . cc . Invoke ( ctx , "/api.BiliAPI/SearchVideo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * biliAPIClient ) SearchLiveRoom ( ctx context . Context , in * SearchLiveRoomReq , opts ... grpc . CallOption ) ( * SearchLiveRoomReply , error ) {
out := new ( SearchLiveRoomReply )
err := c . cc . Invoke ( ctx , "/api.BiliAPI/SearchLiveRoom" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-12-20 21:45:52 +08:00
// BiliAPIServer is the server API for BiliAPI service.
// All implementations must embed UnimplementedBiliAPIServer
// for forward compatibility
type BiliAPIServer interface {
GetUserStat ( context . Context , * StatRequest ) ( * StatReply , error )
GetUserBasicInfo ( context . Context , * InfoRequest ) ( * InfoReply , error )
2022-12-25 18:06:03 +08:00
SearchVideo ( context . Context , * SearchVideoReq ) ( * SearchVideoReply , error )
SearchLiveRoom ( context . Context , * SearchLiveRoomReq ) ( * SearchLiveRoomReply , error )
2022-12-20 21:45:52 +08:00
mustEmbedUnimplementedBiliAPIServer ( )
}
// UnimplementedBiliAPIServer must be embedded to have forward compatible implementations.
type UnimplementedBiliAPIServer struct {
}
func ( UnimplementedBiliAPIServer ) GetUserStat ( context . Context , * StatRequest ) ( * StatReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetUserStat not implemented" )
}
func ( UnimplementedBiliAPIServer ) GetUserBasicInfo ( context . Context , * InfoRequest ) ( * InfoReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetUserBasicInfo not implemented" )
}
2022-12-25 18:06:03 +08:00
func ( UnimplementedBiliAPIServer ) SearchVideo ( context . Context , * SearchVideoReq ) ( * SearchVideoReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SearchVideo not implemented" )
}
func ( UnimplementedBiliAPIServer ) SearchLiveRoom ( context . Context , * SearchLiveRoomReq ) ( * SearchLiveRoomReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SearchLiveRoom not implemented" )
}
2022-12-20 21:45:52 +08:00
func ( UnimplementedBiliAPIServer ) mustEmbedUnimplementedBiliAPIServer ( ) { }
// UnsafeBiliAPIServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BiliAPIServer will
// result in compilation errors.
type UnsafeBiliAPIServer interface {
mustEmbedUnimplementedBiliAPIServer ( )
}
func RegisterBiliAPIServer ( s grpc . ServiceRegistrar , srv BiliAPIServer ) {
s . RegisterService ( & BiliAPI_ServiceDesc , srv )
}
func _BiliAPI_GetUserStat_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( StatRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BiliAPIServer ) . GetUserStat ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/api.BiliAPI/GetUserStat" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BiliAPIServer ) . GetUserStat ( ctx , req . ( * StatRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BiliAPI_GetUserBasicInfo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( InfoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BiliAPIServer ) . GetUserBasicInfo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/api.BiliAPI/GetUserBasicInfo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BiliAPIServer ) . GetUserBasicInfo ( ctx , req . ( * InfoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-12-25 18:06:03 +08:00
func _BiliAPI_SearchVideo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SearchVideoReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BiliAPIServer ) . SearchVideo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/api.BiliAPI/SearchVideo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BiliAPIServer ) . SearchVideo ( ctx , req . ( * SearchVideoReq ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BiliAPI_SearchLiveRoom_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SearchLiveRoomReq )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BiliAPIServer ) . SearchLiveRoom ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/api.BiliAPI/SearchLiveRoom" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BiliAPIServer ) . SearchLiveRoom ( ctx , req . ( * SearchLiveRoomReq ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-12-20 21:45:52 +08:00
// BiliAPI_ServiceDesc is the grpc.ServiceDesc for BiliAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BiliAPI_ServiceDesc = grpc . ServiceDesc {
ServiceName : "api.BiliAPI" ,
HandlerType : ( * BiliAPIServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "GetUserStat" ,
Handler : _BiliAPI_GetUserStat_Handler ,
} ,
{
MethodName : "GetUserBasicInfo" ,
Handler : _BiliAPI_GetUserBasicInfo_Handler ,
} ,
2022-12-25 18:06:03 +08:00
{
MethodName : "SearchVideo" ,
Handler : _BiliAPI_SearchVideo_Handler ,
} ,
{
MethodName : "SearchLiveRoom" ,
Handler : _BiliAPI_SearchLiveRoom_Handler ,
} ,
2022-12-20 21:45:52 +08:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
2022-12-25 18:06:03 +08:00
Metadata : "bili_api.proto" ,
2022-12-20 21:45:52 +08:00
}