config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthed

func CheckAuthed() error

CheckAuthed ensures user has setup an API token

func CheckLoaded

func CheckLoaded() error

CheckLoaded ensures configuration has been loaded

func Host

func Host() string

Host returns the base Karma API endpoint

Types

type Configuration

type Configuration struct {
	Token string `mapstructure:"token"`
	Team  struct {
		ID string `mapstructure:"id"`
	} `mapstructure:"team"`
	Users []struct {
		Name string `mapstructure:"name"`
		ID   string `mapstructure:"id"`
	} `mapstructure:"users"`
	Feats []struct {
		ID    string `mapstructure:"id"`
		Label string `mapstructure:"label"`
		Slug  string `mapstructure:"slug"`
		Karma int    `mapstructure:"karma"`
	} `mapstructure:"feats"`
}

Configuration is the

func Get

func Get() Configuration

Get returns a configuration object

Jump to

Keyboard shortcuts

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