account

package
v0.0.0-...-f46f4bb Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectHTTPClient

func InjectHTTPClient(ctx context.Context, httpClient *http.Client) context.Context

Types

type LoginRequest

type LoginRequest struct {
	Email          string `json:"email"`
	Password       string `json:"password,omitempty"`
	TwoFactorToken string `json:"2FA_token,omitempty"`
	Description    string `json:"description,omitempty"`
	Expires        bool   `json:"expires"`
}

type LoginResponse

type LoginResponse struct {
	Token             *Token `json:"token"`
	TwoFactorRequired bool   `json:"-"`
	WrongPassword     bool   `json:"-"`
}

type Token

type Token struct {
	ID             string `json:"id"`
	UserID         string `json:"user_id"`
	AccessKey      string `json:"access_key"`
	SecretKey      string `json:"secret_key"`
	OrganizationID string `json:"organization_id"`
	ProjectID      string `json:"project_id"`
}

Token represents a Token

func GetAPIKey

func GetAPIKey(ctx context.Context, secretKey string) (*Token, error)

Jump to

Keyboard shortcuts

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