Documentation ¶
Index ¶
- Variables
- func RegisterVideoServiceServer(s grpc.ServiceRegistrar, srv VideoServiceServer)
- type GetVideosReq
- func (*GetVideosReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetVideosReq) GetLiked() int64
- func (x *GetVideosReq) GetShared() int64
- func (x *GetVideosReq) GetTitle() string
- func (x *GetVideosReq) GetYear() int64
- func (*GetVideosReq) ProtoMessage()
- func (x *GetVideosReq) ProtoReflect() protoreflect.Message
- func (x *GetVideosReq) Reset()
- func (x *GetVideosReq) String() string
- func (m *GetVideosReq) Validate() error
- func (m *GetVideosReq) ValidateAll() error
- type GetVideosReqMultiError
- type GetVideosReqValidationError
- func (e GetVideosReqValidationError) Cause() error
- func (e GetVideosReqValidationError) Error() string
- func (e GetVideosReqValidationError) ErrorName() string
- func (e GetVideosReqValidationError) Field() string
- func (e GetVideosReqValidationError) Key() bool
- func (e GetVideosReqValidationError) Reason() string
- type GetVideosResp
- func (*GetVideosResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetVideosResp) GetVideos() []*Video
- func (*GetVideosResp) ProtoMessage()
- func (x *GetVideosResp) ProtoReflect() protoreflect.Message
- func (x *GetVideosResp) Reset()
- func (x *GetVideosResp) String() string
- func (m *GetVideosResp) Validate() error
- func (m *GetVideosResp) ValidateAll() error
- type GetVideosRespMultiError
- type GetVideosRespValidationError
- func (e GetVideosRespValidationError) Cause() error
- func (e GetVideosRespValidationError) Error() string
- func (e GetVideosRespValidationError) ErrorName() string
- func (e GetVideosRespValidationError) Field() string
- func (e GetVideosRespValidationError) Key() bool
- func (e GetVideosRespValidationError) Reason() string
- type JudgeReq
- func (*JudgeReq) Descriptor() ([]byte, []int)deprecated
- func (x *JudgeReq) GetAdminId() int64
- func (x *JudgeReq) GetPassed() bool
- func (x *JudgeReq) GetReason() string
- func (x *JudgeReq) GetVideoId() int64
- func (*JudgeReq) ProtoMessage()
- func (x *JudgeReq) ProtoReflect() protoreflect.Message
- func (x *JudgeReq) Reset()
- func (x *JudgeReq) String() string
- func (m *JudgeReq) Validate() error
- func (m *JudgeReq) ValidateAll() error
- type JudgeReqMultiError
- type JudgeReqValidationError
- type JudgeResp
- func (*JudgeResp) Descriptor() ([]byte, []int)deprecated
- func (x *JudgeResp) GetVideo() *Video
- func (*JudgeResp) ProtoMessage()
- func (x *JudgeResp) ProtoReflect() protoreflect.Message
- func (x *JudgeResp) Reset()
- func (x *JudgeResp) String() string
- func (m *JudgeResp) Validate() error
- func (m *JudgeResp) ValidateAll() error
- type JudgeRespMultiError
- type JudgeRespValidationError
- type LikeReq
- func (*LikeReq) Descriptor() ([]byte, []int)deprecated
- func (x *LikeReq) GetUserId() int64
- func (x *LikeReq) GetVideoId() int64
- func (*LikeReq) ProtoMessage()
- func (x *LikeReq) ProtoReflect() protoreflect.Message
- func (x *LikeReq) Reset()
- func (x *LikeReq) String() string
- func (m *LikeReq) Validate() error
- func (m *LikeReq) ValidateAll() error
- type LikeReqMultiError
- type LikeReqValidationError
- type LikeResp
- type LikeRespMultiError
- type LikeRespValidationError
- type ShareReq
- func (*ShareReq) Descriptor() ([]byte, []int)deprecated
- func (x *ShareReq) GetUserId() int64
- func (x *ShareReq) GetVideoId() int64
- func (*ShareReq) ProtoMessage()
- func (x *ShareReq) ProtoReflect() protoreflect.Message
- func (x *ShareReq) Reset()
- func (x *ShareReq) String() string
- func (m *ShareReq) Validate() error
- func (m *ShareReq) ValidateAll() error
- type ShareReqMultiError
- type ShareReqValidationError
- type ShareResp
- func (*ShareResp) Descriptor() ([]byte, []int)deprecated
- func (x *ShareResp) GetShareUrl() string
- func (*ShareResp) ProtoMessage()
- func (x *ShareResp) ProtoReflect() protoreflect.Message
- func (x *ShareResp) Reset()
- func (x *ShareResp) String() string
- func (m *ShareResp) Validate() error
- func (m *ShareResp) ValidateAll() error
- type ShareRespMultiError
- type ShareRespValidationError
- type UnimplementedVideoServiceServer
- func (UnimplementedVideoServiceServer) GetVideos(context.Context, *GetVideosReq) (*GetVideosResp, error)
- func (UnimplementedVideoServiceServer) Judge(context.Context, *JudgeReq) (*JudgeResp, error)
- func (UnimplementedVideoServiceServer) Like(context.Context, *LikeReq) (*LikeResp, error)
- func (UnimplementedVideoServiceServer) Share(context.Context, *ShareReq) (*ShareResp, error)
- func (UnimplementedVideoServiceServer) Upload(context.Context, *UploadReq) (*UploadResp, error)
- func (UnimplementedVideoServiceServer) View(context.Context, *ViewReq) (*ViewResp, error)
- type UnsafeVideoServiceServer
- type UploadReq
- func (*UploadReq) Descriptor() ([]byte, []int)deprecated
- func (x *UploadReq) GetDescription() string
- func (x *UploadReq) GetTitle() string
- func (x *UploadReq) GetUserId() int64
- func (x *UploadReq) GetVideo() []byte
- func (x *UploadReq) GetYear() int64
- func (*UploadReq) ProtoMessage()
- func (x *UploadReq) ProtoReflect() protoreflect.Message
- func (x *UploadReq) Reset()
- func (x *UploadReq) String() string
- func (m *UploadReq) Validate() error
- func (m *UploadReq) ValidateAll() error
- type UploadReqMultiError
- type UploadReqValidationError
- type UploadResp
- func (*UploadResp) Descriptor() ([]byte, []int)deprecated
- func (x *UploadResp) GetVideo() *Video
- func (*UploadResp) ProtoMessage()
- func (x *UploadResp) ProtoReflect() protoreflect.Message
- func (x *UploadResp) Reset()
- func (x *UploadResp) String() string
- func (m *UploadResp) Validate() error
- func (m *UploadResp) ValidateAll() error
- type UploadRespMultiError
- type UploadRespValidationError
- type Video
- func (*Video) Descriptor() ([]byte, []int)deprecated
- func (x *Video) GetDescription() string
- func (x *Video) GetLiked() int64
- func (x *Video) GetPassed() bool
- func (x *Video) GetReason() string
- func (x *Video) GetShared() int64
- func (x *Video) GetTitle() string
- func (x *Video) GetUserId() int64
- func (x *Video) GetVideoId() int64
- func (x *Video) GetVideoUrl() string
- func (x *Video) GetYear() int64
- func (*Video) ProtoMessage()
- func (x *Video) ProtoReflect() protoreflect.Message
- func (x *Video) Reset()
- func (x *Video) String() string
- func (m *Video) Validate() error
- func (m *Video) ValidateAll() error
- type VideoMultiError
- type VideoServiceClient
- type VideoServiceServer
- type VideoValidationError
- type ViewReq
- func (*ViewReq) Descriptor() ([]byte, []int)deprecated
- func (x *ViewReq) GetFilename() string
- func (*ViewReq) ProtoMessage()
- func (x *ViewReq) ProtoReflect() protoreflect.Message
- func (x *ViewReq) Reset()
- func (x *ViewReq) String() string
- func (m *ViewReq) Validate() error
- func (m *ViewReq) ValidateAll() error
- type ViewReqMultiError
- type ViewReqValidationError
- type ViewResp
- type ViewRespMultiError
- type ViewRespValidationError
Constants ¶
This section is empty.
Variables ¶
var File_video_proto protoreflect.FileDescriptor
var VideoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.VideoService", HandlerType: (*VideoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Upload", Handler: _VideoService_Upload_Handler, }, { MethodName: "Like", Handler: _VideoService_Like_Handler, }, { MethodName: "Share", Handler: _VideoService_Share_Handler, }, { MethodName: "Judge", Handler: _VideoService_Judge_Handler, }, { MethodName: "View", Handler: _VideoService_View_Handler, }, { MethodName: "GetVideos", Handler: _VideoService_GetVideos_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "video.proto", }
VideoService_ServiceDesc is the grpc.ServiceDesc for VideoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVideoServiceServer ¶
func RegisterVideoServiceServer(s grpc.ServiceRegistrar, srv VideoServiceServer)
Types ¶
type GetVideosReq ¶
type GetVideosReq struct { Year int64 `protobuf:"varint,1,opt,name=year,proto3" json:"year" form:"year"` // @gotags: json:"year" form:"year" Liked int64 `protobuf:"varint,2,opt,name=liked,proto3" json:"liked" form:"liked"` // @gotags: json:"liked" form:"liked" Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title" form:"title"` // @gotags: json:"title" form:"title" // contains filtered or unexported fields }
func (*GetVideosReq) Descriptor
deprecated
func (*GetVideosReq) Descriptor() ([]byte, []int)
Deprecated: Use GetVideosReq.ProtoReflect.Descriptor instead.
func (*GetVideosReq) GetLiked ¶
func (x *GetVideosReq) GetLiked() int64
func (*GetVideosReq) GetShared ¶
func (x *GetVideosReq) GetShared() int64
func (*GetVideosReq) GetTitle ¶
func (x *GetVideosReq) GetTitle() string
func (*GetVideosReq) GetYear ¶
func (x *GetVideosReq) GetYear() int64
func (*GetVideosReq) ProtoMessage ¶
func (*GetVideosReq) ProtoMessage()
func (*GetVideosReq) ProtoReflect ¶
func (x *GetVideosReq) ProtoReflect() protoreflect.Message
func (*GetVideosReq) Reset ¶
func (x *GetVideosReq) Reset()
func (*GetVideosReq) String ¶
func (x *GetVideosReq) String() string
func (*GetVideosReq) Validate ¶
func (m *GetVideosReq) Validate() error
Validate checks the field values on GetVideosReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetVideosReq) ValidateAll ¶
func (m *GetVideosReq) ValidateAll() error
ValidateAll checks the field values on GetVideosReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetVideosReqMultiError, or nil if none found.
type GetVideosReqMultiError ¶
type GetVideosReqMultiError []error
GetVideosReqMultiError is an error wrapping multiple validation errors returned by GetVideosReq.ValidateAll() if the designated constraints aren't met.
func (GetVideosReqMultiError) AllErrors ¶
func (m GetVideosReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetVideosReqMultiError) Error ¶
func (m GetVideosReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetVideosReqValidationError ¶
type GetVideosReqValidationError struct {
// contains filtered or unexported fields
}
GetVideosReqValidationError is the validation error returned by GetVideosReq.Validate if the designated constraints aren't met.
func (GetVideosReqValidationError) Cause ¶
func (e GetVideosReqValidationError) Cause() error
Cause function returns cause value.
func (GetVideosReqValidationError) Error ¶
func (e GetVideosReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetVideosReqValidationError) ErrorName ¶
func (e GetVideosReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetVideosReqValidationError) Field ¶
func (e GetVideosReqValidationError) Field() string
Field function returns field value.
func (GetVideosReqValidationError) Key ¶
func (e GetVideosReqValidationError) Key() bool
Key function returns key value.
func (GetVideosReqValidationError) Reason ¶
func (e GetVideosReqValidationError) Reason() string
Reason function returns reason value.
type GetVideosResp ¶
type GetVideosResp struct { Videos []*Video `protobuf:"bytes,1,rep,name=videos,proto3" json:"videos,omitempty"` // contains filtered or unexported fields }
func (*GetVideosResp) Descriptor
deprecated
func (*GetVideosResp) Descriptor() ([]byte, []int)
Deprecated: Use GetVideosResp.ProtoReflect.Descriptor instead.
func (*GetVideosResp) GetVideos ¶
func (x *GetVideosResp) GetVideos() []*Video
func (*GetVideosResp) ProtoMessage ¶
func (*GetVideosResp) ProtoMessage()
func (*GetVideosResp) ProtoReflect ¶
func (x *GetVideosResp) ProtoReflect() protoreflect.Message
func (*GetVideosResp) Reset ¶
func (x *GetVideosResp) Reset()
func (*GetVideosResp) String ¶
func (x *GetVideosResp) String() string
func (*GetVideosResp) Validate ¶
func (m *GetVideosResp) Validate() error
Validate checks the field values on GetVideosResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetVideosResp) ValidateAll ¶
func (m *GetVideosResp) ValidateAll() error
ValidateAll checks the field values on GetVideosResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetVideosRespMultiError, or nil if none found.
type GetVideosRespMultiError ¶
type GetVideosRespMultiError []error
GetVideosRespMultiError is an error wrapping multiple validation errors returned by GetVideosResp.ValidateAll() if the designated constraints aren't met.
func (GetVideosRespMultiError) AllErrors ¶
func (m GetVideosRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetVideosRespMultiError) Error ¶
func (m GetVideosRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetVideosRespValidationError ¶
type GetVideosRespValidationError struct {
// contains filtered or unexported fields
}
GetVideosRespValidationError is the validation error returned by GetVideosResp.Validate if the designated constraints aren't met.
func (GetVideosRespValidationError) Cause ¶
func (e GetVideosRespValidationError) Cause() error
Cause function returns cause value.
func (GetVideosRespValidationError) Error ¶
func (e GetVideosRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetVideosRespValidationError) ErrorName ¶
func (e GetVideosRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetVideosRespValidationError) Field ¶
func (e GetVideosRespValidationError) Field() string
Field function returns field value.
func (GetVideosRespValidationError) Key ¶
func (e GetVideosRespValidationError) Key() bool
Key function returns key value.
func (GetVideosRespValidationError) Reason ¶
func (e GetVideosRespValidationError) Reason() string
Reason function returns reason value.
type JudgeReq ¶
type JudgeReq struct { AdminId int64 `protobuf:"varint,1,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"` VideoId int64 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id" form:"video_id" binding:"required"` // @gotags: json:"video_id" form:"video_id" binding:"required" Passed bool `protobuf:"varint,3,opt,name=passed,proto3" json:"passed" form:"passed" binding:"required"` // @gotags: json:"passed" form:"passed" binding:"required" Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason" form:"reason"` // @gotags: json:"reason" form:"reason" // contains filtered or unexported fields }
func (*JudgeReq) Descriptor
deprecated
func (*JudgeReq) GetAdminId ¶
func (*JudgeReq) GetVideoId ¶
func (*JudgeReq) ProtoMessage ¶
func (*JudgeReq) ProtoMessage()
func (*JudgeReq) ProtoReflect ¶
func (x *JudgeReq) ProtoReflect() protoreflect.Message
func (*JudgeReq) Validate ¶
Validate checks the field values on JudgeReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*JudgeReq) ValidateAll ¶
ValidateAll checks the field values on JudgeReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in JudgeReqMultiError, or nil if none found.
type JudgeReqMultiError ¶
type JudgeReqMultiError []error
JudgeReqMultiError is an error wrapping multiple validation errors returned by JudgeReq.ValidateAll() if the designated constraints aren't met.
func (JudgeReqMultiError) AllErrors ¶
func (m JudgeReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (JudgeReqMultiError) Error ¶
func (m JudgeReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type JudgeReqValidationError ¶
type JudgeReqValidationError struct {
// contains filtered or unexported fields
}
JudgeReqValidationError is the validation error returned by JudgeReq.Validate if the designated constraints aren't met.
func (JudgeReqValidationError) Cause ¶
func (e JudgeReqValidationError) Cause() error
Cause function returns cause value.
func (JudgeReqValidationError) Error ¶
func (e JudgeReqValidationError) Error() string
Error satisfies the builtin error interface
func (JudgeReqValidationError) ErrorName ¶
func (e JudgeReqValidationError) ErrorName() string
ErrorName returns error name.
func (JudgeReqValidationError) Field ¶
func (e JudgeReqValidationError) Field() string
Field function returns field value.
func (JudgeReqValidationError) Key ¶
func (e JudgeReqValidationError) Key() bool
Key function returns key value.
func (JudgeReqValidationError) Reason ¶
func (e JudgeReqValidationError) Reason() string
Reason function returns reason value.
type JudgeResp ¶
type JudgeResp struct { Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"` // contains filtered or unexported fields }
func (*JudgeResp) Descriptor
deprecated
func (*JudgeResp) ProtoMessage ¶
func (*JudgeResp) ProtoMessage()
func (*JudgeResp) ProtoReflect ¶
func (x *JudgeResp) ProtoReflect() protoreflect.Message
func (*JudgeResp) Validate ¶
Validate checks the field values on JudgeResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*JudgeResp) ValidateAll ¶
ValidateAll checks the field values on JudgeResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in JudgeRespMultiError, or nil if none found.
type JudgeRespMultiError ¶
type JudgeRespMultiError []error
JudgeRespMultiError is an error wrapping multiple validation errors returned by JudgeResp.ValidateAll() if the designated constraints aren't met.
func (JudgeRespMultiError) AllErrors ¶
func (m JudgeRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (JudgeRespMultiError) Error ¶
func (m JudgeRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type JudgeRespValidationError ¶
type JudgeRespValidationError struct {
// contains filtered or unexported fields
}
JudgeRespValidationError is the validation error returned by JudgeResp.Validate if the designated constraints aren't met.
func (JudgeRespValidationError) Cause ¶
func (e JudgeRespValidationError) Cause() error
Cause function returns cause value.
func (JudgeRespValidationError) Error ¶
func (e JudgeRespValidationError) Error() string
Error satisfies the builtin error interface
func (JudgeRespValidationError) ErrorName ¶
func (e JudgeRespValidationError) ErrorName() string
ErrorName returns error name.
func (JudgeRespValidationError) Field ¶
func (e JudgeRespValidationError) Field() string
Field function returns field value.
func (JudgeRespValidationError) Key ¶
func (e JudgeRespValidationError) Key() bool
Key function returns key value.
func (JudgeRespValidationError) Reason ¶
func (e JudgeRespValidationError) Reason() string
Reason function returns reason value.
type LikeReq ¶
type LikeReq struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` VideoId int64 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id" form:"video_id" binding:"required"` // @gotags: json:"video_id" form:"video_id" binding:"required" // contains filtered or unexported fields }
func (*LikeReq) Descriptor
deprecated
func (*LikeReq) GetVideoId ¶
func (*LikeReq) ProtoMessage ¶
func (*LikeReq) ProtoMessage()
func (*LikeReq) ProtoReflect ¶
func (x *LikeReq) ProtoReflect() protoreflect.Message
func (*LikeReq) Validate ¶
Validate checks the field values on LikeReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LikeReq) ValidateAll ¶
ValidateAll checks the field values on LikeReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LikeReqMultiError, or nil if none found.
type LikeReqMultiError ¶
type LikeReqMultiError []error
LikeReqMultiError is an error wrapping multiple validation errors returned by LikeReq.ValidateAll() if the designated constraints aren't met.
func (LikeReqMultiError) AllErrors ¶
func (m LikeReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LikeReqMultiError) Error ¶
func (m LikeReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LikeReqValidationError ¶
type LikeReqValidationError struct {
// contains filtered or unexported fields
}
LikeReqValidationError is the validation error returned by LikeReq.Validate if the designated constraints aren't met.
func (LikeReqValidationError) Cause ¶
func (e LikeReqValidationError) Cause() error
Cause function returns cause value.
func (LikeReqValidationError) Error ¶
func (e LikeReqValidationError) Error() string
Error satisfies the builtin error interface
func (LikeReqValidationError) ErrorName ¶
func (e LikeReqValidationError) ErrorName() string
ErrorName returns error name.
func (LikeReqValidationError) Field ¶
func (e LikeReqValidationError) Field() string
Field function returns field value.
func (LikeReqValidationError) Key ¶
func (e LikeReqValidationError) Key() bool
Key function returns key value.
func (LikeReqValidationError) Reason ¶
func (e LikeReqValidationError) Reason() string
Reason function returns reason value.
type LikeResp ¶
type LikeResp struct {
// contains filtered or unexported fields
}
func (*LikeResp) Descriptor
deprecated
func (*LikeResp) ProtoMessage ¶
func (*LikeResp) ProtoMessage()
func (*LikeResp) ProtoReflect ¶
func (x *LikeResp) ProtoReflect() protoreflect.Message
func (*LikeResp) Validate ¶
Validate checks the field values on LikeResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LikeResp) ValidateAll ¶
ValidateAll checks the field values on LikeResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LikeRespMultiError, or nil if none found.
type LikeRespMultiError ¶
type LikeRespMultiError []error
LikeRespMultiError is an error wrapping multiple validation errors returned by LikeResp.ValidateAll() if the designated constraints aren't met.
func (LikeRespMultiError) AllErrors ¶
func (m LikeRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LikeRespMultiError) Error ¶
func (m LikeRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LikeRespValidationError ¶
type LikeRespValidationError struct {
// contains filtered or unexported fields
}
LikeRespValidationError is the validation error returned by LikeResp.Validate if the designated constraints aren't met.
func (LikeRespValidationError) Cause ¶
func (e LikeRespValidationError) Cause() error
Cause function returns cause value.
func (LikeRespValidationError) Error ¶
func (e LikeRespValidationError) Error() string
Error satisfies the builtin error interface
func (LikeRespValidationError) ErrorName ¶
func (e LikeRespValidationError) ErrorName() string
ErrorName returns error name.
func (LikeRespValidationError) Field ¶
func (e LikeRespValidationError) Field() string
Field function returns field value.
func (LikeRespValidationError) Key ¶
func (e LikeRespValidationError) Key() bool
Key function returns key value.
func (LikeRespValidationError) Reason ¶
func (e LikeRespValidationError) Reason() string
Reason function returns reason value.
type ShareReq ¶
type ShareReq struct { // contains filtered or unexported fields }
func (*ShareReq) Descriptor
deprecated
func (*ShareReq) GetVideoId ¶
func (*ShareReq) ProtoMessage ¶
func (*ShareReq) ProtoMessage()
func (*ShareReq) ProtoReflect ¶
func (x *ShareReq) ProtoReflect() protoreflect.Message
func (*ShareReq) Validate ¶
Validate checks the field values on ShareReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ShareReq) ValidateAll ¶
ValidateAll checks the field values on ShareReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ShareReqMultiError, or nil if none found.
type ShareReqMultiError ¶
type ShareReqMultiError []error
ShareReqMultiError is an error wrapping multiple validation errors returned by ShareReq.ValidateAll() if the designated constraints aren't met.
func (ShareReqMultiError) AllErrors ¶
func (m ShareReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ShareReqMultiError) Error ¶
func (m ShareReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ShareReqValidationError ¶
type ShareReqValidationError struct {
// contains filtered or unexported fields
}
ShareReqValidationError is the validation error returned by ShareReq.Validate if the designated constraints aren't met.
func (ShareReqValidationError) Cause ¶
func (e ShareReqValidationError) Cause() error
Cause function returns cause value.
func (ShareReqValidationError) Error ¶
func (e ShareReqValidationError) Error() string
Error satisfies the builtin error interface
func (ShareReqValidationError) ErrorName ¶
func (e ShareReqValidationError) ErrorName() string
ErrorName returns error name.
func (ShareReqValidationError) Field ¶
func (e ShareReqValidationError) Field() string
Field function returns field value.
func (ShareReqValidationError) Key ¶
func (e ShareReqValidationError) Key() bool
Key function returns key value.
func (ShareReqValidationError) Reason ¶
func (e ShareReqValidationError) Reason() string
Reason function returns reason value.
type ShareResp ¶
type ShareResp struct { // contains filtered or unexported fields }
func (*ShareResp) Descriptor
deprecated
func (*ShareResp) GetShareUrl ¶
func (*ShareResp) ProtoMessage ¶
func (*ShareResp) ProtoMessage()
func (*ShareResp) ProtoReflect ¶
func (x *ShareResp) ProtoReflect() protoreflect.Message
func (*ShareResp) Validate ¶
Validate checks the field values on ShareResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ShareResp) ValidateAll ¶
ValidateAll checks the field values on ShareResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ShareRespMultiError, or nil if none found.
type ShareRespMultiError ¶
type ShareRespMultiError []error
ShareRespMultiError is an error wrapping multiple validation errors returned by ShareResp.ValidateAll() if the designated constraints aren't met.
func (ShareRespMultiError) AllErrors ¶
func (m ShareRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ShareRespMultiError) Error ¶
func (m ShareRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ShareRespValidationError ¶
type ShareRespValidationError struct {
// contains filtered or unexported fields
}
ShareRespValidationError is the validation error returned by ShareResp.Validate if the designated constraints aren't met.
func (ShareRespValidationError) Cause ¶
func (e ShareRespValidationError) Cause() error
Cause function returns cause value.
func (ShareRespValidationError) Error ¶
func (e ShareRespValidationError) Error() string
Error satisfies the builtin error interface
func (ShareRespValidationError) ErrorName ¶
func (e ShareRespValidationError) ErrorName() string
ErrorName returns error name.
func (ShareRespValidationError) Field ¶
func (e ShareRespValidationError) Field() string
Field function returns field value.
func (ShareRespValidationError) Key ¶
func (e ShareRespValidationError) Key() bool
Key function returns key value.
func (ShareRespValidationError) Reason ¶
func (e ShareRespValidationError) Reason() string
Reason function returns reason value.
type UnimplementedVideoServiceServer ¶
type UnimplementedVideoServiceServer struct { }
UnimplementedVideoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedVideoServiceServer) GetVideos ¶
func (UnimplementedVideoServiceServer) GetVideos(context.Context, *GetVideosReq) (*GetVideosResp, error)
func (UnimplementedVideoServiceServer) Upload ¶
func (UnimplementedVideoServiceServer) Upload(context.Context, *UploadReq) (*UploadResp, error)
type UnsafeVideoServiceServer ¶
type UnsafeVideoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVideoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VideoServiceServer will result in compilation errors.
type UploadReq ¶
type UploadReq struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Video []byte `protobuf:"bytes,2,opt,name=video,proto3" json:"video,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title" form:"title" binding:"required"` // @gotags: json:"title" form:"title" binding:"required" Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description" form:"description" binding:"required"` // @gotags: json:"description" form:"description" binding:"required" Year int64 `protobuf:"varint,5,opt,name=year,proto3" json:"year" form:"year" binding:"required"` // @gotags: json:"year" form:"year" binding:"required" // contains filtered or unexported fields }
func (*UploadReq) Descriptor
deprecated
func (*UploadReq) GetDescription ¶
func (*UploadReq) ProtoMessage ¶
func (*UploadReq) ProtoMessage()
func (*UploadReq) ProtoReflect ¶
func (x *UploadReq) ProtoReflect() protoreflect.Message
func (*UploadReq) Validate ¶
Validate checks the field values on UploadReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UploadReq) ValidateAll ¶
ValidateAll checks the field values on UploadReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadReqMultiError, or nil if none found.
type UploadReqMultiError ¶
type UploadReqMultiError []error
UploadReqMultiError is an error wrapping multiple validation errors returned by UploadReq.ValidateAll() if the designated constraints aren't met.
func (UploadReqMultiError) AllErrors ¶
func (m UploadReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UploadReqMultiError) Error ¶
func (m UploadReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UploadReqValidationError ¶
type UploadReqValidationError struct {
// contains filtered or unexported fields
}
UploadReqValidationError is the validation error returned by UploadReq.Validate if the designated constraints aren't met.
func (UploadReqValidationError) Cause ¶
func (e UploadReqValidationError) Cause() error
Cause function returns cause value.
func (UploadReqValidationError) Error ¶
func (e UploadReqValidationError) Error() string
Error satisfies the builtin error interface
func (UploadReqValidationError) ErrorName ¶
func (e UploadReqValidationError) ErrorName() string
ErrorName returns error name.
func (UploadReqValidationError) Field ¶
func (e UploadReqValidationError) Field() string
Field function returns field value.
func (UploadReqValidationError) Key ¶
func (e UploadReqValidationError) Key() bool
Key function returns key value.
func (UploadReqValidationError) Reason ¶
func (e UploadReqValidationError) Reason() string
Reason function returns reason value.
type UploadResp ¶
type UploadResp struct { Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"` // contains filtered or unexported fields }
func (*UploadResp) Descriptor
deprecated
func (*UploadResp) Descriptor() ([]byte, []int)
Deprecated: Use UploadResp.ProtoReflect.Descriptor instead.
func (*UploadResp) GetVideo ¶
func (x *UploadResp) GetVideo() *Video
func (*UploadResp) ProtoMessage ¶
func (*UploadResp) ProtoMessage()
func (*UploadResp) ProtoReflect ¶
func (x *UploadResp) ProtoReflect() protoreflect.Message
func (*UploadResp) Reset ¶
func (x *UploadResp) Reset()
func (*UploadResp) String ¶
func (x *UploadResp) String() string
func (*UploadResp) Validate ¶
func (m *UploadResp) Validate() error
Validate checks the field values on UploadResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UploadResp) ValidateAll ¶
func (m *UploadResp) ValidateAll() error
ValidateAll checks the field values on UploadResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UploadRespMultiError, or nil if none found.
type UploadRespMultiError ¶
type UploadRespMultiError []error
UploadRespMultiError is an error wrapping multiple validation errors returned by UploadResp.ValidateAll() if the designated constraints aren't met.
func (UploadRespMultiError) AllErrors ¶
func (m UploadRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UploadRespMultiError) Error ¶
func (m UploadRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UploadRespValidationError ¶
type UploadRespValidationError struct {
// contains filtered or unexported fields
}
UploadRespValidationError is the validation error returned by UploadResp.Validate if the designated constraints aren't met.
func (UploadRespValidationError) Cause ¶
func (e UploadRespValidationError) Cause() error
Cause function returns cause value.
func (UploadRespValidationError) Error ¶
func (e UploadRespValidationError) Error() string
Error satisfies the builtin error interface
func (UploadRespValidationError) ErrorName ¶
func (e UploadRespValidationError) ErrorName() string
ErrorName returns error name.
func (UploadRespValidationError) Field ¶
func (e UploadRespValidationError) Field() string
Field function returns field value.
func (UploadRespValidationError) Key ¶
func (e UploadRespValidationError) Key() bool
Key function returns key value.
func (UploadRespValidationError) Reason ¶
func (e UploadRespValidationError) Reason() string
Reason function returns reason value.
type Video ¶
type Video struct { UserId int64 `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"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Liked int64 `protobuf:"varint,4,opt,name=liked,proto3" json:"liked,omitempty"` VideoId int64 `protobuf:"varint,6,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` VideoUrl string `protobuf:"bytes,7,opt,name=video_url,json=videoUrl,proto3" json:"video_url,omitempty"` Passed bool `protobuf:"varint,8,opt,name=passed,proto3" json:"passed,omitempty"` Reason string `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"` Year int64 `protobuf:"varint,10,opt,name=year,proto3" json:"year,omitempty"` // contains filtered or unexported fields }
func (*Video) Descriptor
deprecated
func (*Video) GetDescription ¶
func (*Video) GetVideoId ¶
func (*Video) GetVideoUrl ¶
func (*Video) ProtoMessage ¶
func (*Video) ProtoMessage()
func (*Video) ProtoReflect ¶
func (x *Video) ProtoReflect() protoreflect.Message
func (*Video) Validate ¶
Validate checks the field values on Video with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Video) ValidateAll ¶
ValidateAll checks the field values on Video with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VideoMultiError, or nil if none found.
type VideoMultiError ¶
type VideoMultiError []error
VideoMultiError is an error wrapping multiple validation errors returned by Video.ValidateAll() if the designated constraints aren't met.
func (VideoMultiError) AllErrors ¶
func (m VideoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VideoMultiError) Error ¶
func (m VideoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VideoServiceClient ¶
type VideoServiceClient interface { Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (*UploadResp, error) Like(ctx context.Context, in *LikeReq, opts ...grpc.CallOption) (*LikeResp, error) Judge(ctx context.Context, in *JudgeReq, opts ...grpc.CallOption) (*JudgeResp, error) View(ctx context.Context, in *ViewReq, opts ...grpc.CallOption) (*ViewResp, error) GetVideos(ctx context.Context, in *GetVideosReq, opts ...grpc.CallOption) (*GetVideosResp, error) }
VideoServiceClient is the client API for VideoService 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 NewVideoServiceClient ¶
func NewVideoServiceClient(cc grpc.ClientConnInterface) VideoServiceClient
type VideoServiceServer ¶
type VideoServiceServer interface { Upload(context.Context, *UploadReq) (*UploadResp, error) Like(context.Context, *LikeReq) (*LikeResp, error) Judge(context.Context, *JudgeReq) (*JudgeResp, error) View(context.Context, *ViewReq) (*ViewResp, error) GetVideos(context.Context, *GetVideosReq) (*GetVideosResp, error) // contains filtered or unexported methods }
VideoServiceServer is the server API for VideoService service. All implementations must embed UnimplementedVideoServiceServer for forward compatibility
type VideoValidationError ¶
type VideoValidationError struct {
// contains filtered or unexported fields
}
VideoValidationError is the validation error returned by Video.Validate if the designated constraints aren't met.
func (VideoValidationError) Cause ¶
func (e VideoValidationError) Cause() error
Cause function returns cause value.
func (VideoValidationError) Error ¶
func (e VideoValidationError) Error() string
Error satisfies the builtin error interface
func (VideoValidationError) ErrorName ¶
func (e VideoValidationError) ErrorName() string
ErrorName returns error name.
func (VideoValidationError) Field ¶
func (e VideoValidationError) Field() string
Field function returns field value.
func (VideoValidationError) Key ¶
func (e VideoValidationError) Key() bool
Key function returns key value.
func (VideoValidationError) Reason ¶
func (e VideoValidationError) Reason() string
Reason function returns reason value.
type ViewReq ¶
type ViewReq struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // contains filtered or unexported fields }
func (*ViewReq) Descriptor
deprecated
func (*ViewReq) GetFilename ¶
func (*ViewReq) ProtoMessage ¶
func (*ViewReq) ProtoMessage()
func (*ViewReq) ProtoReflect ¶
func (x *ViewReq) ProtoReflect() protoreflect.Message
func (*ViewReq) Validate ¶
Validate checks the field values on ViewReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ViewReq) ValidateAll ¶
ValidateAll checks the field values on ViewReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ViewReqMultiError, or nil if none found.
type ViewReqMultiError ¶
type ViewReqMultiError []error
ViewReqMultiError is an error wrapping multiple validation errors returned by ViewReq.ValidateAll() if the designated constraints aren't met.
func (ViewReqMultiError) AllErrors ¶
func (m ViewReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ViewReqMultiError) Error ¶
func (m ViewReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ViewReqValidationError ¶
type ViewReqValidationError struct {
// contains filtered or unexported fields
}
ViewReqValidationError is the validation error returned by ViewReq.Validate if the designated constraints aren't met.
func (ViewReqValidationError) Cause ¶
func (e ViewReqValidationError) Cause() error
Cause function returns cause value.
func (ViewReqValidationError) Error ¶
func (e ViewReqValidationError) Error() string
Error satisfies the builtin error interface
func (ViewReqValidationError) ErrorName ¶
func (e ViewReqValidationError) ErrorName() string
ErrorName returns error name.
func (ViewReqValidationError) Field ¶
func (e ViewReqValidationError) Field() string
Field function returns field value.
func (ViewReqValidationError) Key ¶
func (e ViewReqValidationError) Key() bool
Key function returns key value.
func (ViewReqValidationError) Reason ¶
func (e ViewReqValidationError) Reason() string
Reason function returns reason value.
type ViewResp ¶
type ViewResp struct {
// contains filtered or unexported fields
}
func (*ViewResp) Descriptor
deprecated
func (*ViewResp) ProtoMessage ¶
func (*ViewResp) ProtoMessage()
func (*ViewResp) ProtoReflect ¶
func (x *ViewResp) ProtoReflect() protoreflect.Message
func (*ViewResp) Validate ¶
Validate checks the field values on ViewResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ViewResp) ValidateAll ¶
ValidateAll checks the field values on ViewResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ViewRespMultiError, or nil if none found.
type ViewRespMultiError ¶
type ViewRespMultiError []error
ViewRespMultiError is an error wrapping multiple validation errors returned by ViewResp.ValidateAll() if the designated constraints aren't met.
func (ViewRespMultiError) AllErrors ¶
func (m ViewRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ViewRespMultiError) Error ¶
func (m ViewRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ViewRespValidationError ¶
type ViewRespValidationError struct {
// contains filtered or unexported fields
}
ViewRespValidationError is the validation error returned by ViewResp.Validate if the designated constraints aren't met.
func (ViewRespValidationError) Cause ¶
func (e ViewRespValidationError) Cause() error
Cause function returns cause value.
func (ViewRespValidationError) Error ¶
func (e ViewRespValidationError) Error() string
Error satisfies the builtin error interface
func (ViewRespValidationError) ErrorName ¶
func (e ViewRespValidationError) ErrorName() string
ErrorName returns error name.
func (ViewRespValidationError) Field ¶
func (e ViewRespValidationError) Field() string
Field function returns field value.
func (ViewRespValidationError) Key ¶
func (e ViewRespValidationError) Key() bool
Key function returns key value.
func (ViewRespValidationError) Reason ¶
func (e ViewRespValidationError) Reason() string
Reason function returns reason value.