connecteverything / ngs-cli Goto Github PK
View Code? Open in Web Editor NEWRelease location for the synadia global messaging service CLI
Release location for the synadia global messaging service CLI
Be good if ngs plans
showed the plan options.
? max data (200000000000)
The system will limit the max to the server limits if they are lower than the account.
This is for a business account.
? select account derek
? is the export public? Yes
? source account ADEMOSSWWUE6EGOSSWDXYVQECHUPOPF4CJOCWCPCTRB6W6L2FEE5Y7IF
? source subject ngs.echo
? is import a stream No
? import name echo
? subject mapping ngs.echo
Success! - added stream import "ngs.echo"
~/Development/go/src/github.com/ConnectEverything/active-demo> nsc describe account -a derek
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ Account Details │
├──────────────────────────┬──────────────────────────────────────────────────────────┤
│ Name │ derek │
│ Account ID │ ADEREKYKHPGHKP3UOOWSTAVFTYSFSXZELVLTRXOWQ74RG7CI2BFUKOQ3 │
│ Issuer ID │ ODSKAYU5JRMXLFXFJU7Y73PNN22ZTXCVTVA26VVLVH2CNM6QV2VBJMIO │
│ Issued │ 2018-12-09 07:43:15 +0000 UTC (3 Seconds Ago) │
│ Expires │ No expiration │
│ Max Connections │ Unlimited │
│ Max Data │ Unlimited │
│ Max Exports │ Unlimited │
│ Max Imports │ Unlimited │
│ Max Msg Payload │ Unlimited │
│ Max Subscriptions │ Unlimited │
│ Exports Allows Wildcards │ True │
│ Exports │ No services or streams exported │
╰──────────────────────────┴──────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────╮
│ Imports │
├────────┬────────────┬──────────┬─────────┤
│ Type │ Subject │ To │ Expires │
├────────┼────────────┼──────────┼─────────┤
│ Stream │ ngs.active │ │ │
│ Stream │ ngs.echo │ ngs.echo │ │
╰────────┴────────────┴──────────┴─────────╯
❯ ngs status -n REDACTED
Error: error retrieving data from the account server
Usage:
ngs status [flags]
Flags:
-h, --help help for status
Global Flags:
-n, --account-name string set the account name, defaults to an interactive picker
-d, --synadia-dir string set the synadia operator directory, this should contain the operator JWT
~
❯ ngs --version
ngs version 0.23.0
$ ngs account status
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x951cde]
goroutine 1 [running]:
github.com/ConnectEverything/ngs/ngs/cmd.(*StatusParams).setDefaults(0xc00019c2d0, 0xc00016bc20, 0x54f154)
/home/travis/gopath/src/github.com/ConnectEverything/ngs/ngs/cmd/account_status.go:79 +0xbe
github.com/ConnectEverything/ngs/ngs/cmd.createStatusCmd.func1(0xc0001c5680, 0x100c5f0, 0x0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/github.com/ConnectEverything/ngs/ngs/cmd/account_status.go:26 +0x33
github.com/spf13/cobra.(*Command).execute(0xc0001c5680, 0x100c5f0, 0x0, 0x0, 0xc0001c5680, 0x100c5f0)
/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:762 +0x473
github.com/spf13/cobra.(*Command).ExecuteC(0xfe41e0, 0xc0000ba010, 0xb7c9c0, 0xc0000ba010)
/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xfe41e0, 0xb7c9c0, 0xc0000ba010)
/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:800 +0x2b
main.main()
/home/travis/gopath/src/github.com/ConnectEverything/ngs/ngs/main.go:67 +0x2e9
$ ngs --version
ngs version 0.8.1
$ uname -a
Linux xxx 5.2.10-xanmod9 #1.190825 SMP PREEMPT Sun Aug 25 19:13:19 -03 2019 x86_64 x86_64 x86_64 GNU/Linux
Asks me if I want the export to be public.
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ Account Details │
├──────────────────────────┬──────────────────────────────────────────────────────────┤
│ Name │ derek │
│ Account ID │ ADEREKYKHPGHKP3UOOWSTAVFTYSFSXZELVLTRXOWQ74RG7CI2BFUKOQ3 │
│ Issuer ID │ ODSKAYU5JRMXLFXFJU7Y73PNN22ZTXCVTVA26VVLVH2CNM6QV2VBJMIO │
│ Issued │ 2018-12-09 07:41:08 +0000 UTC (6 Seconds Ago) │
│ Expires │ No expiration │
│ Max Connections │ Unlimited │
│ Max Data │ Unlimited │
│ Max Exports │ Unlimited │
│ Max Imports │ Unlimited │
│ Max Msg Payload │ Unlimited │
│ Max Subscriptions │ Unlimited │
│ Exports Allows Wildcards │ True │
│ Exports │ No services or streams exported │
╰──────────────────────────┴──────────────────────────────────────────────────────────╯
╭────────────────────────────────────╮
│ Imports │
├────────┬────────────┬────┬─────────┤
│ Type │ Subject │ To │ Expires │
├────────┼────────────┼────┼─────────┤
│ Stream │ ngs.active │ │ │
╰────────┴────────────┴────┴─────────╯
~/Development/go/src/github.com/ConnectEverything/active-demo> nsc add import -a derek --src-account ADEMOSSWWUE6EGOSSWDXYVQECHUPOPF4CJOCWCPCTRB6W6L2FEE5Y7IF -K ~/.nkeys/synadia/synadia.nk -i
? select account derek
? is the export public? (Y/n)
I run into this issue when running the installer
$ curl https://downloads.synadia.com/ngs/install.py -sSf | python
Installing NGS tools for platform: darwin
Unable to find release page for None
╭────────────────────────────────────────────────────────────────────────────╮
│ User │
├─────────────────┬──────────────────────────────────────────────────────────┤
│ Name │ ngs │
│ User ID │ UB4XWK3KESGPR4KQNVDFXZNWCWVMXYMGUE7ADN2BOLCBVCTA3TL33SO7 │
│ Issuer ID │ ADNVEAX567QKEKKKEANUEJAU6NOP36XVSHFH6NGQXYYBLOVFPNLM36VE │
│ Max Messages │ Unlimited │
│ Max Msg Payload │ Unlimited │
│ Network Src │ Any │
│ Time │ Any │
│ Issued │ 2018-12-07 03:20:52 +0000 UTC (2 Days Ago) │
│ Expires │ No expiration │
╰─────────────────┴──────────────────────────────────────────────────────────╯```
I don't think we can set max messages or payloads per user at the moment.
How do I add in imports and exports?
I think they should be on an account via edit or edit -i.
I see they are totally separate things..
Sending request to ngs.echo (make sure you have an import.)
Hi I am new to ngs. I was wondering can I use nats.ws to connect my ngs account? is that possible?
Using the shell installer fails on OS X Monterrey:
curl -fsLS https://raw.githubusercontent.com/ConnectEverything/ngs-cli/master/install.sh | sh
sh: Unhandled architecture 'i386', use -a flag to select a supported arch
Providing the architecture works correctly:
curl -fsLS https://raw.githubusercontent.com/ConnectEverything/ngs-cli/master/install.sh | sh -s -- -a amd64
sh: Downloading <https://github.com/connecteverything/ngs-cli/releases/latest/download/ngs-darwin-amd64.zip>
######################################################################## 100.0%##O=# # ######################################################################## 100.0%#-#O=# # ######################################################################## 100.0%
sh: Extracting ngs from /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/ngs/ngs-darwin-amd64.zip
Archive: /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/ngs/ngs-darwin-amd64.zip
inflating: /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/ngs/ngs
sh: NGS: /Users/synadia/.nsc/bin/ngs
-rwxr-xr-x 1 synadia staff 15466240 May 21 2021 /Users/synadia/.nsc/bin/ngs
lrwxr-xr-x 1 synadia staff 27 Jan 13 16:44 /Users/synadia/bin/ngs -> /Users/synadia/.nsc/bin/ngs
sh: Symlink dir '/Users/synadia/bin' is already in your PATH
sh: Downloading <https://github.com/nats-io/nsc/releases/latest/download/nsc-darwin-amd64.zip>
######################################################################## 100.0%##O=# # ######################################################################## 100.0%
sh: Extracting nsc from /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/nsc/nsc-darwin-amd64.zip
Archive: /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/nsc/nsc-darwin-amd64.zip
inflating: /var/folders/1y/_rk6yz81341g5q8k1vr5nqmw0000gq/T/tmp.1BQhJTf3/nsc/nsc
sh: NSC: /Users/synadia/.nsc/bin/nsc
-rwxr-xr-x 1 synadia staff 15079120 Dec 9 13:55 /Users/synadia/.nsc/bin/nsc
lrwxr-xr-x 1 synadia staff 27 Jan 13 16:44 /Users/synadia/bin/nsc -> /Users/synadia/.nsc/bin/nsc
sh: Symlink dir '/Users/synadia/bin' is already in your PATH
The following commands have been installed to /Users/synadia/.nsc/bin:
nsc is used to edit, view and deploy NATS security JWTS.
ngs can be used to signup for the Synadia global service and manage your billing plan.
No PATH manipulation should be needed: symlinks have been put into
a dir already in your PATH: /Users/synadia/bin
If successful, invoke each command with -h to see help options.
Learn more about signing up at synadia.com.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.