client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JSON       = "application/json"
	URLEncoded = "application/x-www-form-urlencoded"
	FormData   = "multipart/form-data"
)

Variables

This section is empty.

Functions

func CreateBaseURL

func CreateBaseURL(subDomain string, apiVersion string) string

Types

type Client

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

func New

func New(sess *session.Session, config Config) *Client

func (Client) GetRestyClient

func (c Client) GetRestyClient() *resty.Client

Used for testing purposes only

func (Client) Send

func (c Client) Send(context context.Context, op Operation, input interface{}, output interface{}) error

type Config

type Config struct {
	Beta         bool
	SubDomain    string
	APIVersion   string
	DebugEnabled bool
	RetryConfig  RetryConfig
}

func GetDefaultConfig

func GetDefaultConfig() Config

type Operation

type Operation struct {
	OverrideBaseURL *string
	Method          string
	URI             string
	ContentType     string
	PathParams      map[string]string
	QueryParams     *url.Values
}

type RetryConfig

type RetryConfig struct {
	Attempts int
	WaitTime time.Duration
}

Jump to

Keyboard shortcuts

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