client

package
v1.20.0-dexcom-api.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: BSD-3-Clause Imports: 10 Imported by: 13

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(cfg *Config) (*Client, error)

func (*Client) AppendURLQuery

func (c *Client) AppendURLQuery(urlString string, query map[string]string) string

func (*Client) ConstructURL

func (c *Client) ConstructURL(paths ...string) string

func (*Client) SendRequest

func (c *Client) SendRequest(ctx context.Context, method string, url string, mutators []Mutator, requestBody interface{}, responseBody interface{}, httpClient *http.Client) error

type Config

type Config struct {
	Address string
}

func NewConfig

func NewConfig() *Config

func (*Config) Load

func (c *Config) Load(configReporter config.Reporter) error

func (*Config) Validate

func (c *Config) Validate() error

type HeaderMutator

type HeaderMutator struct {
	Key   string
	Value string
}

func NewHeaderMutator

func NewHeaderMutator(key string, value string) *HeaderMutator

func (*HeaderMutator) Mutate

func (h *HeaderMutator) Mutate(req *http.Request) error

type Mutator

type Mutator interface {
	Mutate(req *http.Request) error
}

type ParameterMutator

type ParameterMutator struct {
	Key   string
	Value string
}

func NewParameterMutator

func NewParameterMutator(key string, value string) *ParameterMutator

func (*ParameterMutator) Mutate

func (p *ParameterMutator) Mutate(req *http.Request) error

type ParametersMutator

type ParametersMutator struct {
	Parameters map[string]string
}

func NewParametersMutator

func NewParametersMutator(parameters map[string]string) *ParametersMutator

func (*ParametersMutator) Mutate

func (p *ParametersMutator) Mutate(req *http.Request) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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