Commit graph

2120 commits

Author SHA1 Message Date
Juan Font Alonso
ad4a61cc7b update in sum 2021-05-15 00:08:22 +02:00
Juan Font Alonso
84aba256bb Added some deps + updates 2021-05-15 00:06:17 +02:00
Juan Font Alonso
e0d916bb5a Remove dependency on postgres' jsonb 2021-05-15 00:05:41 +02:00
Juan Font
e7a626d3cc
Merge pull request #26 from cure/more_tests
Add more tests
2021-05-13 09:07:53 +02:00
Ward Vandewege
be83281f58 Fix build breakage due to https://github.com/golang/go/issues/44129.
The issue was that our build pipeline uses 'go get' call to install
golint, which changed the go.mod/go.sum files (not good, but I hadn't
noticed before). Due to Golang bug #44129, this caused breakage on the
dependencies of certain modules we use.

The fix was to switch to 'go install golang.org/x/lint/golint@latest'.
The addition of '@latest' puts 'go install' in module aware mode, which
no longer changes go.mod file in the current directory. This is better,
and it also avoids bug #44129.

This commit also has a change due to `go mod tidy`. Finally, I had to
add a longer timeout for the golangci-lint installation step in the
github actions workflow, since that seems to take a bit over a minute
now.  This step is usually cached on subsequent runs, so we hadn't seen
that failure before.
2021-05-12 09:06:46 -04:00
Ward Vandewege
d2748f34aa Add more tests. 2021-05-11 20:55:36 -04:00
Juan Font
0f933c1a46
Merge pull request #24 from cure/add-destroy-namespace-command
Add a DestroyNamespace command and tests for the Namespace functions.
2021-05-09 18:33:28 +02:00
Ward Vandewege
b20b664353 Add a DestroyNamespace command and tests for the Namespace functions. 2021-05-09 11:12:39 -04:00
Juan Font
3cf599be64
Merge pull request #22 from juanfont/json-output
Added JSON-formatted output to CLI
2021-05-08 19:55:19 +02:00
Juan Font Alonso
8ad366f977 Use JsonOutput in version too 2021-05-08 17:06:36 +02:00
Juan Font Alonso
9eaac71762 Trim trailing spaces 2021-05-08 16:56:27 +02:00
Juan Font Alonso
5cbd2d43a8 Update README to mention json output + some minor updates 2021-05-08 14:12:22 +02:00
Juan Font Alonso
8a207374c6 Add some return when enabling routing succeedes + some comments... 2021-05-08 13:59:18 +02:00
Juan Font Alonso
abde7dddb7 More json output 2021-05-08 13:58:51 +02:00
Juan Font Alonso
3b34f715ce Adding support for JSON-formatted output 1/n 2021-05-08 13:28:22 +02:00
Juan Font Alonso
4b3b48441f Return the machine when registering 2021-05-08 13:27:53 +02:00
Juan Font Alonso
33bee1df05 Do not print stuff in the library 2021-05-08 13:27:40 +02:00
Juan Font
32da9c0415
Update README.md
Added CI badge
2021-05-07 13:54:15 +02:00
Juan Font Alonso
5faa6cf59a Update README (although do not advirtise preauth keys that much yet) 2021-05-06 23:58:26 +02:00
Juan Font
8ca940ad30
Merge pull request #21 from juanfont/working-preauth
Support for pre auth keys
2021-05-06 23:50:28 +02:00
Juan Font Alonso
13e086980a Removed logging 2021-05-06 23:49:55 +02:00
Juan Font Alonso
4183db840e Update README (although do not advirtise preauth keys that much yet) 2021-05-06 23:25:40 +02:00
Juan Font Alonso
fc0c519206 Fill RegisterMethod field in Machine 2021-05-06 18:26:01 +02:00
Juan Font Alonso
9bac805d50 Removed spew 2021-05-06 01:03:43 +02:00
Juan Font Alonso
744c687d37 Fixed linting issues 2021-05-06 01:01:45 +02:00
Juan Font Alonso
e17e10e0b7 Preauth keys kinda working 2021-05-06 00:59:26 +02:00
Juan Font Alonso
9ce8dc3fb6 Preload the namespace 2021-05-06 00:59:16 +02:00
Juan Font Alonso
3110dd1575 Added fields in Machine to store authkey + validation tests 2021-05-06 00:08:36 +02:00
Juan Font Alonso
486faa9656 WIP Working on authkeys + tests 2021-05-05 23:00:04 +02:00
Juan Font
03bb32083b
Merge pull request #20 from cure/preauthkeys_improvements
Preauthkeys improvements
2021-05-03 22:56:18 +02:00
Juan Font
13f809be87
Merge pull request #19 from juanfont/node-cmd-improve
List nodes in namespace + register under node command
2021-05-02 23:04:46 +02:00
Ward Vandewege
b34e90c45d Fix bug in preauthkeys: namespace object was not populated in the return
value from CreatePreAuthKey and GetPreAuthKeys. Add tests for that bug,
and the rest of the preauthkeys functionality.

Fix path in `compress` Makefile target.
2021-05-02 14:58:05 -04:00
Juan Font Alonso
45e9001787 Register cmd under node 2021-05-01 20:05:10 +02:00
Juan Font Alonso
c71c13366f Minor fix 2021-05-01 20:04:03 +02:00
Juan Font Alonso
404fee8361 Added list node functionality 2021-05-01 20:00:25 +02:00
Juan Font
8198d2f8ed
Merge pull request #18 from cure/add-actions
Add a basic CI workflow with github actions
2021-04-30 10:45:11 +02:00
Juan Font Alonso
68c21faf64 Check persistnt flag errors 2021-04-30 09:55:39 +02:00
Juan Font
3532eafd8c
Merge pull request #17 from juanfont/namespace-flag
Namespace is now a flag for all the commands
2021-04-30 09:55:17 +02:00
Juan Font Alonso
5648337e68 Removed trailing space 2021-04-30 09:53:44 +02:00
Ward Vandewege
491fb0adb3 Fix a few linter errors. 2021-04-29 21:14:50 -04:00
Ward Vandewege
283ca3b6f8 Add ci workflow. 2021-04-29 21:14:50 -04:00
Juan Font Alonso
b83318bfb3 Namespace is now a flag for all the commands 2021-04-30 00:23:26 +02:00
Juan Font
51139afa50
Merge pull request #16 from juanfont/cmd-funcs-to-cli
Reorganise the CLI structure
2021-04-29 09:49:23 +02:00
Juan Font Alonso
7646bd8fd4 CLI stuff should be in the cmd/ path 2021-04-28 16:55:29 +02:00
Juan Font Alonso
77e5255fdd Move the CLI functiontionality to the CLI package 2021-04-28 16:15:45 +02:00
Juan Font
8f67bdba8c
Merge pull request #15 from cure/add-first-tests
Add first tests
2021-04-27 23:53:27 +02:00
Ward Vandewege
f5010fd75b Add test for our config validation rules. 2021-04-26 20:30:06 -04:00
Ward Vandewege
37601f6b4d Add a very simple test. 2021-04-26 19:22:28 -04:00
Juan Font
031c91a545
Merge pull request #13 from cure/add-Makefile
Add a Makefile with a few targets.
2021-04-25 22:40:34 +02:00
Ward Vandewege
6aedc1111b Add a Makefile with a few targets. The default is 'build'. The build
target calls the new version-at-commit.sh script which will
automatically populate the version variable inside the Headscale binary.

Once we start tagging releases on the git tree, that will come in handy.

The Makefile also has a 'test' target (does nothing yet, no tests yet)
and a 'dev' target, which runs linters, tests, and finally builds.
2021-04-25 10:31:52 -04:00