models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserroleAdmin  string = "admin"
	UserroleMember string = "member"
)

Enum values for Userrole

Variables

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 EventColumns = struct {
	ID               string
	SourceID         string
	Version          string
	Action           string
	ActorID          string
	ActorType        string
	ActorName        string
	ActorMetadata    string
	ContextLocation  string
	ContextUserAgent string
	Metadata         string
	OccurredAt       string
}{
	ID:               "id",
	SourceID:         "source_id",
	Version:          "version",
	Action:           "action",
	ActorID:          "actor_id",
	ActorType:        "actor_type",
	ActorName:        "actor_name",
	ActorMetadata:    "actor_metadata",
	ContextLocation:  "context_location",
	ContextUserAgent: "context_user_agent",
	Metadata:         "metadata",
	OccurredAt:       "occurred_at",
}
View Source
var EventRels = struct {
	Source          string
	ActionEventType string
	EventTargets    string
}{
	Source:          "Source",
	ActionEventType: "ActionEventType",
	EventTargets:    "EventTargets",
}

EventRels is where relationship names are stored.

View Source
var EventTableColumns = struct {
	ID               string
	SourceID         string
	Version          string
	Action           string
	ActorID          string
	ActorType        string
	ActorName        string
	ActorMetadata    string
	ContextLocation  string
	ContextUserAgent string
	Metadata         string
	OccurredAt       string
}{
	ID:               "events.id",
	SourceID:         "events.source_id",
	Version:          "events.version",
	Action:           "events.action",
	ActorID:          "events.actor_id",
	ActorType:        "events.actor_type",
	ActorName:        "events.actor_name",
	ActorMetadata:    "events.actor_metadata",
	ContextLocation:  "events.context_location",
	ContextUserAgent: "events.context_user_agent",
	Metadata:         "events.metadata",
	OccurredAt:       "events.occurred_at",
}
View Source
var EventTargetColumns = struct {
	InternalID string
	ID         string
	EventID    string
	Name       string
	Type       string
	Metadata   string
}{
	InternalID: "internal_id",
	ID:         "id",
	EventID:    "event_id",
	Name:       "name",
	Type:       "type",
	Metadata:   "metadata",
}
View Source
var EventTargetRels = struct {
	Event string
}{
	Event: "Event",
}

EventTargetRels is where relationship names are stored.

View Source
var EventTargetTableColumns = struct {
	InternalID string
	ID         string
	EventID    string
	Name       string
	Type       string
	Metadata   string
}{
	InternalID: "event_targets.internal_id",
	ID:         "event_targets.id",
	EventID:    "event_targets.event_id",
	Name:       "event_targets.name",
	Type:       "event_targets.type",
	Metadata:   "event_targets.metadata",
}
View Source
var EventTargetWhere = struct {
	InternalID whereHelperstring
	ID         whereHelperstring
	EventID    whereHelperstring
	Name       whereHelpernull_String
	Type       whereHelperstring
	Metadata   whereHelpernull_JSON
}{
	InternalID: whereHelperstring{/* contains filtered or unexported fields */},
	ID:         whereHelperstring{/* contains filtered or unexported fields */},
	EventID:    whereHelperstring{/* contains filtered or unexported fields */},
	Name:       whereHelpernull_String{/* contains filtered or unexported fields */},
	Type:       whereHelperstring{/* contains filtered or unexported fields */},
	Metadata:   whereHelpernull_JSON{/* contains filtered or unexported fields */},
}
View Source
var EventTypeColumns = struct {
	Action                       string
	ShouldValidateMetadataSchema string
	CreatedAt                    string
}{
	Action:                       "action",
	ShouldValidateMetadataSchema: "should_validate_metadata_schema",
	CreatedAt:                    "created_at",
}
View Source
var EventTypeRels = struct {
	EventTypeActionEventTypeVersions string
	ActionEvents                     string
}{
	EventTypeActionEventTypeVersions: "EventTypeActionEventTypeVersions",
	ActionEvents:                     "ActionEvents",
}

EventTypeRels is where relationship names are stored.

View Source
var EventTypeTableColumns = struct {
	Action                       string
	ShouldValidateMetadataSchema string
	CreatedAt                    string
}{
	Action:                       "event_types.action",
	ShouldValidateMetadataSchema: "event_types.should_validate_metadata_schema",
	CreatedAt:                    "event_types.created_at",
}
View Source
var EventTypeVersionColumns = struct {
	EventTypeAction string
	Version         string
	TargetTypes     string
	EventSchema     string
	CreatedAt       string
}{
	EventTypeAction: "event_type_action",
	Version:         "version",
	TargetTypes:     "target_types",
	EventSchema:     "event_schema",
	CreatedAt:       "created_at",
}
View Source
var EventTypeVersionRels = struct {
	EventTypeActionEventType string
}{
	EventTypeActionEventType: "EventTypeActionEventType",
}

EventTypeVersionRels is where relationship names are stored.

View Source
var EventTypeVersionTableColumns = struct {
	EventTypeAction string
	Version         string
	TargetTypes     string
	EventSchema     string
	CreatedAt       string
}{
	EventTypeAction: "event_type_versions.event_type_action",
	Version:         "event_type_versions.version",
	TargetTypes:     "event_type_versions.target_types",
	EventSchema:     "event_type_versions.event_schema",
	CreatedAt:       "event_type_versions.created_at",
}
View Source
var EventTypeVersionWhere = struct {
	EventTypeAction whereHelperstring
	Version         whereHelperint
	TargetTypes     whereHelpertypes_StringArray
	EventSchema     whereHelpernull_JSON
	CreatedAt       whereHelpertime_Time
}{
	EventTypeAction: whereHelperstring{/* contains filtered or unexported fields */},
	Version:         whereHelperint{/* contains filtered or unexported fields */},
	TargetTypes:     whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
	EventSchema:     whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var EventTypeWhere = struct {
	Action                       whereHelperstring
	ShouldValidateMetadataSchema whereHelperbool
	CreatedAt                    whereHelpertime_Time
}{
	Action:                       whereHelperstring{/* contains filtered or unexported fields */},
	ShouldValidateMetadataSchema: whereHelperbool{/* contains filtered or unexported fields */},
	CreatedAt:                    whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var EventWhere = struct {
	ID               whereHelperstring
	SourceID         whereHelperstring
	Version          whereHelperint
	Action           whereHelperstring
	ActorID          whereHelperstring
	ActorType        whereHelperstring
	ActorName        whereHelpernull_String
	ActorMetadata    whereHelpernull_JSON
	ContextLocation  whereHelperstring
	ContextUserAgent whereHelpernull_String
	Metadata         whereHelpernull_JSON
	OccurredAt       whereHelpertime_Time
}{
	ID:               whereHelperstring{/* contains filtered or unexported fields */},
	SourceID:         whereHelperstring{/* contains filtered or unexported fields */},
	Version:          whereHelperint{/* contains filtered or unexported fields */},
	Action:           whereHelperstring{/* contains filtered or unexported fields */},
	ActorID:          whereHelperstring{/* contains filtered or unexported fields */},
	ActorType:        whereHelperstring{/* contains filtered or unexported fields */},
	ActorName:        whereHelpernull_String{/* contains filtered or unexported fields */},
	ActorMetadata:    whereHelpernull_JSON{/* contains filtered or unexported fields */},
	ContextLocation:  whereHelperstring{/* contains filtered or unexported fields */},
	ContextUserAgent: whereHelpernull_String{/* contains filtered or unexported fields */},
	Metadata:         whereHelpernull_JSON{/* contains filtered or unexported fields */},
	OccurredAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SourceColumns = struct {
	ID        string
	Name      string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Name:      "name",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var SourceRels = struct {
	Events string
	Tokens string
}{
	Events: "Events",
	Tokens: "Tokens",
}

SourceRels is where relationship names are stored.

View Source
var SourceTableColumns = struct {
	ID        string
	Name      string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "sources.id",
	Name:      "sources.name",
	CreatedAt: "sources.created_at",
	UpdatedAt: "sources.updated_at",
}
View Source
var SourceWhere = struct {
	ID        whereHelperstring
	Name      whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	EventTargets      string
	EventTypeVersions string
	EventTypes        string
	Events            string
	Sources           string
	Tokens            string
	Users             string
}{
	EventTargets:      "event_targets",
	EventTypeVersions: "event_type_versions",
	EventTypes:        "event_types",
	Events:            "events",
	Sources:           "sources",
	Tokens:            "tokens",
	Users:             "users",
}
View Source
var TokenColumns = struct {
	ID        string
	Name      string
	Value     string
	SourceID  string
	CreatedAt string
}{
	ID:        "id",
	Name:      "name",
	Value:     "value",
	SourceID:  "source_id",
	CreatedAt: "created_at",
}
View Source
var TokenRels = struct {
	Source string
}{
	Source: "Source",
}

TokenRels is where relationship names are stored.

View Source
var TokenTableColumns = struct {
	ID        string
	Name      string
	Value     string
	SourceID  string
	CreatedAt string
}{
	ID:        "tokens.id",
	Name:      "tokens.name",
	Value:     "tokens.value",
	SourceID:  "tokens.source_id",
	CreatedAt: "tokens.created_at",
}
View Source
var TokenWhere = struct {
	ID        whereHelperstring
	Name      whereHelperstring
	Value     whereHelperstring
	SourceID  whereHelperstring
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	Value:     whereHelperstring{/* contains filtered or unexported fields */},
	SourceID:  whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var UserColumns = struct {
	ID        string
	Email     string
	Password  string
	Role      string
	CreatedAt string
}{
	ID:        "id",
	Email:     "email",
	Password:  "password",
	Role:      "role",
	CreatedAt: "created_at",
}
View Source
var UserRels = struct {
}{}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID        string
	Email     string
	Password  string
	Role      string
	CreatedAt string
}{
	ID:        "users.id",
	Email:     "users.email",
	Password:  "users.password",
	Role:      "users.role",
	CreatedAt: "users.created_at",
}
View Source
var UserWhere = struct {
	ID        whereHelperstring
	Email     whereHelperstring
	Password  whereHelperstring
	Role      whereHelperstring
	CreatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* 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 */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddEventHook

func AddEventHook(hookPoint boil.HookPoint, eventHook EventHook)

AddEventHook registers your hook function for all future operations.

func AddEventTargetHook

func AddEventTargetHook(hookPoint boil.HookPoint, eventTargetHook EventTargetHook)

AddEventTargetHook registers your hook function for all future operations.

func AddEventTypeHook

func AddEventTypeHook(hookPoint boil.HookPoint, eventTypeHook EventTypeHook)

AddEventTypeHook registers your hook function for all future operations.

func AddEventTypeVersionHook

func AddEventTypeVersionHook(hookPoint boil.HookPoint, eventTypeVersionHook EventTypeVersionHook)

AddEventTypeVersionHook registers your hook function for all future operations.

func AddSourceHook

func AddSourceHook(hookPoint boil.HookPoint, sourceHook SourceHook)

AddSourceHook registers your hook function for all future operations.

func AddTokenHook

func AddTokenHook(hookPoint boil.HookPoint, tokenHook TokenHook)

AddTokenHook 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 AllUserrole

func AllUserrole() []string

func EventExists

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

EventExists checks if the Event row exists.

func EventTargetExists

func EventTargetExists(ctx context.Context, exec boil.ContextExecutor, internalID string) (bool, error)

EventTargetExists checks if the EventTarget row exists.

func EventTargets

func EventTargets(mods ...qm.QueryMod) eventTargetQuery

EventTargets retrieves all the records using an executor.

func EventTypeExists

func EventTypeExists(ctx context.Context, exec boil.ContextExecutor, action string) (bool, error)

EventTypeExists checks if the EventType row exists.

func EventTypeVersionExists

func EventTypeVersionExists(ctx context.Context, exec boil.ContextExecutor, eventTypeAction string, version int) (bool, error)

EventTypeVersionExists checks if the EventTypeVersion row exists.

func EventTypeVersions

func EventTypeVersions(mods ...qm.QueryMod) eventTypeVersionQuery

EventTypeVersions retrieves all the records using an executor.

func EventTypes

func EventTypes(mods ...qm.QueryMod) eventTypeQuery

EventTypes retrieves all the records using an executor.

func Events

func Events(mods ...qm.QueryMod) eventQuery

Events 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 SourceExists

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

SourceExists checks if the Source row exists.

func Sources

func Sources(mods ...qm.QueryMod) sourceQuery

Sources retrieves all the records using an executor.

func TokenExists

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

TokenExists checks if the Token row exists.

func Tokens

func Tokens(mods ...qm.QueryMod) tokenQuery

Tokens retrieves all the records using an executor.

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 Event

type Event struct {
	ID               string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	SourceID         string      `boil:"source_id" json:"source_id" toml:"source_id" yaml:"source_id"`
	Version          int         `boil:"version" json:"version" toml:"version" yaml:"version"`
	Action           string      `boil:"action" json:"action" toml:"action" yaml:"action"`
	ActorID          string      `boil:"actor_id" json:"actor_id" toml:"actor_id" yaml:"actor_id"`
	ActorType        string      `boil:"actor_type" json:"actor_type" toml:"actor_type" yaml:"actor_type"`
	ActorName        null.String `boil:"actor_name" json:"actor_name,omitempty" toml:"actor_name" yaml:"actor_name,omitempty"`
	ActorMetadata    null.JSON   `boil:"actor_metadata" json:"actor_metadata,omitempty" toml:"actor_metadata" yaml:"actor_metadata,omitempty"`
	ContextLocation  string      `boil:"context_location" json:"context_location" toml:"context_location" yaml:"context_location"`
	ContextUserAgent null.String `boil:"context_user_agent" json:"context_user_agent,omitempty" toml:"context_user_agent" yaml:"context_user_agent,omitempty"`
	Metadata         null.JSON   `boil:"metadata" json:"metadata,omitempty" toml:"metadata" yaml:"metadata,omitempty"`
	OccurredAt       time.Time   `boil:"occurred_at" json:"occurred_at" toml:"occurred_at" yaml:"occurred_at"`

	R *eventR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L eventL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Event is an object representing the database table.

func FindEvent

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

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

func (*Event) ActionEventType

func (o *Event) ActionEventType(mods ...qm.QueryMod) eventTypeQuery

ActionEventType pointed to by the foreign key.

func (*Event) AddEventTargets

func (o *Event) AddEventTargets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*EventTarget) error

AddEventTargets adds the given related objects to the existing relationships of the event, optionally inserting them as new records. Appends related to o.R.EventTargets. Sets related.R.Event appropriately.

func (*Event) Delete

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

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

func (*Event) EventTargets

func (o *Event) EventTargets(mods ...qm.QueryMod) eventTargetQuery

EventTargets retrieves all the event_target's EventTargets with an executor.

func (*Event) Exists

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

Exists checks if the Event row exists.

func (*Event) GetActionEventType

func (o *Event) GetActionEventType() *EventType

func (*Event) GetEventTargets

func (o *Event) GetEventTargets() EventTargetSlice

func (*Event) GetSource

func (o *Event) GetSource() *Source

func (*Event) Insert

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

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

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

func (*Event) SetActionEventType

func (o *Event) SetActionEventType(ctx context.Context, exec boil.ContextExecutor, insert bool, related *EventType) error

SetActionEventType of the event to the related item. Sets o.R.ActionEventType to related. Adds o to related.R.ActionEvents.

func (*Event) SetSource

func (o *Event) SetSource(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Source) error

SetSource of the event to the related item. Sets o.R.Source to related. Adds o to related.R.Events.

func (*Event) Source

func (o *Event) Source(mods ...qm.QueryMod) sourceQuery

Source pointed to by the foreign key.

func (*Event) Update

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

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

func (o *Event) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 EventHook

type EventHook func(context.Context, boil.ContextExecutor, *Event) error

EventHook is the signature for custom Event hook methods

type EventSlice

type EventSlice []*Event

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

func (EventSlice) DeleteAll

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

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

func (*EventSlice) ReloadAll

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

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

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

type EventTarget

type EventTarget struct {
	InternalID string      `boil:"internal_id" json:"internal_id" toml:"internal_id" yaml:"internal_id"`
	ID         string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	EventID    string      `boil:"event_id" json:"event_id" toml:"event_id" yaml:"event_id"`
	Name       null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`
	Type       string      `boil:"type" json:"type" toml:"type" yaml:"type"`
	Metadata   null.JSON   `boil:"metadata" json:"metadata,omitempty" toml:"metadata" yaml:"metadata,omitempty"`

	R *eventTargetR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L eventTargetL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

EventTarget is an object representing the database table.

func FindEventTarget

func FindEventTarget(ctx context.Context, exec boil.ContextExecutor, internalID string, selectCols ...string) (*EventTarget, error)

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

func (*EventTarget) Delete

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

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

func (*EventTarget) Event

func (o *EventTarget) Event(mods ...qm.QueryMod) eventQuery

Event pointed to by the foreign key.

func (*EventTarget) Exists

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

Exists checks if the EventTarget row exists.

func (*EventTarget) GetEvent

func (o *EventTarget) GetEvent() *Event

func (*EventTarget) Insert

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

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

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

func (*EventTarget) SetEvent

func (o *EventTarget) SetEvent(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Event) error

SetEvent of the eventTarget to the related item. Sets o.R.Event to related. Adds o to related.R.EventTargets.

func (*EventTarget) Update

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

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

func (o *EventTarget) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 EventTargetHook

type EventTargetHook func(context.Context, boil.ContextExecutor, *EventTarget) error

EventTargetHook is the signature for custom EventTarget hook methods

type EventTargetSlice

type EventTargetSlice []*EventTarget

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

func (EventTargetSlice) DeleteAll

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

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

func (*EventTargetSlice) ReloadAll

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

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

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

type EventType

type EventType struct {
	Action                       string    `boil:"action" json:"action" toml:"action" yaml:"action"`
	ShouldValidateMetadataSchema bool      `` /* 155-byte string literal not displayed */
	CreatedAt                    time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *eventTypeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L eventTypeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

EventType is an object representing the database table.

func FindEventType

func FindEventType(ctx context.Context, exec boil.ContextExecutor, action string, selectCols ...string) (*EventType, error)

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

func (*EventType) ActionEvents

func (o *EventType) ActionEvents(mods ...qm.QueryMod) eventQuery

ActionEvents retrieves all the event's Events with an executor via action column.

func (*EventType) AddActionEvents

func (o *EventType) AddActionEvents(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Event) error

AddActionEvents adds the given related objects to the existing relationships of the event_type, optionally inserting them as new records. Appends related to o.R.ActionEvents. Sets related.R.ActionEventType appropriately.

func (*EventType) AddEventTypeActionEventTypeVersions

func (o *EventType) AddEventTypeActionEventTypeVersions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*EventTypeVersion) error

AddEventTypeActionEventTypeVersions adds the given related objects to the existing relationships of the event_type, optionally inserting them as new records. Appends related to o.R.EventTypeActionEventTypeVersions. Sets related.R.EventTypeActionEventType appropriately.

func (*EventType) Delete

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

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

func (*EventType) EventTypeActionEventTypeVersions

func (o *EventType) EventTypeActionEventTypeVersions(mods ...qm.QueryMod) eventTypeVersionQuery

EventTypeActionEventTypeVersions retrieves all the event_type_version's EventTypeVersions with an executor via event_type_action column.

func (*EventType) Exists

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

Exists checks if the EventType row exists.

func (*EventType) GetActionEvents

func (o *EventType) GetActionEvents() EventSlice

func (*EventType) GetEventTypeActionEventTypeVersions

func (o *EventType) GetEventTypeActionEventTypeVersions() EventTypeVersionSlice

func (*EventType) Insert

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

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

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

func (*EventType) Update

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

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

func (o *EventType) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 EventTypeHook

type EventTypeHook func(context.Context, boil.ContextExecutor, *EventType) error

EventTypeHook is the signature for custom EventType hook methods

type EventTypeSlice

type EventTypeSlice []*EventType

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

func (EventTypeSlice) DeleteAll

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

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

func (*EventTypeSlice) ReloadAll

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

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

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

type EventTypeVersion

type EventTypeVersion struct {
	EventTypeAction string            `boil:"event_type_action" json:"event_type_action" toml:"event_type_action" yaml:"event_type_action"`
	Version         int               `boil:"version" json:"version" toml:"version" yaml:"version"`
	TargetTypes     types.StringArray `boil:"target_types" json:"target_types" toml:"target_types" yaml:"target_types"`
	EventSchema     null.JSON         `boil:"event_schema" json:"event_schema,omitempty" toml:"event_schema" yaml:"event_schema,omitempty"`
	CreatedAt       time.Time         `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *eventTypeVersionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L eventTypeVersionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

EventTypeVersion is an object representing the database table.

func FindEventTypeVersion

func FindEventTypeVersion(ctx context.Context, exec boil.ContextExecutor, eventTypeAction string, version int, selectCols ...string) (*EventTypeVersion, error)

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

func (*EventTypeVersion) Delete

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

func (*EventTypeVersion) EventTypeActionEventType

func (o *EventTypeVersion) EventTypeActionEventType(mods ...qm.QueryMod) eventTypeQuery

EventTypeActionEventType pointed to by the foreign key.

func (*EventTypeVersion) Exists

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

Exists checks if the EventTypeVersion row exists.

func (*EventTypeVersion) GetEventTypeActionEventType

func (o *EventTypeVersion) GetEventTypeActionEventType() *EventType

func (*EventTypeVersion) Insert

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

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

func (*EventTypeVersion) SetEventTypeActionEventType

func (o *EventTypeVersion) SetEventTypeActionEventType(ctx context.Context, exec boil.ContextExecutor, insert bool, related *EventType) error

SetEventTypeActionEventType of the eventTypeVersion to the related item. Sets o.R.EventTypeActionEventType to related. Adds o to related.R.EventTypeActionEventTypeVersions.

func (*EventTypeVersion) Update

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

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

func (o *EventTypeVersion) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 EventTypeVersionHook

type EventTypeVersionHook func(context.Context, boil.ContextExecutor, *EventTypeVersion) error

EventTypeVersionHook is the signature for custom EventTypeVersion hook methods

type EventTypeVersionSlice

type EventTypeVersionSlice []*EventTypeVersion

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

func (EventTypeVersionSlice) DeleteAll

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

func (*EventTypeVersionSlice) ReloadAll

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

func (EventTypeVersionSlice) UpdateAll

func (o EventTypeVersionSlice) 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]any

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

type Source

type Source struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	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"`

	R *sourceR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L sourceL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Source is an object representing the database table.

func FindSource

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

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

func (*Source) AddEvents

func (o *Source) AddEvents(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Event) error

AddEvents adds the given related objects to the existing relationships of the source, optionally inserting them as new records. Appends related to o.R.Events. Sets related.R.Source appropriately.

func (*Source) AddTokens

func (o *Source) AddTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Token) error

AddTokens adds the given related objects to the existing relationships of the source, optionally inserting them as new records. Appends related to o.R.Tokens. Sets related.R.Source appropriately.

func (*Source) Delete

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

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

func (*Source) Events

func (o *Source) Events(mods ...qm.QueryMod) eventQuery

Events retrieves all the event's Events with an executor.

func (*Source) Exists

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

Exists checks if the Source row exists.

func (*Source) GetEvents

func (o *Source) GetEvents() EventSlice

func (*Source) GetTokens

func (o *Source) GetTokens() TokenSlice

func (*Source) Insert

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

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

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

func (*Source) Tokens

func (o *Source) Tokens(mods ...qm.QueryMod) tokenQuery

Tokens retrieves all the token's Tokens with an executor.

func (*Source) Update

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

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

func (o *Source) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 SourceHook

type SourceHook func(context.Context, boil.ContextExecutor, *Source) error

SourceHook is the signature for custom Source hook methods

type SourceSlice

type SourceSlice []*Source

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

func (SourceSlice) DeleteAll

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

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

func (*SourceSlice) ReloadAll

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

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

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

type Token

type Token struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Value     string    `boil:"value" json:"value" toml:"value" yaml:"value"`
	SourceID  string    `boil:"source_id" json:"source_id" toml:"source_id" yaml:"source_id"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`

	R *tokenR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L tokenL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Token is an object representing the database table.

func FindToken

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

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

func (*Token) Delete

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

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

func (*Token) Exists

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

Exists checks if the Token row exists.

func (*Token) GetSource

func (o *Token) GetSource() *Source

func (*Token) Insert

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

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

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

func (*Token) SetSource

func (o *Token) SetSource(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Source) error

SetSource of the token to the related item. Sets o.R.Source to related. Adds o to related.R.Tokens.

func (*Token) Source

func (o *Token) Source(mods ...qm.QueryMod) sourceQuery

Source pointed to by the foreign key.

func (*Token) Update

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

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

func (o *Token) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 TokenHook

type TokenHook func(context.Context, boil.ContextExecutor, *Token) error

TokenHook is the signature for custom Token hook methods

type TokenSlice

type TokenSlice []*Token

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

func (TokenSlice) DeleteAll

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

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

func (*TokenSlice) ReloadAll

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

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

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

type UpsertOptionFunc

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions

type UpsertOptions struct {
	// contains filtered or unexported fields
}

type User

type User struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	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"`
	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) 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) 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) 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, opts ...UpsertOptionFunc) 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