sdk

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(identityAPIURL string) *Client

New creates a new instance of Client with a given topic api url

func NewWithHealthClient

func NewWithHealthClient(hcCli *healthcheck.Client) *Client

NewWithHealthClient creates a new instance of topic API Client, reusing the URL and Clienter from the provided healthcheck client

func (*Client) Checker

func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls identity api health endpoint and returns a check object to the caller

func (*Client) GetToken

func (cli *Client) GetToken(ctx context.Context, credentials models.UserSignIn) (*TokenResponse, apiError.Error)

GetToken attempts to sign in and obtain a JWT token from the API

func (*Client) Health

func (cli *Client) Health() *healthcheck.Client

Health returns the underlying Healthcheck Client for this identity API client

func (*Client) URL

func (cli *Client) URL() string

URL returns the URL used by this client

type ResponseInfo

type ResponseInfo struct {
	Body    []byte
	Headers http.Header
	Status  int
}

type TokenResponse

type TokenResponse struct {
	Token                      string `json:"-"`
	RefreshToken               string `json:"-"`
	ExpirationTime             string `json:"expirationTime"`
	RefreshTokenExpirationTime string `json:"refreshTokenExpirationTime"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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