beer

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeerAPI

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

func New

func New(opts ...klient.OptionClientFn) (*BeerAPI, error)

func (BeerAPI) GetBeer

func (c BeerAPI) GetBeer(ctx context.Context, request GetBeerRequest) (GetBeerRespond, error)

GetBeer directly initialize the request and response function.

func (BeerAPI) GetRandomBeer

func (c BeerAPI) GetRandomBeer(ctx context.Context) ([]RandomRequestResponse, error)

type GetBeerRequest

type GetBeerRequest struct {
	ID string
}

type GetBeerRespond

type GetBeerRespond struct {
	Name string `json:"name"`
}

type RandomGet

type RandomGet struct{}

func (RandomGet) Request

func (r RandomGet) Request(ctx context.Context) (*http.Request, error)

func (RandomGet) Response

func (r RandomGet) Response(resp *http.Response) ([]RandomRequestResponse, error)

type RandomRequestResponse

type RandomRequestResponse struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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