Documentation ¶
Index ¶
- Variables
- func NewRdbmsClient() *grpc.ClientConn
- func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)
- func RegisterVideoServer(s grpc.ServiceRegistrar, srv VideoServer)
- type AccountClient
- type AccountHandler
- type AccountServer
- type AuthNRequest
- func (*AuthNRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthNRequest) GetName() string
- func (x *AuthNRequest) GetPassword() string
- func (*AuthNRequest) ProtoMessage()
- func (x *AuthNRequest) ProtoReflect() protoreflect.Message
- func (x *AuthNRequest) Reset()
- func (x *AuthNRequest) String() string
- type AuthNResponse
- type CreateVideoRequest
- func (*CreateVideoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateVideoRequest) GetTitle() string
- func (x *CreateVideoRequest) GetUserId() uint64
- func (*CreateVideoRequest) ProtoMessage()
- func (x *CreateVideoRequest) ProtoReflect() protoreflect.Message
- func (x *CreateVideoRequest) Reset()
- func (x *CreateVideoRequest) String() string
- type CreateVideoResponse
- func (*CreateVideoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateVideoResponse) GetObjectId() string
- func (*CreateVideoResponse) ProtoMessage()
- func (x *CreateVideoResponse) ProtoReflect() protoreflect.Message
- func (x *CreateVideoResponse) Reset()
- func (x *CreateVideoResponse) String() string
- type InfoRequest
- func (*InfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InfoRequest) GetSignInUserId() uint64
- func (x *InfoRequest) GetUserId() uint64
- func (*InfoRequest) ProtoMessage()
- func (x *InfoRequest) ProtoReflect() protoreflect.Message
- func (x *InfoRequest) Reset()
- func (x *InfoRequest) String() string
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetFollowCount() uint64
- func (x *InfoResponse) GetFollowerCount() uint64
- func (x *InfoResponse) GetIsFollow() bool
- func (x *InfoResponse) GetName() string
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- type UnimplementedAccountServer
- type UnimplementedVideoServer
- type UnsafeAccountServer
- type UnsafeVideoServer
- type VideoClient
- type VideoHandler
- type VideoServer
Constants ¶
This section is empty.
Variables ¶
var ( EmptyAuthNResp = &AuthNResponse{} EmptyInfoResp = &InfoResponse{} )
var Account_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Account", HandlerType: (*AccountServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Account_Create_Handler, }, { MethodName: "Authenticate", Handler: _Account_Authenticate_Handler, }, { MethodName: "GetUserInfo", Handler: _Account_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/account_service.proto", }
Account_ServiceDesc is the grpc.ServiceDesc for Account 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_account_service_proto protoreflect.FileDescriptor
var File_proto_video_service_proto protoreflect.FileDescriptor
var Video_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Video", HandlerType: (*VideoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Video_Create_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/video_service.proto", }
Video_ServiceDesc is the grpc.ServiceDesc for Video service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewRdbmsClient ¶
func NewRdbmsClient() *grpc.ClientConn
func RegisterAccountServer ¶
func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)
func RegisterVideoServer ¶
func RegisterVideoServer(s grpc.ServiceRegistrar, srv VideoServer)
Types ¶
type AccountClient ¶
type AccountClient interface { Create(ctx context.Context, in *AuthNRequest, opts ...grpc.CallOption) (*AuthNResponse, error) Authenticate(ctx context.Context, in *AuthNRequest, opts ...grpc.CallOption) (*AuthNResponse, error) GetUserInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) }
AccountClient is the client API for Account 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 NewAccountClient ¶
func NewAccountClient(cc grpc.ClientConnInterface) AccountClient
type AccountHandler ¶
type AccountHandler struct { UnimplementedAccountServer DB *gorm.DB }
func (*AccountHandler) Authenticate ¶
func (h *AccountHandler) Authenticate(ctx context.Context, req *AuthNRequest) (*AuthNResponse, error)
func (*AccountHandler) Create ¶
func (h *AccountHandler) Create(ctx context.Context, req *AuthNRequest) (*AuthNResponse, error)
func (*AccountHandler) GetUserInfo ¶
func (h *AccountHandler) GetUserInfo(ctx context.Context, in *InfoRequest) (*InfoResponse, error)
type AccountServer ¶
type AccountServer interface { Create(context.Context, *AuthNRequest) (*AuthNResponse, error) Authenticate(context.Context, *AuthNRequest) (*AuthNResponse, error) GetUserInfo(context.Context, *InfoRequest) (*InfoResponse, error) // contains filtered or unexported methods }
AccountServer is the server API for Account service. All implementations must embed UnimplementedAccountServer for forward compatibility
type AuthNRequest ¶
type AuthNRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*AuthNRequest) Descriptor
deprecated
func (*AuthNRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthNRequest.ProtoReflect.Descriptor instead.
func (*AuthNRequest) GetName ¶
func (x *AuthNRequest) GetName() string
func (*AuthNRequest) GetPassword ¶
func (x *AuthNRequest) GetPassword() string
func (*AuthNRequest) ProtoMessage ¶
func (*AuthNRequest) ProtoMessage()
func (*AuthNRequest) ProtoReflect ¶
func (x *AuthNRequest) ProtoReflect() protoreflect.Message
func (*AuthNRequest) Reset ¶
func (x *AuthNRequest) Reset()
func (*AuthNRequest) String ¶
func (x *AuthNRequest) String() string
type AuthNResponse ¶
type AuthNResponse struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*AuthNResponse) Descriptor
deprecated
func (*AuthNResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthNResponse.ProtoReflect.Descriptor instead.
func (*AuthNResponse) GetUserId ¶
func (x *AuthNResponse) GetUserId() uint64
func (*AuthNResponse) ProtoMessage ¶
func (*AuthNResponse) ProtoMessage()
func (*AuthNResponse) ProtoReflect ¶
func (x *AuthNResponse) ProtoReflect() protoreflect.Message
func (*AuthNResponse) Reset ¶
func (x *AuthNResponse) Reset()
func (*AuthNResponse) String ¶
func (x *AuthNResponse) String() string
type CreateVideoRequest ¶
type CreateVideoRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*CreateVideoRequest) Descriptor
deprecated
func (*CreateVideoRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateVideoRequest.ProtoReflect.Descriptor instead.
func (*CreateVideoRequest) GetTitle ¶
func (x *CreateVideoRequest) GetTitle() string
func (*CreateVideoRequest) GetUserId ¶
func (x *CreateVideoRequest) GetUserId() uint64
func (*CreateVideoRequest) ProtoMessage ¶
func (*CreateVideoRequest) ProtoMessage()
func (*CreateVideoRequest) ProtoReflect ¶
func (x *CreateVideoRequest) ProtoReflect() protoreflect.Message
func (*CreateVideoRequest) Reset ¶
func (x *CreateVideoRequest) Reset()
func (*CreateVideoRequest) String ¶
func (x *CreateVideoRequest) String() string
type CreateVideoResponse ¶
type CreateVideoResponse struct { ObjectId string `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` // contains filtered or unexported fields }
func (*CreateVideoResponse) Descriptor
deprecated
func (*CreateVideoResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateVideoResponse.ProtoReflect.Descriptor instead.
func (*CreateVideoResponse) GetObjectId ¶
func (x *CreateVideoResponse) GetObjectId() string
func (*CreateVideoResponse) ProtoMessage ¶
func (*CreateVideoResponse) ProtoMessage()
func (*CreateVideoResponse) ProtoReflect ¶
func (x *CreateVideoResponse) ProtoReflect() protoreflect.Message
func (*CreateVideoResponse) Reset ¶
func (x *CreateVideoResponse) Reset()
func (*CreateVideoResponse) String ¶
func (x *CreateVideoResponse) String() string
type InfoRequest ¶
type InfoRequest struct { SignInUserId uint64 `protobuf:"varint,1,opt,name=sign_in_user_id,json=signInUserId,proto3" json:"sign_in_user_id,omitempty"` UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) GetSignInUserId ¶
func (x *InfoRequest) GetSignInUserId() uint64
func (*InfoRequest) GetUserId ¶
func (x *InfoRequest) GetUserId() uint64
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type InfoResponse ¶
type InfoResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` FollowCount uint64 `protobuf:"varint,2,opt,name=follow_count,json=followCount,proto3" json:"follow_count,omitempty"` FollowerCount uint64 `protobuf:"varint,3,opt,name=follower_count,json=followerCount,proto3" json:"follower_count,omitempty"` IsFollow bool `protobuf:"varint,4,opt,name=is_follow,json=isFollow,proto3" json:"is_follow,omitempty"` // contains filtered or unexported fields }
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetFollowCount ¶
func (x *InfoResponse) GetFollowCount() uint64
func (*InfoResponse) GetFollowerCount ¶
func (x *InfoResponse) GetFollowerCount() uint64
func (*InfoResponse) GetIsFollow ¶
func (x *InfoResponse) GetIsFollow() bool
func (*InfoResponse) GetName ¶
func (x *InfoResponse) GetName() string
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
type UnimplementedAccountServer ¶
type UnimplementedAccountServer struct { }
UnimplementedAccountServer must be embedded to have forward compatible implementations.
func (UnimplementedAccountServer) Authenticate ¶
func (UnimplementedAccountServer) Authenticate(context.Context, *AuthNRequest) (*AuthNResponse, error)
func (UnimplementedAccountServer) Create ¶
func (UnimplementedAccountServer) Create(context.Context, *AuthNRequest) (*AuthNResponse, error)
func (UnimplementedAccountServer) GetUserInfo ¶
func (UnimplementedAccountServer) GetUserInfo(context.Context, *InfoRequest) (*InfoResponse, error)
type UnimplementedVideoServer ¶
type UnimplementedVideoServer struct { }
UnimplementedVideoServer must be embedded to have forward compatible implementations.
func (UnimplementedVideoServer) Create ¶
func (UnimplementedVideoServer) Create(context.Context, *CreateVideoRequest) (*CreateVideoResponse, error)
type UnsafeAccountServer ¶
type UnsafeAccountServer interface {
// contains filtered or unexported methods
}
UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccountServer will result in compilation errors.
type UnsafeVideoServer ¶
type UnsafeVideoServer interface {
// contains filtered or unexported methods
}
UnsafeVideoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VideoServer will result in compilation errors.
type VideoClient ¶
type VideoClient interface {
Create(ctx context.Context, in *CreateVideoRequest, opts ...grpc.CallOption) (*CreateVideoResponse, error)
}
VideoClient is the client API for Video 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 NewVideoClient ¶
func NewVideoClient(cc grpc.ClientConnInterface) VideoClient
type VideoHandler ¶
type VideoHandler struct { UnimplementedVideoServer DB *gorm.DB }
func (*VideoHandler) Create ¶
func (h *VideoHandler) Create(ctx context.Context, req *CreateVideoRequest) (*CreateVideoResponse, error)
type VideoServer ¶
type VideoServer interface { Create(context.Context, *CreateVideoRequest) (*CreateVideoResponse, error) // contains filtered or unexported methods }
VideoServer is the server API for Video service. All implementations must embed UnimplementedVideoServer for forward compatibility