Documentation ¶
Index ¶
- Variables
- func RegisterDanmuServiceServer(s grpc.ServiceRegistrar, srv DanmuServiceServer)
- type Danmu
- func (*Danmu) Descriptor() ([]byte, []int)deprecated
- func (x *Danmu) GetBeginAt() int64
- func (x *Danmu) GetContent() string
- func (x *Danmu) GetId() int64
- func (x *Danmu) GetUserId() int64
- func (x *Danmu) GetVideoId() int64
- func (*Danmu) ProtoMessage()
- func (x *Danmu) ProtoReflect() protoreflect.Message
- func (x *Danmu) Reset()
- func (x *Danmu) String() string
- func (m *Danmu) Validate() error
- func (m *Danmu) ValidateAll() error
- type DanmuMultiError
- type DanmuServiceClient
- type DanmuServiceServer
- type DanmuValidationError
- type GetDanmusReq
- func (*GetDanmusReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetDanmusReq) GetVideoId() int64
- func (*GetDanmusReq) ProtoMessage()
- func (x *GetDanmusReq) ProtoReflect() protoreflect.Message
- func (x *GetDanmusReq) Reset()
- func (x *GetDanmusReq) String() string
- func (m *GetDanmusReq) Validate() error
- func (m *GetDanmusReq) ValidateAll() error
- type GetDanmusReqMultiError
- type GetDanmusReqValidationError
- func (e GetDanmusReqValidationError) Cause() error
- func (e GetDanmusReqValidationError) Error() string
- func (e GetDanmusReqValidationError) ErrorName() string
- func (e GetDanmusReqValidationError) Field() string
- func (e GetDanmusReqValidationError) Key() bool
- func (e GetDanmusReqValidationError) Reason() string
- type GetDanmusResp
- func (*GetDanmusResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetDanmusResp) GetDanmus() []*Danmu
- func (*GetDanmusResp) ProtoMessage()
- func (x *GetDanmusResp) ProtoReflect() protoreflect.Message
- func (x *GetDanmusResp) Reset()
- func (x *GetDanmusResp) String() string
- func (m *GetDanmusResp) Validate() error
- func (m *GetDanmusResp) ValidateAll() error
- type GetDanmusRespMultiError
- type GetDanmusRespValidationError
- func (e GetDanmusRespValidationError) Cause() error
- func (e GetDanmusRespValidationError) Error() string
- func (e GetDanmusRespValidationError) ErrorName() string
- func (e GetDanmusRespValidationError) Field() string
- func (e GetDanmusRespValidationError) Key() bool
- func (e GetDanmusRespValidationError) Reason() string
- type SendReq
- func (*SendReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendReq) GetBeginAt() int64
- func (x *SendReq) GetContent() string
- func (x *SendReq) GetUserId() int64
- func (x *SendReq) GetVideoId() int64
- func (*SendReq) ProtoMessage()
- func (x *SendReq) ProtoReflect() protoreflect.Message
- func (x *SendReq) Reset()
- func (x *SendReq) String() string
- func (m *SendReq) Validate() error
- func (m *SendReq) ValidateAll() error
- type SendReqMultiError
- type SendReqValidationError
- type SendResp
- func (*SendResp) Descriptor() ([]byte, []int)deprecated
- func (x *SendResp) GetDanmu() *Danmu
- func (*SendResp) ProtoMessage()
- func (x *SendResp) ProtoReflect() protoreflect.Message
- func (x *SendResp) Reset()
- func (x *SendResp) String() string
- func (m *SendResp) Validate() error
- func (m *SendResp) ValidateAll() error
- type SendRespMultiError
- type SendRespValidationError
- type UnimplementedDanmuServiceServer
- type UnsafeDanmuServiceServer
Constants ¶
This section is empty.
Variables ¶
var DanmuService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.DanmuService", HandlerType: (*DanmuServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _DanmuService_Send_Handler, }, { MethodName: "GetDanmus", Handler: _DanmuService_GetDanmus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "danmu.proto", }
DanmuService_ServiceDesc is the grpc.ServiceDesc for DanmuService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_danmu_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDanmuServiceServer ¶
func RegisterDanmuServiceServer(s grpc.ServiceRegistrar, srv DanmuServiceServer)
Types ¶
type Danmu ¶
type Danmu struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` VideoId int64 `protobuf:"varint,3,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` BeginAt int64 `protobuf:"varint,5,opt,name=begin_at,json=beginAt,proto3" json:"begin_at,omitempty"` // contains filtered or unexported fields }
func (*Danmu) Descriptor
deprecated
func (*Danmu) GetBeginAt ¶
func (*Danmu) GetContent ¶
func (*Danmu) GetVideoId ¶
func (*Danmu) ProtoMessage ¶
func (*Danmu) ProtoMessage()
func (*Danmu) ProtoReflect ¶
func (x *Danmu) ProtoReflect() protoreflect.Message
func (*Danmu) Validate ¶
Validate checks the field values on Danmu 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 (*Danmu) ValidateAll ¶
ValidateAll checks the field values on Danmu 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 DanmuMultiError, or nil if none found.
type DanmuMultiError ¶
type DanmuMultiError []error
DanmuMultiError is an error wrapping multiple validation errors returned by Danmu.ValidateAll() if the designated constraints aren't met.
func (DanmuMultiError) AllErrors ¶
func (m DanmuMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DanmuMultiError) Error ¶
func (m DanmuMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DanmuServiceClient ¶
type DanmuServiceClient interface { Send(ctx context.Context, in *SendReq, opts ...grpc.CallOption) (*SendResp, error) GetDanmus(ctx context.Context, in *GetDanmusReq, opts ...grpc.CallOption) (*GetDanmusResp, error) }
DanmuServiceClient is the client API for DanmuService 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 NewDanmuServiceClient ¶
func NewDanmuServiceClient(cc grpc.ClientConnInterface) DanmuServiceClient
type DanmuServiceServer ¶
type DanmuServiceServer interface { Send(context.Context, *SendReq) (*SendResp, error) GetDanmus(context.Context, *GetDanmusReq) (*GetDanmusResp, error) // contains filtered or unexported methods }
DanmuServiceServer is the server API for DanmuService service. All implementations must embed UnimplementedDanmuServiceServer for forward compatibility
type DanmuValidationError ¶
type DanmuValidationError struct {
// contains filtered or unexported fields
}
DanmuValidationError is the validation error returned by Danmu.Validate if the designated constraints aren't met.
func (DanmuValidationError) Cause ¶
func (e DanmuValidationError) Cause() error
Cause function returns cause value.
func (DanmuValidationError) Error ¶
func (e DanmuValidationError) Error() string
Error satisfies the builtin error interface
func (DanmuValidationError) ErrorName ¶
func (e DanmuValidationError) ErrorName() string
ErrorName returns error name.
func (DanmuValidationError) Field ¶
func (e DanmuValidationError) Field() string
Field function returns field value.
func (DanmuValidationError) Key ¶
func (e DanmuValidationError) Key() bool
Key function returns key value.
func (DanmuValidationError) Reason ¶
func (e DanmuValidationError) Reason() string
Reason function returns reason value.
type GetDanmusReq ¶
type GetDanmusReq struct { VideoId int64 `protobuf:"varint,1,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` // contains filtered or unexported fields }
func (*GetDanmusReq) Descriptor
deprecated
func (*GetDanmusReq) Descriptor() ([]byte, []int)
Deprecated: Use GetDanmusReq.ProtoReflect.Descriptor instead.
func (*GetDanmusReq) GetVideoId ¶
func (x *GetDanmusReq) GetVideoId() int64
func (*GetDanmusReq) ProtoMessage ¶
func (*GetDanmusReq) ProtoMessage()
func (*GetDanmusReq) ProtoReflect ¶
func (x *GetDanmusReq) ProtoReflect() protoreflect.Message
func (*GetDanmusReq) Reset ¶
func (x *GetDanmusReq) Reset()
func (*GetDanmusReq) String ¶
func (x *GetDanmusReq) String() string
func (*GetDanmusReq) Validate ¶
func (m *GetDanmusReq) Validate() error
Validate checks the field values on GetDanmusReq 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 (*GetDanmusReq) ValidateAll ¶
func (m *GetDanmusReq) ValidateAll() error
ValidateAll checks the field values on GetDanmusReq 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 GetDanmusReqMultiError, or nil if none found.
type GetDanmusReqMultiError ¶
type GetDanmusReqMultiError []error
GetDanmusReqMultiError is an error wrapping multiple validation errors returned by GetDanmusReq.ValidateAll() if the designated constraints aren't met.
func (GetDanmusReqMultiError) AllErrors ¶
func (m GetDanmusReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetDanmusReqMultiError) Error ¶
func (m GetDanmusReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetDanmusReqValidationError ¶
type GetDanmusReqValidationError struct {
// contains filtered or unexported fields
}
GetDanmusReqValidationError is the validation error returned by GetDanmusReq.Validate if the designated constraints aren't met.
func (GetDanmusReqValidationError) Cause ¶
func (e GetDanmusReqValidationError) Cause() error
Cause function returns cause value.
func (GetDanmusReqValidationError) Error ¶
func (e GetDanmusReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetDanmusReqValidationError) ErrorName ¶
func (e GetDanmusReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetDanmusReqValidationError) Field ¶
func (e GetDanmusReqValidationError) Field() string
Field function returns field value.
func (GetDanmusReqValidationError) Key ¶
func (e GetDanmusReqValidationError) Key() bool
Key function returns key value.
func (GetDanmusReqValidationError) Reason ¶
func (e GetDanmusReqValidationError) Reason() string
Reason function returns reason value.
type GetDanmusResp ¶
type GetDanmusResp struct { Danmus []*Danmu `protobuf:"bytes,1,rep,name=danmus,proto3" json:"danmus,omitempty"` // contains filtered or unexported fields }
func (*GetDanmusResp) Descriptor
deprecated
func (*GetDanmusResp) Descriptor() ([]byte, []int)
Deprecated: Use GetDanmusResp.ProtoReflect.Descriptor instead.
func (*GetDanmusResp) GetDanmus ¶
func (x *GetDanmusResp) GetDanmus() []*Danmu
func (*GetDanmusResp) ProtoMessage ¶
func (*GetDanmusResp) ProtoMessage()
func (*GetDanmusResp) ProtoReflect ¶
func (x *GetDanmusResp) ProtoReflect() protoreflect.Message
func (*GetDanmusResp) Reset ¶
func (x *GetDanmusResp) Reset()
func (*GetDanmusResp) String ¶
func (x *GetDanmusResp) String() string
func (*GetDanmusResp) Validate ¶
func (m *GetDanmusResp) Validate() error
Validate checks the field values on GetDanmusResp 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 (*GetDanmusResp) ValidateAll ¶
func (m *GetDanmusResp) ValidateAll() error
ValidateAll checks the field values on GetDanmusResp 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 GetDanmusRespMultiError, or nil if none found.
type GetDanmusRespMultiError ¶
type GetDanmusRespMultiError []error
GetDanmusRespMultiError is an error wrapping multiple validation errors returned by GetDanmusResp.ValidateAll() if the designated constraints aren't met.
func (GetDanmusRespMultiError) AllErrors ¶
func (m GetDanmusRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetDanmusRespMultiError) Error ¶
func (m GetDanmusRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetDanmusRespValidationError ¶
type GetDanmusRespValidationError struct {
// contains filtered or unexported fields
}
GetDanmusRespValidationError is the validation error returned by GetDanmusResp.Validate if the designated constraints aren't met.
func (GetDanmusRespValidationError) Cause ¶
func (e GetDanmusRespValidationError) Cause() error
Cause function returns cause value.
func (GetDanmusRespValidationError) Error ¶
func (e GetDanmusRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetDanmusRespValidationError) ErrorName ¶
func (e GetDanmusRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetDanmusRespValidationError) Field ¶
func (e GetDanmusRespValidationError) Field() string
Field function returns field value.
func (GetDanmusRespValidationError) Key ¶
func (e GetDanmusRespValidationError) Key() bool
Key function returns key value.
func (GetDanmusRespValidationError) Reason ¶
func (e GetDanmusRespValidationError) Reason() string
Reason function returns reason value.
type SendReq ¶
type SendReq struct { VideoId int64 `protobuf:"varint,1,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content" form:"content" binding:"required"` // @gotags: json:"content" form:"content" binding:"required" BeginAt int64 `protobuf:"varint,4,opt,name=begin_at,json=beginAt,proto3" json:"begin_at" form:"begin_at" binding:"required"` // @gotags: json:"begin_at" form:"begin_at" binding:"required" // contains filtered or unexported fields }
func (*SendReq) Descriptor
deprecated
func (*SendReq) GetBeginAt ¶
func (*SendReq) GetContent ¶
func (*SendReq) GetVideoId ¶
func (*SendReq) ProtoMessage ¶
func (*SendReq) ProtoMessage()
func (*SendReq) ProtoReflect ¶
func (x *SendReq) ProtoReflect() protoreflect.Message
func (*SendReq) Validate ¶
Validate checks the field values on SendReq 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 (*SendReq) ValidateAll ¶
ValidateAll checks the field values on SendReq 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 SendReqMultiError, or nil if none found.
type SendReqMultiError ¶
type SendReqMultiError []error
SendReqMultiError is an error wrapping multiple validation errors returned by SendReq.ValidateAll() if the designated constraints aren't met.
func (SendReqMultiError) AllErrors ¶
func (m SendReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendReqMultiError) Error ¶
func (m SendReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendReqValidationError ¶
type SendReqValidationError struct {
// contains filtered or unexported fields
}
SendReqValidationError is the validation error returned by SendReq.Validate if the designated constraints aren't met.
func (SendReqValidationError) Cause ¶
func (e SendReqValidationError) Cause() error
Cause function returns cause value.
func (SendReqValidationError) Error ¶
func (e SendReqValidationError) Error() string
Error satisfies the builtin error interface
func (SendReqValidationError) ErrorName ¶
func (e SendReqValidationError) ErrorName() string
ErrorName returns error name.
func (SendReqValidationError) Field ¶
func (e SendReqValidationError) Field() string
Field function returns field value.
func (SendReqValidationError) Key ¶
func (e SendReqValidationError) Key() bool
Key function returns key value.
func (SendReqValidationError) Reason ¶
func (e SendReqValidationError) Reason() string
Reason function returns reason value.
type SendResp ¶
type SendResp struct { Danmu *Danmu `protobuf:"bytes,1,opt,name=danmu,proto3" json:"danmu,omitempty"` // contains filtered or unexported fields }
func (*SendResp) Descriptor
deprecated
func (*SendResp) ProtoMessage ¶
func (*SendResp) ProtoMessage()
func (*SendResp) ProtoReflect ¶
func (x *SendResp) ProtoReflect() protoreflect.Message
func (*SendResp) Validate ¶
Validate checks the field values on SendResp 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 (*SendResp) ValidateAll ¶
ValidateAll checks the field values on SendResp 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 SendRespMultiError, or nil if none found.
type SendRespMultiError ¶
type SendRespMultiError []error
SendRespMultiError is an error wrapping multiple validation errors returned by SendResp.ValidateAll() if the designated constraints aren't met.
func (SendRespMultiError) AllErrors ¶
func (m SendRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendRespMultiError) Error ¶
func (m SendRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendRespValidationError ¶
type SendRespValidationError struct {
// contains filtered or unexported fields
}
SendRespValidationError is the validation error returned by SendResp.Validate if the designated constraints aren't met.
func (SendRespValidationError) Cause ¶
func (e SendRespValidationError) Cause() error
Cause function returns cause value.
func (SendRespValidationError) Error ¶
func (e SendRespValidationError) Error() string
Error satisfies the builtin error interface
func (SendRespValidationError) ErrorName ¶
func (e SendRespValidationError) ErrorName() string
ErrorName returns error name.
func (SendRespValidationError) Field ¶
func (e SendRespValidationError) Field() string
Field function returns field value.
func (SendRespValidationError) Key ¶
func (e SendRespValidationError) Key() bool
Key function returns key value.
func (SendRespValidationError) Reason ¶
func (e SendRespValidationError) Reason() string
Reason function returns reason value.
type UnimplementedDanmuServiceServer ¶
type UnimplementedDanmuServiceServer struct { }
UnimplementedDanmuServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDanmuServiceServer) GetDanmus ¶
func (UnimplementedDanmuServiceServer) GetDanmus(context.Context, *GetDanmusReq) (*GetDanmusResp, error)
type UnsafeDanmuServiceServer ¶
type UnsafeDanmuServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDanmuServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DanmuServiceServer will result in compilation errors.