roles

package
v0.0.0-...-251dc3f Latest Latest
Warning

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

Go to latest
Published: May 12, 2015 License: BSD-2-Clause Imports: 0 Imported by: 2

Documentation

Overview

Defines an interface that can be implemented to provide IAM Roles data through various communication mechanisms, most likely regular text files (see the roles_files.go implementation).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RolesFields

type RolesFields struct {
	AccessKey string
	Secret    string
	Token     string
}

func NewRolesFields

func NewRolesFields() *RolesFields

NewRolesFields returns a pointer to a RolesFields instance.

func (*RolesFields) IsEmpty

func (rf *RolesFields) IsEmpty() bool

IsEmpty determines if a RolesField struct is uninitialized.

func (*RolesFields) ZeroRoles

func (rf *RolesFields) ZeroRoles()

ZeroRoles recreate the RolessFields as initialized by NewRolesFields.

type RolesReader

type RolesReader interface {

	// a textual description for an instantiating package.
	// in the case of the instantiating packages provided, I use a const ROLES_PROVIDER.
	ProviderType() string
	// UsingIAM tells us if the credentials provided by this role are temporary credentials which
	// also have a Token component, or if they are durable accesskey/secret-only credentials.
	UsingIAM() bool
	// blocking read of roles from roles provider
	RolesRead() error
	// zero out roles values
	ZeroRoles()
	// test for emptiness
	IsEmpty() bool

	// getters
	// wrapper to individual getters
	Get() (string, string, string, error)

	// below funcs should be called by GetAllRoles
	GetAccessKey() (string, error)
	GetSecret() (string, error)
	GetToken() (string, error)

	// Any activity that is required to observe, validate, or refresh
	// roles out-of-band.
	// The chan 'c' can be used to signal abnormal states, while 's' can
	// be used to signal normal operation. Packages instantiating this
	// interface may panic if there is no out-of-band updating defined.
	RolesWatch(c chan error, s chan bool)
}

RolesReader is our interface to describe the functionality for roles credential information.

Jump to

Keyboard shortcuts

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