go-exercises-manager

command
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 11 Imported by: 0

README

go-exercises-manager

The utility for managing users.

Features

  • commands:
    • add a user:
      • parameters:
        • username;
        • password:
          • generate automatically by default;
        • password hashing cost;
        • generated password length.

Installation

Prepare the directory:

$ mkdir --parents "$(go env GOPATH)/src/github.com/thewizardplusplus/"
$ cd "$(go env GOPATH)/src/github.com/thewizardplusplus/"

Clone this repository:

$ git clone https://github.com/thewizardplusplus/go-exercises-backend.git
$ cd go-exercises-backend

Install dependencies with the dep tool:

$ dep ensure -vendor-only

Build the utility:

$ go install ./cmd/go-exercises-manager

Usage

$ go-exercises-manager -h | --help
$ go-exercises-manager add-user [options]

Commands:

  • add-user — add the user.

Options:

  • -h, --help — show the context-sensitive help message and exit;
  • -u STRING, --username STRING — username;
  • -p STRING, --password STRING — user password (default: generated automatically);
  • -c INTEGER, --cost INTEGER — cost of the user password hashing (range: from 4 to 31 inclusive; default: 10);
  • -l INTEGER, --length INTEGER — length of the user password to be generated (minimum: 6; default: 6).

Environment variables:

  • STORAGE_ADDRESSPostgreSQL connection URI (default: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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