Documentation ¶
Overview ¶
Package synthetic contains the repository for synthetic devices.
Index ¶
Constants ¶
View Source
const TokenPrefix = "S"
TokenPrefix is the prefix for a global token id for synthetic devices.
Variables ¶
This section is empty.
Functions ¶
func ToAPI ¶ added in v0.1.20
func ToAPI(sd *models.SyntheticDevice) (*gmodel.SyntheticDevice, error)
ToAPI converts a synthetic device from the database to a GraphQL API model.
Types ¶
type Repository ¶
type Repository struct {
*base.Repository
}
Repository is the repository for synthetic devices.
func (*Repository) GetSyntheticDevice ¶ added in v0.1.20
func (r *Repository) GetSyntheticDevice(ctx context.Context, by gmodel.SyntheticDeviceBy) (*gmodel.SyntheticDevice, error)
GetSyntheticDevice Device retrieves a synthetic device by either its address or tokenID from the database.
func (*Repository) GetSyntheticDevices ¶ added in v0.1.20
func (r *Repository) GetSyntheticDevices(ctx context.Context, first *int, last *int, after *string, before *string, filterBy *gmodel.SyntheticDevicesFilter) (*gmodel.SyntheticDeviceConnection, error)
GetSyntheticDevices retrieves a list of synthetic devices from the database.
Click to show internal directories.
Click to hide internal directories.