client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormEncoded = "application/x-www-form-urlencoded"
	Bearer      = "Bearer"
)
View Source
const (
	EmailUsersPath = "users-by-email"
	Email          = "email"
)
View Source
const (
	OauthTokenPath = "oauth/token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, domain string, clientId string, clientSecret string) (*Client, error)

func (*Client) HttpRequest

func (c *Client) HttpRequest(ctx context.Context, method string, path string, query url.Values, headerMap http.Header, body *bytes.Buffer) (*bytes.Buffer, error)

func (*Client) RequestPath

func (c *Client) RequestPath(path string) string

type EmailUser

type EmailUser struct {
	Email  string `json:"email,omitempty"`
	UserId string `json:"user_id,omitempty"`
}

type OauthToken

type OauthToken struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
	Scope       string `json:"scope"`
}

type RequestError

type RequestError struct {
	StatusCode int
	Err        error
}

func (*RequestError) Error

func (r *RequestError) Error() string

Jump to

Keyboard shortcuts

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