authentication

package
v0.0.0-...-a198cfb Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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

func (*APIError) Error

func (e *APIError) Error() string

type KuberaError

type KuberaError struct {
	Message string `json:"message"`
}

KuberaError represent error message

type Token

type Token struct {
	JWT       string `json:"jwt"`
	AccountID string `json:"accountId"`
}

Token struct of JWT token and AccountID

func (Token) String

func (t Token) String() string

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

Jump to

Keyboard shortcuts

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