Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID string `json:"id"` Kind string `json:"kind"` HRef string `json:"href"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Username string `json:"username"` Email string `json:"email"` Banned bool `json:"banned"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Organization Org `json:"organization"` }
func GetCurrentAccount ¶
func GetCurrentAccount(wrapper client.Wrapper, reg Registration) (*Account, error)
GetCurrentAccount uses a new flow with direct cluster tokenauth
type AccountError ¶
type AccountError struct { Href string `json:"href"` ID string `json:"id"` Kind string `json:"kind"` Code string `json:"code"` OperationId string `json:"operation_id"` Reason string `json:"reason"` Inner error `json:"-"` }
AccountError - holds error information returned from accounts endpoint if error occurred
func (*AccountError) Error ¶
func (a *AccountError) Error() string
func (*AccountError) MarshalLogObject ¶
func (a *AccountError) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*AccountError) Unwrap ¶
func (a *AccountError) Unwrap() error
func (*AccountError) Verbose ¶
func (a *AccountError) Verbose() []byte
type ErrorWithBodyWrapper ¶
type ErrorWithBodyWrapper struct { AccountError *AccountError StatusCode int }
type ErrorWrapper ¶
type ErrorWrapper struct{}
type FakeWrapper ¶
type FakeWrapper struct {
GetAccountResponse *Account
}
type Identity ¶
type Identity struct { AccountNumber string `json:"account_number"` OrgID string `json:"org_id"` Type string `json:"type"` Internal Internal `json:"internal"` System map[string]string `json:"system,omitempty"` }
func GetIdentity ¶
func GetIdentity(wrapper client.Wrapper, reg Registration) (*Identity, error)
GetIdentity is a facade over all the steps required to get an Identity
type Registration ¶
type Registration struct { ClusterID string `json:"cluster_id"` AuthorizationToken string `json:"authorization_token"` }
Registration is the document posted to cluster registration service
Click to show internal directories.
Click to hide internal directories.