api

package
v0.0.0-...-e8be2bb Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pet

type Pet struct {
	ID       schemaorg.Identifier `json:"id"`
	Category schemaorg.Category   `json:"category"`
	Price    schemaorg.Price      `json:"price"`
	Url      schemaorg.Url        `json:"url"`
}

func NewPet

func NewPet(pet core.Pet) Pet

func (Pet) ToCore

func (pet Pet) ToCore() core.Pet

type PetShop

type PetShop struct {
	http.Stack
	// contains filtered or unexported fields
}

func NewPetShop

func NewPetShop(stack http.Stack, host string) *PetShop

func (*PetShop) Continue

func (c *PetShop) Continue(ctx context.Context, cursor schemaorg.Url) (*Pets, error)

func (*PetShop) Create

func (c *PetShop) Create(ctx context.Context, pet *Pet) error

func (*PetShop) List

func (c *PetShop) List(ctx context.Context) (*Pets, error)

func (*PetShop) Pet

func (c *PetShop) Pet(ctx context.Context, url schemaorg.Url) (*Pet, error)

type Pets

type Pets struct {
	Pets []Pet          `json:"pets,omitempty"`
	Next *schemaorg.Url `json:"next,omitempty"`
}

func NewPets

func NewPets(size int, pets []core.Pet) Pets

Jump to

Keyboard shortcuts

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