mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-07 06:30:53 +08:00
Added logic to get a secret and worked on adding createdAt timestamps to models.
This commit is contained in:
130
api/secret.pb.go
130
api/secret.pb.go
@@ -73,6 +73,53 @@ func (m *CreateSecretRequest) GetSecret() *Secret {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetSecretRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetSecretRequest) Reset() { *m = GetSecretRequest{} }
|
||||
func (m *GetSecretRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetSecretRequest) ProtoMessage() {}
|
||||
func (*GetSecretRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_6acf428160d7a216, []int{1}
|
||||
}
|
||||
|
||||
func (m *GetSecretRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetSecretRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetSecretRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetSecretRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GetSecretRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetSecretRequest.Merge(m, src)
|
||||
}
|
||||
func (m *GetSecretRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_GetSecretRequest.Size(m)
|
||||
}
|
||||
func (m *GetSecretRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetSecretRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetSecretRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *GetSecretRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetSecretRequest) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Secret struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Data map[string]string `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
@@ -85,7 +132,7 @@ func (m *Secret) Reset() { *m = Secret{} }
|
||||
func (m *Secret) String() string { return proto.CompactTextString(m) }
|
||||
func (*Secret) ProtoMessage() {}
|
||||
func (*Secret) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_6acf428160d7a216, []int{1}
|
||||
return fileDescriptor_6acf428160d7a216, []int{2}
|
||||
}
|
||||
|
||||
func (m *Secret) XXX_Unmarshal(b []byte) error {
|
||||
@@ -122,6 +169,7 @@ func (m *Secret) GetData() map[string]string {
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateSecretRequest)(nil), "api.CreateSecretRequest")
|
||||
proto.RegisterType((*GetSecretRequest)(nil), "api.GetSecretRequest")
|
||||
proto.RegisterType((*Secret)(nil), "api.Secret")
|
||||
proto.RegisterMapType((map[string]string)(nil), "api.Secret.DataEntry")
|
||||
}
|
||||
@@ -129,27 +177,29 @@ func init() {
|
||||
func init() { proto.RegisterFile("secret.proto", fileDescriptor_6acf428160d7a216) }
|
||||
|
||||
var fileDescriptor_6acf428160d7a216 = []byte{
|
||||
// 305 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xcf, 0x4a, 0x03, 0x31,
|
||||
0x10, 0x87, 0xc9, 0xb6, 0x16, 0x76, 0x5a, 0x41, 0xe2, 0x1f, 0x96, 0xb5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, 0xf1, 0x36, 0xe2, 0x07, 0xd0, 0x78,
|
||||
0xa2, 0x4d, 0x40, 0xd5, 0x25, 0x3f, 0x82, 0xbd, 0x35, 0x2e, 0x56, 0xe4, 0x96, 0x89, 0x73, 0x7f,
|
||||
0x18, 0x45, 0x37, 0x6c, 0xf8, 0xc1, 0x60, 0xdf, 0x33, 0x27, 0x54, 0xad, 0x8b, 0x19, 0x71, 0x03,
|
||||
0x9d, 0xdd, 0xef, 0xf2, 0xc4, 0xbd, 0xfb, 0x8f, 0x81, 0xf4, 0x44, 0x78, 0x6f, 0xe2, 0x57, 0xaa,
|
||||
0x18, 0xd7, 0x52, 0xb3, 0xc1, 0xfb, 0xd7, 0xf7, 0x67, 0x74, 0x99, 0x9d, 0xd5, 0x42, 0x8d, 0x5c,
|
||||
0x0f, 0xa6, 0x64, 0x71, 0x20, 0x5f, 0xb6, 0x76, 0x5e, 0xa5, 0x17, 0x60, 0x46, 0xc1, 0xc4, 0xb4,
|
||||
0xe5, 0x10, 0x57, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0x92, 0x3d, 0x4a, 0xba, 0x01, 0x00,
|
||||
0x00,
|
||||
// 345 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xcf, 0x4a, 0xf3, 0x40,
|
||||
0x14, 0xc5, 0x99, 0xb4, 0x5f, 0x21, 0xb7, 0xfd, 0xa0, 0x8c, 0x7f, 0x08, 0xb1, 0x8b, 0x1a, 0x37,
|
||||
0x51, 0x61, 0x62, 0xeb, 0x42, 0xe9, 0xd6, 0x16, 0xf7, 0xe9, 0xc6, 0xed, 0x6d, 0xbd, 0x96, 0x60,
|
||||
0x9b, 0xc4, 0xcc, 0xb4, 0x50, 0xa4, 0x20, 0xbe, 0x82, 0x8f, 0xe6, 0x2b, 0x08, 0xbe, 0x86, 0x64,
|
||||
0x26, 0x4d, 0x83,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0c, 0xac, 0x6b, 0xd6, 0xff, 0x64, 0xf0, 0xdf, 0x78, 0x8e, 0x29, 0x5b, 0x45, 0x53, 0xe2,
|
||||
0x12, 0x5a, 0x55, 0x68, 0xdc, 0xd1, 0xb9, 0x3f, 0x70, 0x74, 0x0f, 0x85, 0xa1, 0x2f, 0xb6, 0xd5,
|
||||
0x88, 0x51, 0x5e, 0x8d, 0xd7, 0x7b, 0x7d, 0xff, 0x78, 0xb3, 0xce, 0xbd, 0xe3, 0xbc, 0x16, 0x19,
|
||||
0xac, 0x7a, 0x13, 0x52, 0xd8, 0x0b, 0x9e, 0x4b, 0x18, 0x9b, 0xc0, 0x60, 0x94, 0x83, 0x82, 0x27,
|
||||
0x47, 0xb0, 0x4b, 0x9e, 0xdc, 0xfc, 0xf4, 0x3b, 0x5f, 0xb7, 0x5a, 0x84, 0x77, 0xa1, 0x33, 0xce,
|
||||
0xb8, 0xff, 0x6b, 0x86, 0x99, 0x6d, 0x26, 0x0d, 0xbd, 0xe5, 0xe5, 0x57, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xd1, 0x1d, 0xb1, 0x09, 0x63, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -165,6 +215,7 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type SecretServiceClient interface {
|
||||
CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error)
|
||||
}
|
||||
|
||||
type secretServiceClient struct {
|
||||
@@ -184,9 +235,19 @@ func (c *secretServiceClient) CreateSecret(ctx context.Context, in *CreateSecret
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *secretServiceClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) {
|
||||
out := new(Secret)
|
||||
err := c.cc.Invoke(ctx, "/api.SecretService/GetSecret", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SecretServiceServer is the server API for SecretService service.
|
||||
type SecretServiceServer interface {
|
||||
CreateSecret(context.Context, *CreateSecretRequest) (*empty.Empty, error)
|
||||
GetSecret(context.Context, *GetSecretRequest) (*Secret, error)
|
||||
}
|
||||
|
||||
// UnimplementedSecretServiceServer can be embedded to have forward compatible implementations.
|
||||
@@ -196,6 +257,9 @@ type UnimplementedSecretServiceServer struct {
|
||||
func (*UnimplementedSecretServiceServer) CreateSecret(ctx context.Context, req *CreateSecretRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSecret not implemented")
|
||||
}
|
||||
func (*UnimplementedSecretServiceServer) GetSecret(ctx context.Context, req *GetSecretRequest) (*Secret, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSecret not implemented")
|
||||
}
|
||||
|
||||
func RegisterSecretServiceServer(s *grpc.Server, srv SecretServiceServer) {
|
||||
s.RegisterService(&_SecretService_serviceDesc, srv)
|
||||
@@ -219,6 +283,24 @@ func _SecretService_CreateSecret_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecretService_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSecretRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SecretServiceServer).GetSecret(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.SecretService/GetSecret",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SecretServiceServer).GetSecret(ctx, req.(*GetSecretRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SecretService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "api.SecretService",
|
||||
HandlerType: (*SecretServiceServer)(nil),
|
||||
@@ -227,6 +309,10 @@ var _SecretService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CreateSecret",
|
||||
Handler: _SecretService_CreateSecret_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSecret",
|
||||
Handler: _SecretService_GetSecret_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "secret.proto",
|
||||
|
@@ -101,6 +101,82 @@ func local_request_SecretService_CreateSecret_0(ctx context.Context, marshaler r
|
||||
|
||||
}
|
||||
|
||||
func request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetSecretRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetSecretRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetSecret(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterSecretServiceHandlerServer registers the http handlers for service SecretService to "mux".
|
||||
// UnaryRPC :call SecretServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@@ -126,6 +202,26 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_SecretService_GetSecret_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -187,13 +283,37 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_SecretService_GetSecret_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_SecretService_CreateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_SecretService_GetSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_SecretService_CreateSecret_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_SecretService_GetSecret_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
@@ -12,6 +12,12 @@ service SecretService {
|
||||
body: "secret"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetSecret (GetSecretRequest) returns (Secret) {
|
||||
option (google.api.http) = {
|
||||
get: "/apis/v1beta1/{namespace}/secrets/{name}"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message CreateSecretRequest {
|
||||
@@ -19,6 +25,11 @@ message CreateSecretRequest {
|
||||
Secret secret = 2;
|
||||
}
|
||||
|
||||
message GetSecretRequest {
|
||||
string namespace = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message Secret {
|
||||
string name = 1;
|
||||
map<string, string> data = 2;
|
||||
|
@@ -42,6 +42,36 @@
|
||||
"SecretService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/secrets/{name}": {
|
||||
"get": {
|
||||
"operationId": "GetSecret",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiSecret"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"SecretService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
@@ -371,11 +371,12 @@ func (m *LogEntry) GetContent() string {
|
||||
}
|
||||
|
||||
type Workflow struct {
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Parameters []*WorkflowParameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"`
|
||||
WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,5,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Parameters []*WorkflowParameter `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"`
|
||||
WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,6,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -406,6 +407,13 @@ func (m *Workflow) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_Workflow proto.InternalMessageInfo
|
||||
|
||||
func (m *Workflow) GetCreatedAt() string {
|
||||
if m != nil {
|
||||
return m.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Workflow) GetUid() string {
|
||||
if m != nil {
|
||||
return m.Uid
|
||||
@@ -503,58 +511,59 @@ func init() {
|
||||
func init() { proto.RegisterFile("workflow.proto", fileDescriptor_892c7f566756b0be) }
|
||||
|
||||
var fileDescriptor_892c7f566756b0be = []byte{
|
||||
// 814 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x6e, 0x23, 0x45,
|
||||
0x10, 0x80, 0xd5, 0x71, 0xbc, 0xc4, 0xb5, 0xf2, 0xee, 0x52, 0xeb, 0x38, 0xc6, 0x64, 0x45, 0x68,
|
||||
0x16, 0x29, 0x61, 0x23, 0x8f, 0x63, 0x7e, 0x14, 0x05, 0x45, 0x80, 0xa2, 0x24, 0x1c, 0x2c, 0x84,
|
||||
0x0c, 0x21, 0x52, 0x2e, 0xa4, 0x63, 0x77, 0xcc, 0x08, 0x67, 0x7a, 0x98, 0x6e, 0x3b, 0x42, 0x96,
|
||||
0x0f, 0x80, 0xc4, 0x81, 0x2b, 0xdc, 0xb8, 0xf0, 0x18, 0x9c, 0xe1, 0x11, 0x72, 0xe1, 0x01, 0xe0,
|
||||
0x3d, 0xd0, 0xf4, 0x74, 0x4f, 0x66, 0xc6, 0x93, 0xc4, 0x26, 0xdc, 0xdc, 0x55, 0xd5, 0x55, 0x5f,
|
||||
0x75, 0xfd, 0x8c, 0xe1, 0xd1, 0xa5, 0x08, 0xbe, 0x3e, 0x1f, 0x88, 0xcb, 0x86, 0x1f, 0x08, 0x25,
|
||||
0xb0, 0xc0, 0x7c, 0xb7, 0xbe, 0xda, 0x17, 0xa2, 0x3f, 0xe0, 0x0e, 0xf3, 0x5d, 0x87, 0x79, 0x9e,
|
||||
0x50, 0x4c, 0xb9, 0xc2, 0x93, 0x91, 0x49, 0x7d, 0xc5, 0x5e, 0xf9, 0x52, 0xf1, 0x0b, 0x7f, 0xc0,
|
||||
0x14, 0x8f, 0x14, 0xf4, 0x14, 0x96, 0xf7, 0x02, 0xce, 0x14, 0x3f, 0x36, 0x06, 0x1d, 0xfe, 0xcd,
|
||||
0x90, 0x4b, 0x85, 0xab, 0x50, 0xf2, 0xd8, 0x05, 0x97, 0x3e, 0xeb, 0xf2, 0x1a, 0x59, 0x23, 0xeb,
|
||||
0xa5, 0xce, 0xb5, 0x00, 0x37, 0x60, 0xc9, 0x7a, 0xac, 0x2d, 0xac, 0x91, 0xf5, 0x87, 0xad, 0x72,
|
||||
0x83, 0xf9, 0x6e, 0x23, 0xf6, 0x12, 0xab, 0xe9, 0x01, 0xe0, 0x21, 0x57, 0xf3, 0xb9, 0x47, 0x58,
|
||||
0x0c, 0x0f, 0xda, 0x75, 0xa9, 0xa3, 0x7f, 0xd3, 0x8f, 0xa1, 0x72, 0xcc, 0x54, 0xf7, 0xab, 0xfb,
|
||||
0x7b, 0xfa, 0x89, 0x40, 0x35, 0x81, 0xd4, 0x16, 0x7d, 0xf9, 0x9f, 0x9d, 0x61, 0x0d, 0x5e, 0xf2,
|
||||
0x45, 0xef, 0x93, 0x50, 0x5c, 0xd0, 0x62, 0x7b, 0xc4, 0xe7, 0x50, 0xee, 0x0a, 0x4f, 0x31, 0xd7,
|
||||
0xe3, 0x81, 0xd6, 0x2f, 0x6a, 0x7d, 0x5a, 0x48, 0x7f, 0x23, 0x50, 0x69, 0xbb, 0x32, 0xa6, 0x99,
|
||||
0x11, 0xa5, 0x09, 0x4f, 0xed, 0x0b, 0x7f, 0x6e, 0x2a, 0x7a, 0xe4, 0xf6, 0x0c, 0x59, 0x9e, 0x0a,
|
||||
0xb7, 0x61, 0x25, 0x2b, 0xfe, 0x82, 0x07, 0xd2, 0x15, 0x9e, 0x01, 0xbf, 0x49, 0x4d, 0x4f, 0x60,
|
||||
0x39, 0x43, 0x28, 0x7d, 0xe1, 0x49, 0x8e, 0x15, 0x28, 0x76, 0xc5, 0xd0, 0x53, 0x1a, 0xaf, 0xd8,
|
||||
0x89,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 0x61, 0x1b, 0x43,
|
||||
0xb7, 0x37, 0x71, 0x46, 0x51, 0xcc, 0x3c, 0xbd, 0x51, 0x4d, 0x72, 0xf2, 0xfc, 0x83, 0xc0, 0xb3,
|
||||
0xfc, 0x87, 0xb6, 0x79, 0xde, 0xa3, 0x18, 0xe7, 0x3a, 0xbf, 0x53, 0xda, 0xfe, 0x3f, 0xf3, 0xcb,
|
||||
0x49, 0xe2, 0x8a, 0xc0, 0xd3, 0x44, 0xf7, 0xc6, 0xf2, 0xd7, 0xb2, 0x7d, 0x3d, 0x23, 0xf7, 0x0f,
|
||||
0x51, 0x61, 0x26, 0xd8, 0x9a, 0x0f, 0x3c, 0xe4, 0x3c, 0x39, 0xc4, 0xfd, 0xf9, 0x6f, 0x25, 0xaa,
|
||||
0x67, 0x8b, 0x85, 0xbf, 0x13, 0x58, 0x4d, 0xee, 0x99, 0x4c, 0x61, 0x24, 0xae, 0x4f, 0xad, 0xa2,
|
||||
0xac, 0x89, 0xcd, 0x73, 0x63, 0x06, 0x4b, 0xb3, 0xc3, 0xf6, 0x74, 0xea, 0xbb, 0xf8, 0xfe, 0x3d,
|
||||
0x92, 0xc0, 0x5f, 0x48, 0xfa, 0x5b, 0x6e, 0xa3, 0x49, 0x7c, 0xfd, 0x46, 0x92, 0x18, 0x96, 0xde,
|
||||
0x66, 0x62, 0x28, 0xdf, 0xd1, 0x94, 0x0d, 0x9c, 0x6b, 0xcc, 0xcf, 0x1e, 0xe8, 0x3f, 0xa3, 0x6f,
|
||||
0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x8f, 0x34, 0x6c, 0xda, 0x0a, 0x00, 0x00,
|
||||
// 825 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x3b, 0x45,
|
||||
0x14, 0xc0, 0x33, 0xf4, 0x5b, 0xa4, 0xef, 0x9b, 0x7e, 0xc1, 0x47, 0x29, 0xb5, 0x42, 0xc4, 0x11,
|
||||
0x13, 0x10, 0xd2, 0x2d, 0xf5, 0x47, 0x08, 0x86, 0x28, 0x21, 0x80, 0x87, 0xc6, 0x98, 0x2a, 0x92,
|
||||
0x70, 0x91, 0xa1, 0x1d, 0xea, 0xc6, 0xb2, 0xb3, 0xee, 0x4c, 0x4b, 0x4c, 0xd3, 0x83, 0x9a, 0x78,
|
||||
0xf0, 0xaa, 0x37, 0x2f, 0xfe, 0x19, 0x9e, 0xfd, 0x17, 0xb8, 0x78, 0x35, 0xd1, 0xff, 0xc3, 0xec,
|
||||
0xec, 0xce, 0xb2, 0xbb, 0x5d, 0xa0, 0x95, 0xef, 0xad, 0x33, 0xef, 0xcd, 0x7b, 0x9f, 0xf7, 0x73,
|
||||
0x0b, 0x2f, 0x6e, 0x84, 0xf7, 0xcd, 0x55, 0x4f, 0xdc, 0xd4, 0x5c, 0x4f, 0x28, 0x81, 0x39, 0xe6,
|
||||
0xda, 0xd5, 0x95, 0xae, 0x10, 0xdd, 0x1e, 0xb7, 0x98, 0x6b, 0x5b, 0xcc, 0x71, 0x84, 0x62, 0xca,
|
||||
0x16, 0x8e, 0x0c, 0x54, 0xaa, 0xcb, 0xe6, 0xc9, 0x57, 0x8a, 0x5f, 0xbb, 0x3d, 0xa6, 0x78, 0x20,
|
||||
0xa0, 0x17, 0xb0, 0x74, 0xe8, 0x71, 0xa6, 0xf8, 0x59, 0xa8, 0xd0, 0xe2, 0xdf, 0xf6, 0xb9, 0x54,
|
||||
0xb8, 0x02, 0x05, 0x87, 0x5d, 0x73, 0xe9, 0xb2, 0x36, 0xaf, 0x90, 0x35, 0xb2, 0x51, 0x68, 0xdd,
|
||||
0x5d, 0xe0, 0x26, 0xcc, 0x19, 0x8b, 0x95, 0x99, 0x35, 0xb2, 0xf1, 0xbc, 0x51, 0xac, 0x31, 0xd7,
|
||||
0xae, 0x45, 0x56, 0x22, 0x31, 0x3d, 0x06, 0x3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xb1,
|
||||
0xee, 0x8d, 0xee, 0xdf, 0x48, 0xf7, 0xf5, 0x84, 0xdc, 0x3f, 0x06, 0x85, 0x19, 0x61, 0x63, 0x3a,
|
||||
0x70, 0x9f, 0xf3, 0xfc, 0x04, 0x8f, 0xa6, 0x7f, 0x15, 0xab, 0x9e, 0x29, 0x16, 0xfe, 0x41, 0x60,
|
||||
0x25, 0xbe, 0x67, 0x52, 0x85, 0x91, 0xb8, 0x31, 0xb6, 0x8a, 0xd2, 0x2a, 0x26, 0xce, 0xcd, 0x09,
|
||||
0x34, 0xc3, 0x1d, 0x76, 0xa8, 0x43, 0xdf, 0xc7, 0x0f, 0x9f, 0x10, 0x04, 0xfe, 0x4a, 0x92, 0x5f,
|
||||
0x7a, 0xe3, 0x4d, 0xe2, 0x9b, 0xf7, 0x92, 0x44, 0xb0, 0xf4, 0x21, 0x95, 0x90, 0xf2, 0x3d, 0x4d,
|
||||
0x59, 0xc3, 0xa9, 0xc6, 0xfc, 0x72, 0x56, 0xff, 0x55, 0x7d, 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xa3, 0xf5, 0xe8, 0x25, 0xf8, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@@ -119,13 +119,14 @@ message LogEntry {
|
||||
}
|
||||
|
||||
message Workflow {
|
||||
string uid = 1;
|
||||
string name = 2;
|
||||
string status = 3;
|
||||
string createdAt = 1;
|
||||
string uid = 2;
|
||||
string name = 3;
|
||||
string status = 4;
|
||||
|
||||
repeated WorkflowParameter parameters = 4;
|
||||
repeated WorkflowParameter parameters = 5;
|
||||
|
||||
WorkflowTemplate workflowTemplate = 5;
|
||||
WorkflowTemplate workflowTemplate = 6;
|
||||
}
|
||||
|
||||
message WorkflowParameter {
|
||||
|
@@ -479,6 +479,9 @@
|
||||
"apiWorkflow": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"uid": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -513,6 +516,9 @@
|
||||
"apiWorkflowTemplate": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"uid": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@@ -350,11 +350,12 @@ func (m *ListWorkflowTemplatesResponse) GetWorkflowTemplates() []*WorkflowTempla
|
||||
}
|
||||
|
||||
type WorkflowTemplate struct {
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"`
|
||||
IsLatest bool `protobuf:"varint,5,opt,name=isLatest,proto3" json:"isLatest,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Version int32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Manifest string `protobuf:"bytes,5,opt,name=manifest,proto3" json:"manifest,omitempty"`
|
||||
IsLatest bool `protobuf:"varint,6,opt,name=isLatest,proto3" json:"isLatest,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -385,6 +386,13 @@ func (m *WorkflowTemplate) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_WorkflowTemplate proto.InternalMessageInfo
|
||||
|
||||
func (m *WorkflowTemplate) GetCreatedAt() string {
|
||||
if m != nil {
|
||||
return m.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *WorkflowTemplate) GetUid() string {
|
||||
if m != nil {
|
||||
return m.Uid
|
||||
@@ -434,25 +442,26 @@ func init() {
|
||||
func init() { proto.RegisterFile("workflow_template.proto", fileDescriptor_b9a07547748a96e8) }
|
||||
|
||||
var fileDescriptor_b9a07547748a96e8 = []byte{
|
||||
// 316 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0x41, 0x4b, 0xf3, 0x40,
|
||||
0x10, 0x65, 0x9b, 0xe6, 0xfb, 0xda, 0xf1, 0x52, 0x17, 0xc5, 0xa5, 0xb4, 0x10, 0xd6, 0x1e, 0x72,
|
||||
0xea, 0x41, 0xaf, 0x5e, 0xa4, 0x07, 0x2f, 0x3d, 0x2d, 0x56, 0x8f, 0xb2, 0xb6, 0x53, 0x58, 0x6c,
|
||||
0xb2, 0x6b, 0x76, 0x63, 0xc0, 0x93, 0x9e, 0x04, 0x7f, 0xb5, 0x24, 0x4d, 0x5b, 0x48, 0x1a, 0x91,
|
||||
0x82, 0xde, 0xe6, 0x25, 0x6f, 0x66, 0xde, 0x7b, 0xc3, 0xc2, 0x59, 0xa6, 0x93, 0xa7, 0xe5, 0x4a,
|
||||
0x67, 0x0f, 0x0e, 0x23, 0xb3, 0x92, 0x0e, 0xc7, 0x26, 0xd1, 0x4e, 0x53, 0x4f, 0x1a, 0xc5, 0xdf,
|
||||
0x08, 0x0c, 0x27, 0x09, 0x4a, 0x87, 0xf7, 0x25, 0xed, 0xb6, 0x64, 0x09, 0x7c, 0x4e, 0xd1, 0x3a,
|
||||
0x3a, 0x80, 0x6e, 0x2c, 0x23, 0xb4, 0x46, 0xce, 0x91, 0x91, 0x80, 0x84, 0x5d, 0xb1, 0xfb, 0x40,
|
||||
0xaf, 0xa1, 0x97, 0x55, 0x1a, 0x59, 0x2b, 0x20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 0xa3, 0x6b, 0xbd, 0x03, 0x00, 0x00,
|
||||
// 330 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xbf, 0x4f, 0x02, 0x31,
|
||||
0x14, 0x4e, 0x39, 0x0e, 0xb9, 0xe7, 0x82, 0x8d, 0xc6, 0x86, 0x40, 0x72, 0xa9, 0x0c, 0x37, 0x31,
|
||||
0xe8, 0xea, 0x42, 0x18, 0x5c, 0x98, 0x1a, 0xd1, 0xd1, 0x54, 0x78, 0x24, 0x8d, 0x70, 0xad, 0xd7,
|
||||
0x22, 0x89, 0x93, 0x4e, 0xfe, 0x2b, 0xfe, 0x99, 0xe6, 0xca, 0x0f, 0x15, 0xee, 0x8c, 0x21, 0xd1,
|
||||
0xad, 0x5f, 0xfb, 0xbd, 0xd7, 0xef, 0x7b, 0x3f, 0xe0, 0x74, 0xa1, 0xb3, 0x87, 0xc9, 0x54, 0x2f,
|
||||
0xee, 0x1c, 0xce, 0xcc, 0x54, 0x3a, 0xec, 0x9a, 0x4c, 0x3b, 0x4d, 0x03, 0x69, 0x14, 0x7f, 0x21,
|
||||
0xd0, 0xee, 0x67, 0x28, 0x1d, 0xde, 0xae, 0x68, 0xd7, 0x2b, 0x96, 0xc0, 0xc7, 0x39, 0x5a, 0x47,
|
||||
0x5b, 0x10, 0xa5, 0x72, 0x86, 0xd6, 0xc8, 0x11, 0x32, 0x12, 0x93, 0x24, 0x12, 0x9f, 0x17, 0xb4,
|
||||
0x07, 0x8d, 0xc5, 0x56, 0x20, 0xab, 0xc4, 0x24, 0x39, 0x3c, 0x3f, 0xe9, 0x4a, 0xa3, 0xba, 0x3b,
|
||||
0x59, 0x77, 0xe8, 0xfc, 0x8d, 0x40, 0x67, 0x68, 0xc6, 0x05, 0x12, 0x6e, 0x30, 0xb3, 0x4a, 0xa7,
|
||||
0xff, 0xa6, 0x64, 0x02, 0xcd, 0x2b, 0x74, 0xfb, 0x15, 0xa2, 0x01, 0xc1, 0x5c, 0x8d, 0xfd, 0x8f,
|
||||
0x91, 0xc8, 0x8f, 0x94, 0xc1, 0xc1, 0xd3, 0xd2, 0x00, 0x0b, 0x62, 0x92, 0x84, 0x62, 0x0d, 0xf9,
|
||||
0x10, 0xce, 0x06, 0xca, 0xba, 0x12, 0xbb, 0x76, 0xcf, 0x0f, 0xf9, 0x2b, 0x81, 0xce, 0xcf, 0x79,
|
||||
0xad, 0xd1, 0xa9, 0x45, 0x7a, 0x0c, 0xe1, 0x48, 0xcf, 0x53, 0xe7, 0x93, 0x86, 0x62, 0x09, 0x68,
|
||||
0x1f, 0x8e, 0xb6, 0x2b, 0x62, 0x59, 0x25, 0x0e, 0xca, 0x2b, 0xb8, 0xcb, 0xe7, 0x97, 0xd0, 0x2a,
|
||||
0x92, 0xf0, 0x3b, 0x4f, 0xfc, 0x19, 0xda, 0x25, 0xd1, 0x7f, 0xaf, 0xfc, 0x9d, 0x40, 0x63, 0x9b,
|
||||
0x97, 0xcb, 0x1d, 0xf9, 0xed, 0x18, 0xf7, 0xdc, 0x5a, 0xee, 0xe6, 0xa2, 0xa0, 0xe7, 0x14, 0xaa,
|
||||
0xb9, 0x1b, 0xdf, 0xf0, 0x48, 0xf8, 0xf3, 0xd7, 0x39, 0xa8, 0x7e, 0x9b, 0x03, 0xda, 0x84, 0xfa,
|
||||
0x4c, 0xa6, 0x6a, 0x82, 0xd6, 0xb1, 0xd0, 0x47, 0x6c, 0x70, 0xfe, 0xa6, 0xec, 0x20, 0x57, 0xe6,
|
||||
0x58, 0x2d, 0x26, 0x49, 0x5d, 0x6c, 0xf0, 0x7d, 0xcd, 0x2f, 0xf0, 0xc5, 0x47, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xa0, 0x4d, 0xfe, 0x9d, 0xdb, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
@@ -38,9 +38,10 @@ message ListWorkflowTemplatesResponse {
|
||||
}
|
||||
|
||||
message WorkflowTemplate {
|
||||
string uid = 1;
|
||||
string name = 2;
|
||||
int32 version = 3;
|
||||
string manifest = 4;
|
||||
bool isLatest = 5;
|
||||
string createdAt = 1;
|
||||
string uid = 2;
|
||||
string name = 3;
|
||||
int32 version = 4;
|
||||
string manifest = 5;
|
||||
bool isLatest = 6;
|
||||
}
|
@@ -20,3 +20,9 @@ func (c *Client) CreateSecret(namespace string, secret *Secret) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) GetSecret(namespace, name string) (secret *apiv1.Secret, err error) {
|
||||
secret, err = c.CoreV1().Secrets(namespace).Get(name, metav1.GetOptions{})
|
||||
|
||||
return
|
||||
}
|
||||
|
@@ -2,8 +2,15 @@ package manager
|
||||
|
||||
import (
|
||||
"github.com/onepanelio/core/model"
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
func (r *ResourceManager) CreateSecret(namespace string, secret *model.Secret) (err error) {
|
||||
return r.kubeClient.CreateSecret(namespace, secret)
|
||||
}
|
||||
|
||||
func (r *ResourceManager) GetSecret(namespace, name string) (secret *apiv1.Secret, err error) {
|
||||
secret, err = r.kubeClient.GetSecret(namespace, name)
|
||||
|
||||
return
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Workflow struct {
|
||||
ID uint64
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UID string
|
||||
Name string
|
||||
GeneratedName string
|
||||
|
@@ -2,10 +2,12 @@ package model
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"time"
|
||||
)
|
||||
|
||||
type WorkflowTemplate struct {
|
||||
ID uint64
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UID string
|
||||
Name string
|
||||
Manifest string
|
||||
|
@@ -131,7 +131,7 @@ func (r *WorkflowRepository) UpdateWorkflowTemplateVersion(workflowTemplate *mod
|
||||
}
|
||||
|
||||
func (r *WorkflowRepository) workflowTemplatesSelectBuilder(namespace string) sq.SelectBuilder {
|
||||
sb := r.sb.Select("wt.id", "wt.uid", "wt.name", "wtv.version", "wtv.is_latest").
|
||||
sb := r.sb.Select("wt.id", "wt.created_at", "wt.uid", "wt.name", "wtv.version", "wtv.is_latest").
|
||||
From("workflow_template_versions wtv").
|
||||
Join("workflow_templates wt ON wt.id = wtv.workflow_template_id").
|
||||
Where(sq.Eq{
|
||||
|
@@ -2,7 +2,6 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/onepanelio/core/api"
|
||||
"github.com/onepanelio/core/manager"
|
||||
@@ -30,3 +29,24 @@ func (s *SecretServer) CreateSecret(ctx context.Context, req *api.CreateSecretRe
|
||||
|
||||
return &empty.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *SecretServer) GetSecret(ctx context.Context, req *api.GetSecretRequest) (*api.Secret, error) {
|
||||
secret, err := s.resourceManager.GetSecret(req.Namespace, req.Name)
|
||||
|
||||
if err != nil {
|
||||
return nil, util.NewUserError(codes.Unknown, "Unknown error.")
|
||||
}
|
||||
|
||||
formattedData := make(map[string]string)
|
||||
for key := range secret.Data {
|
||||
data := secret.Data[key]
|
||||
formattedData[key] = string(data)
|
||||
}
|
||||
|
||||
apiSecret := &api.Secret{
|
||||
Name: secret.Name,
|
||||
Data: formattedData,
|
||||
}
|
||||
|
||||
return apiSecret, nil
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ func NewWorkflowServer(resourceManager *manager.ResourceManager) *WorkflowServer
|
||||
|
||||
func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) {
|
||||
workflow = &api.Workflow{
|
||||
CreatedAt: wf.CreatedAt.UTC().Format(time.RFC3339),
|
||||
Name: wf.Name,
|
||||
Uid: wf.UID,
|
||||
Status: wf.Status,
|
||||
@@ -42,6 +43,7 @@ func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) {
|
||||
func apiWorkflowTemplate(wft *model.WorkflowTemplate) *api.WorkflowTemplate {
|
||||
return &api.WorkflowTemplate{
|
||||
Uid: wft.UID,
|
||||
CreatedAt: wft.CreatedAt.UTC().Format(time.RFC3339),
|
||||
Name: wft.Name,
|
||||
Version: wft.Version,
|
||||
Manifest: wft.Manifest,
|
||||
|
Reference in New Issue
Block a user