refactor: add CLI schema and code generator #41

Manually merged
dananglin merged 1 commit from enbas-cli-schema into main 2024-08-13 16:29:29 +01:00
Owner

Summary

  • Created a custom CLI schema for Enbas which will act as the Source of Truth for the executor definitions (and more in the future).
  • Created a code generator which uses the schema to generate the executor definitions and code in the internal usage package.

Changes

  • Created the Enbas CLI schema as the Source of Truth for Enbas.
  • Created the code generator that generates the executor definitions and code in the usage package for now.
  • Regenerated the executor definitions using the code generator.
  • Moved the custom flag value types to the new internal flag package.
  • Created a new flag value type for the bool pointer to replace the flag.BoolFunc() used for the sensitive and no-color flags.
  • Moved the version and build variables to the new internal version package to simplify the version executor.
  • Created a new usage package and moved the usage functions there.
  • Changed the type of the account-name flag from string to the internal StringSliceValue type.
### Summary - Created a custom CLI schema for Enbas which will act as the Source of Truth for the executor definitions (and more in the future). - Created a code generator which uses the schema to generate the executor definitions and code in the internal `usage` package. ### Changes - Created the Enbas CLI schema as the Source of Truth for Enbas. - Created the code generator that generates the executor definitions and code in the `usage` package for now. - Regenerated the executor definitions using the code generator. - Moved the custom flag value types to the new internal `flag` package. - Created a new flag value type for the bool pointer to replace the `flag.BoolFunc()` used for the `sensitive` and `no-color` flags. - Moved the version and build variables to the new internal `version` package to simplify the version executor. - Created a new `usage` package and moved the usage functions there. - Changed the type of the `account-name` flag from `string` to the internal `StringSliceValue` type.
dananglin added this to the v0.2.0 milestone 2024-08-12 09:58:01 +01:00
dananglin added 18 commits 2024-08-12 09:58:02 +01:00
dananglin added 1 commit 2024-08-12 10:35:57 +01:00
dananglin added 1 commit 2024-08-12 12:41:59 +01:00
- move the build information to the internal package to simplify the
  version executor.
- add the Executor interface to internal/executor/executors.go
dananglin added 1 commit 2024-08-12 16:02:09 +01:00
dananglin added 1 commit 2024-08-12 17:25:34 +01:00
dananglin changed title from WIP: refactor: add CLI schema and code generator to refactor: add CLI schema and code generator 2024-08-12 17:43:24 +01:00
dananglin added 1 commit 2024-08-12 21:45:16 +01:00
dananglin added 1 commit 2024-08-13 11:20:42 +01:00
dananglin added 1 commit 2024-08-13 11:55:14 +01:00
dananglin added 1 commit 2024-08-13 12:39:10 +01:00
dananglin force-pushed enbas-cli-schema from 22b47e4b40 to 84091f398d 2024-08-13 14:59:49 +01:00 Compare
dananglin manually merged commit 84091f398d into main 2024-08-13 16:29:29 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: apollo/enbas#41
No description provided.