pb

package
v0.0.0-...-905bf1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Danmu.ProtoReflect.Descriptor instead.

func (*Danmu) GetBeginAt

func (x *Danmu) GetBeginAt() int64

func (*Danmu) GetContent

func (x *Danmu) GetContent() string

func (*Danmu) GetId

func (x *Danmu) GetId() int64

func (*Danmu) GetUserId

func (x *Danmu) GetUserId() int64

func (*Danmu) GetVideoId

func (x *Danmu) GetVideoId() int64

func (*Danmu) ProtoMessage

func (*Danmu) ProtoMessage()

func (*Danmu) ProtoReflect

func (x *Danmu) ProtoReflect() protoreflect.Message

func (*Danmu) Reset

func (x *Danmu) Reset()

func (*Danmu) String

func (x *Danmu) String() string

func (*Danmu) Validate

func (m *Danmu) Validate() error

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

func (m *Danmu) ValidateAll() error

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.

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

Cause function returns cause value.

func (GetDanmusReqValidationError) Error

Error satisfies the builtin error interface

func (GetDanmusReqValidationError) ErrorName

func (e GetDanmusReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetDanmusReqValidationError) Field

Field function returns field value.

func (GetDanmusReqValidationError) Key

Key function returns key value.

func (GetDanmusReqValidationError) Reason

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

Cause function returns cause value.

func (GetDanmusRespValidationError) Error

Error satisfies the builtin error interface

func (GetDanmusRespValidationError) ErrorName

func (e GetDanmusRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetDanmusRespValidationError) Field

Field function returns field value.

func (GetDanmusRespValidationError) Key

Key function returns key value.

func (GetDanmusRespValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use SendReq.ProtoReflect.Descriptor instead.

func (*SendReq) GetBeginAt

func (x *SendReq) GetBeginAt() int64

func (*SendReq) GetContent

func (x *SendReq) GetContent() string

func (*SendReq) GetUserId

func (x *SendReq) GetUserId() int64

func (*SendReq) GetVideoId

func (x *SendReq) GetVideoId() int64

func (*SendReq) ProtoMessage

func (*SendReq) ProtoMessage()

func (*SendReq) ProtoReflect

func (x *SendReq) ProtoReflect() protoreflect.Message

func (*SendReq) Reset

func (x *SendReq) Reset()

func (*SendReq) String

func (x *SendReq) String() string

func (*SendReq) Validate

func (m *SendReq) Validate() error

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

func (m *SendReq) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use SendResp.ProtoReflect.Descriptor instead.

func (*SendResp) GetDanmu

func (x *SendResp) GetDanmu() *Danmu

func (*SendResp) ProtoMessage

func (*SendResp) ProtoMessage()

func (*SendResp) ProtoReflect

func (x *SendResp) ProtoReflect() protoreflect.Message

func (*SendResp) Reset

func (x *SendResp) Reset()

func (*SendResp) String

func (x *SendResp) String() string

func (*SendResp) Validate

func (m *SendResp) Validate() error

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

func (m *SendResp) ValidateAll() error

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) Send

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL