mockweathergov

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 5 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 NewClient

func NewClient(t *testing.T) *Client

func (*Client) AddGetForecast

func (m *Client) AddGetForecast(f ClientGetForecastFunc)

func (*Client) AddName

func (m *Client) AddName(f ClientNameFunc)

func (*Client) AddPing

func (m *Client) AddPing(f ClientPingFunc)

func (*Client) GetForecast

func (m *Client) GetForecast(ctx context.Context, lat, long float64) (*weathergov.Forecast, error)

func (*Client) HasMore

func (m *Client) HasMore() bool

func (*Client) Name

func (m *Client) Name() string

func (*Client) Ping

func (m *Client) Ping(ctx context.Context) error

func (*Client) SetGetForecast

func (m *Client) SetGetForecast(f ClientGetForecastFunc)

func (*Client) SetName

func (m *Client) SetName(f ClientNameFunc)

func (*Client) SetPing

func (m *Client) SetPing(f ClientPingFunc)

type ClientGetForecastFunc

type ClientGetForecastFunc func(ctx context.Context, lat, long float64) (*weathergov.Forecast, error)

type ClientNameFunc

type ClientNameFunc func() string

type ClientPingFunc

type ClientPingFunc func(ctx context.Context) error

type Doer

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

func NewDoer

func NewDoer(t *testing.T) *Doer

func (*Doer) AddDo

func (m *Doer) AddDo(f DoerDoFunc)

func (*Doer) Do

func (m *Doer) Do(req *http.Request) (*http.Response, error)

func (*Doer) HasMore

func (m *Doer) HasMore() bool

func (*Doer) SetDo

func (m *Doer) SetDo(f DoerDoFunc)

type DoerDoFunc

type DoerDoFunc func(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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