models

package
v0.0.0-...-a05456e Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderTypeFCM string = "fcm"
	ProviderTypeApn string = "apn"
)

Enum values for ProviderType

Variables

View Source
var AccessTokenColumns = struct {
	Token      string
	ValidUntil string
	UserID     string
	CreatedAt  string
	UpdatedAt  string
}{
	Token:      "token",
	ValidUntil: "valid_until",
	UserID:     "user_id",
	CreatedAt:  "created_at",
	UpdatedAt:  "updated_at",
}
View Source
var AccessTokenRels = struct {
	User string
}{
	User: "User",
}

AccessTokenRels is where relationship names are stored.

View Source
var AccessTokenTableColumns = struct {
	Token      string
	ValidUntil string
	UserID     string
	CreatedAt  string
	UpdatedAt  string
}{
	Token:      "access_tokens.token",
	ValidUntil: "access_tokens.valid_until",
	UserID:     "access_tokens.user_id",
	CreatedAt:  "access_tokens.created_at",
	UpdatedAt:  "access_tokens.updated_at",
}
View Source
var AccessTokenWhere = struct {
	Token      whereHelperstring
	ValidUntil whereHelpertime_Time
	UserID     whereHelperstring
	CreatedAt  whereHelpertime_Time
	UpdatedAt  whereHelpertime_Time
}{
	Token:      whereHelperstring{/* contains filtered or unexported fields */},
	ValidUntil: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:     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 AppUserProfileColumns = struct {
	UserID          string
	LegalAcceptedAt string
	CreatedAt       string
	UpdatedAt       string
}{
	UserID:          "user_id",
	LegalAcceptedAt: "legal_accepted_at",
	CreatedAt:       "created_at",
	UpdatedAt:       "updated_at",
}
View Source
var AppUserProfileRels = struct {
	User string
}{
	User: "User",
}

AppUserProfileRels is where relationship names are stored.

View Source
var AppUserProfileTableColumns = struct {
	UserID          string
	LegalAcceptedAt string
	CreatedAt       string
	UpdatedAt       string
}{
	UserID:          "app_user_profiles.user_id",
	LegalAcceptedAt: "app_user_profiles.legal_accepted_at",
	CreatedAt:       "app_user_profiles.created_at",
	UpdatedAt:       "app_user_profiles.updated_at",
}
View Source
var AppUserProfileWhere = struct {
	UserID          whereHelperstring
	LegalAcceptedAt whereHelpernull_Time
	CreatedAt       whereHelpertime_Time
	UpdatedAt       whereHelpertime_Time
}{
	UserID:          whereHelperstring{/* contains filtered or unexported fields */},
	LegalAcceptedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:       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 PasswordResetTokenColumns = struct {
	Token      string
	ValidUntil string
	UserID     string
	CreatedAt  string
	UpdatedAt  string
}{
	Token:      "token",
	ValidUntil: "valid_until",
	UserID:     "user_id",
	CreatedAt:  "created_at",
	UpdatedAt:  "updated_at",
}
View Source
var PasswordResetTokenRels = struct {
	User string
}{
	User: "User",
}

PasswordResetTokenRels is where relationship names are stored.

View Source
var PasswordResetTokenTableColumns = struct {
	Token      string
	ValidUntil string
	UserID     string
	CreatedAt  string
	UpdatedAt  string
}{
	Token:      "password_reset_tokens.token",
	ValidUntil: "password_reset_tokens.valid_until",
	UserID:     "password_reset_tokens.user_id",
	CreatedAt:  "password_reset_tokens.created_at",
	UpdatedAt:  "password_reset_tokens.updated_at",
}
View Source
var PasswordResetTokenWhere = struct {
	Token      whereHelperstring
	ValidUntil whereHelpertime_Time
	UserID     whereHelperstring
	CreatedAt  whereHelpertime_Time
	UpdatedAt  whereHelpertime_Time
}{
	Token:      whereHelperstring{/* contains filtered or unexported fields */},
	ValidUntil: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:     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 PushTokenColumns = struct {
	ID        string
	Token     string
	Provider  string
	UserID    string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Token:     "token",
	Provider:  "provider",
	UserID:    "user_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var PushTokenRels = struct {
	User string
}{
	User: "User",
}

PushTokenRels is where relationship names are stored.

View Source
var PushTokenTableColumns = struct {
	ID        string
	Token     string
	Provider  string
	UserID    string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "push_tokens.id",
	Token:     "push_tokens.token",
	Provider:  "push_tokens.provider",
	UserID:    "push_tokens.user_id",
	CreatedAt: "push_tokens.created_at",
	UpdatedAt: "push_tokens.updated_at",
}
View Source
var PushTokenWhere = struct {
	ID        whereHelperstring
	Token     whereHelperstring
	Provider  whereHelperstring
	UserID    whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Token:     whereHelperstring{/* contains filtered or unexported fields */},
	Provider:  whereHelperstring{/* contains filtered or unexported fields */},
	UserID:    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 RefreshTokenColumns = struct {
	Token     string
	UserID    string
	CreatedAt string
	UpdatedAt string
}{
	Token:     "token",
	UserID:    "user_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var RefreshTokenRels = struct {
	User string
}{
	User: "User",
}

RefreshTokenRels is where relationship names are stored.

View Source
var RefreshTokenTableColumns = struct {
	Token     string
	UserID    string
	CreatedAt string
	UpdatedAt string
}{
	Token:     "refresh_tokens.token",
	UserID:    "refresh_tokens.user_id",
	CreatedAt: "refresh_tokens.created_at",
	UpdatedAt: "refresh_tokens.updated_at",
}
View Source
var RefreshTokenWhere = struct {
	Token     whereHelperstring
	UserID    whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	Token:     whereHelperstring{/* contains filtered or unexported fields */},
	UserID:    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 {
	AccessTokens        string
	AppUserProfiles     string
	PasswordResetTokens string
	PushTokens          string
	RefreshTokens       string
	Trips               string
	Users               string
}{
	AccessTokens:        "access_tokens",
	AppUserProfiles:     "app_user_profiles",
	PasswordResetTokens: "password_reset_tokens",
	PushTokens:          "push_tokens",
	RefreshTokens:       "refresh_tokens",
	Trips:               "trips",
	Users:               "users",
}
View Source
var TripColumns = struct {
	ID        string
	Name      string
	CreatedAt string
	UpdatedAt string
	StartDate string
	EndDate   string
	UserID    string
}{
	ID:        "id",
	Name:      "name",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	StartDate: "start_date",
	EndDate:   "end_date",
	UserID:    "user_id",
}
View Source
var TripRels = struct {
	User string
}{
	User: "User",
}

TripRels is where relationship names are stored.

View Source
var TripTableColumns = struct {
	ID        string
	Name      string
	CreatedAt string
	UpdatedAt string
	StartDate string
	EndDate   string
	UserID    string
}{
	ID:        "trips.id",
	Name:      "trips.name",
	CreatedAt: "trips.created_at",
	UpdatedAt: "trips.updated_at",
	StartDate: "trips.start_date",
	EndDate:   "trips.end_date",
	UserID:    "trips.user_id",
}
View Source
var TripWhere = struct {
	ID        whereHelperstring
	Name      whereHelpernull_String
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
	StartDate whereHelpertime_Time
	EndDate   whereHelpertime_Time
	UserID    whereHelperstring
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Name:      whereHelpernull_String{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	StartDate: whereHelpertime_Time{/* contains filtered or unexported fields */},
	EndDate:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:    whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var UserColumns = struct {
	ID                  string
	Username            string
	Password            string
	IsActive            string
	Scopes              string
	LastAuthenticatedAt string
	CreatedAt           string
	UpdatedAt           string
}{
	ID:                  "id",
	Username:            "username",
	Password:            "password",
	IsActive:            "is_active",
	Scopes:              "scopes",
	LastAuthenticatedAt: "last_authenticated_at",
	CreatedAt:           "created_at",
	UpdatedAt:           "updated_at",
}
View Source
var UserRels = struct {
	AppUserProfile      string
	AccessTokens        string
	PasswordResetTokens string
	PushTokens          string
	RefreshTokens       string
	Trips               string
}{
	AppUserProfile:      "AppUserProfile",
	AccessTokens:        "AccessTokens",
	PasswordResetTokens: "PasswordResetTokens",
	PushTokens:          "PushTokens",
	RefreshTokens:       "RefreshTokens",
	Trips:               "Trips",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID                  string
	Username            string
	Password            string
	IsActive            string
	Scopes              string
	LastAuthenticatedAt string
	CreatedAt           string
	UpdatedAt           string
}{
	ID:                  "users.id",
	Username:            "users.username",
	Password:            "users.password",
	IsActive:            "users.is_active",
	Scopes:              "users.scopes",
	LastAuthenticatedAt: "users.last_authenticated_at",
	CreatedAt:           "users.created_at",
	UpdatedAt:           "users.updated_at",
}
View Source
var UserWhere = struct {
	ID                  whereHelperstring
	Username            whereHelpernull_String
	Password            whereHelpernull_String
	IsActive            whereHelperbool
	Scopes              whereHelpertypes_StringArray
	LastAuthenticatedAt whereHelpernull_Time
	CreatedAt           whereHelpertime_Time
	UpdatedAt           whereHelpertime_Time
}{
	ID:                  whereHelperstring{/* contains filtered or unexported fields */},
	Username:            whereHelpernull_String{/* contains filtered or unexported fields */},
	Password:            whereHelpernull_String{/* contains filtered or unexported fields */},
	IsActive:            whereHelperbool{/* contains filtered or unexported fields */},
	Scopes:              whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
	LastAuthenticatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt:           whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:           whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AccessTokenExists

func AccessTokenExists(ctx context.Context, exec boil.ContextExecutor, token string) (bool, error)

AccessTokenExists checks if the AccessToken row exists.

func AccessTokens

func AccessTokens(mods ...qm.QueryMod) accessTokenQuery

AccessTokens retrieves all the records using an executor.

func AllProviderType

func AllProviderType() []string

func AppUserProfileExists

func AppUserProfileExists(ctx context.Context, exec boil.ContextExecutor, userID string) (bool, error)

AppUserProfileExists checks if the AppUserProfile row exists.

func AppUserProfiles

func AppUserProfiles(mods ...qm.QueryMod) appUserProfileQuery

AppUserProfiles 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 PasswordResetTokenExists

func PasswordResetTokenExists(ctx context.Context, exec boil.ContextExecutor, token string) (bool, error)

PasswordResetTokenExists checks if the PasswordResetToken row exists.

func PasswordResetTokens

func PasswordResetTokens(mods ...qm.QueryMod) passwordResetTokenQuery

PasswordResetTokens retrieves all the records using an executor.

func PushTokenExists

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

PushTokenExists checks if the PushToken row exists.

func PushTokens

func PushTokens(mods ...qm.QueryMod) pushTokenQuery

PushTokens retrieves all the records using an executor.

func RefreshTokenExists

func RefreshTokenExists(ctx context.Context, exec boil.ContextExecutor, token string) (bool, error)

RefreshTokenExists checks if the RefreshToken row exists.

func RefreshTokens

func RefreshTokens(mods ...qm.QueryMod) refreshTokenQuery

RefreshTokens retrieves all the records using an executor.

func TripExists

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

TripExists checks if the Trip row exists.

func Trips

func Trips(mods ...qm.QueryMod) tripQuery

Trips 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 AccessToken

type AccessToken struct {
	Token      string    `boil:"token" json:"token" toml:"token" yaml:"token"`
	ValidUntil time.Time `boil:"valid_until" json:"valid_until" toml:"valid_until" yaml:"valid_until"`
	UserID     string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	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 *accessTokenR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L accessTokenL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AccessToken is an object representing the database table.

func FindAccessToken

func FindAccessToken(ctx context.Context, exec boil.ContextExecutor, token string, selectCols ...string) (*AccessToken, error)

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

func (*AccessToken) Delete

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

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

func (*AccessToken) Exists

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

Exists checks if the AccessToken row exists.

func (*AccessToken) Insert

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

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

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

func (*AccessToken) SetUser

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

SetUser of the accessToken to the related item. Sets o.R.User to related. Adds o to related.R.AccessTokens.

func (*AccessToken) Update

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

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

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

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

User pointed to by the foreign key.

type AccessTokenSlice

type AccessTokenSlice []*AccessToken

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

func (AccessTokenSlice) DeleteAll

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

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

func (*AccessTokenSlice) ReloadAll

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

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

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

type AppUserProfile

type AppUserProfile struct {
	UserID          string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	LegalAcceptedAt null.Time `boil:"legal_accepted_at" json:"legal_accepted_at,omitempty" toml:"legal_accepted_at" yaml:"legal_accepted_at,omitempty"`
	CreatedAt       time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt       time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *appUserProfileR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L appUserProfileL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AppUserProfile is an object representing the database table.

func FindAppUserProfile

func FindAppUserProfile(ctx context.Context, exec boil.ContextExecutor, userID string, selectCols ...string) (*AppUserProfile, error)

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

func (*AppUserProfile) Delete

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

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

func (*AppUserProfile) Exists

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

Exists checks if the AppUserProfile row exists.

func (*AppUserProfile) Insert

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

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

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

func (*AppUserProfile) SetUser

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

SetUser of the appUserProfile to the related item. Sets o.R.User to related. Adds o to related.R.AppUserProfile.

func (*AppUserProfile) Update

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

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

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

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

User pointed to by the foreign key.

type AppUserProfileSlice

type AppUserProfileSlice []*AppUserProfile

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

func (AppUserProfileSlice) DeleteAll

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

func (*AppUserProfileSlice) ReloadAll

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

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

type PasswordResetToken struct {
	Token      string    `boil:"token" json:"token" toml:"token" yaml:"token"`
	ValidUntil time.Time `boil:"valid_until" json:"valid_until" toml:"valid_until" yaml:"valid_until"`
	UserID     string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	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 *passwordResetTokenR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L passwordResetTokenL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

PasswordResetToken is an object representing the database table.

func FindPasswordResetToken

func FindPasswordResetToken(ctx context.Context, exec boil.ContextExecutor, token string, selectCols ...string) (*PasswordResetToken, error)

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

func (*PasswordResetToken) Delete

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

func (*PasswordResetToken) Exists

Exists checks if the PasswordResetToken row exists.

func (*PasswordResetToken) Insert

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

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

func (*PasswordResetToken) SetUser

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

SetUser of the passwordResetToken to the related item. Sets o.R.User to related. Adds o to related.R.PasswordResetTokens.

func (*PasswordResetToken) Update

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

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

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

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

User pointed to by the foreign key.

type PasswordResetTokenSlice

type PasswordResetTokenSlice []*PasswordResetToken

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

func (PasswordResetTokenSlice) DeleteAll

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

func (*PasswordResetTokenSlice) ReloadAll

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

func (PasswordResetTokenSlice) UpdateAll

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

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

type PushToken

type PushToken struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Token     string    `boil:"token" json:"token" toml:"token" yaml:"token"`
	Provider  string    `boil:"provider" json:"provider" toml:"provider" yaml:"provider"`
	UserID    string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	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 *pushTokenR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L pushTokenL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

PushToken is an object representing the database table.

func FindPushToken

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

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

func (*PushToken) Delete

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

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

func (*PushToken) Exists

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

Exists checks if the PushToken row exists.

func (*PushToken) Insert

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

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

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

func (*PushToken) SetUser

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

SetUser of the pushToken to the related item. Sets o.R.User to related. Adds o to related.R.PushTokens.

func (*PushToken) Update

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

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

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

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

User pointed to by the foreign key.

type PushTokenSlice

type PushTokenSlice []*PushToken

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

func (PushTokenSlice) DeleteAll

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

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

func (*PushTokenSlice) ReloadAll

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

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

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

type RefreshToken

type RefreshToken struct {
	Token     string    `boil:"token" json:"token" toml:"token" yaml:"token"`
	UserID    string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	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 *refreshTokenR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L refreshTokenL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

RefreshToken is an object representing the database table.

func FindRefreshToken

func FindRefreshToken(ctx context.Context, exec boil.ContextExecutor, token string, selectCols ...string) (*RefreshToken, error)

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

func (*RefreshToken) Delete

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

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

func (*RefreshToken) Exists

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

Exists checks if the RefreshToken row exists.

func (*RefreshToken) Insert

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

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

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

func (*RefreshToken) SetUser

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

SetUser of the refreshToken to the related item. Sets o.R.User to related. Adds o to related.R.RefreshTokens.

func (*RefreshToken) Update

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

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

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

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

User pointed to by the foreign key.

type RefreshTokenSlice

type RefreshTokenSlice []*RefreshToken

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

func (RefreshTokenSlice) DeleteAll

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

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

func (*RefreshTokenSlice) ReloadAll

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

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

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

type Trip

type Trip struct {
	ID        string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`
	CreatedAt time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	StartDate time.Time   `boil:"start_date" json:"start_date" toml:"start_date" yaml:"start_date"`
	EndDate   time.Time   `boil:"end_date" json:"end_date" toml:"end_date" yaml:"end_date"`
	UserID    string      `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`

	R *tripR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L tripL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Trip is an object representing the database table.

func FindTrip

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

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

func (*Trip) Delete

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

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

func (*Trip) Exists

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

Exists checks if the Trip row exists.

func (*Trip) Insert

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

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

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

func (*Trip) SetUser

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

SetUser of the trip to the related item. Sets o.R.User to related. Adds o to related.R.Trips.

func (*Trip) Update

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

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

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

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

User pointed to by the foreign key.

type TripSlice

type TripSlice []*Trip

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

func (TripSlice) DeleteAll

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

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

func (*TripSlice) ReloadAll

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

func (o TripSlice) 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"`
	Username            null.String       `boil:"username" json:"username,omitempty" toml:"username" yaml:"username,omitempty"`
	Password            null.String       `boil:"password" json:"password,omitempty" toml:"password" yaml:"password,omitempty"`
	IsActive            bool              `boil:"is_active" json:"is_active" toml:"is_active" yaml:"is_active"`
	Scopes              types.StringArray `boil:"scopes" json:"scopes" toml:"scopes" yaml:"scopes"`
	LastAuthenticatedAt null.Time         `` /* 135-byte string literal not displayed */
	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 *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) AccessTokens

func (o *User) AccessTokens(mods ...qm.QueryMod) accessTokenQuery

AccessTokens retrieves all the access_token's AccessTokens with an executor.

func (*User) AddAccessTokens

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

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

func (*User) AddPasswordResetTokens

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

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

func (*User) AddPushTokens

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

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

func (*User) AddRefreshTokens

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

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

func (*User) AddTrips

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

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

func (*User) AppUserProfile

func (o *User) AppUserProfile(mods ...qm.QueryMod) appUserProfileQuery

AppUserProfile pointed to by the foreign key.

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) PasswordResetTokens

func (o *User) PasswordResetTokens(mods ...qm.QueryMod) passwordResetTokenQuery

PasswordResetTokens retrieves all the password_reset_token's PasswordResetTokens with an executor.

func (*User) PushTokens

func (o *User) PushTokens(mods ...qm.QueryMod) pushTokenQuery

PushTokens retrieves all the push_token's PushTokens with an executor.

func (*User) RefreshTokens

func (o *User) RefreshTokens(mods ...qm.QueryMod) refreshTokenQuery

RefreshTokens retrieves all the refresh_token's RefreshTokens 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) SetAppUserProfile

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

SetAppUserProfile of the user to the related item. Sets o.R.AppUserProfile to related. Adds o to related.R.User.

func (*User) Trips

func (o *User) Trips(mods ...qm.QueryMod) tripQuery

Trips retrieves all the trip's Trips 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 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