swapi

package
v0.0.0-...-f01d026 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPlanetNotFound = errors.New("the planet was not found")
	ErrFilmNotFound   = errors.New("the film was not found")
)

Functions

func NewClient

func NewClient(url string, timeout time.Duration) port.SwapiClient

Types

type Client

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

func (*Client) FindFilmByID

func (c *Client) FindFilmByID(ctx context.Context, id string) (*port.SwapiFilm, error)

func (*Client) FindPlanetByName

func (c *Client) FindPlanetByName(ctx context.Context, name string) (*port.SwapiPlanet, error)

Jump to

Keyboard shortcuts

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