feat: pcm-ac auth接口调整

Signed-off-by: devad <cossjie@foxmail.com>
This commit is contained in:
devad 2023-03-23 15:38:09 +08:00
parent 12a5a6ea84
commit e72008043f
8 changed files with 476 additions and 106 deletions

View File

@ -1,5 +1,5 @@
pcm-ac:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-ac adaptor/PCM-HPC/PCM-AC/rpc/pcmac.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-ac adaptor/PCM-HPC/PCM-AC/rpc/hpcac.go
pcm-kubeNative:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-kubenative adaptor/PCM-K8S/PCM-K8S-NATIVE/rpc/pcmkubenative.go

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.19.4
// protoc v3.21.12
// source: hpcAC.proto
package hpcAC
@ -4990,6 +4990,195 @@ func (x *UserQuotasLimitData) GetMaxWallTime() int64 {
return 0
}
type ACAuthReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
OrgId string `protobuf:"bytes,3,opt,name=orgId,proto3" json:"orgId,omitempty"`
}
func (x *ACAuthReq) Reset() {
*x = ACAuthReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hpcAC_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ACAuthReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ACAuthReq) ProtoMessage() {}
func (x *ACAuthReq) ProtoReflect() protoreflect.Message {
mi := &file_hpcAC_proto_msgTypes[48]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ACAuthReq.ProtoReflect.Descriptor instead.
func (*ACAuthReq) Descriptor() ([]byte, []int) {
return file_hpcAC_proto_rawDescGZIP(), []int{48}
}
func (x *ACAuthReq) GetUser() string {
if x != nil {
return x.User
}
return ""
}
func (x *ACAuthReq) GetPassword() string {
if x != nil {
return x.Password
}
return ""
}
func (x *ACAuthReq) GetOrgId() string {
if x != nil {
return x.OrgId
}
return ""
}
type ACAuthResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
Data []*ACAuthData `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
}
func (x *ACAuthResp) Reset() {
*x = ACAuthResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hpcAC_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ACAuthResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ACAuthResp) ProtoMessage() {}
func (x *ACAuthResp) ProtoReflect() protoreflect.Message {
mi := &file_hpcAC_proto_msgTypes[49]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ACAuthResp.ProtoReflect.Descriptor instead.
func (*ACAuthResp) Descriptor() ([]byte, []int) {
return file_hpcAC_proto_rawDescGZIP(), []int{49}
}
func (x *ACAuthResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *ACAuthResp) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *ACAuthResp) GetData() []*ACAuthData {
if x != nil {
return x.Data
}
return nil
}
type ACAuthData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ClusterName string `protobuf:"bytes,1,opt,name=clusterName,proto3" json:"clusterName,omitempty"`
ClusterId string `protobuf:"bytes,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *ACAuthData) Reset() {
*x = ACAuthData{}
if protoimpl.UnsafeEnabled {
mi := &file_hpcAC_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ACAuthData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ACAuthData) ProtoMessage() {}
func (x *ACAuthData) ProtoReflect() protoreflect.Message {
mi := &file_hpcAC_proto_msgTypes[50]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ACAuthData.ProtoReflect.Descriptor instead.
func (*ACAuthData) Descriptor() ([]byte, []int) {
return file_hpcAC_proto_rawDescGZIP(), []int{50}
}
func (x *ACAuthData) GetClusterName() string {
if x != nil {
return x.ClusterName
}
return ""
}
func (x *ACAuthData) GetClusterId() string {
if x != nil {
return x.ClusterId
}
return ""
}
func (x *ACAuthData) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
var File_hpcAC_proto protoreflect.FileDescriptor
var file_hpcAC_proto_rawDesc = []byte{
@ -5804,68 +5993,88 @@ var file_hpcAC_proto_rawDesc = []byte{
0x28, 0x03, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x15,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d,
0x65, 0x32, 0xc1, 0x07, 0x0a, 0x05, 0x68, 0x70, 0x63, 0x41, 0x43, 0x12, 0x30, 0x0a, 0x07, 0x4c,
0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x11, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x68, 0x70, 0x63, 0x41,
0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a,
0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12,
0x18, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x68, 0x70, 0x63, 0x41,
0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62,
0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f,
0x62, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74,
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x53,
0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0e,
0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x14,
0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x72, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12,
0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x47, 0x65, 0x74,
0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a,
0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63,
0x41, 0x43, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a,
0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f,
0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x46, 0x69, 0x6c,
0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x12, 0x36, 0x0a, 0x11, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42,
0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75,
0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51,
0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72,
0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0f, 0x2e,
0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x17,
0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79,
0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
0x65, 0x22, 0x51, 0x0a, 0x09, 0x41, 0x43, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x12, 0x12,
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73,
0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x14,
0x0a, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f,
0x72, 0x67, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x0a, 0x41, 0x43, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65,
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x41,
0x43, 0x41, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
0x62, 0x0a, 0x0a, 0x41, 0x43, 0x41, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x32, 0xf0, 0x07, 0x0a, 0x05, 0x68, 0x70, 0x63, 0x41, 0x43, 0x12, 0x30, 0x0a,
0x07, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x11, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x68, 0x70,
0x63, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12,
0x45, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f,
0x62, 0x12, 0x18, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x68, 0x70,
0x63, 0x41, 0x43, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a,
0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74,
0x4a, 0x6f, 0x62, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x53, 0x75, 0x62, 0x6d,
0x69, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41,
0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
0x12, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x12, 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74,
0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x47,
0x65, 0x74, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12,
0x36, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x13, 0x2e, 0x68,
0x70, 0x63, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65,
0x71, 0x1a, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x46,
0x69, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x68, 0x70, 0x63,
0x41, 0x43, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x36, 0x0a, 0x11, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x75,
0x65, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e,
0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x11, 0x51, 0x75,
0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12,
0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71,
0x1a, 0x1a, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d,
0x50, 0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x17, 0x2e,
0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x51, 0x75,
0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x50,
0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
0x12, 0x33, 0x0a, 0x08, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x2e, 0x68,
0x70, 0x63, 0x41, 0x43, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71,
0x1a, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d,
0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4a, 0x6f,
0x62, 0x73, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65,
0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e,
0x51, 0x75, 0x65, 0x75, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a,
0x07, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x11, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x68, 0x70,
0x63, 0x41, 0x43, 0x2e, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
0x27, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x0e, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e,
0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e,
0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x48, 0x69, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x2e, 0x68,
0x70, 0x63, 0x41, 0x43, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x65, 0x73, 0x70, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x68, 0x70, 0x63, 0x41, 0x43, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x1a, 0x17, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65,
0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x14, 0x51, 0x75, 0x65,
0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69,
0x74, 0x12, 0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52,
0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x51,
0x75, 0x6f, 0x74, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42,
0x0a, 0x0d, 0x50, 0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12,
0x17, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72,
0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43,
0x2e, 0x50, 0x61, 0x72, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65,
0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12,
0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x52,
0x65, 0x71, 0x1a, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x54,
0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65,
0x4a, 0x6f, 0x62, 0x73, 0x12, 0x13, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x51, 0x75, 0x65,
0x75, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x70, 0x63, 0x41,
0x43, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
0x30, 0x0a, 0x07, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x11, 0x2e, 0x68, 0x70, 0x63,
0x41, 0x43, 0x2e, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e,
0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73,
0x70, 0x12, 0x27, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x0e, 0x2e, 0x68, 0x70, 0x63, 0x41,
0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x68, 0x70, 0x63, 0x41,
0x43, 0x2e, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x48, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a,
0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f,
0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x68, 0x70, 0x63,
0x41, 0x43, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74,
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x06, 0x41, 0x43, 0x41, 0x75, 0x74,
0x68, 0x12, 0x10, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x41, 0x43, 0x41, 0x75, 0x74, 0x68,
0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x68, 0x70, 0x63, 0x41, 0x43, 0x2e, 0x41, 0x43, 0x41, 0x75,
0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x68, 0x70, 0x63, 0x41, 0x43,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -5880,7 +6089,7 @@ func file_hpcAC_proto_rawDescGZIP() []byte {
return file_hpcAC_proto_rawDescData
}
var file_hpcAC_proto_msgTypes = make([]protoimpl.MessageInfo, 49)
var file_hpcAC_proto_msgTypes = make([]protoimpl.MessageInfo, 52)
var file_hpcAC_proto_goTypes = []interface{}{
(*JobManager)(nil), // 0: hpcAC.JobManager
(*JobManagerReq)(nil), // 1: hpcAC.JobManagerReq
@ -5930,14 +6139,17 @@ var file_hpcAC_proto_goTypes = []interface{}{
(*QueueDetailsData)(nil), // 45: hpcAC.QueueDetailsData
(*UserQuotasLimitResp)(nil), // 46: hpcAC.UserQuotasLimitResp
(*UserQuotasLimitData)(nil), // 47: hpcAC.UserQuotasLimitData
nil, // 48: hpcAC.DeleteJobResp.DataEntry
(*ACAuthReq)(nil), // 48: hpcAC.ACAuthReq
(*ACAuthResp)(nil), // 49: hpcAC.ACAuthResp
(*ACAuthData)(nil), // 50: hpcAC.ACAuthData
nil, // 51: hpcAC.DeleteJobResp.DataEntry
}
var file_hpcAC_proto_depIdxs = []int32{
0, // 0: hpcAC.ListJobManagerResp.data:type_name -> hpcAC.JobManager
3, // 1: hpcAC.JobDetail.job_init_attr:type_name -> hpcAC.JobInitAttr
4, // 2: hpcAC.JobDetail.job_session_info:type_name -> hpcAC.JobVncSessionInfo
5, // 3: hpcAC.GetJobDetailResp.data:type_name -> hpcAC.JobDetail
48, // 4: hpcAC.DeleteJobResp.data:type_name -> hpcAC.DeleteJobResp.DataEntry
51, // 4: hpcAC.DeleteJobResp.data:type_name -> hpcAC.DeleteJobResp.DataEntry
10, // 5: hpcAC.ListJobResp.jobs:type_name -> hpcAC.job
15, // 6: hpcAC.ListHistoryJobResp.data:type_name -> hpcAC.HistoryJobData
16, // 7: hpcAC.HistoryJobData.list:type_name -> hpcAC.HistoryJobList
@ -5952,43 +6164,46 @@ var file_hpcAC_proto_depIdxs = []int32{
43, // 16: hpcAC.QueueResp.data:type_name -> hpcAC.QueueData
45, // 17: hpcAC.QueueDetailsResp.data:type_name -> hpcAC.QueueDetailsData
47, // 18: hpcAC.UserQuotasLimitResp.data:type_name -> hpcAC.UserQuotasLimitData
11, // 19: hpcAC.hpcAC.ListJob:input_type -> hpcAC.ListJobReq
13, // 20: hpcAC.hpcAC.ListHistoryJob:input_type -> hpcAC.ListHistoryJobReq
17, // 21: hpcAC.hpcAC.SubmitJob:input_type -> hpcAC.SubmitJobReq
1, // 22: hpcAC.hpcAC.ListJobManager:input_type -> hpcAC.JobManagerReq
6, // 23: hpcAC.hpcAC.GetJobDetail:input_type -> hpcAC.JobDetailReq
8, // 24: hpcAC.hpcAC.DeleteJob:input_type -> hpcAC.DeleteJobReq
39, // 25: hpcAC.hpcAC.FileContent:input_type -> hpcAC.FileDataReq
41, // 26: hpcAC.hpcAC.SelectQueueByUser:input_type -> hpcAC.QueueReq
41, // 27: hpcAC.hpcAC.QueryQueueDetails:input_type -> hpcAC.QueueReq
41, // 28: hpcAC.hpcAC.QueryUserQuotasLimit:input_type -> hpcAC.QueueReq
20, // 29: hpcAC.hpcAC.ParaStorQuota:input_type -> hpcAC.ParaStorQuotaReq
23, // 30: hpcAC.hpcAC.WallTime:input_type -> hpcAC.WallTimeReq
25, // 31: hpcAC.hpcAC.QueueJobs:input_type -> hpcAC.QueueJobsReq
29, // 32: hpcAC.hpcAC.CpuCore:input_type -> hpcAC.CpuCoreReq
32, // 33: hpcAC.hpcAC.jobs:input_type -> hpcAC.JobsReq
35, // 34: hpcAC.hpcAC.HistoryJobDetail:input_type -> hpcAC.HistoryJobDetailReq
12, // 35: hpcAC.hpcAC.ListJob:output_type -> hpcAC.ListJobResp
14, // 36: hpcAC.hpcAC.ListHistoryJob:output_type -> hpcAC.ListHistoryJobResp
18, // 37: hpcAC.hpcAC.SubmitJob:output_type -> hpcAC.SubmitJobResp
2, // 38: hpcAC.hpcAC.ListJobManager:output_type -> hpcAC.ListJobManagerResp
7, // 39: hpcAC.hpcAC.GetJobDetail:output_type -> hpcAC.GetJobDetailResp
9, // 40: hpcAC.hpcAC.DeleteJob:output_type -> hpcAC.DeleteJobResp
38, // 41: hpcAC.hpcAC.FileContent:output_type -> hpcAC.FileContentResp
42, // 42: hpcAC.hpcAC.SelectQueueByUser:output_type -> hpcAC.QueueResp
44, // 43: hpcAC.hpcAC.QueryQueueDetails:output_type -> hpcAC.QueueDetailsResp
46, // 44: hpcAC.hpcAC.QueryUserQuotasLimit:output_type -> hpcAC.UserQuotasLimitResp
21, // 45: hpcAC.hpcAC.ParaStorQuota:output_type -> hpcAC.ParaStorQuotaResp
24, // 46: hpcAC.hpcAC.WallTime:output_type -> hpcAC.WallTimeResp
26, // 47: hpcAC.hpcAC.QueueJobs:output_type -> hpcAC.QueueJobsResp
30, // 48: hpcAC.hpcAC.CpuCore:output_type -> hpcAC.CpuCoreResp
33, // 49: hpcAC.hpcAC.jobs:output_type -> hpcAC.JobsResp
37, // 50: hpcAC.hpcAC.HistoryJobDetail:output_type -> hpcAC.HistoryJobDetailResp
35, // [35:51] is the sub-list for method output_type
19, // [19:35] is the sub-list for method input_type
19, // [19:19] is the sub-list for extension type_name
19, // [19:19] is the sub-list for extension extendee
0, // [0:19] is the sub-list for field type_name
50, // 19: hpcAC.ACAuthResp.data:type_name -> hpcAC.ACAuthData
11, // 20: hpcAC.hpcAC.ListJob:input_type -> hpcAC.ListJobReq
13, // 21: hpcAC.hpcAC.ListHistoryJob:input_type -> hpcAC.ListHistoryJobReq
17, // 22: hpcAC.hpcAC.SubmitJob:input_type -> hpcAC.SubmitJobReq
1, // 23: hpcAC.hpcAC.ListJobManager:input_type -> hpcAC.JobManagerReq
6, // 24: hpcAC.hpcAC.GetJobDetail:input_type -> hpcAC.JobDetailReq
8, // 25: hpcAC.hpcAC.DeleteJob:input_type -> hpcAC.DeleteJobReq
39, // 26: hpcAC.hpcAC.FileContent:input_type -> hpcAC.FileDataReq
41, // 27: hpcAC.hpcAC.SelectQueueByUser:input_type -> hpcAC.QueueReq
41, // 28: hpcAC.hpcAC.QueryQueueDetails:input_type -> hpcAC.QueueReq
41, // 29: hpcAC.hpcAC.QueryUserQuotasLimit:input_type -> hpcAC.QueueReq
20, // 30: hpcAC.hpcAC.ParaStorQuota:input_type -> hpcAC.ParaStorQuotaReq
23, // 31: hpcAC.hpcAC.WallTime:input_type -> hpcAC.WallTimeReq
25, // 32: hpcAC.hpcAC.QueueJobs:input_type -> hpcAC.QueueJobsReq
29, // 33: hpcAC.hpcAC.CpuCore:input_type -> hpcAC.CpuCoreReq
32, // 34: hpcAC.hpcAC.jobs:input_type -> hpcAC.JobsReq
35, // 35: hpcAC.hpcAC.HistoryJobDetail:input_type -> hpcAC.HistoryJobDetailReq
48, // 36: hpcAC.hpcAC.ACAuth:input_type -> hpcAC.ACAuthReq
12, // 37: hpcAC.hpcAC.ListJob:output_type -> hpcAC.ListJobResp
14, // 38: hpcAC.hpcAC.ListHistoryJob:output_type -> hpcAC.ListHistoryJobResp
18, // 39: hpcAC.hpcAC.SubmitJob:output_type -> hpcAC.SubmitJobResp
2, // 40: hpcAC.hpcAC.ListJobManager:output_type -> hpcAC.ListJobManagerResp
7, // 41: hpcAC.hpcAC.GetJobDetail:output_type -> hpcAC.GetJobDetailResp
9, // 42: hpcAC.hpcAC.DeleteJob:output_type -> hpcAC.DeleteJobResp
38, // 43: hpcAC.hpcAC.FileContent:output_type -> hpcAC.FileContentResp
42, // 44: hpcAC.hpcAC.SelectQueueByUser:output_type -> hpcAC.QueueResp
44, // 45: hpcAC.hpcAC.QueryQueueDetails:output_type -> hpcAC.QueueDetailsResp
46, // 46: hpcAC.hpcAC.QueryUserQuotasLimit:output_type -> hpcAC.UserQuotasLimitResp
21, // 47: hpcAC.hpcAC.ParaStorQuota:output_type -> hpcAC.ParaStorQuotaResp
24, // 48: hpcAC.hpcAC.WallTime:output_type -> hpcAC.WallTimeResp
26, // 49: hpcAC.hpcAC.QueueJobs:output_type -> hpcAC.QueueJobsResp
30, // 50: hpcAC.hpcAC.CpuCore:output_type -> hpcAC.CpuCoreResp
33, // 51: hpcAC.hpcAC.jobs:output_type -> hpcAC.JobsResp
37, // 52: hpcAC.hpcAC.HistoryJobDetail:output_type -> hpcAC.HistoryJobDetailResp
49, // 53: hpcAC.hpcAC.ACAuth:output_type -> hpcAC.ACAuthResp
37, // [37:54] is the sub-list for method output_type
20, // [20:37] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
}
func init() { file_hpcAC_proto_init() }
@ -6573,6 +6788,42 @@ func file_hpcAC_proto_init() {
return nil
}
}
file_hpcAC_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ACAuthReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_hpcAC_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ACAuthResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_hpcAC_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ACAuthData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -6580,7 +6831,7 @@ func file_hpcAC_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hpcAC_proto_rawDesc,
NumEnums: 0,
NumMessages: 49,
NumMessages: 52,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// - protoc v3.21.12
// source: hpcAC.proto
package hpcAC
@ -51,6 +51,8 @@ type HpcACClient interface {
CpuCore(ctx context.Context, in *CpuCoreReq, opts ...grpc.CallOption) (*CpuCoreResp, error)
Jobs(ctx context.Context, in *JobsReq, opts ...grpc.CallOption) (*JobsResp, error)
HistoryJobDetail(ctx context.Context, in *HistoryJobDetailReq, opts ...grpc.CallOption) (*HistoryJobDetailResp, error)
// 曙光ac登录认证
ACAuth(ctx context.Context, in *ACAuthReq, opts ...grpc.CallOption) (*ACAuthResp, error)
}
type hpcACClient struct {
@ -205,6 +207,15 @@ func (c *hpcACClient) HistoryJobDetail(ctx context.Context, in *HistoryJobDetail
return out, nil
}
func (c *hpcACClient) ACAuth(ctx context.Context, in *ACAuthReq, opts ...grpc.CallOption) (*ACAuthResp, error) {
out := new(ACAuthResp)
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/ACAuth", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HpcACServer is the server API for HpcAC service.
// All implementations must embed UnimplementedHpcACServer
// for forward compatibility
@ -238,6 +249,8 @@ type HpcACServer interface {
CpuCore(context.Context, *CpuCoreReq) (*CpuCoreResp, error)
Jobs(context.Context, *JobsReq) (*JobsResp, error)
HistoryJobDetail(context.Context, *HistoryJobDetailReq) (*HistoryJobDetailResp, error)
// 曙光ac登录认证
ACAuth(context.Context, *ACAuthReq) (*ACAuthResp, error)
mustEmbedUnimplementedHpcACServer()
}
@ -293,6 +306,9 @@ func (UnimplementedHpcACServer) Jobs(context.Context, *JobsReq) (*JobsResp, erro
func (UnimplementedHpcACServer) HistoryJobDetail(context.Context, *HistoryJobDetailReq) (*HistoryJobDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method HistoryJobDetail not implemented")
}
func (UnimplementedHpcACServer) ACAuth(context.Context, *ACAuthReq) (*ACAuthResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ACAuth not implemented")
}
func (UnimplementedHpcACServer) mustEmbedUnimplementedHpcACServer() {}
// UnsafeHpcACServer may be embedded to opt out of forward compatibility for this service.
@ -594,6 +610,24 @@ func _HpcAC_HistoryJobDetail_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _HpcAC_ACAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ACAuthReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HpcACServer).ACAuth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/hpcAC.hpcAC/ACAuth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HpcACServer).ACAuth(ctx, req.(*ACAuthReq))
}
return interceptor(ctx, in, info, handler)
}
// HpcAC_ServiceDesc is the grpc.ServiceDesc for HpcAC service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -665,6 +699,10 @@ var HpcAC_ServiceDesc = grpc.ServiceDesc{
MethodName: "HistoryJobDetail",
Handler: _HpcAC_HistoryJobDetail_Handler,
},
{
MethodName: "ACAuth",
Handler: _HpcAC_ACAuth_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "hpcAC.proto",

View File

@ -13,6 +13,9 @@ import (
)
type (
ACAuthData = hpcAC.ACAuthData
ACAuthReq = hpcAC.ACAuthReq
ACAuthResp = hpcAC.ACAuthResp
CpuCore = hpcAC.CpuCore
CpuCoreReq = hpcAC.CpuCoreReq
CpuCoreResp = hpcAC.CpuCoreResp
@ -92,6 +95,8 @@ type (
CpuCore(ctx context.Context, in *CpuCoreReq, opts ...grpc.CallOption) (*CpuCoreResp, error)
Jobs(ctx context.Context, in *JobsReq, opts ...grpc.CallOption) (*JobsResp, error)
HistoryJobDetail(ctx context.Context, in *HistoryJobDetailReq, opts ...grpc.CallOption) (*HistoryJobDetailResp, error)
// 曙光ac登录认证
ACAuth(ctx context.Context, in *ACAuthReq, opts ...grpc.CallOption) (*ACAuthResp, error)
}
defaultHpcAC struct {
@ -197,3 +202,9 @@ func (m *defaultHpcAC) HistoryJobDetail(ctx context.Context, in *HistoryJobDetai
client := hpcAC.NewHpcACClient(m.cli.Conn())
return client.HistoryJobDetail(ctx, in, opts...)
}
// 曙光ac登录认证
func (m *defaultHpcAC) ACAuth(ctx context.Context, in *ACAuthReq, opts ...grpc.CallOption) (*ACAuthResp, error) {
client := hpcAC.NewHpcACClient(m.cli.Conn())
return client.ACAuth(ctx, in, opts...)
}

View File

@ -0,0 +1,44 @@
package logic
import (
"PCM/adaptor/PCM-HPC/PCM-AC/rpc/hpcAC"
"PCM/adaptor/PCM-HPC/PCM-AC/rpc/internal/svc"
"context"
"github.com/go-resty/resty/v2"
"github.com/zeromicro/go-zero/core/logx"
)
type ACAuthLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewACAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ACAuthLogic {
return &ACAuthLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 曙光ac登录认证
func (l *ACAuthLogic) ACAuth(in *hpcAC.ACAuthReq) (*hpcAC.ACAuthResp, error) {
var resp hpcAC.ACAuthResp
client := resty.New()
queryParams := map[string]string{
"user": l.svcCtx.Config.ShuguangConf.User,
"password": l.svcCtx.Config.ShuguangConf.Password,
"orgId": l.svcCtx.Config.ShuguangConf.OrgId,
}
_, err := client.R().
SetHeaders(queryParams).
SetResult(&resp).
Post(l.svcCtx.Config.ShuguangConf.TokenUrl)
if err != nil {
logx.WithContext(l.ctx).Errorf("ACAuth err: %s", err.Error())
return nil, err
}
return &resp, nil
}

View File

@ -114,3 +114,9 @@ func (s *HpcACServer) HistoryJobDetail(ctx context.Context, in *hpcAC.HistoryJob
l := logic.NewHistoryJobDetailLogic(ctx, s.svcCtx)
return l.HistoryJobDetail(in)
}
// 曙光ac登录认证
func (s *HpcACServer) ACAuth(ctx context.Context, in *hpcAC.ACAuthReq) (*hpcAC.ACAuthResp, error) {
l := logic.NewACAuthLogic(ctx, s.svcCtx)
return l.ACAuth(in)
}

View File

@ -551,6 +551,24 @@ message UserQuotasLimitData{
int64 maxWallTime = 21; // @gotags: copier:"maxWallTime" //glod账号的机时s,-1
}
message ACAuthReq {
string user = 1;
string password = 2;
string orgId = 3;
}
message ACAuthResp {
string msg = 1;
string code = 2;
repeated ACAuthData data = 3;
}
message ACAuthData {
string clusterName = 1;
string clusterId = 2;
string token = 3;
}
// HPC Services for AC
service hpcAC {
@ -598,4 +616,7 @@ service hpcAC {
rpc jobs(JobsReq) returns (JobsResp);
rpc HistoryJobDetail(HistoryJobDetailReq)returns (HistoryJobDetailResp);
// ac登录认证
rpc ACAuth(ACAuthReq) returns (ACAuthResp);
}

View File

@ -104,5 +104,4 @@ func (l *ApplyYamlLogic) ApplyYaml(in *kubenative.ApplyReq) (*kubenative.ApplyRe
}
}
return resp, nil
return &kubenative.ApplyResp{}, nil
}