GithubHelp home page GithubHelp logo

akt's People

Contributors

boz avatar troian avatar

Watchers

 avatar  avatar  avatar  avatar

akt's Issues

configuration loading, saving

Add functionality in config/ for initializing, loading, editing configuration.

Configuration should store structures defined in config/types.go. It should be serialized as YAML, stored in the configuration directory as config.yml.

Configuration is stored in a directory. There can be multiple directories.

There are a number of ways of finding a directory:

  1. Explicit path.
  2. Determine local path by heuristic (see below)
  3. Default global directory (~/.akt)

Interface

func Load(opts LoadOptions) Config

Example Usage:

cfg, err := config.Load(config.DefaultLoadOptions())

LoadOptions:

type LoadOptions struct {
  Path string    // default: empty
  Global bool   // default: true
}
  • If Global is true, include the global config directory (~/.akt), if available.
  • If Path is set, use the directory at Path as local configuration directory.
  • If Path is not set:
    1. Stop if in user's home directory.
    2. Stop if $PWD/.akt is available.
    3. Stop if "$PWD/.git" exists.
    4. Repeat above steps at successive parent directories until stop.

command: account create, list

Commands to create, list accounts.

akt account create <name>

Create a new account.

Options:

Flag Description Default
--[no-]global Create a global account, or not. --global
--type <type> Use the given keyring backend test

akt account list

List current accounts.

command: config

Create akt config command to display current configuration. This command should use the library created for #1.

Options:

  • --confdir <directory> use an explicit directory instead of auto-discovered path.
  • --[no-]global include global ~/.akt configuration (defaults to --global)

command: network create, list

Network create, list commands.

akt network create <name>

Creates a new network.

Options:

Name Defult Required
--chain-id <id> Y
--endpoint Y
--[no-]global true N

akt network list

Lists given networks.

command: init

Command to initialize configuration.

akt init [directory].

  • akt configuration directory will be created at [directory]/.akt
  • [directory] defaults to $PWD;
  • --global flag will initialize the global configuration at ~/.akt
  • --confdir <directory> requires no [directory] positional argument and will use the directory given to the argument.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.