-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add url import subcommand #61
Conversation
b83a28d
to
32ac53d
Compare
func registerImportCmd(rootCmd *cobra.Command) { | ||
rootCmd.AddCommand(importCmd) | ||
importCmd.Flags().Bool("schema", true, "import schema") | ||
importCmd.Flags().Bool("relationships", true, "import relationships") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably have json
mode to match the other commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's not really output for this command aside from the log messages (which already detect if it's a tty and switch to json if not)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds a
zed import <url>
command to import schema and relationships to a spicedb instance.It can read directly from a file or url if it contains the devtools export format
It also has hard-coded support for importing from the authzed playground, gists, and pastebin.
Examples:
Note that the playground import relies on urls of the form
https://play.authzed.com/s/iksdFvCtvnkR/download
returning the full developer api download outputFixes #24