unit_test_with_grafik

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRocketResultsData

type GetRocketResultsData struct {
	RocketsResult RocketsResult `json:"rocketsResult"`
}

type GetRocketResultsResponse

type GetRocketResultsResponse struct {
	Data   GetRocketResultsData `json:"data"`
	Errors []GraphQLError       `json:"errors"`
}

type GraphQLError

type GraphQLError struct {
	Message    string                 `json:"message"`
	Locations  []GraphQLErrorLocation `json:"locations"`
	Extensions GraphQLErrorExtensions `json:"extensions"`
}

type GraphQLErrorExtensions

type GraphQLErrorExtensions struct {
	Code string `json:"code"`
}

type GraphQLErrorLocation

type GraphQLErrorLocation struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type Result

type Result struct {
	TotalCount int `json:"totalCount"`
}

type Rocket

type Rocket struct {
	CostPerLaunch int    `json:"cost_per_launch"`
	Country       string `json:"country"`
	Name          string `json:"name"`
}

type RocketsResult

type RocketsResult struct {
	Result Result   `json:"result"`
	Data   []Rocket `json:"data"`
}

type SpaceXClient

type SpaceXClient interface {
	GetRocketResults(ctx context.Context, limit int, header http.Header) (*http.Response, error)
}

func New

func New(endpoint string, client *http.Client) SpaceXClient

Jump to

Keyboard shortcuts

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