feat: oss sign
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 28s
CI / chore (push) Successful in 28s
CI / equipment (push) Successful in 1s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 28s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 28s
CI / chore (push) Successful in 28s
CI / equipment (push) Successful in 1s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 28s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
This commit is contained in:
@@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
const (
|
||||
Chore_Policy_FullMethodName = "/chore.Chore/Policy"
|
||||
Chore_Upload_FullMethodName = "/chore.Chore/Upload"
|
||||
Chore_OssSignature_FullMethodName = "/chore.Chore/OssSignature"
|
||||
Chore_Test_FullMethodName = "/chore.Chore/Test"
|
||||
Chore_DecryptMobile_FullMethodName = "/chore.Chore/DecryptMobile"
|
||||
Chore_Regions_FullMethodName = "/chore.Chore/Regions"
|
||||
@@ -46,6 +47,8 @@ const (
|
||||
type ChoreClient interface {
|
||||
Policy(ctx context.Context, in *PolicyReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 微信小程序直传 OSS 所需的 PostObject V4 签名参数
|
||||
OssSignature(ctx context.Context, in *OssSignatureReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*Response, error)
|
||||
DecryptMobile(ctx context.Context, in *DecryptMobileReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Regions(ctx context.Context, in *RegionsReq, opts ...grpc.CallOption) (*Response, error)
|
||||
@@ -93,6 +96,16 @@ func (c *choreClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc.Ca
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *choreClient) OssSignature(ctx context.Context, in *OssSignatureReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Chore_OssSignature_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *choreClient) Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -269,6 +282,8 @@ func (c *choreClient) SendPassword(ctx context.Context, in *SendPasswordReq, opt
|
||||
type ChoreServer interface {
|
||||
Policy(context.Context, *PolicyReq) (*Response, error)
|
||||
Upload(context.Context, *UploadReq) (*Response, error)
|
||||
// 微信小程序直传 OSS 所需的 PostObject V4 签名参数
|
||||
OssSignature(context.Context, *OssSignatureReq) (*Response, error)
|
||||
Test(context.Context, *TestReq) (*Response, error)
|
||||
DecryptMobile(context.Context, *DecryptMobileReq) (*Response, error)
|
||||
Regions(context.Context, *RegionsReq) (*Response, error)
|
||||
@@ -302,6 +317,9 @@ func (UnimplementedChoreServer) Policy(context.Context, *PolicyReq) (*Response,
|
||||
func (UnimplementedChoreServer) Upload(context.Context, *UploadReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Upload not implemented")
|
||||
}
|
||||
func (UnimplementedChoreServer) OssSignature(context.Context, *OssSignatureReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method OssSignature not implemented")
|
||||
}
|
||||
func (UnimplementedChoreServer) Test(context.Context, *TestReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Test not implemented")
|
||||
}
|
||||
@@ -410,6 +428,24 @@ func _Chore_Upload_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Chore_OssSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OssSignatureReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChoreServer).OssSignature(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Chore_OssSignature_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChoreServer).OssSignature(ctx, req.(*OssSignatureReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Chore_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TestReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -731,6 +767,10 @@ var Chore_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Upload",
|
||||
Handler: _Chore_Upload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OssSignature",
|
||||
Handler: _Chore_OssSignature_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Test",
|
||||
Handler: _Chore_Test_Handler,
|
||||
|
||||
Reference in New Issue
Block a user