twinstake

package
v0.0.0-...-fa9a987 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsAuthParameters

type AwsAuthParameters struct {
	Username string `json:"USERNAME"`
	Password string `json:"PASSWORD"`
}

type AwsAuthRequest

type AwsAuthRequest struct {
	AuthParameters AwsAuthParameters `json:"AuthParameters"`
	AuthFlow       string            `json:"AuthFlow"`
	ClientID       string            `json:"ClientId"`
}

AuthRequest represents the structure for the authentication request.

type AwsAuthenticationResult

type AwsAuthenticationResult struct {
	AccessToken  string `json:"AccessToken"`
	ExpiresIn    int    `json:"ExpiresIn"`
	IdToken      string `json:"IdToken"`
	RefreshToken string `json:"RefreshToken"`
	TokenType    string `json:"TokenType"`
}

AuthenticationResult represents the structure for the authentication result.

type AwsError

type AwsError struct {
	Type    string `json:"__type"`
	Message string `json:"message"`
}

type AwsIncognitoResponse

type AwsIncognitoResponse struct {
	AuthenticationResult AwsAuthenticationResult `json:"AuthenticationResult"`
	ChallengeParameters  map[string]string       `json:"ChallengeParameters"`
}

Response represents the main structure of the response.

type Client

type Client struct {
	Chain string
	Url   string

	// AWS needs a lot of pesky parameters
	Username string
	Region   string
	ClientId string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(chain string, cfg *services.TwinstakeConfig) (*Client, error)

func (*Client) Login

func (cli *Client) Login() (string, error)
func (cli *Client) Post(path string, requestBody any, response any) error {
	return cli.Send("POST", path, requestBody, response)
}

type Error

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

Jump to

Keyboard shortcuts

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