config

package
v0.0.0-...-939ff54 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FileName = ".lazy-awslogs"

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Current      string
	Environments []Environment
}

func Load

func Load() (c Configuration)

Load returns a Configuration object.

func (*Configuration) AddEnvironment

func (this *Configuration) AddEnvironment(newEnvironment Environment) (err error)

AddEnvironment adds a Environment.

func (*Configuration) CurrentEnvironment

func (this *Configuration) CurrentEnvironment() (environment Environment)

CurrentEnvironment returns Environment current.

func (*Configuration) CurrentEnvironmentP

func (this *Configuration) CurrentEnvironmentP() (environment *Environment)

CurrentEnvironment returns Environment current pointer.

func (*Configuration) ReadGroups

func (this *Configuration) ReadGroups() (groups []Group)

ReadGroups returns groups in Config.

func (*Configuration) ReadStreams

func (this *Configuration) ReadStreams(groupName string) (streams []Stream)

ReadStreams returns streams in Config.

func (*Configuration) RemoveEnvironment

func (this *Configuration) RemoveEnvironment(targetName string) (err error)

RemoveEnvironment remove a Environment.

func (*Configuration) SetCurrentEnvironmentParam

func (this *Configuration) SetCurrentEnvironmentParam(key EnvironmentKey, value string)

SetCurrentProfile sets profile name in current Environment.

func (*Configuration) UpdateCurrent

func (this *Configuration) UpdateCurrent(current string) (err error)

UpdateCurrent updates CurrentEnvironment.

func (*Configuration) UpdateGroups

func (this *Configuration) UpdateGroups(groups []Group)

UpdateGroups updates groups in Config.

func (*Configuration) UpdateStreams

func (this *Configuration) UpdateStreams(groupName string, streams []Stream)

UpdateStreams update streams in Config.

type Environment

type Environment struct {
	Name    string
	Profile string
	Region  string
	Groups  []Group
}

type EnvironmentKey

type EnvironmentKey int
const (
	Name EnvironmentKey = iota
	Profile
	Region
)

type Group

type Group struct {
	Name    string
	Streams []Stream
}

type Stream

type Stream struct {
	Name string
}

Jump to

Keyboard shortcuts

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