models

package
v0.26.7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IncidentActionTypeResolved     string = "resolved"
	IncidentActionTypeAcknowledged string = "acknowledged"
	IncidentActionTypeCreated      string = "created"
)

Enum values for IncidentActionType

View Source
const (
	RoleTypeOwner  string = "owner"
	RoleTypeAdmin  string = "admin"
	RoleTypeWriter string = "writer"
	RoleTypeReader string = "reader"
)

Enum values for RoleType

Variables

View Source
var AccountColumns = struct {
	ID         string
	Name       string
	VerifiedAt string
	CreatedAt  string
}{
	ID:         "id",
	Name:       "name",
	VerifiedAt: "verified_at",
	CreatedAt:  "created_at",
}
View Source
var AccountRels = struct {
	Monitors string
	Users    string
}{
	Monitors: "Monitors",
	Users:    "Users",
}

AccountRels is where relationship names are stored.

View Source
var AccountTableColumns = struct {
	ID         string
	Name       string
	VerifiedAt string
	CreatedAt  string
}{
	ID:         "accounts.id",
	Name:       "accounts.name",
	VerifiedAt: "accounts.verified_at",
	CreatedAt:  "accounts.created_at",
}
View Source
var AccountWhere = struct {
	ID         whereHelperstring
	Name       whereHelperstring
	VerifiedAt whereHelpernull_Time
	CreatedAt  whereHelpertime_Time
}{
	ID:         whereHelperstring{/* contains filtered or unexported fields */},
	Name:       whereHelperstring{/* contains filtered or unexported fields */},
	VerifiedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt:  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 IncidentActionColumns = struct {
	ID                string
	Description       string
	ActionType        string
	IncidentID        string
	TakenByUserWithID string
	At                string
}{
	ID:                "id",
	Description:       "description",
	ActionType:        "action_type",
	IncidentID:        "incident_id",
	TakenByUserWithID: "taken_by_user_with_id",
	At:                "at",
}
View Source
var IncidentActionRels = struct {
	Incident        string
	TakenByUserWith string
}{
	Incident:        "Incident",
	TakenByUserWith: "TakenByUserWith",
}

IncidentActionRels is where relationship names are stored.

View Source
var IncidentActionTableColumns = struct {
	ID                string
	Description       string
	ActionType        string
	IncidentID        string
	TakenByUserWithID string
	At                string
}{
	ID:                "incident_actions.id",
	Description:       "incident_actions.description",
	ActionType:        "incident_actions.action_type",
	IncidentID:        "incident_actions.incident_id",
	TakenByUserWithID: "incident_actions.taken_by_user_with_id",
	At:                "incident_actions.at",
}
View Source
var IncidentActionWhere = struct {
	ID                whereHelperstring
	Description       whereHelpernull_String
	ActionType        whereHelperstring
	IncidentID        whereHelperstring
	TakenByUserWithID whereHelpernull_String
	At                whereHelpertime_Time
}{
	ID:                whereHelperstring{/* contains filtered or unexported fields */},
	Description:       whereHelpernull_String{/* contains filtered or unexported fields */},
	ActionType:        whereHelperstring{/* contains filtered or unexported fields */},
	IncidentID:        whereHelperstring{/* contains filtered or unexported fields */},
	TakenByUserWithID: whereHelpernull_String{/* contains filtered or unexported fields */},
	At:                whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var IncidentColumns = struct {
	ID             string
	MonitorID      string
	ResolvedAt     string
	Cause          string
	ResponseStatus string
	CheckedURL     string
	CreatedAt      string
}{
	ID:             "id",
	MonitorID:      "monitor_id",
	ResolvedAt:     "resolved_at",
	Cause:          "cause",
	ResponseStatus: "response_status",
	CheckedURL:     "checked_url",
	CreatedAt:      "created_at",
}
View Source
var IncidentRels = struct {
	Monitor         string
	IncidentActions string
}{
	Monitor:         "Monitor",
	IncidentActions: "IncidentActions",
}

IncidentRels is where relationship names are stored.

View Source
var IncidentTableColumns = struct {
	ID             string
	MonitorID      string
	ResolvedAt     string
	Cause          string
	ResponseStatus string
	CheckedURL     string
	CreatedAt      string
}{
	ID:             "incidents.id",
	MonitorID:      "incidents.monitor_id",
	ResolvedAt:     "incidents.resolved_at",
	Cause:          "incidents.cause",
	ResponseStatus: "incidents.response_status",
	CheckedURL:     "incidents.checked_url",
	CreatedAt:      "incidents.created_at",
}
View Source
var IncidentWhere = struct {
	ID             whereHelperstring
	MonitorID      whereHelperstring
	ResolvedAt     whereHelpernull_Time
	Cause          whereHelpernull_String
	ResponseStatus whereHelpernull_Int16
	CheckedURL     whereHelperstring
	CreatedAt      whereHelpertime_Time
}{
	ID:             whereHelperstring{/* contains filtered or unexported fields */},
	MonitorID:      whereHelperstring{/* contains filtered or unexported fields */},
	ResolvedAt:     whereHelpernull_Time{/* contains filtered or unexported fields */},
	Cause:          whereHelpernull_String{/* contains filtered or unexported fields */},
	ResponseStatus: whereHelpernull_Int16{/* contains filtered or unexported fields */},
	CheckedURL:     whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var MonitorCheckResultColumns = struct {
	ID               string
	MonitorID        string
	StatusCode       string
	Region           string
	ResponseTimeInMS string
	CheckedAt        string
}{
	ID:               "id",
	MonitorID:        "monitor_id",
	StatusCode:       "status_code",
	Region:           "region",
	ResponseTimeInMS: "response_time_in_ms",
	CheckedAt:        "checked_at",
}
View Source
var MonitorCheckResultRels = struct {
	Monitor string
}{
	Monitor: "Monitor",
}

MonitorCheckResultRels is where relationship names are stored.

View Source
var MonitorCheckResultTableColumns = struct {
	ID               string
	MonitorID        string
	StatusCode       string
	Region           string
	ResponseTimeInMS string
	CheckedAt        string
}{
	ID:               "monitor_check_results.id",
	MonitorID:        "monitor_check_results.monitor_id",
	StatusCode:       "monitor_check_results.status_code",
	Region:           "monitor_check_results.region",
	ResponseTimeInMS: "monitor_check_results.response_time_in_ms",
	CheckedAt:        "monitor_check_results.checked_at",
}
View Source
var MonitorCheckResultWhere = struct {
	ID               whereHelperstring
	MonitorID        whereHelperstring
	StatusCode       whereHelpernull_Int16
	Region           whereHelperstring
	ResponseTimeInMS whereHelperint16
	CheckedAt        whereHelpertime_Time
}{
	ID:               whereHelperstring{/* contains filtered or unexported fields */},
	MonitorID:        whereHelperstring{/* contains filtered or unexported fields */},
	StatusCode:       whereHelpernull_Int16{/* contains filtered or unexported fields */},
	Region:           whereHelperstring{/* contains filtered or unexported fields */},
	ResponseTimeInMS: whereHelperint16{/* contains filtered or unexported fields */},
	CheckedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var MonitorColumns = struct {
	ID                     string
	AccountID              string
	EndpointURL            string
	IsEndpointUp           string
	CreatedAt              string
	LastCheckedAt          string
	CheckIntervalInSeconds string
	IsPaused               string
}{
	ID:                     "id",
	AccountID:              "account_id",
	EndpointURL:            "endpoint_url",
	IsEndpointUp:           "is_endpoint_up",
	CreatedAt:              "created_at",
	LastCheckedAt:          "last_checked_at",
	CheckIntervalInSeconds: "check_interval_in_seconds",
	IsPaused:               "is_paused",
}
View Source
var MonitorRels = struct {
	Account             string
	Incidents           string
	MonitorCheckResults string
	Users               string
}{
	Account:             "Account",
	Incidents:           "Incidents",
	MonitorCheckResults: "MonitorCheckResults",
	Users:               "Users",
}

MonitorRels is where relationship names are stored.

View Source
var MonitorTableColumns = struct {
	ID                     string
	AccountID              string
	EndpointURL            string
	IsEndpointUp           string
	CreatedAt              string
	LastCheckedAt          string
	CheckIntervalInSeconds string
	IsPaused               string
}{
	ID:                     "monitors.id",
	AccountID:              "monitors.account_id",
	EndpointURL:            "monitors.endpoint_url",
	IsEndpointUp:           "monitors.is_endpoint_up",
	CreatedAt:              "monitors.created_at",
	LastCheckedAt:          "monitors.last_checked_at",
	CheckIntervalInSeconds: "monitors.check_interval_in_seconds",
	IsPaused:               "monitors.is_paused",
}
View Source
var MonitorWhere = struct {
	ID                     whereHelperstring
	AccountID              whereHelperstring
	EndpointURL            whereHelperstring
	IsEndpointUp           whereHelperbool
	CreatedAt              whereHelpertime_Time
	LastCheckedAt          whereHelpernull_Time
	CheckIntervalInSeconds whereHelperint
	IsPaused               whereHelperbool
}{
	ID:                     whereHelperstring{/* contains filtered or unexported fields */},
	AccountID:              whereHelperstring{/* contains filtered or unexported fields */},
	EndpointURL:            whereHelperstring{/* contains filtered or unexported fields */},
	IsEndpointUp:           whereHelperbool{/* contains filtered or unexported fields */},
	CreatedAt:              whereHelpertime_Time{/* contains filtered or unexported fields */},
	LastCheckedAt:          whereHelpernull_Time{/* contains filtered or unexported fields */},
	CheckIntervalInSeconds: whereHelperint{/* contains filtered or unexported fields */},
	IsPaused:               whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Accounts            string
	IncidentActions     string
	Incidents           string
	MonitorCheckResults string
	Monitors            string
	Subscribers         string
	Users               string
}{
	Accounts:            "accounts",
	IncidentActions:     "incident_actions",
	Incidents:           "incidents",
	MonitorCheckResults: "monitor_check_results",
	Monitors:            "monitors",
	Subscribers:         "subscribers",
	Users:               "users",
}
View Source
var UserColumns = struct {
	ID        string
	FirstName string
	LastName  string
	Email     string
	Password  string
	Role      string
	AccountID string
	CreatedAt string
}{
	ID:        "id",
	FirstName: "first_name",
	LastName:  "last_name",
	Email:     "email",
	Password:  "password",
	Role:      "role",
	AccountID: "account_id",
	CreatedAt: "created_at",
}
View Source
var UserRels = struct {
	Account                        string
	TakenByUserWithIncidentActions string
	Monitors                       string
}{
	Account:                        "Account",
	TakenByUserWithIncidentActions: "TakenByUserWithIncidentActions",
	Monitors:                       "Monitors",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID        string
	FirstName string
	LastName  string
	Email     string
	Password  string
	Role      string
	AccountID string
	CreatedAt string
}{
	ID:        "users.id",
	FirstName: "users.first_name",
	LastName:  "users.last_name",
	Email:     "users.email",
	Password:  "users.password",
	Role:      "users.role",
	AccountID: "users.account_id",
	CreatedAt: "users.created_at",
}
View Source
var UserWhere = struct {
	ID        whereHelperstring
	FirstName whereHelpernull_String
	LastName  whereHelpernull_String
	Email     whereHelperstring
	Password  whereHelperstring
	Role      whereHelperstring
	AccountID whereHelperstring
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	FirstName: whereHelpernull_String{/* contains filtered or unexported fields */},
	LastName:  whereHelpernull_String{/* contains filtered or unexported fields */},
	Email:     whereHelperstring{/* contains filtered or unexported fields */},
	Password:  whereHelperstring{/* contains filtered or unexported fields */},
	Role:      whereHelperstring{/* contains filtered or unexported fields */},
	AccountID: whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AccountExists

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

AccountExists checks if the Account row exists.

func Accounts

func Accounts(mods ...qm.QueryMod) accountQuery

Accounts retrieves all the records using an executor.

func AddAccountHook

func AddAccountHook(hookPoint boil.HookPoint, accountHook AccountHook)

AddAccountHook registers your hook function for all future operations.

func AddIncidentActionHook

func AddIncidentActionHook(hookPoint boil.HookPoint, incidentActionHook IncidentActionHook)

AddIncidentActionHook registers your hook function for all future operations.

func AddIncidentHook

func AddIncidentHook(hookPoint boil.HookPoint, incidentHook IncidentHook)

AddIncidentHook registers your hook function for all future operations.

func AddMonitorCheckResultHook

func AddMonitorCheckResultHook(hookPoint boil.HookPoint, monitorCheckResultHook MonitorCheckResultHook)

AddMonitorCheckResultHook registers your hook function for all future operations.

func AddMonitorHook

func AddMonitorHook(hookPoint boil.HookPoint, monitorHook MonitorHook)

AddMonitorHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func AllIncidentActionType

func AllIncidentActionType() []string

func AllRoleType

func AllRoleType() []string

func IncidentActionExists

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

IncidentActionExists checks if the IncidentAction row exists.

func IncidentActions

func IncidentActions(mods ...qm.QueryMod) incidentActionQuery

IncidentActions retrieves all the records using an executor.

func IncidentExists

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

IncidentExists checks if the Incident row exists.

func Incidents

func Incidents(mods ...qm.QueryMod) incidentQuery

Incidents retrieves all the records using an executor.

func MonitorCheckResultExists

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

MonitorCheckResultExists checks if the MonitorCheckResult row exists.

func MonitorCheckResults

func MonitorCheckResults(mods ...qm.QueryMod) monitorCheckResultQuery

MonitorCheckResults retrieves all the records using an executor.

func MonitorExists

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

MonitorExists checks if the Monitor row exists.

func Monitors

func Monitors(mods ...qm.QueryMod) monitorQuery

Monitors 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 UserExists

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

UserExists checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type Account

type Account struct {
	ID         string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name       string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	VerifiedAt null.Time `boil:"verified_at" json:"verified_at,omitempty" toml:"verified_at" yaml:"verified_at,omitempty"`
	CreatedAt  time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *accountR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L accountL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Account is an object representing the database table.

func FindAccount

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

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

func (*Account) AddMonitors

func (o *Account) AddMonitors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Monitor) error

AddMonitors adds the given related objects to the existing relationships of the account, optionally inserting them as new records. Appends related to o.R.Monitors. Sets related.R.Account appropriately.

func (*Account) AddUsers

func (o *Account) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddUsers adds the given related objects to the existing relationships of the account, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Account appropriately.

func (*Account) Delete

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

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

func (*Account) Exists

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

Exists checks if the Account row exists.

func (*Account) Insert

func (o *Account) 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 (*Account) Monitors

func (o *Account) Monitors(mods ...qm.QueryMod) monitorQuery

Monitors retrieves all the monitor's Monitors with an executor.

func (*Account) Reload

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

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

func (*Account) Update

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

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

func (o *Account) 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 (*Account) Users

func (o *Account) Users(mods ...qm.QueryMod) userQuery

Users retrieves all the user's Users with an executor.

type AccountHook

type AccountHook func(context.Context, boil.ContextExecutor, *Account) error

AccountHook is the signature for custom Account hook methods

type AccountSlice

type AccountSlice []*Account

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

func (AccountSlice) DeleteAll

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

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

func (*AccountSlice) ReloadAll

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

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

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

type Incident

type Incident struct {
	ID             string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	MonitorID      string      `boil:"monitor_id" json:"monitor_id" toml:"monitor_id" yaml:"monitor_id"`
	ResolvedAt     null.Time   `boil:"resolved_at" json:"resolved_at,omitempty" toml:"resolved_at" yaml:"resolved_at,omitempty"`
	Cause          null.String `boil:"cause" json:"cause,omitempty" toml:"cause" yaml:"cause,omitempty"`
	ResponseStatus null.Int16  `boil:"response_status" json:"response_status,omitempty" toml:"response_status" yaml:"response_status,omitempty"`
	CheckedURL     string      `boil:"checked_url" json:"checked_url" toml:"checked_url" yaml:"checked_url"`
	CreatedAt      time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *incidentR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L incidentL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Incident is an object representing the database table.

func FindIncident

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

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

func (*Incident) AddIncidentActions

func (o *Incident) AddIncidentActions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*IncidentAction) error

AddIncidentActions adds the given related objects to the existing relationships of the incident, optionally inserting them as new records. Appends related to o.R.IncidentActions. Sets related.R.Incident appropriately.

func (*Incident) Delete

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

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

func (*Incident) Exists

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

Exists checks if the Incident row exists.

func (*Incident) IncidentActions

func (o *Incident) IncidentActions(mods ...qm.QueryMod) incidentActionQuery

IncidentActions retrieves all the incident_action's IncidentActions with an executor.

func (*Incident) Insert

func (o *Incident) 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 (*Incident) Monitor

func (o *Incident) Monitor(mods ...qm.QueryMod) monitorQuery

Monitor pointed to by the foreign key.

func (*Incident) Reload

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

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

func (*Incident) SetMonitor

func (o *Incident) SetMonitor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Monitor) error

SetMonitor of the incident to the related item. Sets o.R.Monitor to related. Adds o to related.R.Incidents.

func (*Incident) Update

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

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

func (o *Incident) 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 IncidentAction

type IncidentAction struct {
	ID                string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Description       null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`
	ActionType        string      `boil:"action_type" json:"action_type" toml:"action_type" yaml:"action_type"`
	IncidentID        string      `boil:"incident_id" json:"incident_id" toml:"incident_id" yaml:"incident_id"`
	TakenByUserWithID null.String `` /* 135-byte string literal not displayed */
	At                time.Time   `boil:"at" json:"at" toml:"at" yaml:"at"`

	R *incidentActionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L incidentActionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

IncidentAction is an object representing the database table.

func FindIncidentAction

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

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

func (*IncidentAction) Delete

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

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

func (*IncidentAction) Exists

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

Exists checks if the IncidentAction row exists.

func (*IncidentAction) Incident

func (o *IncidentAction) Incident(mods ...qm.QueryMod) incidentQuery

Incident pointed to by the foreign key.

func (*IncidentAction) Insert

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

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

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

func (*IncidentAction) RemoveTakenByUserWith

func (o *IncidentAction) RemoveTakenByUserWith(ctx context.Context, exec boil.ContextExecutor, related *User) error

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

func (*IncidentAction) SetIncident

func (o *IncidentAction) SetIncident(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Incident) error

SetIncident of the incidentAction to the related item. Sets o.R.Incident to related. Adds o to related.R.IncidentActions.

func (*IncidentAction) SetTakenByUserWith

func (o *IncidentAction) SetTakenByUserWith(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetTakenByUserWith of the incidentAction to the related item. Sets o.R.TakenByUserWith to related. Adds o to related.R.TakenByUserWithIncidentActions.

func (*IncidentAction) TakenByUserWith

func (o *IncidentAction) TakenByUserWith(mods ...qm.QueryMod) userQuery

TakenByUserWith pointed to by the foreign key.

func (*IncidentAction) Update

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

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

func (o *IncidentAction) 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 IncidentActionHook

type IncidentActionHook func(context.Context, boil.ContextExecutor, *IncidentAction) error

IncidentActionHook is the signature for custom IncidentAction hook methods

type IncidentActionSlice

type IncidentActionSlice []*IncidentAction

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

func (IncidentActionSlice) DeleteAll

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

func (*IncidentActionSlice) ReloadAll

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

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

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

type IncidentHook

type IncidentHook func(context.Context, boil.ContextExecutor, *Incident) error

IncidentHook is the signature for custom Incident hook methods

type IncidentSlice

type IncidentSlice []*Incident

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

func (IncidentSlice) DeleteAll

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

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

func (*IncidentSlice) ReloadAll

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

func (o IncidentSlice) 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 Monitor

type Monitor struct {
	ID                     string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	AccountID              string    `boil:"account_id" json:"account_id" toml:"account_id" yaml:"account_id"`
	EndpointURL            string    `boil:"endpoint_url" json:"endpoint_url" toml:"endpoint_url" yaml:"endpoint_url"`
	IsEndpointUp           bool      `boil:"is_endpoint_up" json:"is_endpoint_up" toml:"is_endpoint_up" yaml:"is_endpoint_up"`
	CreatedAt              time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	LastCheckedAt          null.Time `boil:"last_checked_at" json:"last_checked_at,omitempty" toml:"last_checked_at" yaml:"last_checked_at,omitempty"`
	CheckIntervalInSeconds int       `` /* 131-byte string literal not displayed */
	IsPaused               bool      `boil:"is_paused" json:"is_paused" toml:"is_paused" yaml:"is_paused"`

	R *monitorR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L monitorL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Monitor is an object representing the database table.

func FindMonitor

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

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

func (*Monitor) Account

func (o *Monitor) Account(mods ...qm.QueryMod) accountQuery

Account pointed to by the foreign key.

func (*Monitor) AddIncidents

func (o *Monitor) AddIncidents(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Incident) error

AddIncidents adds the given related objects to the existing relationships of the monitor, optionally inserting them as new records. Appends related to o.R.Incidents. Sets related.R.Monitor appropriately.

func (*Monitor) AddMonitorCheckResults

func (o *Monitor) AddMonitorCheckResults(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*MonitorCheckResult) error

AddMonitorCheckResults adds the given related objects to the existing relationships of the monitor, optionally inserting them as new records. Appends related to o.R.MonitorCheckResults. Sets related.R.Monitor appropriately.

func (*Monitor) AddUsers

func (o *Monitor) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddUsers adds the given related objects to the existing relationships of the monitor, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Monitors appropriately.

func (*Monitor) Delete

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

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

func (*Monitor) Exists

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

Exists checks if the Monitor row exists.

func (*Monitor) Incidents

func (o *Monitor) Incidents(mods ...qm.QueryMod) incidentQuery

Incidents retrieves all the incident's Incidents with an executor.

func (*Monitor) Insert

func (o *Monitor) 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 (*Monitor) MonitorCheckResults

func (o *Monitor) MonitorCheckResults(mods ...qm.QueryMod) monitorCheckResultQuery

MonitorCheckResults retrieves all the monitor_check_result's MonitorCheckResults with an executor.

func (*Monitor) Reload

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

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

func (*Monitor) RemoveUsers

func (o *Monitor) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Monitors.

func (*Monitor) SetAccount

func (o *Monitor) SetAccount(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Account) error

SetAccount of the monitor to the related item. Sets o.R.Account to related. Adds o to related.R.Monitors.

func (*Monitor) SetUsers

func (o *Monitor) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetUsers removes all previously related items of the monitor replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Monitors's Users accordingly. Replaces o.R.Users with related. Sets related.R.Monitors's Users accordingly.

func (*Monitor) Update

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

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

func (o *Monitor) 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 (*Monitor) Users

func (o *Monitor) Users(mods ...qm.QueryMod) userQuery

Users retrieves all the user's Users with an executor.

type MonitorCheckResult

type MonitorCheckResult struct {
	ID               string     `boil:"id" json:"id" toml:"id" yaml:"id"`
	MonitorID        string     `boil:"monitor_id" json:"monitor_id" toml:"monitor_id" yaml:"monitor_id"`
	StatusCode       null.Int16 `boil:"status_code" json:"status_code,omitempty" toml:"status_code" yaml:"status_code,omitempty"`
	Region           string     `boil:"region" json:"region" toml:"region" yaml:"region"`
	ResponseTimeInMS int16      `boil:"response_time_in_ms" json:"response_time_in_ms" toml:"response_time_in_ms" yaml:"response_time_in_ms"`
	CheckedAt        time.Time  `boil:"checked_at" json:"checked_at" toml:"checked_at" yaml:"checked_at"`

	R *monitorCheckResultR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L monitorCheckResultL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

MonitorCheckResult is an object representing the database table.

func FindMonitorCheckResult

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

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

func (*MonitorCheckResult) Delete

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

func (*MonitorCheckResult) Exists

Exists checks if the MonitorCheckResult row exists.

func (*MonitorCheckResult) Insert

func (o *MonitorCheckResult) 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 (*MonitorCheckResult) Monitor

func (o *MonitorCheckResult) Monitor(mods ...qm.QueryMod) monitorQuery

Monitor pointed to by the foreign key.

func (*MonitorCheckResult) Reload

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

func (*MonitorCheckResult) SetMonitor

func (o *MonitorCheckResult) SetMonitor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Monitor) error

SetMonitor of the monitorCheckResult to the related item. Sets o.R.Monitor to related. Adds o to related.R.MonitorCheckResults.

func (*MonitorCheckResult) Update

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

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

func (o *MonitorCheckResult) 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 MonitorCheckResultHook

type MonitorCheckResultHook func(context.Context, boil.ContextExecutor, *MonitorCheckResult) error

MonitorCheckResultHook is the signature for custom MonitorCheckResult hook methods

type MonitorCheckResultSlice

type MonitorCheckResultSlice []*MonitorCheckResult

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

func (MonitorCheckResultSlice) DeleteAll

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

func (*MonitorCheckResultSlice) ReloadAll

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

func (MonitorCheckResultSlice) UpdateAll

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

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

type MonitorHook

type MonitorHook func(context.Context, boil.ContextExecutor, *Monitor) error

MonitorHook is the signature for custom Monitor hook methods

type MonitorSlice

type MonitorSlice []*Monitor

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

func (MonitorSlice) DeleteAll

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

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

func (*MonitorSlice) ReloadAll

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

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

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

type User

type User struct {
	ID        string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	FirstName null.String `boil:"first_name" json:"first_name,omitempty" toml:"first_name" yaml:"first_name,omitempty"`
	LastName  null.String `boil:"last_name" json:"last_name,omitempty" toml:"last_name" yaml:"last_name,omitempty"`
	Email     string      `boil:"email" json:"email" toml:"email" yaml:"email"`
	Password  string      `boil:"password" json:"password" toml:"password" yaml:"password"`
	Role      string      `boil:"role" json:"role" toml:"role" yaml:"role"`
	AccountID string      `boil:"account_id" json:"account_id" toml:"account_id" yaml:"account_id"`
	CreatedAt time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

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

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

func (*User) Account

func (o *User) Account(mods ...qm.QueryMod) accountQuery

Account pointed to by the foreign key.

func (*User) AddMonitors

func (o *User) AddMonitors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Monitor) error

AddMonitors adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Monitors. Sets related.R.Users appropriately.

func (*User) AddTakenByUserWithIncidentActions

func (o *User) AddTakenByUserWithIncidentActions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*IncidentAction) error

AddTakenByUserWithIncidentActions adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.TakenByUserWithIncidentActions. Sets related.R.TakenByUserWith appropriately.

func (*User) Delete

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

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

func (*User) Exists

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

Exists checks if the User row exists.

func (*User) Insert

func (o *User) 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 (*User) Monitors

func (o *User) Monitors(mods ...qm.QueryMod) monitorQuery

Monitors retrieves all the monitor's Monitors with an executor.

func (*User) Reload

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

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

func (*User) RemoveMonitors

func (o *User) RemoveMonitors(ctx context.Context, exec boil.ContextExecutor, related ...*Monitor) error

RemoveMonitors relationships from objects passed in. Removes related items from R.Monitors (uses pointer comparison, removal does not keep order) Sets related.R.Users.

func (*User) RemoveTakenByUserWithIncidentActions

func (o *User) RemoveTakenByUserWithIncidentActions(ctx context.Context, exec boil.ContextExecutor, related ...*IncidentAction) error

RemoveTakenByUserWithIncidentActions relationships from objects passed in. Removes related items from R.TakenByUserWithIncidentActions (uses pointer comparison, removal does not keep order) Sets related.R.TakenByUserWith.

func (*User) SetAccount

func (o *User) SetAccount(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Account) error

SetAccount of the user to the related item. Sets o.R.Account to related. Adds o to related.R.Users.

func (*User) SetMonitors

func (o *User) SetMonitors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Monitor) error

SetMonitors removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Monitors accordingly. Replaces o.R.Monitors with related. Sets related.R.Users's Monitors accordingly.

func (*User) SetTakenByUserWithIncidentActions

func (o *User) SetTakenByUserWithIncidentActions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*IncidentAction) error

SetTakenByUserWithIncidentActions removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.TakenByUserWith's TakenByUserWithIncidentActions accordingly. Replaces o.R.TakenByUserWithIncidentActions with related. Sets related.R.TakenByUserWith's TakenByUserWithIncidentActions accordingly.

func (*User) TakenByUserWithIncidentActions

func (o *User) TakenByUserWithIncidentActions(mods ...qm.QueryMod) incidentActionQuery

TakenByUserWithIncidentActions retrieves all the incident_action's IncidentActions with an executor via taken_by_user_with_id column.

func (*User) Update

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

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

func (o *User) 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 UserHook

type UserHook func(context.Context, boil.ContextExecutor, *User) error

UserHook is the signature for custom User hook methods

type UserSlice

type UserSlice []*User

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

func (UserSlice) DeleteAll

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

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

func (*UserSlice) ReloadAll

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

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