configuration

package
v6.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2013 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFile

func ConfigFile() (file string, err error)

Keep this one public for configtest/configuration.go

func DecodeTokenInfo

func DecodeTokenInfo(accessToken string) (clearTokenInfo []byte, err error)

Types

type Configuration

type Configuration struct {
	Target                  string
	ApiVersion              string
	AuthorizationEndpoint   string
	AccessToken             string
	RefreshToken            string
	Organization            cf.Organization
	Space                   cf.Space
	ApplicationStartTimeout time.Duration // will be used as seconds
}

func (Configuration) HasOrganization

func (c Configuration) HasOrganization() bool

func (Configuration) HasSpace

func (c Configuration) HasSpace() bool

func (Configuration) IsLoggedIn

func (c Configuration) IsLoggedIn() bool

func (Configuration) UserEmail

func (c Configuration) UserEmail() (email string)

func (Configuration) UserGuid

func (c Configuration) UserGuid() (guid string)

func (Configuration) Username

func (c Configuration) Username() (guid string)

type ConfigurationDiskRepository

type ConfigurationDiskRepository struct {
}

func NewConfigurationDiskRepository

func NewConfigurationDiskRepository() (repo ConfigurationDiskRepository)

func (ConfigurationDiskRepository) ClearSession

func (repo ConfigurationDiskRepository) ClearSession() (err error)

func (ConfigurationDiskRepository) ClearTokens

func (repo ConfigurationDiskRepository) ClearTokens() (err error)

func (ConfigurationDiskRepository) Delete

func (repo ConfigurationDiskRepository) Delete()

func (ConfigurationDiskRepository) Get

func (repo ConfigurationDiskRepository) Get() (c *Configuration, err error)

func (ConfigurationDiskRepository) Save

func (repo ConfigurationDiskRepository) Save() (err error)

func (ConfigurationDiskRepository) SetOrganization

func (repo ConfigurationDiskRepository) SetOrganization(org cf.Organization) (err error)

func (ConfigurationDiskRepository) SetSpace

func (repo ConfigurationDiskRepository) SetSpace(space cf.Space) (err error)

type ConfigurationRepository

type ConfigurationRepository interface {
	Get() (config *Configuration, err error)
	Delete()
	Save() (err error)
	ClearTokens() (err error)
	ClearSession() (err error)
	SetOrganization(org cf.Organization) (err error)
	SetSpace(space cf.Space) (err error)
}

type TokenInfo

type TokenInfo struct {
	Username string `json:"user_name"`
	Email    string `json:"email"`
	UserGuid string `json:"user_id"`
}

Jump to

Keyboard shortcuts

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