update: 更新pb
This commit is contained in:
parent
d5a81f5c74
commit
3b2a6d059e
1313
api/cast/cast.pb.go
1313
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
@ -20493,6 +20493,8 @@ func (m *ListCastTagsReq) validate(all bool) error {
|
|||||||
|
|
||||||
// no validation rules for CreatedAtEnd
|
// no validation rules for CreatedAtEnd
|
||||||
|
|
||||||
|
// no validation rules for IsWatchCountCalled
|
||||||
|
|
||||||
// no validation rules for OrderBy
|
// no validation rules for OrderBy
|
||||||
|
|
||||||
// no validation rules for Sort
|
// no validation rules for Sort
|
||||||
@ -20625,6 +20627,8 @@ func (m *CastTagInfo) validate(all bool) error {
|
|||||||
|
|
||||||
// no validation rules for Success
|
// no validation rules for Success
|
||||||
|
|
||||||
|
// no validation rules for IsWatchCountCalled
|
||||||
|
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
return CastTagInfoMultiError(errors)
|
return CastTagInfoMultiError(errors)
|
||||||
}
|
}
|
||||||
@ -21114,6 +21118,142 @@ var _ interface {
|
|||||||
ErrorName() string
|
ErrorName() string
|
||||||
} = UpdateCastTagBatchRespValidationError{}
|
} = UpdateCastTagBatchRespValidationError{}
|
||||||
|
|
||||||
|
// Validate checks the field values on BatchUpdateCastTagsReq 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 (m *BatchUpdateCastTagsReq) Validate() error {
|
||||||
|
return m.validate(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateAll checks the field values on BatchUpdateCastTagsReq 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
|
||||||
|
// BatchUpdateCastTagsReqMultiError, or nil if none found.
|
||||||
|
func (m *BatchUpdateCastTagsReq) ValidateAll() error {
|
||||||
|
return m.validate(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchUpdateCastTagsReq) validate(all bool) error {
|
||||||
|
if m == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var errors []error
|
||||||
|
|
||||||
|
for idx, item := range m.GetData() {
|
||||||
|
_, _ = idx, item
|
||||||
|
|
||||||
|
if all {
|
||||||
|
switch v := interface{}(item).(type) {
|
||||||
|
case interface{ ValidateAll() error }:
|
||||||
|
if err := v.ValidateAll(); err != nil {
|
||||||
|
errors = append(errors, BatchUpdateCastTagsReqValidationError{
|
||||||
|
field: fmt.Sprintf("Data[%v]", idx),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case interface{ Validate() error }:
|
||||||
|
if err := v.Validate(); err != nil {
|
||||||
|
errors = append(errors, BatchUpdateCastTagsReqValidationError{
|
||||||
|
field: fmt.Sprintf("Data[%v]", idx),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||||
|
if err := v.Validate(); err != nil {
|
||||||
|
return BatchUpdateCastTagsReqValidationError{
|
||||||
|
field: fmt.Sprintf("Data[%v]", idx),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(errors) > 0 {
|
||||||
|
return BatchUpdateCastTagsReqMultiError(errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// BatchUpdateCastTagsReqMultiError is an error wrapping multiple validation
|
||||||
|
// errors returned by BatchUpdateCastTagsReq.ValidateAll() if the designated
|
||||||
|
// constraints aren't met.
|
||||||
|
type BatchUpdateCastTagsReqMultiError []error
|
||||||
|
|
||||||
|
// Error returns a concatenation of all the error messages it wraps.
|
||||||
|
func (m BatchUpdateCastTagsReqMultiError) Error() string {
|
||||||
|
var msgs []string
|
||||||
|
for _, err := range m {
|
||||||
|
msgs = append(msgs, err.Error())
|
||||||
|
}
|
||||||
|
return strings.Join(msgs, "; ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllErrors returns a list of validation violation errors.
|
||||||
|
func (m BatchUpdateCastTagsReqMultiError) AllErrors() []error { return m }
|
||||||
|
|
||||||
|
// BatchUpdateCastTagsReqValidationError is the validation error returned by
|
||||||
|
// BatchUpdateCastTagsReq.Validate if the designated constraints aren't met.
|
||||||
|
type BatchUpdateCastTagsReqValidationError struct {
|
||||||
|
field string
|
||||||
|
reason string
|
||||||
|
cause error
|
||||||
|
key bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Field function returns field value.
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) Field() string { return e.field }
|
||||||
|
|
||||||
|
// Reason function returns reason value.
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) Reason() string { return e.reason }
|
||||||
|
|
||||||
|
// Cause function returns cause value.
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) Cause() error { return e.cause }
|
||||||
|
|
||||||
|
// Key function returns key value.
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) Key() bool { return e.key }
|
||||||
|
|
||||||
|
// ErrorName returns error name.
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) ErrorName() string {
|
||||||
|
return "BatchUpdateCastTagsReqValidationError"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error satisfies the builtin error interface
|
||||||
|
func (e BatchUpdateCastTagsReqValidationError) Error() string {
|
||||||
|
cause := ""
|
||||||
|
if e.cause != nil {
|
||||||
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
key := ""
|
||||||
|
if e.key {
|
||||||
|
key = "key for "
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf(
|
||||||
|
"invalid %sBatchUpdateCastTagsReq.%s: %s%s",
|
||||||
|
key,
|
||||||
|
e.field,
|
||||||
|
e.reason,
|
||||||
|
cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ error = BatchUpdateCastTagsReqValidationError{}
|
||||||
|
|
||||||
|
var _ interface {
|
||||||
|
Field() string
|
||||||
|
Reason() string
|
||||||
|
Key() bool
|
||||||
|
Cause() error
|
||||||
|
ErrorName() string
|
||||||
|
} = BatchUpdateCastTagsReqValidationError{}
|
||||||
|
|
||||||
// Validate checks the field values on UpdateCastTagStatusReq with the rules
|
// Validate checks the field values on UpdateCastTagStatusReq with the rules
|
||||||
// defined in the proto definition for this message. If any rules are
|
// 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.
|
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||||
|
|||||||
@ -116,6 +116,7 @@ type CastClient interface {
|
|||||||
UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment)
|
UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment)
|
||||||
ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment)
|
ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment)
|
||||||
UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment)
|
UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment)
|
||||||
|
BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment)
|
RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
@ -198,6 +199,7 @@ type CastClientImpl struct {
|
|||||||
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
||||||
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
||||||
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
||||||
|
BatchUpdateCastTags func(ctx context.Context, in *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
|
||||||
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
||||||
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
||||||
}
|
}
|
||||||
@ -652,6 +654,12 @@ func (c *castClient) UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBa
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagBatch", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagBatch", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchUpdateCastTags", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
func (c *castClient) UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||||
out := new(emptypb.Empty)
|
out := new(emptypb.Empty)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -755,6 +763,7 @@ type CastServer interface {
|
|||||||
UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
||||||
ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error)
|
ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error)
|
||||||
UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
||||||
|
BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
|
||||||
UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
||||||
RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
||||||
mustEmbedUnimplementedCastServer()
|
mustEmbedUnimplementedCastServer()
|
||||||
@ -984,6 +993,9 @@ func (UnimplementedCastServer) ListCastTags(context.Context, *ListCastTagsReq) (
|
|||||||
func (UnimplementedCastServer) UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error) {
|
func (UnimplementedCastServer) UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagBatch not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagBatch not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateCastTags not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error) {
|
func (UnimplementedCastServer) UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagStatus not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagStatus not implemented")
|
||||||
}
|
}
|
||||||
@ -3135,6 +3147,35 @@ func _Cast_UpdateCastTagBatch_Handler(srv interface{}, ctx context.Context, dec
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_BatchUpdateCastTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BatchUpdateCastTagsReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||||
|
args := []interface{}{}
|
||||||
|
args = append(args, in)
|
||||||
|
md, _ := metadata.FromIncomingContext(ctx)
|
||||||
|
invAttachment := make(map[string]interface{}, len(md))
|
||||||
|
for k, v := range md {
|
||||||
|
invAttachment[k] = v
|
||||||
|
}
|
||||||
|
invo := invocation.NewRPCInvocation("BatchUpdateCastTags", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Cast_UpdateCastTagStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_UpdateCastTagStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UpdateCastTagStatusReq)
|
in := new(UpdateCastTagStatusReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3492,6 +3533,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "UpdateCastTagBatch",
|
MethodName: "UpdateCastTagBatch",
|
||||||
Handler: _Cast_UpdateCastTagBatch_Handler,
|
Handler: _Cast_UpdateCastTagBatch_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BatchUpdateCastTags",
|
||||||
|
Handler: _Cast_BatchUpdateCastTags_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UpdateCastTagStatus",
|
MethodName: "UpdateCastTagStatus",
|
||||||
Handler: _Cast_UpdateCastTagStatus_Handler,
|
Handler: _Cast_UpdateCastTagStatus_Handler,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user