models

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIKeyColumns = struct {
	ID         string
	LogbookID  string
	KeyName    string
	KeyHash    string
	KeyPrefix  string
	Scopes     string
	AllowedIps string
	CreatedAt  string
	LastUsedAt string
	ExpiresAt  string
	RevokedAt  string
	CreatedBy  string
	RevokedBy  string
	UseCount   string
}{
	ID:         "id",
	LogbookID:  "logbook_id",
	KeyName:    "key_name",
	KeyHash:    "key_hash",
	KeyPrefix:  "key_prefix",
	Scopes:     "scopes",
	AllowedIps: "allowed_ips",
	CreatedAt:  "created_at",
	LastUsedAt: "last_used_at",
	ExpiresAt:  "expires_at",
	RevokedAt:  "revoked_at",
	CreatedBy:  "created_by",
	RevokedBy:  "revoked_by",
	UseCount:   "use_count",
}
View Source
var APIKeyRels = struct {
	Logbook string
}{
	Logbook: "Logbook",
}

APIKeyRels is where relationship names are stored.

View Source
var APIKeyTableColumns = struct {
	ID         string
	LogbookID  string
	KeyName    string
	KeyHash    string
	KeyPrefix  string
	Scopes     string
	AllowedIps string
	CreatedAt  string
	LastUsedAt string
	ExpiresAt  string
	RevokedAt  string
	CreatedBy  string
	RevokedBy  string
	UseCount   string
}{
	ID:         "api_keys.id",
	LogbookID:  "api_keys.logbook_id",
	KeyName:    "api_keys.key_name",
	KeyHash:    "api_keys.key_hash",
	KeyPrefix:  "api_keys.key_prefix",
	Scopes:     "api_keys.scopes",
	AllowedIps: "api_keys.allowed_ips",
	CreatedAt:  "api_keys.created_at",
	LastUsedAt: "api_keys.last_used_at",
	ExpiresAt:  "api_keys.expires_at",
	RevokedAt:  "api_keys.revoked_at",
	CreatedBy:  "api_keys.created_by",
	RevokedBy:  "api_keys.revoked_by",
	UseCount:   "api_keys.use_count",
}
View Source
var APIKeyWhere = struct {
	ID         whereHelperint64
	LogbookID  whereHelperint64
	KeyName    whereHelperstring
	KeyHash    whereHelperstring
	KeyPrefix  whereHelperstring
	Scopes     whereHelpertypes_StringArray
	AllowedIps whereHelpertypes_StringArray
	CreatedAt  whereHelpertime_Time
	LastUsedAt whereHelpernull_Time
	ExpiresAt  whereHelpernull_Time
	RevokedAt  whereHelpernull_Time
	CreatedBy  whereHelpernull_String
	RevokedBy  whereHelpernull_String
	UseCount   whereHelpernull_Int64
}{
	ID:         whereHelperint64{/* contains filtered or unexported fields */},
	LogbookID:  whereHelperint64{/* contains filtered or unexported fields */},
	KeyName:    whereHelperstring{/* contains filtered or unexported fields */},
	KeyHash:    whereHelperstring{/* contains filtered or unexported fields */},
	KeyPrefix:  whereHelperstring{/* contains filtered or unexported fields */},
	Scopes:     whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
	AllowedIps: whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	LastUsedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	ExpiresAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	RevokedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedBy:  whereHelpernull_String{/* contains filtered or unexported fields */},
	RevokedBy:  whereHelpernull_String{/* contains filtered or unexported fields */},
	UseCount:   whereHelpernull_Int64{/* contains filtered or unexported fields */},
}
View Source
var APIKeysStatusColumns = struct {
	ID         string
	LogbookID  string
	KeyName    string
	KeyPrefix  string
	CreatedAt  string
	LastUsedAt string
	ExpiresAt  string
	RevokedAt  string
	IsActive   string
}{
	ID:         "id",
	LogbookID:  "logbook_id",
	KeyName:    "key_name",
	KeyPrefix:  "key_prefix",
	CreatedAt:  "created_at",
	LastUsedAt: "last_used_at",
	ExpiresAt:  "expires_at",
	RevokedAt:  "revoked_at",
	IsActive:   "is_active",
}
View Source
var APIKeysStatusTableColumns = struct {
	ID         string
	LogbookID  string
	KeyName    string
	KeyPrefix  string
	CreatedAt  string
	LastUsedAt string
	ExpiresAt  string
	RevokedAt  string
	IsActive   string
}{
	ID:         "api_keys_status.id",
	LogbookID:  "api_keys_status.logbook_id",
	KeyName:    "api_keys_status.key_name",
	KeyPrefix:  "api_keys_status.key_prefix",
	CreatedAt:  "api_keys_status.created_at",
	LastUsedAt: "api_keys_status.last_used_at",
	ExpiresAt:  "api_keys_status.expires_at",
	RevokedAt:  "api_keys_status.revoked_at",
	IsActive:   "api_keys_status.is_active",
}
View Source
var APIKeysStatusWhere = struct {
	ID         whereHelpernull_Int64
	LogbookID  whereHelpernull_Int64
	KeyName    whereHelpernull_String
	KeyPrefix  whereHelpernull_String
	CreatedAt  whereHelpernull_Time
	LastUsedAt whereHelpernull_Time
	ExpiresAt  whereHelpernull_Time
	RevokedAt  whereHelpernull_Time
	IsActive   whereHelpernull_Bool
}{
	ID:         whereHelpernull_Int64{/* contains filtered or unexported fields */},
	LogbookID:  whereHelpernull_Int64{/* contains filtered or unexported fields */},
	KeyName:    whereHelpernull_String{/* contains filtered or unexported fields */},
	KeyPrefix:  whereHelpernull_String{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	LastUsedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	ExpiresAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	RevokedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	IsActive:   whereHelpernull_Bool{/* 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 LogbookColumns = struct {
	ID          string
	UID         string
	CreatedAt   string
	ModifiedAt  string
	UserID      string
	Name        string
	Callsign    string
	Description string
}{
	ID:          "id",
	UID:         "uid",
	CreatedAt:   "created_at",
	ModifiedAt:  "modified_at",
	UserID:      "user_id",
	Name:        "name",
	Callsign:    "callsign",
	Description: "description",
}
View Source
var LogbookRels = struct {
	User   string
	APIKey string
	Qsos   string
}{
	User:   "User",
	APIKey: "APIKey",
	Qsos:   "Qsos",
}

LogbookRels is where relationship names are stored.

View Source
var LogbookTableColumns = struct {
	ID          string
	UID         string
	CreatedAt   string
	ModifiedAt  string
	UserID      string
	Name        string
	Callsign    string
	Description string
}{
	ID:          "logbook.id",
	UID:         "logbook.uid",
	CreatedAt:   "logbook.created_at",
	ModifiedAt:  "logbook.modified_at",
	UserID:      "logbook.user_id",
	Name:        "logbook.name",
	Callsign:    "logbook.callsign",
	Description: "logbook.description",
}
View Source
var LogbookWhere = struct {
	ID          whereHelperint64
	UID         whereHelperstring
	CreatedAt   whereHelpertime_Time
	ModifiedAt  whereHelpernull_Time
	UserID      whereHelperint64
	Name        whereHelperstring
	Callsign    whereHelperstring
	Description whereHelpernull_String
}{
	ID:          whereHelperint64{/* contains filtered or unexported fields */},
	UID:         whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	ModifiedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	UserID:      whereHelperint64{/* contains filtered or unexported fields */},
	Name:        whereHelperstring{/* contains filtered or unexported fields */},
	Callsign:    whereHelperstring{/* contains filtered or unexported fields */},
	Description: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var QsoColumns = struct {
	ID             string
	CreatedAt      string
	ModifiedAt     string
	Call           string
	Band           string
	Mode           string
	Freq           string
	QsoDate        string
	TimeOn         string
	TimeOff        string
	RstSent        string
	RstRcvd        string
	Country        string
	AdditionalData string
	LogbookID      string
}{
	ID:             "id",
	CreatedAt:      "created_at",
	ModifiedAt:     "modified_at",
	Call:           "call",
	Band:           "band",
	Mode:           "mode",
	Freq:           "freq",
	QsoDate:        "qso_date",
	TimeOn:         "time_on",
	TimeOff:        "time_off",
	RstSent:        "rst_sent",
	RstRcvd:        "rst_rcvd",
	Country:        "country",
	AdditionalData: "additional_data",
	LogbookID:      "logbook_id",
}
View Source
var QsoRels = struct {
	Logbook string
}{
	Logbook: "Logbook",
}

QsoRels is where relationship names are stored.

View Source
var QsoTableColumns = struct {
	ID             string
	CreatedAt      string
	ModifiedAt     string
	Call           string
	Band           string
	Mode           string
	Freq           string
	QsoDate        string
	TimeOn         string
	TimeOff        string
	RstSent        string
	RstRcvd        string
	Country        string
	AdditionalData string
	LogbookID      string
}{
	ID:             "qso.id",
	CreatedAt:      "qso.created_at",
	ModifiedAt:     "qso.modified_at",
	Call:           "qso.call",
	Band:           "qso.band",
	Mode:           "qso.mode",
	Freq:           "qso.freq",
	QsoDate:        "qso.qso_date",
	TimeOn:         "qso.time_on",
	TimeOff:        "qso.time_off",
	RstSent:        "qso.rst_sent",
	RstRcvd:        "qso.rst_rcvd",
	Country:        "qso.country",
	AdditionalData: "qso.additional_data",
	LogbookID:      "qso.logbook_id",
}
View Source
var QsoWhere = struct {
	ID             whereHelperint64
	CreatedAt      whereHelpertime_Time
	ModifiedAt     whereHelpernull_Time
	Call           whereHelperstring
	Band           whereHelperstring
	Mode           whereHelperstring
	Freq           whereHelperint64
	QsoDate        whereHelpertime_Time
	TimeOn         whereHelpertime_Time
	TimeOff        whereHelpertime_Time
	RstSent        whereHelperstring
	RstRcvd        whereHelperstring
	Country        whereHelpernull_String
	AdditionalData whereHelpertypes_JSON
	LogbookID      whereHelperint64
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	ModifiedAt:     whereHelpernull_Time{/* contains filtered or unexported fields */},
	Call:           whereHelperstring{/* contains filtered or unexported fields */},
	Band:           whereHelperstring{/* contains filtered or unexported fields */},
	Mode:           whereHelperstring{/* contains filtered or unexported fields */},
	Freq:           whereHelperint64{/* contains filtered or unexported fields */},
	QsoDate:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	TimeOn:         whereHelpertime_Time{/* contains filtered or unexported fields */},
	TimeOff:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	RstSent:        whereHelperstring{/* contains filtered or unexported fields */},
	RstRcvd:        whereHelperstring{/* contains filtered or unexported fields */},
	Country:        whereHelpernull_String{/* contains filtered or unexported fields */},
	AdditionalData: whereHelpertypes_JSON{/* contains filtered or unexported fields */},
	LogbookID:      whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	APIKeys string
	Logbook string
	Qso     string
	Users   string
}{
	APIKeys: "api_keys",
	Logbook: "logbook",
	Qso:     "qso",
	Users:   "users",
}
View Source
var UserColumns = struct {
	ID                 string
	CreatedAt          string
	ModifiedAt         string
	Username           string
	PassHash           string
	Issuer             string
	Subject            string
	Email              string
	EmailConfirmed     string
	BootstrapHash      string
	BootstrapExpiresAt string
	BootstrapUsedAt    string
}{
	ID:                 "id",
	CreatedAt:          "created_at",
	ModifiedAt:         "modified_at",
	Username:           "username",
	PassHash:           "pass_hash",
	Issuer:             "issuer",
	Subject:            "subject",
	Email:              "email",
	EmailConfirmed:     "email_confirmed",
	BootstrapHash:      "bootstrap_hash",
	BootstrapExpiresAt: "bootstrap_expires_at",
	BootstrapUsedAt:    "bootstrap_used_at",
}
View Source
var UserRels = struct {
	Logbooks string
}{
	Logbooks: "Logbooks",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID                 string
	CreatedAt          string
	ModifiedAt         string
	Username           string
	PassHash           string
	Issuer             string
	Subject            string
	Email              string
	EmailConfirmed     string
	BootstrapHash      string
	BootstrapExpiresAt string
	BootstrapUsedAt    string
}{
	ID:                 "users.id",
	CreatedAt:          "users.created_at",
	ModifiedAt:         "users.modified_at",
	Username:           "users.username",
	PassHash:           "users.pass_hash",
	Issuer:             "users.issuer",
	Subject:            "users.subject",
	Email:              "users.email",
	EmailConfirmed:     "users.email_confirmed",
	BootstrapHash:      "users.bootstrap_hash",
	BootstrapExpiresAt: "users.bootstrap_expires_at",
	BootstrapUsedAt:    "users.bootstrap_used_at",
}
View Source
var UserWhere = struct {
	ID                 whereHelperint64
	CreatedAt          whereHelpertime_Time
	ModifiedAt         whereHelpernull_Time
	Username           whereHelperstring
	PassHash           whereHelpernull_String
	Issuer             whereHelpernull_String
	Subject            whereHelpernull_String
	Email              whereHelpernull_String
	EmailConfirmed     whereHelpernull_Bool
	BootstrapHash      whereHelpernull_String
	BootstrapExpiresAt whereHelpernull_Time
	BootstrapUsedAt    whereHelpernull_Time
}{
	ID:                 whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	ModifiedAt:         whereHelpernull_Time{/* contains filtered or unexported fields */},
	Username:           whereHelperstring{/* contains filtered or unexported fields */},
	PassHash:           whereHelpernull_String{/* contains filtered or unexported fields */},
	Issuer:             whereHelpernull_String{/* contains filtered or unexported fields */},
	Subject:            whereHelpernull_String{/* contains filtered or unexported fields */},
	Email:              whereHelpernull_String{/* contains filtered or unexported fields */},
	EmailConfirmed:     whereHelpernull_Bool{/* contains filtered or unexported fields */},
	BootstrapHash:      whereHelpernull_String{/* contains filtered or unexported fields */},
	BootstrapExpiresAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	BootstrapUsedAt:    whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
	APIKeysStatus string
}{
	APIKeysStatus: "api_keys_status",
}

Functions

func APIKeyExists

func APIKeyExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

APIKeyExists checks if the APIKey row exists.

func APIKeys

func APIKeys(mods ...qm.QueryMod) apiKeyQuery

APIKeys retrieves all the records using an executor.

func APIKeysStatuses added in v0.0.8

func APIKeysStatuses(mods ...qm.QueryMod) apiKeysStatusQuery

APIKeysStatuses retrieves all the records using an executor.

func LogbookExists added in v0.0.8

func LogbookExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

LogbookExists checks if the Logbook row exists.

func Logbooks added in v0.0.8

func Logbooks(mods ...qm.QueryMod) logbookQuery

Logbooks 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 QsoExists

func QsoExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

QsoExists checks if the Qso row exists.

func Qsos

func Qsos(mods ...qm.QueryMod) qsoQuery

Qsos retrieves all the records using an executor.

func UserExists added in v0.0.9

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

UserExists checks if the User row exists.

func Users added in v0.0.9

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

Users retrieves all the records using an executor.

Types

type APIKey

type APIKey struct {
	ID         int64             `boil:"id" json:"id" toml:"id" yaml:"id"`
	LogbookID  int64             `boil:"logbook_id" json:"logbook_id" toml:"logbook_id" yaml:"logbook_id"`
	KeyName    string            `boil:"key_name" json:"key_name" toml:"key_name" yaml:"key_name"`
	KeyHash    string            `boil:"key_hash" json:"key_hash" toml:"key_hash" yaml:"key_hash"`
	KeyPrefix  string            `boil:"key_prefix" json:"key_prefix" toml:"key_prefix" yaml:"key_prefix"`
	Scopes     types.StringArray `boil:"scopes" json:"scopes,omitempty" toml:"scopes" yaml:"scopes,omitempty"`
	AllowedIps types.StringArray `boil:"allowed_ips" json:"allowed_ips,omitempty" toml:"allowed_ips" yaml:"allowed_ips,omitempty"`
	CreatedAt  time.Time         `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	LastUsedAt null.Time         `boil:"last_used_at" json:"last_used_at,omitempty" toml:"last_used_at" yaml:"last_used_at,omitempty"`
	ExpiresAt  null.Time         `boil:"expires_at" json:"expires_at,omitempty" toml:"expires_at" yaml:"expires_at,omitempty"`
	RevokedAt  null.Time         `boil:"revoked_at" json:"revoked_at,omitempty" toml:"revoked_at" yaml:"revoked_at,omitempty"`
	CreatedBy  null.String       `boil:"created_by" json:"created_by,omitempty" toml:"created_by" yaml:"created_by,omitempty"`
	RevokedBy  null.String       `boil:"revoked_by" json:"revoked_by,omitempty" toml:"revoked_by" yaml:"revoked_by,omitempty"`
	UseCount   null.Int64        `boil:"use_count" json:"use_count,omitempty" toml:"use_count" yaml:"use_count,omitempty"`

	R *apiKeyR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L apiKeyL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

APIKey is an object representing the database table.

func FindAPIKey

func FindAPIKey(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*APIKey, error)

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

func (*APIKey) Delete

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

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

func (*APIKey) Exists

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

Exists checks if the APIKey row exists.

func (*APIKey) GetLogbook added in v0.0.8

func (o *APIKey) GetLogbook() *Logbook

func (*APIKey) Insert

func (o *APIKey) 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 (*APIKey) Logbook added in v0.0.8

func (o *APIKey) Logbook(mods ...qm.QueryMod) logbookQuery

Logbook pointed to by the foreign key.

func (*APIKey) Reload

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

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

func (*APIKey) SetLogbook added in v0.0.8

func (o *APIKey) SetLogbook(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Logbook) error

SetLogbook of the apiKey to the related item. Sets o.R.Logbook to related. Adds o to related.R.APIKey.

func (*APIKey) Update

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

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

func (o *APIKey) 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 APIKeySlice

type APIKeySlice []*APIKey

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

func (APIKeySlice) DeleteAll

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

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

func (*APIKeySlice) ReloadAll

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

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

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

type APIKeysStatus added in v0.0.8

type APIKeysStatus struct {
	ID         null.Int64  `boil:"id" json:"id,omitempty" toml:"id" yaml:"id,omitempty"`
	LogbookID  null.Int64  `boil:"logbook_id" json:"logbook_id,omitempty" toml:"logbook_id" yaml:"logbook_id,omitempty"`
	KeyName    null.String `boil:"key_name" json:"key_name,omitempty" toml:"key_name" yaml:"key_name,omitempty"`
	KeyPrefix  null.String `boil:"key_prefix" json:"key_prefix,omitempty" toml:"key_prefix" yaml:"key_prefix,omitempty"`
	CreatedAt  null.Time   `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`
	LastUsedAt null.Time   `boil:"last_used_at" json:"last_used_at,omitempty" toml:"last_used_at" yaml:"last_used_at,omitempty"`
	ExpiresAt  null.Time   `boil:"expires_at" json:"expires_at,omitempty" toml:"expires_at" yaml:"expires_at,omitempty"`
	RevokedAt  null.Time   `boil:"revoked_at" json:"revoked_at,omitempty" toml:"revoked_at" yaml:"revoked_at,omitempty"`
	IsActive   null.Bool   `boil:"is_active" json:"is_active,omitempty" toml:"is_active" yaml:"is_active,omitempty"`
}

APIKeysStatus is an object representing the database table.

func (*APIKeysStatus) Insert added in v0.0.8

func (o *APIKeysStatus) 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 (*APIKeysStatus) Upsert added in v0.0.8

func (o *APIKeysStatus) 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 APIKeysStatusSlice added in v0.0.8

type APIKeysStatusSlice []*APIKeysStatus

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

type Logbook added in v0.0.8

type Logbook struct {
	ID          int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	UID         string      `boil:"uid" json:"uid" toml:"uid" yaml:"uid"`
	CreatedAt   time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	ModifiedAt  null.Time   `boil:"modified_at" json:"modified_at,omitempty" toml:"modified_at" yaml:"modified_at,omitempty"`
	UserID      int64       `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	Name        string      `boil:"name" json:"name" toml:"name" yaml:"name"`
	Callsign    string      `boil:"callsign" json:"callsign" toml:"callsign" yaml:"callsign"`
	Description null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`

	R *logbookR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L logbookL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Logbook is an object representing the database table.

func FindLogbook added in v0.0.8

func FindLogbook(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Logbook, error)

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

func (*Logbook) APIKey added in v0.0.8

func (o *Logbook) APIKey(mods ...qm.QueryMod) apiKeyQuery

APIKey pointed to by the foreign key.

func (*Logbook) AddQsos added in v0.0.8

func (o *Logbook) AddQsos(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Qso) error

AddQsos adds the given related objects to the existing relationships of the logbook, optionally inserting them as new records. Appends related to o.R.Qsos. Sets related.R.Logbook appropriately.

func (*Logbook) Delete added in v0.0.8

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

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

func (*Logbook) Exists added in v0.0.8

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

Exists checks if the Logbook row exists.

func (*Logbook) GetAPIKey added in v0.0.8

func (o *Logbook) GetAPIKey() *APIKey

func (*Logbook) GetQsos added in v0.0.8

func (o *Logbook) GetQsos() QsoSlice

func (*Logbook) GetUser added in v0.0.9

func (o *Logbook) GetUser() *User

func (*Logbook) Insert added in v0.0.8

func (o *Logbook) 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 (*Logbook) Qsos added in v0.0.8

func (o *Logbook) Qsos(mods ...qm.QueryMod) qsoQuery

Qsos retrieves all the qso's Qsos with an executor.

func (*Logbook) Reload added in v0.0.8

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

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

func (*Logbook) SetAPIKey added in v0.0.8

func (o *Logbook) SetAPIKey(ctx context.Context, exec boil.ContextExecutor, insert bool, related *APIKey) error

SetAPIKey of the logbook to the related item. Sets o.R.APIKey to related. Adds o to related.R.Logbook.

func (*Logbook) SetUser added in v0.0.9

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

SetUser of the logbook to the related item. Sets o.R.User to related. Adds o to related.R.Logbooks.

func (*Logbook) Update added in v0.0.8

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

Update uses an executor to update the Logbook. 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 (*Logbook) Upsert added in v0.0.8

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

func (*Logbook) User added in v0.0.9

func (o *Logbook) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type LogbookSlice added in v0.0.8

type LogbookSlice []*Logbook

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

func (LogbookSlice) DeleteAll added in v0.0.8

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

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

func (*LogbookSlice) ReloadAll added in v0.0.8

func (o *LogbookSlice) 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 (LogbookSlice) UpdateAll added in v0.0.8

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

type Qso struct {
	ID             int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt      time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	ModifiedAt     null.Time   `boil:"modified_at" json:"modified_at,omitempty" toml:"modified_at" yaml:"modified_at,omitempty"`
	Call           string      `boil:"call" json:"call" toml:"call" yaml:"call"`
	Band           string      `boil:"band" json:"band" toml:"band" yaml:"band"`
	Mode           string      `boil:"mode" json:"mode" toml:"mode" yaml:"mode"`
	Freq           int64       `boil:"freq" json:"freq" toml:"freq" yaml:"freq"`
	QsoDate        time.Time   `boil:"qso_date" json:"qso_date" toml:"qso_date" yaml:"qso_date"`
	TimeOn         time.Time   `boil:"time_on" json:"time_on" toml:"time_on" yaml:"time_on"`
	TimeOff        time.Time   `boil:"time_off" json:"time_off" toml:"time_off" yaml:"time_off"`
	RstSent        string      `boil:"rst_sent" json:"rst_sent" toml:"rst_sent" yaml:"rst_sent"`
	RstRcvd        string      `boil:"rst_rcvd" json:"rst_rcvd" toml:"rst_rcvd" yaml:"rst_rcvd"`
	Country        null.String `boil:"country" json:"country,omitempty" toml:"country" yaml:"country,omitempty"`
	AdditionalData types.JSON  `boil:"additional_data" json:"additional_data" toml:"additional_data" yaml:"additional_data"`
	LogbookID      int64       `boil:"logbook_id" json:"logbook_id" toml:"logbook_id" yaml:"logbook_id"`

	R *qsoR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L qsoL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Qso is an object representing the database table.

func FindQso

func FindQso(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Qso, error)

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

func (*Qso) Delete

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

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

func (*Qso) Exists

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

Exists checks if the Qso row exists.

func (*Qso) GetLogbook added in v0.0.8

func (o *Qso) GetLogbook() *Logbook

func (*Qso) Insert

func (o *Qso) 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 (*Qso) Logbook added in v0.0.8

func (o *Qso) Logbook(mods ...qm.QueryMod) logbookQuery

Logbook pointed to by the foreign key.

func (*Qso) Reload

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

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

func (*Qso) SetLogbook added in v0.0.8

func (o *Qso) SetLogbook(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Logbook) error

SetLogbook of the qso to the related item. Sets o.R.Logbook to related. Adds o to related.R.Qsos.

func (*Qso) Update

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

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

func (o *Qso) 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 QsoSlice

type QsoSlice []*Qso

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

func (QsoSlice) DeleteAll

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

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

func (*QsoSlice) ReloadAll

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

func (o QsoSlice) 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 added in v0.0.9

type User struct {
	ID                 int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt          time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	ModifiedAt         null.Time   `boil:"modified_at" json:"modified_at,omitempty" toml:"modified_at" yaml:"modified_at,omitempty"`
	Username           string      `boil:"username" json:"username" toml:"username" yaml:"username"`
	PassHash           null.String `boil:"pass_hash" json:"pass_hash,omitempty" toml:"pass_hash" yaml:"pass_hash,omitempty"`
	Issuer             null.String `boil:"issuer" json:"issuer,omitempty" toml:"issuer" yaml:"issuer,omitempty"`
	Subject            null.String `boil:"subject" json:"subject,omitempty" toml:"subject" yaml:"subject,omitempty"`
	Email              null.String `boil:"email" json:"email,omitempty" toml:"email" yaml:"email,omitempty"`
	EmailConfirmed     null.Bool   `boil:"email_confirmed" json:"email_confirmed,omitempty" toml:"email_confirmed" yaml:"email_confirmed,omitempty"`
	BootstrapHash      null.String `boil:"bootstrap_hash" json:"bootstrap_hash,omitempty" toml:"bootstrap_hash" yaml:"bootstrap_hash,omitempty"`
	BootstrapExpiresAt null.Time   `` /* 131-byte string literal not displayed */
	BootstrapUsedAt    null.Time   `boil:"bootstrap_used_at" json:"bootstrap_used_at,omitempty" toml:"bootstrap_used_at" yaml:"bootstrap_used_at,omitempty"`

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

User is an object representing the database table.

func FindUser added in v0.0.9

func FindUser(ctx context.Context, exec boil.ContextExecutor, iD int64, 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) AddLogbooks added in v0.0.9

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

AddLogbooks adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Logbooks. Sets related.R.User appropriately.

func (*User) Delete added in v0.0.9

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 added in v0.0.9

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

Exists checks if the User row exists.

func (*User) GetLogbooks added in v0.0.9

func (o *User) GetLogbooks() LogbookSlice

func (*User) Insert added in v0.0.9

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) Logbooks added in v0.0.9

func (o *User) Logbooks(mods ...qm.QueryMod) logbookQuery

Logbooks retrieves all the logbook's Logbooks with an executor.

func (*User) Reload added in v0.0.9

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 added in v0.0.9

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 added in v0.0.9

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 UserSlice added in v0.0.9

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 added in v0.0.9

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 added in v0.0.9

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 added in v0.0.9

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