feat: ota
This commit is contained in:
@@ -20,6 +20,8 @@ type (
|
||||
IdReq = chore.IdReq
|
||||
InternalActionApplyLogCreateData = chore.InternalActionApplyLogCreateData
|
||||
InternalActionApplyLogCreateReq = chore.InternalActionApplyLogCreateReq
|
||||
InternalUploadData = chore.InternalUploadData
|
||||
InternalUploadReq = chore.InternalUploadReq
|
||||
PolicyReq = chore.PolicyReq
|
||||
RegionItem = chore.RegionItem
|
||||
RegionsByIdsData = chore.RegionsByIdsData
|
||||
@@ -32,9 +34,14 @@ type (
|
||||
StatusReq = chore.StatusReq
|
||||
SystemEditReq = chore.SystemEditReq
|
||||
TestReq = chore.TestReq
|
||||
UploadReq = chore.UploadReq
|
||||
|
||||
Chore interface {
|
||||
Policy(ctx context.Context, in *PolicyReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 对外:服务端直传 OSS
|
||||
Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 对内:服务间直传 OSS(无 HTTP 暴露)
|
||||
InternalUpload(ctx context.Context, in *InternalUploadReq, opts ...grpc.CallOption) (*InternalUploadData, 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)
|
||||
@@ -69,6 +76,18 @@ func (m *defaultChore) Policy(ctx context.Context, in *PolicyReq, opts ...grpc.C
|
||||
return client.Policy(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 对外:服务端直传 OSS
|
||||
func (m *defaultChore) Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
client := chore.NewChoreClient(m.cli.Conn())
|
||||
return client.Upload(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 对内:服务间直传 OSS(无 HTTP 暴露)
|
||||
func (m *defaultChore) InternalUpload(ctx context.Context, in *InternalUploadReq, opts ...grpc.CallOption) (*InternalUploadData, error) {
|
||||
client := chore.NewChoreClient(m.cli.Conn())
|
||||
return client.InternalUpload(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultChore) Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
client := chore.NewChoreClient(m.cli.Conn())
|
||||
return client.Test(ctx, in, opts...)
|
||||
|
||||
Reference in New Issue
Block a user