sdk

package
v0.0.0-...-b20942e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CognitoClient

type CognitoClient struct {
	ClientID string `json:"client_id"`
	API      string `json:"api"`
	Username string `json:"username"`
	Password string `json:"password"`
	// temp attributes
	AccessToken  string `json:"access_token"`
	IDToken      string `json:"id_token"`
	RefreshToken string `json:"refresh_token"`
}

func Authenticate

func Authenticate() (*CognitoClient, error)

func NewCognitoClientFromJSON

func NewCognitoClientFromJSON(filePath string) (*CognitoClient, error)

func (*CognitoClient) AddTarget

func (c *CognitoClient) AddTarget(host string) (Response, error)

func (*CognitoClient) GetTargets

func (c *CognitoClient) GetTargets() (Response, error)

func (*CognitoClient) Pull

func (c *CognitoClient) Pull(namespace, host string) (Response, error)

func (*CognitoClient) Push

func (c *CognitoClient) Push(namespace, host, value string) (Response, error)

func (*CognitoClient) Refresh

func (c *CognitoClient) Refresh() error

func (*CognitoClient) RemoveTarget

func (c *CognitoClient) RemoveTarget(host string) (Response, error)

func (*CognitoClient) SetNotification

func (c *CognitoClient) SetNotification(address string) (Response, error)

type Object

type Object struct {
	Namespace string    `json:"namespace,omitempty"`
	Host      string    `json:"host,omitempty"`
	Value     string    `json:"value,omitempty"`
	Updated   time.Time `json:"updated,omitempty"`
}

type Response

type Response struct {
	Hits []Object `json:"hits,omitempty"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	IDToken      string `json:"id_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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