Commit Graph

27 Commits

Author SHA1 Message Date
decentral1se fce1ab6c02
refactor: better naming for loop scoped variables
continuous-integration/drone/push Build is passing Details
2021-07-22 14:53:08 +02:00
decentral1se 381de28e83
refactor: make ReadApps main API entrypoint
This allows AppsReadFS/AppsReadWeb to be used behind the scenes of this
API for the conditional loading logic. All functions are left as public
for now while we're experimenting.
2021-07-22 14:51:56 +02:00
decentral1se 56cec1580a
refactor: use app-less naming for this struct also
continuous-integration/drone/push Build is passing Details
2021-07-22 14:25:37 +02:00
Roxie Gibson fc7dade6f8
feat: server add command
continuous-integration/drone/push Build is passing Details
Interacts with and stores infomaton in the docker store at ~/.docker

Equivalent to docker context add
2021-07-22 12:48:14 +01:00
Roxie Gibson fe86b50ee3
refactor: actual context getting
continuous-integration/drone/push Build is passing Details
2021-07-22 09:51:27 +01:00
decentral1se 1f6c0e8c4b
feat: support local apps.json loading
continuous-integration/drone/pr Build is passing Details
This logic supports the following cases:

- Download a fresh apps.json and load it if missing
- Check if a local apps.json is old and get a fresh one if so
- Always save a local copy after downloading a fresh apps.json

The http.Head() call is faster than a http.Get() call (only carries back
respones headers) and aims to make the more general case more
performant: you have the latest copy of the apps.json and don't need to
download another one. This a direct port of our Bash implementation
logic.

Closes #9.
2021-07-21 22:42:51 +02:00
Roxie Gibson 6b370599fa
refactor: simplified sort of app names
continuous-integration/drone/push Build is passing Details
2021-07-21 17:12:35 +01:00
Roxie Gibson 9216cc5d6a
refactor: simplifing range statement
continuous-integration/drone/push Build is passing Details
2021-07-21 16:36:46 +01:00
decentral1se 53576dc916
Revert "style: add missing type marker"
continuous-integration/drone/push Build is passing Details
This reverts commit e064f18730.

As discussed, this is explicitly using a type shorthand which is all
good.
2021-07-21 13:32:16 +02:00
decentral1se 302ebcb394
feat: add recipe ls command
continuous-integration/drone/pr Build is passing Details
2021-07-21 13:28:46 +02:00
Roxie Gibson 29971c36a0
refactor: moved all fatal errors to logrus
continuous-integration/drone/push Build is passing Details
This will allow us to test commands that would normally exit
2021-07-21 09:04:34 +01:00
decentral1se a74d214121
docs: use hyphen shortname and trim message
continuous-integration/drone/push Build is passing Details
2021-07-21 00:19:06 +02:00
decentral1se e064f18730
style: add missing type marker
continuous-integration/drone/push Build is passing Details
2021-07-21 00:17:16 +02:00
decentral1se 7b2100c568
feat: add version command
continuous-integration/drone/push Build is passing Details
2021-07-20 23:59:47 +02:00
Roxie Gibson 16514b3151
feat: implemented type & servers flags in `app ls`
continuous-integration/drone/push Build is passing Details
2021-07-20 13:00:03 +01:00
Roxie Gibson cfe2f70151
refactor: moving logging to command functions
easier to unit test our util commands like this
2021-07-19 12:47:46 +01:00
Roxie Gibson bd9bc530d1
faet: a draft version of the app ls command
continuous-integration/drone/push Build is passing Details
2021-07-19 08:37:00 +01:00
Roxie Gibson 37c06c82bf
feat: added error to GetContextEndpoint
continuous-integration/drone/push Build is passing Details
this ill make the progam not fail if there is a non-docker swarm context
2021-07-18 06:34:22 +01:00
Roxie Gibson 38f610bdec
feat: abra server ls
continuous-integration/drone/push Build is passing Details
WE DID IT! The first actual command to be ported.

Code is still a mess in terms of UX but its a milestone!
2021-07-18 04:21:26 +01:00
Roxie Gibson d1f7e8011d
refactor: Moved table function to fornatter
Makes more sense for it to be in there
2021-07-18 03:24:48 +01:00
Roxie Gibson 2134f57dd0
WIP: Messy code that is mostly just testing
continuous-integration/drone/push Build is passing Details
This is me trying to print all services in a stack.

Struggling to isolate stack and tasks which is needed for swarm
2021-07-17 09:30:56 +01:00
Roxie Gibson 6c748922b4
feat: added context flag to make dev easier
needed until we have proper server subcommand system
2021-07-17 09:29:25 +01:00
Roxie Gibson b9e06f2310
feat: added util formatting for the cil 2021-07-17 09:27:52 +01:00
Roxie Gibson be46695d82
feat: added flags to base command
they already exist just attatching them to the command
2021-07-17 05:11:48 +01:00
Roxie Gibson a78bb9123a
feat: POC passgen 2021-07-15 08:23:26 +01:00
Roxie Gibson 1adca5ca0e
feat: added app commands and flags for commands 2021-07-15 06:17:47 +01:00
Roxie Gibson 9a0bd6dc11
refactor(cli): moved commands and cli out of main 2021-07-15 03:44:07 +01:00