vehicle

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TokenPrefix = "V"

TokenPrefix is the prefix for a global token id for vehicles.

Variables

This section is empty.

Functions

func ToAPI added in v0.1.20

func ToAPI(v *models.Vehicle, imageUrl string, dataURI string) (*gmodel.Vehicle, error)

ToAPI converts a vehicle to a corresponding graphql model.

Types

type Repository

type Repository struct {
	*base.Repository
}

func (*Repository) GetVehicle

func (r *Repository) GetVehicle(ctx context.Context, id int) (*gmodel.Vehicle, error)

func (*Repository) GetVehicles

func (v *Repository) GetVehicles(ctx context.Context, first *int, after *string, last *int, before *string, filterBy *gmodel.VehiclesFilter) (*gmodel.VehicleConnection, error)

GetVehicles godoc @Description gets devices for an owner address @Param addr common.Address "eth address of owner" @Param first [*int] "the number of devices to return per page" @Param after [*string] "base64 string representing a device tokenID. This is a pointer to where we start fetching devices from on each page" @Param last [*int] "the number of devices to return from previous pages" @Param before [*string] "base64 string representing a device tokenID. Pointer to where we start fetching devices from previous pages"

Jump to

Keyboard shortcuts

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