roles_files

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: 11 Imported by: 12

Documentation

Overview

Implements the RolesReader interface (roles.go) for text files. It is assumed that users will have another process that obtains roles data from AWS and deposits files.

example use: see roles_files_test.go

Index

Constants

View Source
const (
	ROLE_PROVIDER = "file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RolesFiles

type RolesFiles struct {
	BaseDir       string
	AccessKeyFile string
	SecretFile    string
	TokenFile     string
	// contains filtered or unexported fields
}

RolesFiles describes the location of roles files as well as a lock for safe access.

func NewRolesFiles

func NewRolesFiles() *RolesFiles

NewRolesFiles returns a pointer to a RolesFields instance.

func (*RolesFiles) Get

func (rf *RolesFiles) Get() (string, string, string, error)

Get returns the (accessKey,secret,token), or an error.

func (*RolesFiles) GetAccessKey

func (rf *RolesFiles) GetAccessKey() (string, error)

GetAccessKey returns the accessKey or an error.

func (*RolesFiles) GetSecret

func (rf *RolesFiles) GetSecret() (string, error)

GetSecret returns the secret or an error.

func (*RolesFiles) GetToken

func (rf *RolesFiles) GetToken() (string, error)

GetToken returns the token or an error.

func (*RolesFiles) IsEmpty

func (rf *RolesFiles) IsEmpty() bool

IsEmpty determines if a RolesFiles struct is uninitialized.

func (*RolesFiles) ProviderType

func (rf *RolesFiles) ProviderType() string

ProviderType is a descriptive string of the implementation.

func (*RolesFiles) RolesRead

func (rf *RolesFiles) RolesRead() error

RolesRead populates rolesFields with blocking refresh of files

func (*RolesFiles) RolesWatch

func (rf *RolesFiles) RolesWatch(err_chan chan error, read_signal chan bool)

RolesWatch catches filesystem notify events to determine when new roles files are ready to be read in and used as new authentication values.

func (*RolesFiles) UsingIAM

func (rf *RolesFiles) UsingIAM() bool

UsingIAM tells us if the credentials provided by this role are temporary credentials which also have a Token component, or if they are durable key/secret-only credentials.

func (*RolesFiles) ZeroRoles

func (rf *RolesFiles) ZeroRoles()

ZeroRoles recreate the RolesFiles as initialized by NewRolesFiles

Jump to

Keyboard shortcuts

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