Vaccine-Hunters-Canada / VaxFinder-admin-cli

CLI for admins to manage the Vaccine Hunters Finder tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VaxFinder Admin CLI

A CLI for administrators to manage vaccine availabilities and other data for the Vaccine Hunters Finder tool.

Installation

Click here for installation instructions.

Commands

If you ever need help, run vf-admin help.

vf-admin configure --key=<auth-key>

Before running all other commands, you must add an authentication key that can be obtained through one of the developers working on the VaxFinder backend. Multiple profiles are supported so you can be authenticated using multiple keys. To create a profile with an authentication key, run vf-admin configure --key=<auth-key> --profile=<named-profile>.

Go to the docs folder to view auto-generated documentation on the CLI.

Note that there is no stable release for this tool yet. 🚧

Development

Installation

go get .

Pre-commit Hooks

Pre-commit hooks helps identify simple issues in code before it's committed into Git.

Install pre-commit

Follow installation instructions for pre-commit here.

Install the git hook scripts

pre-commit install

Temporarily Disabling hooks

It's possible to disable hooks temporarily, but it isn't recommended.

$ SKIP=go-fmt,go-vet,go-lint git commit -m <message>

Running locally

go run main.go help

You can also install the application locally which is how it is expected to be used in production. In order to do this, you must first set GOPATH and GOBIN appropriately. If they are not set, add this to your .bashrc or .bash_profile etc. AND open new terminal.

make install
vf-admin help

Generating an OpenAPI Client

make api-codegen

After running this command, you may find that there is an issue. This is discussed here. In the meantime, manually fix the issue on line ~28 at internal/api/client.gen.go by replacing InputTypeEnum InputTypeEnum = 1 with InputTypeEnum0 InputTypeEnum = 1.

Generating Docs Automatically

make docs

How to install

Using cURL

TBA

Using go

TBA

How to uninstall

TBA

About

CLI for admins to manage the Vaccine Hunters Finder tool.

License:Apache License 2.0


Languages

Language:Go 99.6%Language:Makefile 0.4%