updated proto
This commit is contained in:
+16
-1
@@ -1,6 +1,9 @@
|
||||
package apiconfig
|
||||
|
||||
import "encoding/json"
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.servflow.io/servflow/definitions/proto"
|
||||
)
|
||||
|
||||
type RequestType string
|
||||
|
||||
@@ -121,6 +124,18 @@ type ResponseObject struct {
|
||||
Fields map[string]ResponseObject `json:"fields" yaml:"fields"`
|
||||
}
|
||||
|
||||
func (o *ResponseObject) ToProto() *proto.ResponseObject {
|
||||
resp := proto.ResponseObject{
|
||||
Value: o.Value,
|
||||
}
|
||||
|
||||
for k, v := range o.Fields {
|
||||
resp.Fields[k] = v.ToProto()
|
||||
}
|
||||
|
||||
return &resp
|
||||
}
|
||||
|
||||
type DatasourceConfig struct {
|
||||
ID string `json:"id" yaml:"id"`
|
||||
Config json.RawMessage `json:"config" yaml:"-"`
|
||||
|
||||
Reference in New Issue
Block a user