修改接口
This commit is contained in:
parent
7e77b6d585
commit
bbb09a08b2
1267
api/cast/cast.pb.go
1267
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
@ -25097,6 +25097,118 @@ var _ interface {
|
|||||||
ErrorName() string
|
ErrorName() string
|
||||||
} = UnbindMediaAuthRespValidationError{}
|
} = UnbindMediaAuthRespValidationError{}
|
||||||
|
|
||||||
|
// Validate checks the field values on UpdateMediaAccInfoReq 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 *UpdateMediaAccInfoReq) Validate() error {
|
||||||
|
return m.validate(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateAll checks the field values on UpdateMediaAccInfoReq 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
|
||||||
|
// UpdateMediaAccInfoReqMultiError, or nil if none found.
|
||||||
|
func (m *UpdateMediaAccInfoReq) ValidateAll() error {
|
||||||
|
return m.validate(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UpdateMediaAccInfoReq) validate(all bool) error {
|
||||||
|
if m == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var errors []error
|
||||||
|
|
||||||
|
// no validation rules for MediaAccountUuid
|
||||||
|
|
||||||
|
// no validation rules for ExceptionStatus
|
||||||
|
|
||||||
|
// no validation rules for Expired
|
||||||
|
|
||||||
|
// no validation rules for ExpiredSource
|
||||||
|
|
||||||
|
// no validation rules for Remark
|
||||||
|
|
||||||
|
if len(errors) > 0 {
|
||||||
|
return UpdateMediaAccInfoReqMultiError(errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateMediaAccInfoReqMultiError is an error wrapping multiple validation
|
||||||
|
// errors returned by UpdateMediaAccInfoReq.ValidateAll() if the designated
|
||||||
|
// constraints aren't met.
|
||||||
|
type UpdateMediaAccInfoReqMultiError []error
|
||||||
|
|
||||||
|
// Error returns a concatenation of all the error messages it wraps.
|
||||||
|
func (m UpdateMediaAccInfoReqMultiError) Error() string {
|
||||||
|
msgs := make([]string, 0, len(m))
|
||||||
|
for _, err := range m {
|
||||||
|
msgs = append(msgs, err.Error())
|
||||||
|
}
|
||||||
|
return strings.Join(msgs, "; ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllErrors returns a list of validation violation errors.
|
||||||
|
func (m UpdateMediaAccInfoReqMultiError) AllErrors() []error { return m }
|
||||||
|
|
||||||
|
// UpdateMediaAccInfoReqValidationError is the validation error returned by
|
||||||
|
// UpdateMediaAccInfoReq.Validate if the designated constraints aren't met.
|
||||||
|
type UpdateMediaAccInfoReqValidationError struct {
|
||||||
|
field string
|
||||||
|
reason string
|
||||||
|
cause error
|
||||||
|
key bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Field function returns field value.
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) Field() string { return e.field }
|
||||||
|
|
||||||
|
// Reason function returns reason value.
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) Reason() string { return e.reason }
|
||||||
|
|
||||||
|
// Cause function returns cause value.
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) Cause() error { return e.cause }
|
||||||
|
|
||||||
|
// Key function returns key value.
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) Key() bool { return e.key }
|
||||||
|
|
||||||
|
// ErrorName returns error name.
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) ErrorName() string {
|
||||||
|
return "UpdateMediaAccInfoReqValidationError"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error satisfies the builtin error interface
|
||||||
|
func (e UpdateMediaAccInfoReqValidationError) 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 %sUpdateMediaAccInfoReq.%s: %s%s",
|
||||||
|
key,
|
||||||
|
e.field,
|
||||||
|
e.reason,
|
||||||
|
cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ error = UpdateMediaAccInfoReqValidationError{}
|
||||||
|
|
||||||
|
var _ interface {
|
||||||
|
Field() string
|
||||||
|
Reason() string
|
||||||
|
Key() bool
|
||||||
|
Cause() error
|
||||||
|
ErrorName() string
|
||||||
|
} = UpdateMediaAccInfoReqValidationError{}
|
||||||
|
|
||||||
// Validate checks the field values on WorkListResp_Info with the rules defined
|
// Validate checks the field values on WorkListResp_Info with the rules defined
|
||||||
// in the proto definition for this message. If any rules are violated, the
|
// 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.
|
// first error encountered is returned, or nil if there are no violations.
|
||||||
|
|||||||
@ -57,6 +57,7 @@ type CastClient interface {
|
|||||||
UpdateMediaAccStatus(ctx context.Context, in *UpdateMediaAccStatusReq, opts ...grpc_go.CallOption) (*UpdateMediaAccStatusResp, common.ErrorWithAttachment)
|
UpdateMediaAccStatus(ctx context.Context, in *UpdateMediaAccStatusReq, opts ...grpc_go.CallOption) (*UpdateMediaAccStatusResp, common.ErrorWithAttachment)
|
||||||
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
||||||
UnbindMediaAuth(ctx context.Context, in *UnbindMediaAuthReq, opts ...grpc_go.CallOption) (*UnbindMediaAuthResp, common.ErrorWithAttachment)
|
UnbindMediaAuth(ctx context.Context, in *UnbindMediaAuthReq, opts ...grpc_go.CallOption) (*UnbindMediaAuthResp, common.ErrorWithAttachment)
|
||||||
|
UpdateMediaAccInfo(ctx context.Context, in *UpdateMediaAccInfoReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment)
|
OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment)
|
||||||
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
||||||
UpdateOAuth(ctx context.Context, in *UpdateOAuthReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateOAuth(ctx context.Context, in *UpdateOAuthReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
@ -169,6 +170,7 @@ type CastClientImpl struct {
|
|||||||
UpdateMediaAccStatus func(ctx context.Context, in *UpdateMediaAccStatusReq) (*UpdateMediaAccStatusResp, error)
|
UpdateMediaAccStatus func(ctx context.Context, in *UpdateMediaAccStatusReq) (*UpdateMediaAccStatusResp, error)
|
||||||
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
UnbindMediaAuth func(ctx context.Context, in *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error)
|
UnbindMediaAuth func(ctx context.Context, in *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error)
|
||||||
|
UpdateMediaAccInfo func(ctx context.Context, in *UpdateMediaAccInfoReq) (*emptypb.Empty, error)
|
||||||
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
||||||
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
UpdateOAuth func(ctx context.Context, in *UpdateOAuthReq) (*emptypb.Empty, error)
|
UpdateOAuth func(ctx context.Context, in *UpdateOAuthReq) (*emptypb.Empty, error)
|
||||||
@ -413,6 +415,12 @@ func (c *castClient) UnbindMediaAuth(ctx context.Context, in *UnbindMediaAuthReq
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindMediaAuth", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindMediaAuth", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) UpdateMediaAccInfo(ctx context.Context, in *UpdateMediaAccInfoReq, 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+"/UpdateMediaAccInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment) {
|
func (c *castClient) OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment) {
|
||||||
out := new(OAuthAccountV2Resp)
|
out := new(OAuthAccountV2Resp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -817,6 +825,7 @@ type CastServer interface {
|
|||||||
UpdateMediaAccStatus(context.Context, *UpdateMediaAccStatusReq) (*UpdateMediaAccStatusResp, error)
|
UpdateMediaAccStatus(context.Context, *UpdateMediaAccStatusReq) (*UpdateMediaAccStatusResp, error)
|
||||||
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
UnbindMediaAuth(context.Context, *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error)
|
UnbindMediaAuth(context.Context, *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error)
|
||||||
|
UpdateMediaAccInfo(context.Context, *UpdateMediaAccInfoReq) (*emptypb.Empty, error)
|
||||||
OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
||||||
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
UpdateOAuth(context.Context, *UpdateOAuthReq) (*emptypb.Empty, error)
|
UpdateOAuth(context.Context, *UpdateOAuthReq) (*emptypb.Empty, error)
|
||||||
@ -986,6 +995,9 @@ func (UnimplementedCastServer) OAuthAccount(context.Context, *OAuthAccountReq) (
|
|||||||
func (UnimplementedCastServer) UnbindMediaAuth(context.Context, *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error) {
|
func (UnimplementedCastServer) UnbindMediaAuth(context.Context, *UnbindMediaAuthReq) (*UnbindMediaAuthResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UnbindMediaAuth not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UnbindMediaAuth not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) UpdateMediaAccInfo(context.Context, *UpdateMediaAccInfoReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccInfo not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error) {
|
func (UnimplementedCastServer) OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthAccountV2 not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthAccountV2 not implemented")
|
||||||
}
|
}
|
||||||
@ -2012,6 +2024,35 @@ func _Cast_UnbindMediaAuth_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_UpdateMediaAccInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateMediaAccInfoReq)
|
||||||
|
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("UpdateMediaAccInfo", 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_OAuthAccountV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_OAuthAccountV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(OAuthAccountV2Req)
|
in := new(OAuthAccountV2Req)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3929,6 +3970,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "UnbindMediaAuth",
|
MethodName: "UnbindMediaAuth",
|
||||||
Handler: _Cast_UnbindMediaAuth_Handler,
|
Handler: _Cast_UnbindMediaAuth_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateMediaAccInfo",
|
||||||
|
Handler: _Cast_UpdateMediaAccInfo_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "OAuthAccountV2",
|
MethodName: "OAuthAccountV2",
|
||||||
Handler: _Cast_OAuthAccountV2_Handler,
|
Handler: _Cast_OAuthAccountV2_Handler,
|
||||||
|
|||||||
@ -27,10 +27,10 @@ import (
|
|||||||
// InitTasks 初始化定时任务
|
// InitTasks 初始化定时任务
|
||||||
func InitTasks() error {
|
func InitTasks() error {
|
||||||
cm := GetCronManager()
|
cm := GetCronManager()
|
||||||
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
|
err := cm.AddTask("refreshWorkApprovalStatus", "0 */5 * * * *", RefreshWorkApprovalStatusTask)
|
||||||
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
|
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
|
||||||
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", PublishTask)
|
err = cm.AddTask("refreshPublishStatus", "0 */5 * * * *", PublishTask)
|
||||||
err = cm.AddTask("scheduledPublish", "0 */10 * * * *", ScheduledPublishTask)
|
err = cm.AddTask("scheduledPublish", "0 */30 * * * *", ScheduledPublishTask)
|
||||||
|
|
||||||
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
||||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user