Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { Err error `json:"err"` Message string `json:"message"` StatusCode int `json:"statusCode"` Status string `json:"status"` }
APIError struct of error, error message, status code and status
type KuberaError ¶
type KuberaError struct {
Message string `json:"message"`
}
KuberaError represent error message
type TokenFetching ¶
type TokenFetching struct {
conn.Connection `json:"connection"`
}
TokenFetching struct of token fetching connection
func NewTokenFetcher ¶
func NewTokenFetcher(config TokenFetchingConfig) *TokenFetching
NewTokenFetcher returns a new instance of TokenFetching
func (*TokenFetching) Fetch ¶
func (t *TokenFetching) Fetch() (Token, error)
Fetch returns authenticated token
func (TokenFetching) String ¶
func (t TokenFetching) String() string
type TokenFetchingConfig ¶
type TokenFetchingConfig struct {
Connection conn.Connection
}
TokenFetchingConfig is struct of connection
type UserCreation ¶
type UserCreation struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Credential UserCredential `json:"password"` }
UserCreation contains structure of the input data to create NewUser
func NewUserCreator ¶
func NewUserCreator(config UserCreationConfig) *UserCreation
NewUserCreator returns a new instance of UserCreation
func (*UserCreation) Create ¶
func (t *UserCreation) Create() (Token, error)
Create will creates new kubera user in kubera by making post request
func (UserCreation) String ¶
func (t UserCreation) String() string
String print UserCreation in pretty format
type UserCreationConfig ¶
type UserCreationConfig struct {
UserCreation
}
UserCreationConfig defines the structure of user input fields
type UserCredential ¶
type UserCredential struct { Email string `json:"publicValue"` Password string `json:"secretValue"` }
UserCredential contains structure of the user secrets input