-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code(pkg/references) - add reference connector and placeholders
- Loading branch information
Showing
15 changed files
with
466 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"references": { | ||
"TokenRef": { | ||
"connector_config": { | ||
"response_type": "json", | ||
"static_config": { | ||
"value": "\"plain token\"" | ||
} | ||
}, | ||
"model": { | ||
"base_field": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"TokenObjectRef": { | ||
"connector_config": { | ||
"response_type": "json", | ||
"static_config": { | ||
"value": "{\"token\":\"token from object\"}" | ||
} | ||
}, | ||
"model": { | ||
"object_config": { | ||
"fields": { | ||
"token": { | ||
"base_field": { | ||
"type": "string", | ||
"path": "token" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"item": { | ||
"connector_config": { | ||
"response_type": "HTML", | ||
"url": "https://time.is", | ||
"server_config": { | ||
"method": "GET" | ||
} | ||
}, | ||
"model": { | ||
"object_config": { | ||
"fields": { | ||
"first_field": { | ||
"base_field": { | ||
"type": "string", | ||
"path": "time#clock", | ||
"generated": { | ||
"formatted": { | ||
"template": "Current time is: {PL} with token from TokenRef={{{RefName=TokenRef}}} and TokenObjectRef={{{RefName=TokenObjectRef token}}}" | ||
} | ||
} | ||
} | ||
}, | ||
"second_field": { | ||
"base_field": { | ||
"generated": { | ||
"model": { | ||
"connector_config": { | ||
"response_type": "json", | ||
"reference_config": { | ||
"name": "TokenObjectRef" | ||
} | ||
}, | ||
"model": { | ||
"base_field": { | ||
"type": "string", | ||
"path": "token" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ func main() { | |
}, | ||
}, | ||
}, | ||
}, nil, nil) | ||
}, nil, nil, nil) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.