14 Commits

Author SHA1 Message Date
337d3e9ae1
refactor: more conventional name for method 2021-07-26 17:50:40 +02:00
60a70d2d83
refactor(recipe): better naming, sorting and types
In order to arrange various types of sorting for the app catalogue, it
seems like the recommended approach is to maintain a separate data
structure alongside the JSON map we get from apps.coopcloud.tech.

Therefore, I attempt to provide a ToList() method and accompanying
sort.Sort interface sorting implementations. For now, this is just
sorting by app name.

I am testing this type of implementation here before moving on to
arrange different types of sorting for the `app list` command.
2021-07-26 17:25:08 +02:00
1f62ace524
refactor: use method to sort recipe apps listing 2021-07-26 15:43:35 +02:00
1f550c2470
feat: finish recipe create command 2021-07-25 19:28:29 +02:00
359b07b562
WIP: recipe create 2021-07-25 00:07:35 +02:00
45c3bce7ff
fix: return if erroring out 2021-07-24 23:30:42 +02:00
6eee02d90a
feat: add recipe versions command 2021-07-24 23:18:23 +02:00
fce1ab6c02
refactor: better naming for loop scoped variables
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-22 14:53:08 +02:00
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
56cec1580a
refactor: use app-less naming for this struct also
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-22 14:25:37 +02:00
1f6c0e8c4b
feat: support local apps.json loading
All checks were successful
continuous-integration/drone/pr Build is passing
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 https://git.autonomic.zone/coop-cloud/go-abra/issues/9.
2021-07-21 22:42:51 +02:00
6b370599fa
refactor: simplified sort of app names
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-21 17:12:35 +01:00
9216cc5d6a
refactor: simplifing range statement
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-21 16:36:46 +01:00
302ebcb394
feat: add recipe ls command
All checks were successful
continuous-integration/drone/pr Build is passing
2021-07-21 13:28:46 +02:00