command

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package command provides the root and sub-commands for the clean-arch web project. Commands are organized using the cobra library. The root command starts the web server itself while the "db" sub-command can be used for the database migration actions. Three migration actions are supported. The init-dev and init-prod actions for initialization of the database with the development or production suitable data records and the migrate action for converting from one config and database version to another version.

./caweb [-c /path/of/main/config.yaml]           # start web server
./caweb db init-dev [-c /path/of/main/config.yaml]
./caweb db init-prod [-c /path/of/main/config.yaml]
./caweb db migrate
    /path/of/src/config.yaml
    /path/of/dst/config.yaml
    [-c /path/of/main/config.yaml]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the rootCmd which in turn parses CLI arguments and flags and runs the most specific cobra command. The exit code may be a boolean (zero for success and non-zero for failure) or may be chosen based on the error condition (if it is desired to report several error conditions in the CLI of this program).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL