stim

command module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 7 Imported by: 0

README

Stim

Build ReportCard GoDoc License

Running in Docker

Stim is available in Docker. To use, simply run

docker run readytalk/stim <stim-command>

Stim natively supports configuration via environment variables. So, for example, to log into Vault and map the token to your home directory, run

docker run \
  -it \
  -e VAULT_ADDR=https://my-vault-domain:8200 \
  -v $HOME/.vault-token:/root/vault-token \
  readytalk/stim vault login

Developing with Stim

Project Structure

The project is broken down into 4 major componenets: api, command, packages, and stimpacks. More explaination below.

├── pkg/
│   ├── pagerduty/
│   ├── utils/
│   ├── vault/
│   ├── ...
├── stim/
├── stimpacks/
│   ├── deploy/
│   ├── vault/
│   ├── ...
├── scripts/
├── vendor/
  • pkg/ The components in this directory should be developed as stand-alone packages that can be consumed not only by Stim but also externally. They are generally wrappers around existing APIs (for example Vault) that simplify basic functionality.
  • stim/ This component is the core of the Stim application. It is what every stimpack interfaces with to talk with the core Stim application. Stim initializes components as-needed by the stimpacks. For instance, if a stimpack needs access to Pagerduy, Stim will call Vault, get the API key for Pagerduty and instantiate a new instance of Pagerduty for the stimpack to use. Stim also allows stimpacks to attach cli commands and add configuration parameters.
  • stimpacks/ Stimpacks are pluggable extensions of the main Stim application. They interface directly with the Stim api and can add commands and configuration to the cli. They generally contain opionated functions for configuring developer workstations, building applications, testing, and deployments.
Developing Stimpacks

See comments in stimpacks/vault for details TODO: More docs here

Developing Re-usable Packages

Guidelines:

  • Don't log, just return errors and let the consumer deal with it

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
aws
stimpacks
aws

Jump to

Keyboard shortcuts

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