models

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntegrationTypeHardware string = "Hardware"
	IntegrationTypeAPI      string = "API"
)

Enum values for IntegrationType

View Source
const (
	IntegrationStyleAddon   string = "Addon"
	IntegrationStyleOEM     string = "OEM"
	IntegrationStyleWebhook string = "Webhook"
)

Enum values for IntegrationStyle

Variables

View Source
var DeviceDefinitionColumns = struct {
	ID           string
	Model        string
	Year         string
	ImageURL     string
	Metadata     string
	CreatedAt    string
	UpdatedAt    string
	Source       string
	Verified     string
	ExternalID   string
	DeviceMakeID string
}{
	ID:           "id",
	Model:        "model",
	Year:         "year",
	ImageURL:     "image_url",
	Metadata:     "metadata",
	CreatedAt:    "created_at",
	UpdatedAt:    "updated_at",
	Source:       "source",
	Verified:     "verified",
	ExternalID:   "external_id",
	DeviceMakeID: "device_make_id",
}
View Source
var DeviceDefinitionRels = struct {
	DeviceMake         string
	DeviceIntegrations string
	DeviceStyles       string
}{
	DeviceMake:         "DeviceMake",
	DeviceIntegrations: "DeviceIntegrations",
	DeviceStyles:       "DeviceStyles",
}

DeviceDefinitionRels is where relationship names are stored.

View Source
var DeviceDefinitionTableColumns = struct {
	ID           string
	Model        string
	Year         string
	ImageURL     string
	Metadata     string
	CreatedAt    string
	UpdatedAt    string
	Source       string
	Verified     string
	ExternalID   string
	DeviceMakeID string
}{
	ID:           "device_definitions.id",
	Model:        "device_definitions.model",
	Year:         "device_definitions.year",
	ImageURL:     "device_definitions.image_url",
	Metadata:     "device_definitions.metadata",
	CreatedAt:    "device_definitions.created_at",
	UpdatedAt:    "device_definitions.updated_at",
	Source:       "device_definitions.source",
	Verified:     "device_definitions.verified",
	ExternalID:   "device_definitions.external_id",
	DeviceMakeID: "device_definitions.device_make_id",
}
View Source
var DeviceDefinitionWhere = struct {
	ID           whereHelperstring
	Model        whereHelperstring
	Year         whereHelperint16
	ImageURL     whereHelpernull_String
	Metadata     whereHelpernull_JSON
	CreatedAt    whereHelpertime_Time
	UpdatedAt    whereHelpertime_Time
	Source       whereHelpernull_String
	Verified     whereHelperbool
	ExternalID   whereHelpernull_String
	DeviceMakeID whereHelperstring
}{
	ID:           whereHelperstring{/* contains filtered or unexported fields */},
	Model:        whereHelperstring{/* contains filtered or unexported fields */},
	Year:         whereHelperint16{/* contains filtered or unexported fields */},
	ImageURL:     whereHelpernull_String{/* contains filtered or unexported fields */},
	Metadata:     whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	Source:       whereHelpernull_String{/* contains filtered or unexported fields */},
	Verified:     whereHelperbool{/* contains filtered or unexported fields */},
	ExternalID:   whereHelpernull_String{/* contains filtered or unexported fields */},
	DeviceMakeID: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var DeviceIntegrationColumns = struct {
	DeviceDefinitionID string
	IntegrationID      string
	Capabilities       string
	CreatedAt          string
	UpdatedAt          string
	Region             string
}{
	DeviceDefinitionID: "device_definition_id",
	IntegrationID:      "integration_id",
	Capabilities:       "capabilities",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	Region:             "region",
}
View Source
var DeviceIntegrationRels = struct {
	DeviceDefinition string
	Integration      string
}{
	DeviceDefinition: "DeviceDefinition",
	Integration:      "Integration",
}

DeviceIntegrationRels is where relationship names are stored.

View Source
var DeviceIntegrationTableColumns = struct {
	DeviceDefinitionID string
	IntegrationID      string
	Capabilities       string
	CreatedAt          string
	UpdatedAt          string
	Region             string
}{
	DeviceDefinitionID: "device_integrations.device_definition_id",
	IntegrationID:      "device_integrations.integration_id",
	Capabilities:       "device_integrations.capabilities",
	CreatedAt:          "device_integrations.created_at",
	UpdatedAt:          "device_integrations.updated_at",
	Region:             "device_integrations.region",
}
View Source
var DeviceIntegrationWhere = struct {
	DeviceDefinitionID whereHelperstring
	IntegrationID      whereHelperstring
	Capabilities       whereHelpernull_JSON
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpertime_Time
	Region             whereHelperstring
}{
	DeviceDefinitionID: whereHelperstring{/* contains filtered or unexported fields */},
	IntegrationID:      whereHelperstring{/* contains filtered or unexported fields */},
	Capabilities:       whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	Region:             whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var DeviceMakeColumns = struct {
	ID              string
	Name            string
	ExternalIds     string
	CreatedAt       string
	UpdatedAt       string
	TokenID         string
	LogoURL         string
	OemPlatformName string
}{
	ID:              "id",
	Name:            "name",
	ExternalIds:     "external_ids",
	CreatedAt:       "created_at",
	UpdatedAt:       "updated_at",
	TokenID:         "token_id",
	LogoURL:         "logo_url",
	OemPlatformName: "oem_platform_name",
}
View Source
var DeviceMakeRels = struct {
	DeviceDefinitions string
}{
	DeviceDefinitions: "DeviceDefinitions",
}

DeviceMakeRels is where relationship names are stored.

View Source
var DeviceMakeTableColumns = struct {
	ID              string
	Name            string
	ExternalIds     string
	CreatedAt       string
	UpdatedAt       string
	TokenID         string
	LogoURL         string
	OemPlatformName string
}{
	ID:              "device_makes.id",
	Name:            "device_makes.name",
	ExternalIds:     "device_makes.external_ids",
	CreatedAt:       "device_makes.created_at",
	UpdatedAt:       "device_makes.updated_at",
	TokenID:         "device_makes.token_id",
	LogoURL:         "device_makes.logo_url",
	OemPlatformName: "device_makes.oem_platform_name",
}
View Source
var DeviceMakeWhere = struct {
	ID              whereHelperstring
	Name            whereHelperstring
	ExternalIds     whereHelpernull_JSON
	CreatedAt       whereHelpertime_Time
	UpdatedAt       whereHelpertime_Time
	TokenID         whereHelpertypes_NullDecimal
	LogoURL         whereHelpernull_String
	OemPlatformName whereHelpernull_String
}{
	ID:              whereHelperstring{/* contains filtered or unexported fields */},
	Name:            whereHelperstring{/* contains filtered or unexported fields */},
	ExternalIds:     whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	TokenID:         whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	LogoURL:         whereHelpernull_String{/* contains filtered or unexported fields */},
	OemPlatformName: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var DeviceStyleColumns = struct {
	ID                 string
	DeviceDefinitionID string
	Name               string
	ExternalStyleID    string
	Source             string
	CreatedAt          string
	UpdatedAt          string
	SubModel           string
}{
	ID:                 "id",
	DeviceDefinitionID: "device_definition_id",
	Name:               "name",
	ExternalStyleID:    "external_style_id",
	Source:             "source",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	SubModel:           "sub_model",
}
View Source
var DeviceStyleRels = struct {
	DeviceDefinition string
}{
	DeviceDefinition: "DeviceDefinition",
}

DeviceStyleRels is where relationship names are stored.

View Source
var DeviceStyleTableColumns = struct {
	ID                 string
	DeviceDefinitionID string
	Name               string
	ExternalStyleID    string
	Source             string
	CreatedAt          string
	UpdatedAt          string
	SubModel           string
}{
	ID:                 "device_styles.id",
	DeviceDefinitionID: "device_styles.device_definition_id",
	Name:               "device_styles.name",
	ExternalStyleID:    "device_styles.external_style_id",
	Source:             "device_styles.source",
	CreatedAt:          "device_styles.created_at",
	UpdatedAt:          "device_styles.updated_at",
	SubModel:           "device_styles.sub_model",
}
View Source
var DeviceStyleWhere = struct {
	ID                 whereHelperstring
	DeviceDefinitionID whereHelperstring
	Name               whereHelperstring
	ExternalStyleID    whereHelperstring
	Source             whereHelperstring
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpertime_Time
	SubModel           whereHelperstring
}{
	ID:                 whereHelperstring{/* contains filtered or unexported fields */},
	DeviceDefinitionID: whereHelperstring{/* contains filtered or unexported fields */},
	Name:               whereHelperstring{/* contains filtered or unexported fields */},
	ExternalStyleID:    whereHelperstring{/* contains filtered or unexported fields */},
	Source:             whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	SubModel:           whereHelperstring{/* 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 IntegrationColumns = struct {
	ID               string
	Type             string
	Style            string
	Vendor           string
	CreatedAt        string
	UpdatedAt        string
	RefreshLimitSecs string
	Metadata         string
}{
	ID:               "id",
	Type:             "type",
	Style:            "style",
	Vendor:           "vendor",
	CreatedAt:        "created_at",
	UpdatedAt:        "updated_at",
	RefreshLimitSecs: "refresh_limit_secs",
	Metadata:         "metadata",
}
View Source
var IntegrationRels = struct {
	DeviceIntegrations string
}{
	DeviceIntegrations: "DeviceIntegrations",
}

IntegrationRels is where relationship names are stored.

View Source
var IntegrationTableColumns = struct {
	ID               string
	Type             string
	Style            string
	Vendor           string
	CreatedAt        string
	UpdatedAt        string
	RefreshLimitSecs string
	Metadata         string
}{
	ID:               "integrations.id",
	Type:             "integrations.type",
	Style:            "integrations.style",
	Vendor:           "integrations.vendor",
	CreatedAt:        "integrations.created_at",
	UpdatedAt:        "integrations.updated_at",
	RefreshLimitSecs: "integrations.refresh_limit_secs",
	Metadata:         "integrations.metadata",
}
View Source
var IntegrationWhere = struct {
	ID               whereHelperstring
	Type             whereHelperstring
	Style            whereHelperstring
	Vendor           whereHelperstring
	CreatedAt        whereHelpertime_Time
	UpdatedAt        whereHelpertime_Time
	RefreshLimitSecs whereHelperint
	Metadata         whereHelpernull_JSON
}{
	ID:               whereHelperstring{/* contains filtered or unexported fields */},
	Type:             whereHelperstring{/* contains filtered or unexported fields */},
	Style:            whereHelperstring{/* contains filtered or unexported fields */},
	Vendor:           whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	RefreshLimitSecs: whereHelperint{/* contains filtered or unexported fields */},
	Metadata:         whereHelpernull_JSON{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	DeviceDefinitions  string
	DeviceIntegrations string
	DeviceMakes        string
	DeviceStyles       string
	Integrations       string
}{
	DeviceDefinitions:  "device_definitions",
	DeviceIntegrations: "device_integrations",
	DeviceMakes:        "device_makes",
	DeviceStyles:       "device_styles",
	Integrations:       "integrations",
}
View Source
var ViewNames = struct {
}{}

Functions

func AddDeviceDefinitionHook

func AddDeviceDefinitionHook(hookPoint boil.HookPoint, deviceDefinitionHook DeviceDefinitionHook)

AddDeviceDefinitionHook registers your hook function for all future operations.

func AddDeviceIntegrationHook

func AddDeviceIntegrationHook(hookPoint boil.HookPoint, deviceIntegrationHook DeviceIntegrationHook)

AddDeviceIntegrationHook registers your hook function for all future operations.

func AddDeviceMakeHook

func AddDeviceMakeHook(hookPoint boil.HookPoint, deviceMakeHook DeviceMakeHook)

AddDeviceMakeHook registers your hook function for all future operations.

func AddDeviceStyleHook

func AddDeviceStyleHook(hookPoint boil.HookPoint, deviceStyleHook DeviceStyleHook)

AddDeviceStyleHook registers your hook function for all future operations.

func AddIntegrationHook

func AddIntegrationHook(hookPoint boil.HookPoint, integrationHook IntegrationHook)

AddIntegrationHook registers your hook function for all future operations.

func AllIntegrationStyle

func AllIntegrationStyle() []string

func AllIntegrationType

func AllIntegrationType() []string

func DeviceDefinitionExists

func DeviceDefinitionExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

DeviceDefinitionExists checks if the DeviceDefinition row exists.

func DeviceDefinitions

func DeviceDefinitions(mods ...qm.QueryMod) deviceDefinitionQuery

DeviceDefinitions retrieves all the records using an executor.

func DeviceIntegrationExists

func DeviceIntegrationExists(ctx context.Context, exec boil.ContextExecutor, deviceDefinitionID string, integrationID string, region string) (bool, error)

DeviceIntegrationExists checks if the DeviceIntegration row exists.

func DeviceIntegrations

func DeviceIntegrations(mods ...qm.QueryMod) deviceIntegrationQuery

DeviceIntegrations retrieves all the records using an executor.

func DeviceMakeExists

func DeviceMakeExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

DeviceMakeExists checks if the DeviceMake row exists.

func DeviceMakes

func DeviceMakes(mods ...qm.QueryMod) deviceMakeQuery

DeviceMakes retrieves all the records using an executor.

func DeviceStyleExists

func DeviceStyleExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

DeviceStyleExists checks if the DeviceStyle row exists.

func DeviceStyles

func DeviceStyles(mods ...qm.QueryMod) deviceStyleQuery

DeviceStyles retrieves all the records using an executor.

func IntegrationExists

func IntegrationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

IntegrationExists checks if the Integration row exists.

func Integrations

func Integrations(mods ...qm.QueryMod) integrationQuery

Integrations 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

Types

type DeviceDefinition

type DeviceDefinition struct {
	ID           string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Model        string      `boil:"model" json:"model" toml:"model" yaml:"model"`
	Year         int16       `boil:"year" json:"year" toml:"year" yaml:"year"`
	ImageURL     null.String `boil:"image_url" json:"image_url,omitempty" toml:"image_url" yaml:"image_url,omitempty"`
	Metadata     null.JSON   `boil:"metadata" json:"metadata,omitempty" toml:"metadata" yaml:"metadata,omitempty"`
	CreatedAt    time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt    time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	Source       null.String `boil:"source" json:"source,omitempty" toml:"source" yaml:"source,omitempty"`
	Verified     bool        `boil:"verified" json:"verified" toml:"verified" yaml:"verified"`
	ExternalID   null.String `boil:"external_id" json:"external_id,omitempty" toml:"external_id" yaml:"external_id,omitempty"`
	DeviceMakeID string      `boil:"device_make_id" json:"device_make_id" toml:"device_make_id" yaml:"device_make_id"`

	R *deviceDefinitionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deviceDefinitionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeviceDefinition is an object representing the database table.

func FindDeviceDefinition

func FindDeviceDefinition(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*DeviceDefinition, error)

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

func (*DeviceDefinition) AddDeviceIntegrations

func (o *DeviceDefinition) AddDeviceIntegrations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeviceIntegration) error

AddDeviceIntegrations adds the given related objects to the existing relationships of the device_definition, optionally inserting them as new records. Appends related to o.R.DeviceIntegrations. Sets related.R.DeviceDefinition appropriately.

func (*DeviceDefinition) AddDeviceStyles

func (o *DeviceDefinition) AddDeviceStyles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeviceStyle) error

AddDeviceStyles adds the given related objects to the existing relationships of the device_definition, optionally inserting them as new records. Appends related to o.R.DeviceStyles. Sets related.R.DeviceDefinition appropriately.

func (*DeviceDefinition) Delete

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

func (*DeviceDefinition) DeviceIntegrations

func (o *DeviceDefinition) DeviceIntegrations(mods ...qm.QueryMod) deviceIntegrationQuery

DeviceIntegrations retrieves all the device_integration's DeviceIntegrations with an executor.

func (*DeviceDefinition) DeviceMake

func (o *DeviceDefinition) DeviceMake(mods ...qm.QueryMod) deviceMakeQuery

DeviceMake pointed to by the foreign key.

func (*DeviceDefinition) DeviceStyles

func (o *DeviceDefinition) DeviceStyles(mods ...qm.QueryMod) deviceStyleQuery

DeviceStyles retrieves all the device_style's DeviceStyles with an executor.

func (*DeviceDefinition) Insert

func (o *DeviceDefinition) 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 (*DeviceDefinition) Reload

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

func (*DeviceDefinition) SetDeviceMake

func (o *DeviceDefinition) SetDeviceMake(ctx context.Context, exec boil.ContextExecutor, insert bool, related *DeviceMake) error

SetDeviceMake of the deviceDefinition to the related item. Sets o.R.DeviceMake to related. Adds o to related.R.DeviceDefinitions.

func (*DeviceDefinition) Update

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

Update uses an executor to update the DeviceDefinition. 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 (*DeviceDefinition) Upsert

func (o *DeviceDefinition) 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 DeviceDefinitionHook

type DeviceDefinitionHook func(context.Context, boil.ContextExecutor, *DeviceDefinition) error

DeviceDefinitionHook is the signature for custom DeviceDefinition hook methods

type DeviceDefinitionSlice

type DeviceDefinitionSlice []*DeviceDefinition

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

func (DeviceDefinitionSlice) DeleteAll

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

func (*DeviceDefinitionSlice) ReloadAll

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

func (DeviceDefinitionSlice) UpdateAll

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

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

type DeviceIntegration

type DeviceIntegration struct {
	DeviceDefinitionID string    `boil:"device_definition_id" json:"device_definition_id" toml:"device_definition_id" yaml:"device_definition_id"`
	IntegrationID      string    `boil:"integration_id" json:"integration_id" toml:"integration_id" yaml:"integration_id"`
	Capabilities       null.JSON `boil:"capabilities" json:"capabilities,omitempty" toml:"capabilities" yaml:"capabilities,omitempty"`
	CreatedAt          time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt          time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	Region             string    `boil:"region" json:"region" toml:"region" yaml:"region"`

	R *deviceIntegrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deviceIntegrationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeviceIntegration is an object representing the database table.

func FindDeviceIntegration

func FindDeviceIntegration(ctx context.Context, exec boil.ContextExecutor, deviceDefinitionID string, integrationID string, region string, selectCols ...string) (*DeviceIntegration, error)

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

func (*DeviceIntegration) Delete

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

func (*DeviceIntegration) DeviceDefinition

func (o *DeviceIntegration) DeviceDefinition(mods ...qm.QueryMod) deviceDefinitionQuery

DeviceDefinition pointed to by the foreign key.

func (*DeviceIntegration) Insert

func (o *DeviceIntegration) 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 (*DeviceIntegration) Integration

func (o *DeviceIntegration) Integration(mods ...qm.QueryMod) integrationQuery

Integration pointed to by the foreign key.

func (*DeviceIntegration) Reload

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

func (*DeviceIntegration) SetDeviceDefinition

func (o *DeviceIntegration) SetDeviceDefinition(ctx context.Context, exec boil.ContextExecutor, insert bool, related *DeviceDefinition) error

SetDeviceDefinition of the deviceIntegration to the related item. Sets o.R.DeviceDefinition to related. Adds o to related.R.DeviceIntegrations.

func (*DeviceIntegration) SetIntegration

func (o *DeviceIntegration) SetIntegration(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Integration) error

SetIntegration of the deviceIntegration to the related item. Sets o.R.Integration to related. Adds o to related.R.DeviceIntegrations.

func (*DeviceIntegration) Update

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

Update uses an executor to update the DeviceIntegration. 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 (*DeviceIntegration) Upsert

func (o *DeviceIntegration) 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 DeviceIntegrationHook

type DeviceIntegrationHook func(context.Context, boil.ContextExecutor, *DeviceIntegration) error

DeviceIntegrationHook is the signature for custom DeviceIntegration hook methods

type DeviceIntegrationSlice

type DeviceIntegrationSlice []*DeviceIntegration

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

func (DeviceIntegrationSlice) DeleteAll

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

func (*DeviceIntegrationSlice) ReloadAll

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

func (DeviceIntegrationSlice) UpdateAll

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

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

type DeviceMake

type DeviceMake struct {
	ID              string            `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name            string            `boil:"name" json:"name" toml:"name" yaml:"name"`
	ExternalIds     null.JSON         `boil:"external_ids" json:"external_ids,omitempty" toml:"external_ids" yaml:"external_ids,omitempty"`
	CreatedAt       time.Time         `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt       time.Time         `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	TokenID         types.NullDecimal `boil:"token_id" json:"token_id,omitempty" toml:"token_id" yaml:"token_id,omitempty"`
	LogoURL         null.String       `boil:"logo_url" json:"logo_url,omitempty" toml:"logo_url" yaml:"logo_url,omitempty"`
	OemPlatformName null.String       `boil:"oem_platform_name" json:"oem_platform_name,omitempty" toml:"oem_platform_name" yaml:"oem_platform_name,omitempty"`

	R *deviceMakeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deviceMakeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeviceMake is an object representing the database table.

func FindDeviceMake

func FindDeviceMake(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*DeviceMake, error)

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

func (*DeviceMake) AddDeviceDefinitions

func (o *DeviceMake) AddDeviceDefinitions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeviceDefinition) error

AddDeviceDefinitions adds the given related objects to the existing relationships of the device_make, optionally inserting them as new records. Appends related to o.R.DeviceDefinitions. Sets related.R.DeviceMake appropriately.

func (*DeviceMake) Delete

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

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

func (*DeviceMake) DeviceDefinitions

func (o *DeviceMake) DeviceDefinitions(mods ...qm.QueryMod) deviceDefinitionQuery

DeviceDefinitions retrieves all the device_definition's DeviceDefinitions with an executor.

func (*DeviceMake) Insert

func (o *DeviceMake) 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 (*DeviceMake) Reload

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

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

func (*DeviceMake) Update

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

Update uses an executor to update the DeviceMake. 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 (*DeviceMake) Upsert

func (o *DeviceMake) 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 DeviceMakeHook

type DeviceMakeHook func(context.Context, boil.ContextExecutor, *DeviceMake) error

DeviceMakeHook is the signature for custom DeviceMake hook methods

type DeviceMakeSlice

type DeviceMakeSlice []*DeviceMake

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

func (DeviceMakeSlice) DeleteAll

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

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

func (*DeviceMakeSlice) ReloadAll

func (o *DeviceMakeSlice) 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 (DeviceMakeSlice) UpdateAll

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

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

type DeviceStyle

type DeviceStyle struct {
	ID                 string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	DeviceDefinitionID string    `boil:"device_definition_id" json:"device_definition_id" toml:"device_definition_id" yaml:"device_definition_id"`
	Name               string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	ExternalStyleID    string    `boil:"external_style_id" json:"external_style_id" toml:"external_style_id" yaml:"external_style_id"`
	Source             string    `boil:"source" json:"source" toml:"source" yaml:"source"`
	CreatedAt          time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt          time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	SubModel           string    `boil:"sub_model" json:"sub_model" toml:"sub_model" yaml:"sub_model"`

	R *deviceStyleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deviceStyleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeviceStyle is an object representing the database table.

func FindDeviceStyle

func FindDeviceStyle(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*DeviceStyle, error)

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

func (*DeviceStyle) Delete

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

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

func (*DeviceStyle) DeviceDefinition

func (o *DeviceStyle) DeviceDefinition(mods ...qm.QueryMod) deviceDefinitionQuery

DeviceDefinition pointed to by the foreign key.

func (*DeviceStyle) Insert

func (o *DeviceStyle) 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 (*DeviceStyle) Reload

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

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

func (*DeviceStyle) SetDeviceDefinition

func (o *DeviceStyle) SetDeviceDefinition(ctx context.Context, exec boil.ContextExecutor, insert bool, related *DeviceDefinition) error

SetDeviceDefinition of the deviceStyle to the related item. Sets o.R.DeviceDefinition to related. Adds o to related.R.DeviceStyles.

func (*DeviceStyle) Update

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

Update uses an executor to update the DeviceStyle. 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 (*DeviceStyle) Upsert

func (o *DeviceStyle) 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 DeviceStyleHook

type DeviceStyleHook func(context.Context, boil.ContextExecutor, *DeviceStyle) error

DeviceStyleHook is the signature for custom DeviceStyle hook methods

type DeviceStyleSlice

type DeviceStyleSlice []*DeviceStyle

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

func (DeviceStyleSlice) DeleteAll

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

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

func (*DeviceStyleSlice) ReloadAll

func (o *DeviceStyleSlice) 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 (DeviceStyleSlice) UpdateAll

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

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

type Integration

type Integration struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Type      string    `boil:"type" json:"type" toml:"type" yaml:"type"`
	Style     string    `boil:"style" json:"style" toml:"style" yaml:"style"`
	Vendor    string    `boil:"vendor" json:"vendor" toml:"vendor" yaml:"vendor"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	// How often can integration be called in seconds
	RefreshLimitSecs int       `boil:"refresh_limit_secs" json:"refresh_limit_secs" toml:"refresh_limit_secs" yaml:"refresh_limit_secs"`
	Metadata         null.JSON `boil:"metadata" json:"metadata,omitempty" toml:"metadata" yaml:"metadata,omitempty"`

	R *integrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L integrationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Integration is an object representing the database table.

func FindIntegration

func FindIntegration(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Integration, error)

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

func (*Integration) AddDeviceIntegrations

func (o *Integration) AddDeviceIntegrations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DeviceIntegration) error

AddDeviceIntegrations adds the given related objects to the existing relationships of the integration, optionally inserting them as new records. Appends related to o.R.DeviceIntegrations. Sets related.R.Integration appropriately.

func (*Integration) Delete

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

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

func (*Integration) DeviceIntegrations

func (o *Integration) DeviceIntegrations(mods ...qm.QueryMod) deviceIntegrationQuery

DeviceIntegrations retrieves all the device_integration's DeviceIntegrations with an executor.

func (*Integration) Insert

func (o *Integration) 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 (*Integration) Reload

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

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

func (*Integration) Update

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

Update uses an executor to update the Integration. 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 (*Integration) Upsert

func (o *Integration) 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 IntegrationHook

type IntegrationHook func(context.Context, boil.ContextExecutor, *Integration) error

IntegrationHook is the signature for custom Integration hook methods

type IntegrationSlice

type IntegrationSlice []*Integration

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

func (IntegrationSlice) DeleteAll

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

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

func (*IntegrationSlice) ReloadAll

func (o *IntegrationSlice) 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 (IntegrationSlice) UpdateAll

func (o IntegrationSlice) 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.

Jump to

Keyboard shortcuts

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