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 CommentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.CommentService",
	HandlerType: (*CommentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Comment",
			Handler:    _CommentService_Comment_Handler,
		},
		{
			MethodName: "response",
			Handler:    _CommentService_Response_Handler,
		},
		{
			MethodName: "GetComment",
			Handler:    _CommentService_GetComment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "comment.proto",
}

CommentService_ServiceDesc is the grpc.ServiceDesc for CommentService 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_comment_proto protoreflect.FileDescriptor

Functions

func RegisterCommentServiceServer

func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer)

Types

type CommentReq

type CommentReq 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,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content" form:"content" binding:"required"` // @gotags: json:"content" form:"content" binding:"required"
	SentAt  int64  `protobuf:"varint,4,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentReq) Descriptor deprecated

func (*CommentReq) Descriptor() ([]byte, []int)

Deprecated: Use CommentReq.ProtoReflect.Descriptor instead.

func (*CommentReq) GetContent

func (x *CommentReq) GetContent() string

func (*CommentReq) GetSentAt

func (x *CommentReq) GetSentAt() int64

func (*CommentReq) GetUserId

func (x *CommentReq) GetUserId() int64

func (*CommentReq) GetVideoId

func (x *CommentReq) GetVideoId() int64

func (*CommentReq) ProtoMessage

func (*CommentReq) ProtoMessage()

func (*CommentReq) ProtoReflect

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

func (*CommentReq) Reset

func (x *CommentReq) Reset()

func (*CommentReq) String

func (x *CommentReq) String() string

func (*CommentReq) Validate

func (m *CommentReq) Validate() error

Validate checks the field values on CommentReq 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 (*CommentReq) ValidateAll

func (m *CommentReq) ValidateAll() error

ValidateAll checks the field values on CommentReq 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 CommentReqMultiError, or nil if none found.

type CommentReqMultiError

type CommentReqMultiError []error

CommentReqMultiError is an error wrapping multiple validation errors returned by CommentReq.ValidateAll() if the designated constraints aren't met.

func (CommentReqMultiError) AllErrors

func (m CommentReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommentReqMultiError) Error

func (m CommentReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CommentReqValidationError

type CommentReqValidationError struct {
	// contains filtered or unexported fields
}

CommentReqValidationError is the validation error returned by CommentReq.Validate if the designated constraints aren't met.

func (CommentReqValidationError) Cause

func (e CommentReqValidationError) Cause() error

Cause function returns cause value.

func (CommentReqValidationError) Error

Error satisfies the builtin error interface

func (CommentReqValidationError) ErrorName

func (e CommentReqValidationError) ErrorName() string

ErrorName returns error name.

func (CommentReqValidationError) Field

Field function returns field value.

func (CommentReqValidationError) Key

Key function returns key value.

func (CommentReqValidationError) Reason

func (e CommentReqValidationError) Reason() string

Reason function returns reason value.

type CommentResp

type CommentResp struct {
	Comment *Resp `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentResp) Descriptor deprecated

func (*CommentResp) Descriptor() ([]byte, []int)

Deprecated: Use CommentResp.ProtoReflect.Descriptor instead.

func (*CommentResp) GetComment

func (x *CommentResp) GetComment() *Resp

func (*CommentResp) ProtoMessage

func (*CommentResp) ProtoMessage()

func (*CommentResp) ProtoReflect

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

func (*CommentResp) Reset

func (x *CommentResp) Reset()

func (*CommentResp) String

func (x *CommentResp) String() string

func (*CommentResp) Validate

func (m *CommentResp) Validate() error

Validate checks the field values on CommentResp 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 (*CommentResp) ValidateAll

func (m *CommentResp) ValidateAll() error

ValidateAll checks the field values on CommentResp 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 CommentRespMultiError, or nil if none found.

type CommentRespMultiError

type CommentRespMultiError []error

CommentRespMultiError is an error wrapping multiple validation errors returned by CommentResp.ValidateAll() if the designated constraints aren't met.

func (CommentRespMultiError) AllErrors

func (m CommentRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommentRespMultiError) Error

func (m CommentRespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CommentRespValidationError

type CommentRespValidationError struct {
	// contains filtered or unexported fields
}

CommentRespValidationError is the validation error returned by CommentResp.Validate if the designated constraints aren't met.

func (CommentRespValidationError) Cause

Cause function returns cause value.

func (CommentRespValidationError) Error

Error satisfies the builtin error interface

func (CommentRespValidationError) ErrorName

func (e CommentRespValidationError) ErrorName() string

ErrorName returns error name.

func (CommentRespValidationError) Field

Field function returns field value.

func (CommentRespValidationError) Key

Key function returns key value.

func (CommentRespValidationError) Reason

Reason function returns reason value.

type CommentServiceClient

type CommentServiceClient interface {
	Comment(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommentResp, error)
	Response(ctx context.Context, in *ResponseReq, opts ...grpc.CallOption) (*ResponseResp, error)
	GetComment(ctx context.Context, in *GetCommentReq, opts ...grpc.CallOption) (*GetCommentResp, error)
}

CommentServiceClient is the client API for CommentService 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 CommentServiceServer

type CommentServiceServer interface {
	Comment(context.Context, *CommentReq) (*CommentResp, error)
	Response(context.Context, *ResponseReq) (*ResponseResp, error)
	GetComment(context.Context, *GetCommentReq) (*GetCommentResp, error)
	// contains filtered or unexported methods
}

CommentServiceServer is the server API for CommentService service. All implementations must embed UnimplementedCommentServiceServer for forward compatibility

type GetCommentReq

type GetCommentReq struct {
	CommentId int64 `protobuf:"varint,1,opt,name=comment_id,json=commentId,proto3" json:"comment_id" form:"comment_id" binding:"required"` // @gotags: json:"comment_id" form:"comment_id" binding:"required"
	// contains filtered or unexported fields
}

func (*GetCommentReq) Descriptor deprecated

func (*GetCommentReq) Descriptor() ([]byte, []int)

Deprecated: Use GetCommentReq.ProtoReflect.Descriptor instead.

func (*GetCommentReq) GetCommentId

func (x *GetCommentReq) GetCommentId() int64

func (*GetCommentReq) ProtoMessage

func (*GetCommentReq) ProtoMessage()

func (*GetCommentReq) ProtoReflect

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

func (*GetCommentReq) Reset

func (x *GetCommentReq) Reset()

func (*GetCommentReq) String

func (x *GetCommentReq) String() string

func (*GetCommentReq) Validate

func (m *GetCommentReq) Validate() error

Validate checks the field values on GetCommentReq 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 (*GetCommentReq) ValidateAll

func (m *GetCommentReq) ValidateAll() error

ValidateAll checks the field values on GetCommentReq 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 GetCommentReqMultiError, or nil if none found.

type GetCommentReqMultiError

type GetCommentReqMultiError []error

GetCommentReqMultiError is an error wrapping multiple validation errors returned by GetCommentReq.ValidateAll() if the designated constraints aren't met.

func (GetCommentReqMultiError) AllErrors

func (m GetCommentReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCommentReqMultiError) Error

func (m GetCommentReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetCommentReqValidationError

type GetCommentReqValidationError struct {
	// contains filtered or unexported fields
}

GetCommentReqValidationError is the validation error returned by GetCommentReq.Validate if the designated constraints aren't met.

func (GetCommentReqValidationError) Cause

Cause function returns cause value.

func (GetCommentReqValidationError) Error

Error satisfies the builtin error interface

func (GetCommentReqValidationError) ErrorName

func (e GetCommentReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetCommentReqValidationError) Field

Field function returns field value.

func (GetCommentReqValidationError) Key

Key function returns key value.

func (GetCommentReqValidationError) Reason

Reason function returns reason value.

type GetCommentResp

type GetCommentResp struct {
	Comment  *Resp   `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`
	Responds []*Resp `protobuf:"bytes,2,rep,name=responds,proto3" json:"responds,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentResp) Descriptor deprecated

func (*GetCommentResp) Descriptor() ([]byte, []int)

Deprecated: Use GetCommentResp.ProtoReflect.Descriptor instead.

func (*GetCommentResp) GetComment

func (x *GetCommentResp) GetComment() *Resp

func (*GetCommentResp) GetResponds

func (x *GetCommentResp) GetResponds() []*Resp

func (*GetCommentResp) ProtoMessage

func (*GetCommentResp) ProtoMessage()

func (*GetCommentResp) ProtoReflect

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

func (*GetCommentResp) Reset

func (x *GetCommentResp) Reset()

func (*GetCommentResp) String

func (x *GetCommentResp) String() string

func (*GetCommentResp) Validate

func (m *GetCommentResp) Validate() error

Validate checks the field values on GetCommentResp 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 (*GetCommentResp) ValidateAll

func (m *GetCommentResp) ValidateAll() error

ValidateAll checks the field values on GetCommentResp 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 GetCommentRespMultiError, or nil if none found.

type GetCommentRespMultiError

type GetCommentRespMultiError []error

GetCommentRespMultiError is an error wrapping multiple validation errors returned by GetCommentResp.ValidateAll() if the designated constraints aren't met.

func (GetCommentRespMultiError) AllErrors

func (m GetCommentRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCommentRespMultiError) Error

func (m GetCommentRespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetCommentRespValidationError

type GetCommentRespValidationError struct {
	// contains filtered or unexported fields
}

GetCommentRespValidationError is the validation error returned by GetCommentResp.Validate if the designated constraints aren't met.

func (GetCommentRespValidationError) Cause

Cause function returns cause value.

func (GetCommentRespValidationError) Error

Error satisfies the builtin error interface

func (GetCommentRespValidationError) ErrorName

func (e GetCommentRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetCommentRespValidationError) Field

Field function returns field value.

func (GetCommentRespValidationError) Key

Key function returns key value.

func (GetCommentRespValidationError) Reason

Reason function returns reason value.

type Resp

type Resp 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"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	SentAt  int64  `protobuf:"varint,4,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Resp) Descriptor deprecated

func (*Resp) Descriptor() ([]byte, []int)

Deprecated: Use Resp.ProtoReflect.Descriptor instead.

func (*Resp) GetContent

func (x *Resp) GetContent() string

func (*Resp) GetId

func (x *Resp) GetId() int64

func (*Resp) GetSentAt

func (x *Resp) GetSentAt() int64

func (*Resp) GetUserId

func (x *Resp) GetUserId() int64

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) ProtoReflect

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

func (*Resp) Reset

func (x *Resp) Reset()

func (*Resp) String

func (x *Resp) String() string

func (*Resp) Validate

func (m *Resp) Validate() error

Validate checks the field values on Resp 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 (*Resp) ValidateAll

func (m *Resp) ValidateAll() error

ValidateAll checks the field values on Resp 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 RespMultiError, or nil if none found.

type RespMultiError

type RespMultiError []error

RespMultiError is an error wrapping multiple validation errors returned by Resp.ValidateAll() if the designated constraints aren't met.

func (RespMultiError) AllErrors

func (m RespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RespMultiError) Error

func (m RespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type RespValidationError

type RespValidationError struct {
	// contains filtered or unexported fields
}

RespValidationError is the validation error returned by Resp.Validate if the designated constraints aren't met.

func (RespValidationError) Cause

func (e RespValidationError) Cause() error

Cause function returns cause value.

func (RespValidationError) Error

func (e RespValidationError) Error() string

Error satisfies the builtin error interface

func (RespValidationError) ErrorName

func (e RespValidationError) ErrorName() string

ErrorName returns error name.

func (RespValidationError) Field

func (e RespValidationError) Field() string

Field function returns field value.

func (RespValidationError) Key

func (e RespValidationError) Key() bool

Key function returns key value.

func (RespValidationError) Reason

func (e RespValidationError) Reason() string

Reason function returns reason value.

type ResponseReq

type ResponseReq struct {
	UserId    int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	CommentId int64  `protobuf:"varint,2,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"`
	Content   string `protobuf:"bytes,3,opt,name=content,proto3" json:"content" form:"content" binding:"required"` // @gotags: json:"content" form:"content" binding:"required"
	SentAt    int64  `protobuf:"varint,4,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseReq) Descriptor deprecated

func (*ResponseReq) Descriptor() ([]byte, []int)

Deprecated: Use ResponseReq.ProtoReflect.Descriptor instead.

func (*ResponseReq) GetCommentId

func (x *ResponseReq) GetCommentId() int64

func (*ResponseReq) GetContent

func (x *ResponseReq) GetContent() string

func (*ResponseReq) GetSentAt

func (x *ResponseReq) GetSentAt() int64

func (*ResponseReq) GetUserId

func (x *ResponseReq) GetUserId() int64

func (*ResponseReq) ProtoMessage

func (*ResponseReq) ProtoMessage()

func (*ResponseReq) ProtoReflect

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

func (*ResponseReq) Reset

func (x *ResponseReq) Reset()

func (*ResponseReq) String

func (x *ResponseReq) String() string

func (*ResponseReq) Validate

func (m *ResponseReq) Validate() error

Validate checks the field values on ResponseReq 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 (*ResponseReq) ValidateAll

func (m *ResponseReq) ValidateAll() error

ValidateAll checks the field values on ResponseReq 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 ResponseReqMultiError, or nil if none found.

type ResponseReqMultiError

type ResponseReqMultiError []error

ResponseReqMultiError is an error wrapping multiple validation errors returned by ResponseReq.ValidateAll() if the designated constraints aren't met.

func (ResponseReqMultiError) AllErrors

func (m ResponseReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResponseReqMultiError) Error

func (m ResponseReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ResponseReqValidationError

type ResponseReqValidationError struct {
	// contains filtered or unexported fields
}

ResponseReqValidationError is the validation error returned by ResponseReq.Validate if the designated constraints aren't met.

func (ResponseReqValidationError) Cause

Cause function returns cause value.

func (ResponseReqValidationError) Error

Error satisfies the builtin error interface

func (ResponseReqValidationError) ErrorName

func (e ResponseReqValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseReqValidationError) Field

Field function returns field value.

func (ResponseReqValidationError) Key

Key function returns key value.

func (ResponseReqValidationError) Reason

Reason function returns reason value.

type ResponseResp

type ResponseResp struct {
	Response  *Resp `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	CommentId int64 `protobuf:"varint,2,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseResp) Descriptor deprecated

func (*ResponseResp) Descriptor() ([]byte, []int)

Deprecated: Use ResponseResp.ProtoReflect.Descriptor instead.

func (*ResponseResp) GetCommentId

func (x *ResponseResp) GetCommentId() int64

func (*ResponseResp) GetResponse

func (x *ResponseResp) GetResponse() *Resp

func (*ResponseResp) ProtoMessage

func (*ResponseResp) ProtoMessage()

func (*ResponseResp) ProtoReflect

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

func (*ResponseResp) Reset

func (x *ResponseResp) Reset()

func (*ResponseResp) String

func (x *ResponseResp) String() string

func (*ResponseResp) Validate

func (m *ResponseResp) Validate() error

Validate checks the field values on ResponseResp 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 (*ResponseResp) ValidateAll

func (m *ResponseResp) ValidateAll() error

ValidateAll checks the field values on ResponseResp 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 ResponseRespMultiError, or nil if none found.

type ResponseRespMultiError

type ResponseRespMultiError []error

ResponseRespMultiError is an error wrapping multiple validation errors returned by ResponseResp.ValidateAll() if the designated constraints aren't met.

func (ResponseRespMultiError) AllErrors

func (m ResponseRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResponseRespMultiError) Error

func (m ResponseRespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ResponseRespValidationError

type ResponseRespValidationError struct {
	// contains filtered or unexported fields
}

ResponseRespValidationError is the validation error returned by ResponseResp.Validate if the designated constraints aren't met.

func (ResponseRespValidationError) Cause

Cause function returns cause value.

func (ResponseRespValidationError) Error

Error satisfies the builtin error interface

func (ResponseRespValidationError) ErrorName

func (e ResponseRespValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseRespValidationError) Field

Field function returns field value.

func (ResponseRespValidationError) Key

Key function returns key value.

func (ResponseRespValidationError) Reason

Reason function returns reason value.

type UnimplementedCommentServiceServer

type UnimplementedCommentServiceServer struct {
}

UnimplementedCommentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCommentServiceServer) Comment

func (UnimplementedCommentServiceServer) GetComment

func (UnimplementedCommentServiceServer) Response

type UnsafeCommentServiceServer

type UnsafeCommentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCommentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommentServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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