models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AftermarketDeviceColumns = struct {
	ID             string
	Address        string
	Owner          string
	Serial         string
	Imei           string
	MintedAt       string
	VehicleID      string
	Beneficiary    string
	ManufacturerID string
	ClaimedAt      string
}{
	ID:             "id",
	Address:        "address",
	Owner:          "owner",
	Serial:         "serial",
	Imei:           "imei",
	MintedAt:       "minted_at",
	VehicleID:      "vehicle_id",
	Beneficiary:    "beneficiary",
	ManufacturerID: "manufacturer_id",
	ClaimedAt:      "claimed_at",
}
View Source
var AftermarketDeviceRels = struct {
	Manufacturer string
	Vehicle      string
}{
	Manufacturer: "Manufacturer",
	Vehicle:      "Vehicle",
}

AftermarketDeviceRels is where relationship names are stored.

View Source
var AftermarketDeviceTableColumns = struct {
	ID             string
	Address        string
	Owner          string
	Serial         string
	Imei           string
	MintedAt       string
	VehicleID      string
	Beneficiary    string
	ManufacturerID string
	ClaimedAt      string
}{
	ID:             "aftermarket_devices.id",
	Address:        "aftermarket_devices.address",
	Owner:          "aftermarket_devices.owner",
	Serial:         "aftermarket_devices.serial",
	Imei:           "aftermarket_devices.imei",
	MintedAt:       "aftermarket_devices.minted_at",
	VehicleID:      "aftermarket_devices.vehicle_id",
	Beneficiary:    "aftermarket_devices.beneficiary",
	ManufacturerID: "aftermarket_devices.manufacturer_id",
	ClaimedAt:      "aftermarket_devices.claimed_at",
}
View Source
var AftermarketDeviceWhere = struct {
	ID             whereHelperint
	Address        whereHelper__byte
	Owner          whereHelper__byte
	Serial         whereHelpernull_String
	Imei           whereHelpernull_String
	MintedAt       whereHelpertime_Time
	VehicleID      whereHelpernull_Int
	Beneficiary    whereHelper__byte
	ManufacturerID whereHelpernull_Int
	ClaimedAt      whereHelpernull_Time
}{
	ID:             whereHelperint{/* contains filtered or unexported fields */},
	Address:        whereHelper__byte{/* contains filtered or unexported fields */},
	Owner:          whereHelper__byte{/* contains filtered or unexported fields */},
	Serial:         whereHelpernull_String{/* contains filtered or unexported fields */},
	Imei:           whereHelpernull_String{/* contains filtered or unexported fields */},
	MintedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	VehicleID:      whereHelpernull_Int{/* contains filtered or unexported fields */},
	Beneficiary:    whereHelper__byte{/* contains filtered or unexported fields */},
	ManufacturerID: whereHelpernull_Int{/* contains filtered or unexported fields */},
	ClaimedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var DCNColumns = struct {
	Node         string
	OwnerAddress string
	Expiration   string
	Name         string
	VehicleID    string
	MintedAt     string
}{
	Node:         "node",
	OwnerAddress: "owner_address",
	Expiration:   "expiration",
	Name:         "name",
	VehicleID:    "vehicle_id",
	MintedAt:     "minted_at",
}
View Source
var DCNRels = struct {
	Vehicle string
}{
	Vehicle: "Vehicle",
}

DCNRels is where relationship names are stored.

View Source
var DCNTableColumns = struct {
	Node         string
	OwnerAddress string
	Expiration   string
	Name         string
	VehicleID    string
	MintedAt     string
}{
	Node:         "dcns.node",
	OwnerAddress: "dcns.owner_address",
	Expiration:   "dcns.expiration",
	Name:         "dcns.name",
	VehicleID:    "dcns.vehicle_id",
	MintedAt:     "dcns.minted_at",
}
View Source
var DCNWhere = struct {
	Node         whereHelper__byte
	OwnerAddress whereHelper__byte
	Expiration   whereHelpernull_Time
	Name         whereHelpernull_String
	VehicleID    whereHelpernull_Int
	MintedAt     whereHelpertime_Time
}{
	Node:         whereHelper__byte{/* contains filtered or unexported fields */},
	OwnerAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	Expiration:   whereHelpernull_Time{/* contains filtered or unexported fields */},
	Name:         whereHelpernull_String{/* contains filtered or unexported fields */},
	VehicleID:    whereHelpernull_Int{/* contains filtered or unexported fields */},
	MintedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var ManufacturerColumns = struct {
	ID       string
	Name     string
	Owner    string
	MintedAt string
}{
	ID:       "id",
	Name:     "name",
	Owner:    "owner",
	MintedAt: "minted_at",
}
View Source
var ManufacturerRels = struct {
	AftermarketDevices string
	Vehicles           string
}{
	AftermarketDevices: "AftermarketDevices",
	Vehicles:           "Vehicles",
}

ManufacturerRels is where relationship names are stored.

View Source
var ManufacturerTableColumns = struct {
	ID       string
	Name     string
	Owner    string
	MintedAt string
}{
	ID:       "manufacturers.id",
	Name:     "manufacturers.name",
	Owner:    "manufacturers.owner",
	MintedAt: "manufacturers.minted_at",
}
View Source
var ManufacturerWhere = struct {
	ID       whereHelperint
	Name     whereHelperstring
	Owner    whereHelper__byte
	MintedAt whereHelpertime_Time
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Name:     whereHelperstring{/* contains filtered or unexported fields */},
	Owner:    whereHelper__byte{/* contains filtered or unexported fields */},
	MintedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var PrivilegeColumns = struct {
	TokenID     string
	PrivilegeID string
	UserAddress string
	SetAt       string
	ExpiresAt   string
}{
	TokenID:     "token_id",
	PrivilegeID: "privilege_id",
	UserAddress: "user_address",
	SetAt:       "set_at",
	ExpiresAt:   "expires_at",
}
View Source
var PrivilegeRels = struct {
	Token string
}{
	Token: "Token",
}

PrivilegeRels is where relationship names are stored.

View Source
var PrivilegeTableColumns = struct {
	TokenID     string
	PrivilegeID string
	UserAddress string
	SetAt       string
	ExpiresAt   string
}{
	TokenID:     "privileges.token_id",
	PrivilegeID: "privileges.privilege_id",
	UserAddress: "privileges.user_address",
	SetAt:       "privileges.set_at",
	ExpiresAt:   "privileges.expires_at",
}
View Source
var PrivilegeWhere = struct {
	TokenID     whereHelperint
	PrivilegeID whereHelperint
	UserAddress whereHelper__byte
	SetAt       whereHelpertime_Time
	ExpiresAt   whereHelpertime_Time
}{
	TokenID:     whereHelperint{/* contains filtered or unexported fields */},
	PrivilegeID: whereHelperint{/* contains filtered or unexported fields */},
	UserAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	SetAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	ExpiresAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SyntheticDeviceColumns = struct {
	ID            string
	IntegrationID string
	VehicleID     string
	DeviceAddress string
	MintedAt      string
}{
	ID:            "id",
	IntegrationID: "integration_id",
	VehicleID:     "vehicle_id",
	DeviceAddress: "device_address",
	MintedAt:      "minted_at",
}
View Source
var SyntheticDeviceRels = struct {
	Vehicle string
}{
	Vehicle: "Vehicle",
}

SyntheticDeviceRels is where relationship names are stored.

View Source
var SyntheticDeviceTableColumns = struct {
	ID            string
	IntegrationID string
	VehicleID     string
	DeviceAddress string
	MintedAt      string
}{
	ID:            "synthetic_devices.id",
	IntegrationID: "synthetic_devices.integration_id",
	VehicleID:     "synthetic_devices.vehicle_id",
	DeviceAddress: "synthetic_devices.device_address",
	MintedAt:      "synthetic_devices.minted_at",
}
View Source
var SyntheticDeviceWhere = struct {
	ID            whereHelperint
	IntegrationID whereHelperint
	VehicleID     whereHelperint
	DeviceAddress whereHelper__byte
	MintedAt      whereHelpertime_Time
}{
	ID:            whereHelperint{/* contains filtered or unexported fields */},
	IntegrationID: whereHelperint{/* contains filtered or unexported fields */},
	VehicleID:     whereHelperint{/* contains filtered or unexported fields */},
	DeviceAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	MintedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	AftermarketDevices string
	DCNS               string
	Manufacturers      string
	Privileges         string
	SyntheticDevices   string
	Vehicles           string
}{
	AftermarketDevices: "aftermarket_devices",
	DCNS:               "dcns",
	Manufacturers:      "manufacturers",
	Privileges:         "privileges",
	SyntheticDevices:   "synthetic_devices",
	Vehicles:           "vehicles",
}
View Source
var VehicleColumns = struct {
	ID             string
	OwnerAddress   string
	Make           string
	Model          string
	Year           string
	MintedAt       string
	DefinitionURI  string
	ManufacturerID string
}{
	ID:             "id",
	OwnerAddress:   "owner_address",
	Make:           "make",
	Model:          "model",
	Year:           "year",
	MintedAt:       "minted_at",
	DefinitionURI:  "definition_uri",
	ManufacturerID: "manufacturer_id",
}
View Source
var VehicleRels = struct {
	Manufacturer      string
	AftermarketDevice string
	DCNS              string
	TokenPrivileges   string
	SyntheticDevices  string
}{
	Manufacturer:      "Manufacturer",
	AftermarketDevice: "AftermarketDevice",
	DCNS:              "DCNS",
	TokenPrivileges:   "TokenPrivileges",
	SyntheticDevices:  "SyntheticDevices",
}

VehicleRels is where relationship names are stored.

View Source
var VehicleTableColumns = struct {
	ID             string
	OwnerAddress   string
	Make           string
	Model          string
	Year           string
	MintedAt       string
	DefinitionURI  string
	ManufacturerID string
}{
	ID:             "vehicles.id",
	OwnerAddress:   "vehicles.owner_address",
	Make:           "vehicles.make",
	Model:          "vehicles.model",
	Year:           "vehicles.year",
	MintedAt:       "vehicles.minted_at",
	DefinitionURI:  "vehicles.definition_uri",
	ManufacturerID: "vehicles.manufacturer_id",
}
View Source
var VehicleWhere = struct {
	ID             whereHelperint
	OwnerAddress   whereHelper__byte
	Make           whereHelpernull_String
	Model          whereHelpernull_String
	Year           whereHelpernull_Int
	MintedAt       whereHelpertime_Time
	DefinitionURI  whereHelpernull_String
	ManufacturerID whereHelpernull_Int
}{
	ID:             whereHelperint{/* contains filtered or unexported fields */},
	OwnerAddress:   whereHelper__byte{/* contains filtered or unexported fields */},
	Make:           whereHelpernull_String{/* contains filtered or unexported fields */},
	Model:          whereHelpernull_String{/* contains filtered or unexported fields */},
	Year:           whereHelpernull_Int{/* contains filtered or unexported fields */},
	MintedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	DefinitionURI:  whereHelpernull_String{/* contains filtered or unexported fields */},
	ManufacturerID: whereHelpernull_Int{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddAftermarketDeviceHook

func AddAftermarketDeviceHook(hookPoint boil.HookPoint, aftermarketDeviceHook AftermarketDeviceHook)

AddAftermarketDeviceHook registers your hook function for all future operations.

func AddDCNHook

func AddDCNHook(hookPoint boil.HookPoint, dcnHook DCNHook)

AddDCNHook registers your hook function for all future operations.

func AddManufacturerHook

func AddManufacturerHook(hookPoint boil.HookPoint, manufacturerHook ManufacturerHook)

AddManufacturerHook registers your hook function for all future operations.

func AddPrivilegeHook

func AddPrivilegeHook(hookPoint boil.HookPoint, privilegeHook PrivilegeHook)

AddPrivilegeHook registers your hook function for all future operations.

func AddSyntheticDeviceHook

func AddSyntheticDeviceHook(hookPoint boil.HookPoint, syntheticDeviceHook SyntheticDeviceHook)

AddSyntheticDeviceHook registers your hook function for all future operations.

func AddVehicleHook

func AddVehicleHook(hookPoint boil.HookPoint, vehicleHook VehicleHook)

AddVehicleHook registers your hook function for all future operations.

func AftermarketDeviceExists

func AftermarketDeviceExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

AftermarketDeviceExists checks if the AftermarketDevice row exists.

func AftermarketDevices

func AftermarketDevices(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevices retrieves all the records using an executor.

func DCNExists

func DCNExists(ctx context.Context, exec boil.ContextExecutor, node []byte) (bool, error)

DCNExists checks if the DCN row exists.

func DCNS

func DCNS(mods ...qm.QueryMod) dcnQuery

DCNS retrieves all the records using an executor.

func ManufacturerExists

func ManufacturerExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

ManufacturerExists checks if the Manufacturer row exists.

func Manufacturers

func Manufacturers(mods ...qm.QueryMod) manufacturerQuery

Manufacturers retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func PrivilegeExists

func PrivilegeExists(ctx context.Context, exec boil.ContextExecutor, tokenID int, privilegeID int, userAddress []byte) (bool, error)

PrivilegeExists checks if the Privilege row exists.

func Privileges

func Privileges(mods ...qm.QueryMod) privilegeQuery

Privileges retrieves all the records using an executor.

func SyntheticDeviceExists

func SyntheticDeviceExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

SyntheticDeviceExists checks if the SyntheticDevice row exists.

func SyntheticDevices

func SyntheticDevices(mods ...qm.QueryMod) syntheticDeviceQuery

SyntheticDevices retrieves all the records using an executor.

func VehicleExists

func VehicleExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

VehicleExists checks if the Vehicle row exists.

func Vehicles

func Vehicles(mods ...qm.QueryMod) vehicleQuery

Vehicles retrieves all the records using an executor.

Types

type AftermarketDevice

type AftermarketDevice struct {
	ID             int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Address        []byte      `boil:"address" json:"address" toml:"address" yaml:"address"`
	Owner          []byte      `boil:"owner" json:"owner" toml:"owner" yaml:"owner"`
	Serial         null.String `boil:"serial" json:"serial,omitempty" toml:"serial" yaml:"serial,omitempty"`
	Imei           null.String `boil:"imei" json:"imei,omitempty" toml:"imei" yaml:"imei,omitempty"`
	MintedAt       time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`
	VehicleID      null.Int    `boil:"vehicle_id" json:"vehicle_id,omitempty" toml:"vehicle_id" yaml:"vehicle_id,omitempty"`
	Beneficiary    []byte      `boil:"beneficiary" json:"beneficiary" toml:"beneficiary" yaml:"beneficiary"`
	ManufacturerID null.Int    `boil:"manufacturer_id" json:"manufacturer_id,omitempty" toml:"manufacturer_id" yaml:"manufacturer_id,omitempty"`
	ClaimedAt      null.Time   `boil:"claimed_at" json:"claimed_at,omitempty" toml:"claimed_at" yaml:"claimed_at,omitempty"`

	R *aftermarketDeviceR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L aftermarketDeviceL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AftermarketDevice is an object representing the database table.

func FindAftermarketDevice

func FindAftermarketDevice(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*AftermarketDevice, error)

FindAftermarketDevice retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*AftermarketDevice) Delete

Delete deletes a single AftermarketDevice record with an executor. Delete will match against the primary key column to find the record to delete.

func (*AftermarketDevice) Exists

Exists checks if the AftermarketDevice row exists.

func (*AftermarketDevice) Insert

func (o *AftermarketDevice) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*AftermarketDevice) Manufacturer

func (o *AftermarketDevice) Manufacturer(mods ...qm.QueryMod) manufacturerQuery

Manufacturer pointed to by the foreign key.

func (*AftermarketDevice) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*AftermarketDevice) RemoveManufacturer

func (o *AftermarketDevice) RemoveManufacturer(ctx context.Context, exec boil.ContextExecutor, related *Manufacturer) error

RemoveManufacturer relationship. Sets o.R.Manufacturer to nil. Removes o from all passed in related items' relationships struct.

func (*AftermarketDevice) RemoveVehicle

func (o *AftermarketDevice) RemoveVehicle(ctx context.Context, exec boil.ContextExecutor, related *Vehicle) error

RemoveVehicle relationship. Sets o.R.Vehicle to nil. Removes o from all passed in related items' relationships struct.

func (*AftermarketDevice) SetManufacturer

func (o *AftermarketDevice) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Manufacturer) error

SetManufacturer of the aftermarketDevice to the related item. Sets o.R.Manufacturer to related. Adds o to related.R.AftermarketDevices.

func (*AftermarketDevice) SetVehicle

func (o *AftermarketDevice) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the aftermarketDevice to the related item. Sets o.R.Vehicle to related. Adds o to related.R.AftermarketDevice.

func (*AftermarketDevice) Update

func (o *AftermarketDevice) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the AftermarketDevice. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*AftermarketDevice) Upsert

func (o *AftermarketDevice) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*AftermarketDevice) Vehicle

func (o *AftermarketDevice) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type AftermarketDeviceHook

type AftermarketDeviceHook func(context.Context, boil.ContextExecutor, *AftermarketDevice) error

AftermarketDeviceHook is the signature for custom AftermarketDevice hook methods

type AftermarketDeviceSlice

type AftermarketDeviceSlice []*AftermarketDevice

AftermarketDeviceSlice is an alias for a slice of pointers to AftermarketDevice. This should almost always be used instead of []AftermarketDevice.

func (AftermarketDeviceSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (*AftermarketDeviceSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (AftermarketDeviceSlice) UpdateAll

func (o AftermarketDeviceSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type DCN

type DCN struct {
	Node         []byte      `boil:"node" json:"node" toml:"node" yaml:"node"`
	OwnerAddress []byte      `boil:"owner_address" json:"owner_address" toml:"owner_address" yaml:"owner_address"`
	Expiration   null.Time   `boil:"expiration" json:"expiration,omitempty" toml:"expiration" yaml:"expiration,omitempty"`
	Name         null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`
	VehicleID    null.Int    `boil:"vehicle_id" json:"vehicle_id,omitempty" toml:"vehicle_id" yaml:"vehicle_id,omitempty"`
	MintedAt     time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *dcnR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L dcnL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DCN is an object representing the database table.

func FindDCN

func FindDCN(ctx context.Context, exec boil.ContextExecutor, node []byte, selectCols ...string) (*DCN, error)

FindDCN retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*DCN) Delete

func (o *DCN) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single DCN record with an executor. Delete will match against the primary key column to find the record to delete.

func (*DCN) Exists

func (o *DCN) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the DCN row exists.

func (*DCN) Insert

func (o *DCN) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DCN) Reload

func (o *DCN) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*DCN) RemoveVehicle

func (o *DCN) RemoveVehicle(ctx context.Context, exec boil.ContextExecutor, related *Vehicle) error

RemoveVehicle relationship. Sets o.R.Vehicle to nil. Removes o from all passed in related items' relationships struct.

func (*DCN) SetVehicle

func (o *DCN) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the dcn to the related item. Sets o.R.Vehicle to related. Adds o to related.R.DCNS.

func (*DCN) Update

func (o *DCN) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the DCN. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*DCN) Upsert

func (o *DCN) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*DCN) Vehicle

func (o *DCN) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type DCNHook

type DCNHook func(context.Context, boil.ContextExecutor, *DCN) error

DCNHook is the signature for custom DCN hook methods

type DCNSlice

type DCNSlice []*DCN

DCNSlice is an alias for a slice of pointers to DCN. This should almost always be used instead of []DCN.

func (DCNSlice) DeleteAll

func (o DCNSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DCNSlice) ReloadAll

func (o *DCNSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DCNSlice) UpdateAll

func (o DCNSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type Manufacturer

type Manufacturer struct {
	ID       int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name     string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Owner    []byte    `boil:"owner" json:"owner" toml:"owner" yaml:"owner"`
	MintedAt time.Time `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *manufacturerR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L manufacturerL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Manufacturer is an object representing the database table.

func FindManufacturer

func FindManufacturer(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Manufacturer, error)

FindManufacturer retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Manufacturer) AddAftermarketDevices

func (o *Manufacturer) AddAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AftermarketDevice) error

AddAftermarketDevices adds the given related objects to the existing relationships of the manufacturer, optionally inserting them as new records. Appends related to o.R.AftermarketDevices. Sets related.R.Manufacturer appropriately.

func (*Manufacturer) AddVehicles

func (o *Manufacturer) AddVehicles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vehicle) error

AddVehicles adds the given related objects to the existing relationships of the manufacturer, optionally inserting them as new records. Appends related to o.R.Vehicles. Sets related.R.Manufacturer appropriately.

func (*Manufacturer) AftermarketDevices

func (o *Manufacturer) AftermarketDevices(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevices retrieves all the aftermarket_device's AftermarketDevices with an executor.

func (*Manufacturer) Delete

func (o *Manufacturer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Manufacturer record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Manufacturer) Exists

func (o *Manufacturer) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Manufacturer row exists.

func (*Manufacturer) Insert

func (o *Manufacturer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Manufacturer) Reload

func (o *Manufacturer) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Manufacturer) RemoveAftermarketDevices

func (o *Manufacturer) RemoveAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, related ...*AftermarketDevice) error

RemoveAftermarketDevices relationships from objects passed in. Removes related items from R.AftermarketDevices (uses pointer comparison, removal does not keep order) Sets related.R.Manufacturer.

func (*Manufacturer) RemoveVehicles

func (o *Manufacturer) RemoveVehicles(ctx context.Context, exec boil.ContextExecutor, related ...*Vehicle) error

RemoveVehicles relationships from objects passed in. Removes related items from R.Vehicles (uses pointer comparison, removal does not keep order) Sets related.R.Manufacturer.

func (*Manufacturer) SetAftermarketDevices

func (o *Manufacturer) SetAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AftermarketDevice) error

SetAftermarketDevices removes all previously related items of the manufacturer replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Manufacturer's AftermarketDevices accordingly. Replaces o.R.AftermarketDevices with related. Sets related.R.Manufacturer's AftermarketDevices accordingly.

func (*Manufacturer) SetVehicles

func (o *Manufacturer) SetVehicles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vehicle) error

SetVehicles removes all previously related items of the manufacturer replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Manufacturer's Vehicles accordingly. Replaces o.R.Vehicles with related. Sets related.R.Manufacturer's Vehicles accordingly.

func (*Manufacturer) Update

func (o *Manufacturer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Manufacturer. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Manufacturer) Upsert

func (o *Manufacturer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*Manufacturer) Vehicles

func (o *Manufacturer) Vehicles(mods ...qm.QueryMod) vehicleQuery

Vehicles retrieves all the vehicle's Vehicles with an executor.

type ManufacturerHook

type ManufacturerHook func(context.Context, boil.ContextExecutor, *Manufacturer) error

ManufacturerHook is the signature for custom Manufacturer hook methods

type ManufacturerSlice

type ManufacturerSlice []*Manufacturer

ManufacturerSlice is an alias for a slice of pointers to Manufacturer. This should almost always be used instead of []Manufacturer.

func (ManufacturerSlice) DeleteAll

func (o ManufacturerSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*ManufacturerSlice) ReloadAll

func (o *ManufacturerSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (ManufacturerSlice) UpdateAll

func (o ManufacturerSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Privilege

type Privilege struct {
	TokenID     int       `boil:"token_id" json:"token_id" toml:"token_id" yaml:"token_id"`
	PrivilegeID int       `boil:"privilege_id" json:"privilege_id" toml:"privilege_id" yaml:"privilege_id"`
	UserAddress []byte    `boil:"user_address" json:"user_address" toml:"user_address" yaml:"user_address"`
	SetAt       time.Time `boil:"set_at" json:"set_at" toml:"set_at" yaml:"set_at"`
	ExpiresAt   time.Time `boil:"expires_at" json:"expires_at" toml:"expires_at" yaml:"expires_at"`

	R *privilegeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L privilegeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Privilege is an object representing the database table.

func FindPrivilege

func FindPrivilege(ctx context.Context, exec boil.ContextExecutor, tokenID int, privilegeID int, userAddress []byte, selectCols ...string) (*Privilege, error)

FindPrivilege retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Privilege) Delete

func (o *Privilege) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Privilege record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Privilege) Exists

func (o *Privilege) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Privilege row exists.

func (*Privilege) Insert

func (o *Privilege) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Privilege) Reload

func (o *Privilege) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Privilege) SetToken

func (o *Privilege) SetToken(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetToken of the privilege to the related item. Sets o.R.Token to related. Adds o to related.R.TokenPrivileges.

func (*Privilege) Token

func (o *Privilege) Token(mods ...qm.QueryMod) vehicleQuery

Token pointed to by the foreign key.

func (*Privilege) Update

func (o *Privilege) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Privilege. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Privilege) Upsert

func (o *Privilege) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type PrivilegeHook

type PrivilegeHook func(context.Context, boil.ContextExecutor, *Privilege) error

PrivilegeHook is the signature for custom Privilege hook methods

type PrivilegeSlice

type PrivilegeSlice []*Privilege

PrivilegeSlice is an alias for a slice of pointers to Privilege. This should almost always be used instead of []Privilege.

func (PrivilegeSlice) DeleteAll

func (o PrivilegeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*PrivilegeSlice) ReloadAll

func (o *PrivilegeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (PrivilegeSlice) UpdateAll

func (o PrivilegeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type SyntheticDevice

type SyntheticDevice struct {
	ID            int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	IntegrationID int       `boil:"integration_id" json:"integration_id" toml:"integration_id" yaml:"integration_id"`
	VehicleID     int       `boil:"vehicle_id" json:"vehicle_id" toml:"vehicle_id" yaml:"vehicle_id"`
	DeviceAddress []byte    `boil:"device_address" json:"device_address" toml:"device_address" yaml:"device_address"`
	MintedAt      time.Time `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *syntheticDeviceR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L syntheticDeviceL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

SyntheticDevice is an object representing the database table.

func FindSyntheticDevice

func FindSyntheticDevice(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*SyntheticDevice, error)

FindSyntheticDevice retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*SyntheticDevice) Delete

func (o *SyntheticDevice) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single SyntheticDevice record with an executor. Delete will match against the primary key column to find the record to delete.

func (*SyntheticDevice) Exists

func (o *SyntheticDevice) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the SyntheticDevice row exists.

func (*SyntheticDevice) Insert

func (o *SyntheticDevice) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*SyntheticDevice) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*SyntheticDevice) SetVehicle

func (o *SyntheticDevice) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the syntheticDevice to the related item. Sets o.R.Vehicle to related. Adds o to related.R.SyntheticDevices.

func (*SyntheticDevice) Update

func (o *SyntheticDevice) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the SyntheticDevice. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*SyntheticDevice) Upsert

func (o *SyntheticDevice) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*SyntheticDevice) Vehicle

func (o *SyntheticDevice) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type SyntheticDeviceHook

type SyntheticDeviceHook func(context.Context, boil.ContextExecutor, *SyntheticDevice) error

SyntheticDeviceHook is the signature for custom SyntheticDevice hook methods

type SyntheticDeviceSlice

type SyntheticDeviceSlice []*SyntheticDevice

SyntheticDeviceSlice is an alias for a slice of pointers to SyntheticDevice. This should almost always be used instead of []SyntheticDevice.

func (SyntheticDeviceSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (*SyntheticDeviceSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (SyntheticDeviceSlice) UpdateAll

func (o SyntheticDeviceSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Vehicle

type Vehicle struct {
	ID             int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	OwnerAddress   []byte      `boil:"owner_address" json:"owner_address" toml:"owner_address" yaml:"owner_address"`
	Make           null.String `boil:"make" json:"make,omitempty" toml:"make" yaml:"make,omitempty"`
	Model          null.String `boil:"model" json:"model,omitempty" toml:"model" yaml:"model,omitempty"`
	Year           null.Int    `boil:"year" json:"year,omitempty" toml:"year" yaml:"year,omitempty"`
	MintedAt       time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`
	DefinitionURI  null.String `boil:"definition_uri" json:"definition_uri,omitempty" toml:"definition_uri" yaml:"definition_uri,omitempty"`
	ManufacturerID null.Int    `boil:"manufacturer_id" json:"manufacturer_id,omitempty" toml:"manufacturer_id" yaml:"manufacturer_id,omitempty"`

	R *vehicleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L vehicleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Vehicle is an object representing the database table.

func FindVehicle

func FindVehicle(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Vehicle, error)

FindVehicle retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Vehicle) AddDCNS

func (o *Vehicle) AddDCNS(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DCN) error

AddDCNS adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.DCNS. Sets related.R.Vehicle appropriately.

func (*Vehicle) AddSyntheticDevices

func (o *Vehicle) AddSyntheticDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*SyntheticDevice) error

AddSyntheticDevices adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.SyntheticDevices. Sets related.R.Vehicle appropriately.

func (*Vehicle) AddTokenPrivileges

func (o *Vehicle) AddTokenPrivileges(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Privilege) error

AddTokenPrivileges adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.TokenPrivileges. Sets related.R.Token appropriately.

func (*Vehicle) AftermarketDevice

func (o *Vehicle) AftermarketDevice(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevice pointed to by the foreign key.

func (*Vehicle) DCNS

func (o *Vehicle) DCNS(mods ...qm.QueryMod) dcnQuery

DCNS retrieves all the dcn's DCNS with an executor.

func (*Vehicle) Delete

func (o *Vehicle) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Vehicle record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Vehicle) Exists

func (o *Vehicle) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Vehicle row exists.

func (*Vehicle) Insert

func (o *Vehicle) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Vehicle) Manufacturer

func (o *Vehicle) Manufacturer(mods ...qm.QueryMod) manufacturerQuery

Manufacturer pointed to by the foreign key.

func (*Vehicle) Reload

func (o *Vehicle) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Vehicle) RemoveAftermarketDevice

func (o *Vehicle) RemoveAftermarketDevice(ctx context.Context, exec boil.ContextExecutor, related *AftermarketDevice) error

RemoveAftermarketDevice relationship. Sets o.R.AftermarketDevice to nil. Removes o from all passed in related items' relationships struct.

func (*Vehicle) RemoveDCNS

func (o *Vehicle) RemoveDCNS(ctx context.Context, exec boil.ContextExecutor, related ...*DCN) error

RemoveDCNS relationships from objects passed in. Removes related items from R.DCNS (uses pointer comparison, removal does not keep order) Sets related.R.Vehicle.

func (*Vehicle) RemoveManufacturer

func (o *Vehicle) RemoveManufacturer(ctx context.Context, exec boil.ContextExecutor, related *Manufacturer) error

RemoveManufacturer relationship. Sets o.R.Manufacturer to nil. Removes o from all passed in related items' relationships struct.

func (*Vehicle) SetAftermarketDevice

func (o *Vehicle) SetAftermarketDevice(ctx context.Context, exec boil.ContextExecutor, insert bool, related *AftermarketDevice) error

SetAftermarketDevice of the vehicle to the related item. Sets o.R.AftermarketDevice to related. Adds o to related.R.Vehicle.

func (*Vehicle) SetDCNS

func (o *Vehicle) SetDCNS(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DCN) error

SetDCNS removes all previously related items of the vehicle replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Vehicle's DCNS accordingly. Replaces o.R.DCNS with related. Sets related.R.Vehicle's DCNS accordingly.

func (*Vehicle) SetManufacturer

func (o *Vehicle) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Manufacturer) error

SetManufacturer of the vehicle to the related item. Sets o.R.Manufacturer to related. Adds o to related.R.Vehicles.

func (*Vehicle) SyntheticDevices

func (o *Vehicle) SyntheticDevices(mods ...qm.QueryMod) syntheticDeviceQuery

SyntheticDevices retrieves all the synthetic_device's SyntheticDevices with an executor.

func (*Vehicle) TokenPrivileges

func (o *Vehicle) TokenPrivileges(mods ...qm.QueryMod) privilegeQuery

TokenPrivileges retrieves all the privilege's Privileges with an executor via token_id column.

func (*Vehicle) Update

func (o *Vehicle) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Vehicle. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Vehicle) Upsert

func (o *Vehicle) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type VehicleHook

type VehicleHook func(context.Context, boil.ContextExecutor, *Vehicle) error

VehicleHook is the signature for custom Vehicle hook methods

type VehicleSlice

type VehicleSlice []*Vehicle

VehicleSlice is an alias for a slice of pointers to Vehicle. This should almost always be used instead of []Vehicle.

func (VehicleSlice) DeleteAll

func (o VehicleSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*VehicleSlice) ReloadAll

func (o *VehicleSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (VehicleSlice) UpdateAll

func (o VehicleSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

Jump to

Keyboard shortcuts

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