Documentation ¶
Index ¶
- func DecodeAccessToken(accessToken string) (tokenJson []byte, err error)
- func DefaultFilePath() string
- func JsonMarshalV2(config *Data) (output []byte, err error)
- func JsonUnmarshalV2(input []byte, config *Data) (err error)
- type AuthPrompt
- type AuthPromptType
- type Data
- type DiskPersistor
- type Persistor
- type ReadWriter
- type Reader
- type Repository
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAccessToken ¶
func DefaultFilePath ¶
func DefaultFilePath() string
func JsonMarshalV2 ¶
func JsonUnmarshalV2 ¶
Types ¶
type AuthPrompt ¶
type AuthPrompt struct { Type AuthPromptType DisplayName string }
type AuthPromptType ¶
type AuthPromptType string
const ( AuthPromptTypeText AuthPromptType = "TEXT" AuthPromptTypePassword AuthPromptType = "PASSWORD" )
type Data ¶
type Data struct { ConfigVersion int Target string ApiVersion string AuthorizationEndpoint string LoggregatorEndPoint string AccessToken string RefreshToken string OrganizationFields models.OrganizationFields SpaceFields models.SpaceFields AuthenticationPrompts map[string]AuthPrompt }
type DiskPersistor ¶
type DiskPersistor struct {
// contains filtered or unexported fields
}
func NewDiskPersistor ¶
func NewDiskPersistor(path string) (dp DiskPersistor)
func (DiskPersistor) Delete ¶
func (dp DiskPersistor) Delete()
func (DiskPersistor) Load ¶
func (dp DiskPersistor) Load() (data *Data, err error)
func (DiskPersistor) Save ¶
func (dp DiskPersistor) Save(data *Data) (err error)
type ReadWriter ¶
type Reader ¶
type Reader interface { ApiEndpoint() string ApiVersion() string HasAPIEndpoint() bool AuthorizationEndpoint() string LoggregatorEndpoint() string AccessToken() string RefreshToken() string OrganizationFields() models.OrganizationFields HasOrganization() bool SpaceFields() models.SpaceFields HasSpace() bool Username() string UserGuid() string UserEmail() string IsLoggedIn() bool }
type Repository ¶
type Repository interface { ReadWriter Close() }
func NewRepositoryFromFilepath ¶
func NewRepositoryFromFilepath(filepath string, errorHandler func(error)) Repository
func NewRepositoryFromPersistor ¶
func NewRepositoryFromPersistor(persistor Persistor, errorHandler func(error)) Repository
Click to show internal directories.
Click to hide internal directories.