duck

package
v0.0.0-...-6abb0f4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAddress

func GenerateAddress(token string) (string, error)

GenerateAddress generates a new @duck.com email address

func GetClient

func GetClient() (c *resty.Client)
func GetLoginLink(user string) error

GetLoginLink sends the OTP link/passphrase to the user's email

Types

type DashboardResponse

type DashboardResponse struct {
	User struct {
		AccessToken string `json:"access_token"`
	} `json:"user"`
}

func GetDashboard

func GetDashboard(otpToken string) (response DashboardResponse, err error)

GetDashboard uses the one-time token from `getLogin` to retrieve a long-lasting access token

type LoginResponse

type LoginResponse struct {
	Status string `json:"status"`
	Token  string `json:"token"`
	User   string `json:"user"`
}

func GetLogin

func GetLogin(user string, passphrase string) (response LoginResponse, err error)

GetLogin takes the passphrase from `getLoginLink`, and retrieves a one-time login token

Jump to

Keyboard shortcuts

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