endpoint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPet

func AddPet(store AddStore) rest.Endpoint

func DeletePet

func DeletePet(store DeleteStore) rest.Endpoint

func Download added in v0.2.0

func Download(store PetByIdStore, images GetImageIndex) rest.Endpoint

func FindPetByID

func FindPetByID(store PetByIdStore) rest.Endpoint

func ListPets

func ListPets(store ListStore) rest.Endpoint

func Upload added in v0.2.0

func Upload(store AddStore, images AddImageIndex) rest.Endpoint

Types

type AddImageIndex added in v0.2.0

type AddImageIndex interface {
	IndexImage(context.Context, *petstorepb.Pet, io.Reader) error
}

type AddStore

type AddStore interface {
	Add(context.Context, *petstorepb.Pet)
}

type DeleteStore

type DeleteStore interface {
	Delete(context.Context, int64)
}

type DownloadResponse added in v0.2.0

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

func (DownloadResponse) OpenApiV3Schema added in v0.2.0

func (DownloadResponse) OpenApiV3Schema() (*openapi3.Schema, error)

func (*DownloadResponse) WriteParts added in v0.2.0

func (resp *DownloadResponse) WriteParts(mw rest.MultipartWriter) error

type GetImageIndex added in v0.2.0

type GetImageIndex interface {
	GetImage(context.Context, int64) ([]byte, bool)
}

type ListStore

type ListStore interface {
	Pets(context.Context) []*petstorepb.Pet
}

type PetByIdStore

type PetByIdStore interface {
	Get(context.Context, int64) (*petstorepb.Pet, bool)
}

type UploadSchema added in v0.2.0

type UploadSchema struct{}

func (UploadSchema) OpenApiV3Schema added in v0.2.0

func (UploadSchema) OpenApiV3Schema() (*openapi3.Schema, error)

Jump to

Keyboard shortcuts

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