Documentation ¶
Index ¶
- Variables
- func AddArchiveEventHook(hookPoint boil.HookPoint, archiveEventHook ArchiveEventHook)
- func AddArchiveHook(hookPoint boil.HookPoint, archiveHook ArchiveHook)
- func AddClientHook(hookPoint boil.HookPoint, clientHook ClientHook)
- func AddDeviceHook(hookPoint boil.HookPoint, deviceHook DeviceHook)
- func ArchiveEventExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func ArchiveEvents(mods ...qm.QueryMod) archiveEventQuery
- func ArchiveExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Archives(mods ...qm.QueryMod) archiveQuery
- func ClientExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Clients(mods ...qm.QueryMod) clientQuery
- func DeviceExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Devices(mods ...qm.QueryMod) deviceQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Archive
- func (o *Archive) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Archive) Device(mods ...qm.QueryMod) deviceQuery
- func (o *Archive) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Archive) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Archive) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Archive) SetDevice(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Device) error
- func (o *Archive) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Archive) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ArchiveEvent
- func (o *ArchiveEvent) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ArchiveEvent) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *ArchiveEvent) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ArchiveEvent) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ArchiveEvent) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *ArchiveEvent) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ArchiveEventHook
- type ArchiveEventSlice
- type ArchiveHook
- type ArchiveSlice
- type Client
- func (o *Client) AddDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Client) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Client) Devices(mods ...qm.QueryMod) deviceQuery
- func (o *Client) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Client) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Client) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Client) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Client) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ClientHook
- type ClientSlice
- type Device
- func (o *Device) AddArchives(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Device) Archives(mods ...qm.QueryMod) archiveQuery
- func (o *Device) Client(mods ...qm.QueryMod) clientQuery
- func (o *Device) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Device) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Device) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Device) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Device) SetClient(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Client) error
- func (o *Device) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Device) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type DeviceHook
- type DeviceSlice
- type M
Constants ¶
This section is empty.
Variables ¶
var ArchiveColumns = struct { ID string DeviceID string ArchiveEventID string ContentType string }{ ID: "id", DeviceID: "device_id", ArchiveEventID: "archive_event_id", ContentType: "content_type", }
var ArchiveEventColumns = struct { ID string DeviceID string ClientID string RequestedAt string }{ ID: "id", DeviceID: "device_id", ClientID: "client_id", RequestedAt: "requested_at", }
var ArchiveEventRels = struct {
}{}
ArchiveEventRels is where relationship names are stored.
var ArchiveEventTableColumns = struct { ID string DeviceID string ClientID string RequestedAt string }{ ID: "archive_event.id", DeviceID: "archive_event.device_id", ClientID: "archive_event.client_id", RequestedAt: "archive_event.requested_at", }
var ArchiveEventWhere = struct { ID whereHelperstring DeviceID whereHelperstring ClientID whereHelperstring RequestedAt whereHelpertime_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, DeviceID: whereHelperstring{/* contains filtered or unexported fields */}, ClientID: whereHelperstring{/* contains filtered or unexported fields */}, RequestedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ArchiveRels = struct { Device string }{ Device: "Device", }
ArchiveRels is where relationship names are stored.
var ArchiveTableColumns = struct { ID string DeviceID string ArchiveEventID string ContentType string }{ ID: "archive.id", DeviceID: "archive.device_id", ArchiveEventID: "archive.archive_event_id", ContentType: "archive.content_type", }
var ArchiveWhere = struct { ID whereHelperstring DeviceID whereHelperstring ArchiveEventID whereHelperstring ContentType whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, DeviceID: whereHelperstring{/* contains filtered or unexported fields */}, ArchiveEventID: whereHelperstring{/* contains filtered or unexported fields */}, ContentType: whereHelperstring{/* contains filtered or unexported fields */}, }
var ClientColumns = struct { ID string Name string Secret string }{ ID: "id", Name: "name", Secret: "secret", }
var ClientRels = struct { Devices string }{ Devices: "Devices", }
ClientRels is where relationship names are stored.
var ClientTableColumns = struct { ID string Name string Secret string }{ ID: "client.id", Name: "client.name", Secret: "client.secret", }
var ClientWhere = struct { ID whereHelperstring Name whereHelperstring Secret whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Secret: whereHelperstring{/* contains filtered or unexported fields */}, }
var DeviceColumns = struct { ID string Name string Secret string ClientID string IsDeleted string }{ ID: "id", Name: "name", Secret: "secret", ClientID: "client_id", IsDeleted: "is_deleted", }
var DeviceRels = struct { Client string Archives string }{ Client: "Client", Archives: "Archives", }
DeviceRels is where relationship names are stored.
var DeviceTableColumns = struct { ID string Name string Secret string ClientID string IsDeleted string }{ ID: "device.id", Name: "device.name", Secret: "device.secret", ClientID: "device.client_id", IsDeleted: "device.is_deleted", }
var DeviceWhere = struct { ID whereHelperstring Name whereHelperstring Secret whereHelperstring ClientID whereHelperstring IsDeleted whereHelpernull_Bool }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Secret: whereHelperstring{/* contains filtered or unexported fields */}, ClientID: whereHelperstring{/* contains filtered or unexported fields */}, IsDeleted: whereHelpernull_Bool{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("schema: 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.
var TableNames = struct { Archive string ArchiveEvent string Client string Device string }{ Archive: "archive", ArchiveEvent: "archive_event", Client: "client", Device: "device", }
var ViewNames = struct {
}{}
Functions ¶
func AddArchiveEventHook ¶
func AddArchiveEventHook(hookPoint boil.HookPoint, archiveEventHook ArchiveEventHook)
AddArchiveEventHook registers your hook function for all future operations.
func AddArchiveHook ¶
func AddArchiveHook(hookPoint boil.HookPoint, archiveHook ArchiveHook)
AddArchiveHook registers your hook function for all future operations.
func AddClientHook ¶
func AddClientHook(hookPoint boil.HookPoint, clientHook ClientHook)
AddClientHook registers your hook function for all future operations.
func AddDeviceHook ¶
func AddDeviceHook(hookPoint boil.HookPoint, deviceHook DeviceHook)
AddDeviceHook registers your hook function for all future operations.
func ArchiveEventExists ¶
ArchiveEventExists checks if the ArchiveEvent row exists.
func ArchiveEvents ¶
ArchiveEvents retrieves all the records using an executor.
func ArchiveExists ¶
ArchiveExists checks if the Archive row exists.
func ClientExists ¶
ClientExists checks if the Client row exists.
func DeviceExists ¶
DeviceExists checks if the Device row exists.
Types ¶
type Archive ¶
type Archive struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` DeviceID string `boil:"device_id" json:"device_id" toml:"device_id" yaml:"device_id"` ArchiveEventID string `boil:"archive_event_id" json:"archive_event_id" toml:"archive_event_id" yaml:"archive_event_id"` ContentType string `boil:"content_type" json:"content_type" toml:"content_type" yaml:"content_type"` R *archiveR `boil:"-" json:"-" toml:"-" yaml:"-"` L archiveL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Archive is an object representing the database table.
func FindArchive ¶
func FindArchive(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Archive, error)
FindArchive retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Archive) Delete ¶
Delete deletes a single Archive record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Archive) Insert ¶
func (o *Archive) 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 (*Archive) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Archive) SetDevice ¶
func (o *Archive) SetDevice(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Device) error
SetDevice of the archive to the related item. Sets o.R.Device to related. Adds o to related.R.Archives.
func (*Archive) Update ¶
func (o *Archive) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Archive. 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 (*Archive) Upsert ¶
func (o *Archive) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 ArchiveEvent ¶
type ArchiveEvent struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` DeviceID string `boil:"device_id" json:"device_id" toml:"device_id" yaml:"device_id"` ClientID string `boil:"client_id" json:"client_id" toml:"client_id" yaml:"client_id"` RequestedAt time.Time `boil:"requested_at" json:"requested_at" toml:"requested_at" yaml:"requested_at"` R *archiveEventR `boil:"-" json:"-" toml:"-" yaml:"-"` L archiveEventL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ArchiveEvent is an object representing the database table.
func FindArchiveEvent ¶
func FindArchiveEvent(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*ArchiveEvent, error)
FindArchiveEvent retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*ArchiveEvent) Delete ¶
func (o *ArchiveEvent) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ArchiveEvent record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ArchiveEvent) Exists ¶
func (o *ArchiveEvent) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the ArchiveEvent row exists.
func (*ArchiveEvent) Insert ¶
func (o *ArchiveEvent) 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 (*ArchiveEvent) Reload ¶
func (o *ArchiveEvent) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ArchiveEvent) Update ¶
func (o *ArchiveEvent) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ArchiveEvent. 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 (*ArchiveEvent) Upsert ¶
func (o *ArchiveEvent) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 ArchiveEventHook ¶
type ArchiveEventHook func(context.Context, boil.ContextExecutor, *ArchiveEvent) error
ArchiveEventHook is the signature for custom ArchiveEvent hook methods
type ArchiveEventSlice ¶
type ArchiveEventSlice []*ArchiveEvent
ArchiveEventSlice is an alias for a slice of pointers to ArchiveEvent. This should almost always be used instead of []ArchiveEvent.
func (ArchiveEventSlice) DeleteAll ¶
func (o ArchiveEventSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ArchiveEventSlice) ReloadAll ¶
func (o *ArchiveEventSlice) 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 (ArchiveEventSlice) UpdateAll ¶
func (o ArchiveEventSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type ArchiveHook ¶
ArchiveHook is the signature for custom Archive hook methods
type ArchiveSlice ¶
type ArchiveSlice []*Archive
ArchiveSlice is an alias for a slice of pointers to Archive. This should almost always be used instead of []Archive.
func (ArchiveSlice) DeleteAll ¶
func (o ArchiveSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ArchiveSlice) ReloadAll ¶
func (o *ArchiveSlice) 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 (ArchiveSlice) UpdateAll ¶
func (o ArchiveSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Client ¶
type Client struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Secret string `boil:"secret" json:"secret" toml:"secret" yaml:"secret"` R *clientR `boil:"-" json:"-" toml:"-" yaml:"-"` L clientL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Client is an object representing the database table.
func FindClient ¶
func FindClient(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Client, error)
FindClient retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Client) AddDevices ¶
func (o *Client) AddDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Device) error
AddDevices adds the given related objects to the existing relationships of the client, optionally inserting them as new records. Appends related to o.R.Devices. Sets related.R.Client appropriately.
func (*Client) Delete ¶
Delete deletes a single Client record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Client) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Client) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Client) Update ¶
func (o *Client) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Client. 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 (*Client) Upsert ¶
func (o *Client) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 ClientHook ¶
ClientHook is the signature for custom Client hook methods
type ClientSlice ¶
type ClientSlice []*Client
ClientSlice is an alias for a slice of pointers to Client. This should almost always be used instead of []Client.
func (ClientSlice) DeleteAll ¶
func (o ClientSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ClientSlice) ReloadAll ¶
func (o *ClientSlice) 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 (ClientSlice) UpdateAll ¶
func (o ClientSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Device ¶
type Device struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Secret string `boil:"secret" json:"secret" toml:"secret" yaml:"secret"` ClientID string `boil:"client_id" json:"client_id" toml:"client_id" yaml:"client_id"` IsDeleted null.Bool `boil:"is_deleted" json:"is_deleted,omitempty" toml:"is_deleted" yaml:"is_deleted,omitempty"` R *deviceR `boil:"-" json:"-" toml:"-" yaml:"-"` L deviceL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Device is an object representing the database table.
func FindDevice ¶
func FindDevice(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Device, error)
FindDevice retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Device) AddArchives ¶
func (o *Device) AddArchives(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Archive) error
AddArchives adds the given related objects to the existing relationships of the device, optionally inserting them as new records. Appends related to o.R.Archives. Sets related.R.Device appropriately.
func (*Device) Delete ¶
Delete deletes a single Device record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Device) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Device) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Device) SetClient ¶
func (o *Device) SetClient(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Client) error
SetClient of the device to the related item. Sets o.R.Client to related. Adds o to related.R.Devices.
func (*Device) Update ¶
func (o *Device) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Device. 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 (*Device) Upsert ¶
func (o *Device) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 DeviceHook ¶
DeviceHook is the signature for custom Device hook methods
type DeviceSlice ¶
type DeviceSlice []*Device
DeviceSlice is an alias for a slice of pointers to Device. This should almost always be used instead of []Device.
func (DeviceSlice) DeleteAll ¶
func (o DeviceSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*DeviceSlice) ReloadAll ¶
func (o *DeviceSlice) 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 (DeviceSlice) UpdateAll ¶
func (o DeviceSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.