Documentation
¶
Index ¶
- Variables
- func AddAudienceHook(hookPoint boil.HookPoint, audienceHook AudienceHook)
- func AddGroupHook(hookPoint boil.HookPoint, groupHook GroupHook)
- func AddJWTKeyHook(hookPoint boil.HookPoint, jwtKeyHook JWTKeyHook)
- func AddPasswordHook(hookPoint boil.HookPoint, passwordHook PasswordHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func AudienceExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Audiences(mods ...qm.QueryMod) audienceQuery
- func GroupExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Groups(mods ...qm.QueryMod) groupQuery
- func JWTKeyExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func JWTKeys(mods ...qm.QueryMod) jwtKeyQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PasswordExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Passwords(mods ...qm.QueryMod) passwordQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Audience
- func (o *Audience) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Audience) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Audience) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Audience) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Audience) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Audience) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Audience) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Audience) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Audience) Users(mods ...qm.QueryMod) userQuery
- type AudienceHook
- type AudienceSlice
- type Group
- func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Group) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Group) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Group) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Group) Users(mods ...qm.QueryMod) userQuery
- type GroupHook
- type GroupSlice
- type JWTKey
- func (o *JWTKey) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *JWTKey) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *JWTKey) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *JWTKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *JWTKey) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type JWTKeyHook
- type JWTKeySlice
- type M
- type Password
- func (o *Password) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Password) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Password) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Password) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Password) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Password) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Password) User(mods ...qm.QueryMod) userQuery
- type PasswordHook
- type PasswordSlice
- type User
- func (o *User) AddAudiences(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) Audiences(mods ...qm.QueryMod) audienceQuery
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Groups(mods ...qm.QueryMod) groupQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Password(mods ...qm.QueryMod) passwordQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveAudiences(ctx context.Context, exec boil.ContextExecutor, related ...*Audience) error
- func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
- func (o *User) SetAudiences(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) SetPassword(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Password) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var AudienceColumns = struct { ID string CreatedAt string UpdatedAt string Name string Description string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", Name: "name", Description: "description", }
var AudienceRels = struct { Users string }{ Users: "Users", }
AudienceRels is where relationship names are stored.
var AudienceWhere = struct { ID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Name whereHelperstring Description whereHelperstring }{ ID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Description: whereHelperstring{/* contains filtered or unexported fields */}, }
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.
var GroupColumns = struct { ID string CreatedAt string UpdatedAt string Name string Description string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", Name: "name", Description: "description", }
var GroupRels = struct { Users string }{ Users: "Users", }
GroupRels is where relationship names are stored.
var GroupWhere = struct { ID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Name whereHelperstring Description whereHelperstring }{ ID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Description: whereHelperstring{/* contains filtered or unexported fields */}, }
var JWTKeyColumns = struct { ID string PublicKey string CreatedAt string }{ ID: "id", PublicKey: "public_key", CreatedAt: "created_at", }
var JWTKeyRels = struct {
}{}
JWTKeyRels is where relationship names are stored.
var JWTKeyWhere = struct { ID whereHelperint PublicKey whereHelper__byte CreatedAt whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, PublicKey: whereHelper__byte{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var PasswordColumns = struct { ID string UserID string CreatedAt string UpdatedAt string Salt string Hash string }{ ID: "id", UserID: "user_id", CreatedAt: "created_at", UpdatedAt: "updated_at", Salt: "salt", Hash: "hash", }
var PasswordRels = struct { User string }{ User: "User", }
PasswordRels is where relationship names are stored.
var PasswordWhere = struct { ID whereHelperint UserID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Salt whereHelper__byte Hash whereHelper__byte }{ ID: whereHelperint{/* contains filtered or unexported fields */}, UserID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Salt: whereHelper__byte{/* contains filtered or unexported fields */}, Hash: whereHelper__byte{/* contains filtered or unexported fields */}, }
var TableNames = struct { Audiences string Groups string JWTKeys string Passwords string UserAudiences string UserGroups string Users string }{ Audiences: "audiences", Groups: "groups", JWTKeys: "jwt_keys", Passwords: "passwords", UserAudiences: "user_audiences", UserGroups: "user_groups", Users: "users", }
var UserColumns = struct { ID string Email string Name string CreatedAt string UpdatedAt string }{ ID: "id", Email: "email", Name: "name", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var UserRels = struct { Password string Audiences string Groups string }{ Password: "Password", Audiences: "Audiences", Groups: "Groups", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint Email whereHelperstring Name whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Email: 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 */}, }
Functions ¶
func AddAudienceHook ¶
func AddAudienceHook(hookPoint boil.HookPoint, audienceHook AudienceHook)
AddAudienceHook registers your hook function for all future operations.
func AddGroupHook ¶
AddGroupHook registers your hook function for all future operations.
func AddJWTKeyHook ¶
func AddJWTKeyHook(hookPoint boil.HookPoint, jwtKeyHook JWTKeyHook)
AddJWTKeyHook registers your hook function for all future operations.
func AddPasswordHook ¶
func AddPasswordHook(hookPoint boil.HookPoint, passwordHook PasswordHook)
AddPasswordHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func AudienceExists ¶
AudienceExists checks if the Audience row exists.
func GroupExists ¶
GroupExists checks if the Group row exists.
func JWTKeyExists ¶
JWTKeyExists checks if the JWTKey row exists.
func PasswordExists ¶
PasswordExists checks if the Password row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Audience ¶
type Audience struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"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"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
Description string `boil:"description" json:"description" toml:"description" yaml:"description"`
R *audienceR `boil:"-" json:"-" toml:"-" yaml:"-"`
L audienceL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Audience is an object representing the database table.
func FindAudience ¶
func FindAudience(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Audience, error)
FindAudience retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Audience) AddUsers ¶
func (o *Audience) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the audience, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Audiences appropriately.
func (*Audience) Delete ¶
Delete deletes a single Audience record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Audience) Insert ¶
func (o *Audience) 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 (*Audience) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Audience) RemoveUsers ¶
func (o *Audience) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Audiences.
func (*Audience) SetUsers ¶
func (o *Audience) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the audience replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Audiences's Users accordingly. Replaces o.R.Users with related. Sets related.R.Audiences's Users accordingly.
func (*Audience) Update ¶
func (o *Audience) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Audience. 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 (*Audience) Upsert ¶
func (o *Audience) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type AudienceHook ¶
AudienceHook is the signature for custom Audience hook methods
type AudienceSlice ¶
type AudienceSlice []*Audience
AudienceSlice is an alias for a slice of pointers to Audience. This should generally be used opposed to []Audience.
func (AudienceSlice) DeleteAll ¶
func (o AudienceSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AudienceSlice) ReloadAll ¶
func (o *AudienceSlice) 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 (AudienceSlice) UpdateAll ¶
func (o AudienceSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Group ¶
type Group struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"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"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
Description string `boil:"description" json:"description" toml:"description" yaml:"description"`
R *groupR `boil:"-" json:"-" toml:"-" yaml:"-"`
L groupL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Group is an object representing the database table.
func FindGroup ¶
func FindGroup(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Group, error)
FindGroup retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Group) AddUsers ¶
func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the group, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Groups appropriately.
func (*Group) Delete ¶
Delete deletes a single Group record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Group) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Group) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Group) RemoveUsers ¶
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Groups.
func (*Group) SetUsers ¶
func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the group replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Groups's Users accordingly. Replaces o.R.Users with related. Sets related.R.Groups's Users accordingly.
func (*Group) Update ¶
func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Group. 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 (*Group) Upsert ¶
func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type GroupSlice ¶
type GroupSlice []*Group
GroupSlice is an alias for a slice of pointers to Group. This should generally be used opposed to []Group.
func (GroupSlice) DeleteAll ¶
func (o GroupSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*GroupSlice) ReloadAll ¶
func (o *GroupSlice) 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 (GroupSlice) UpdateAll ¶
func (o GroupSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type JWTKey ¶
type JWTKey struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"id"`
PublicKey []byte `boil:"public_key" json:"public_key" toml:"public_key" yaml:"public_key"`
CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
R *jwtKeyR `boil:"-" json:"-" toml:"-" yaml:"-"`
L jwtKeyL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
JWTKey is an object representing the database table.
func FindJWTKey ¶
func FindJWTKey(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*JWTKey, error)
FindJWTKey retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*JWTKey) Delete ¶
Delete deletes a single JWTKey record with an executor. Delete will match against the primary key column to find the record to delete.
func (*JWTKey) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*JWTKey) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*JWTKey) Update ¶
func (o *JWTKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the JWTKey. 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 (*JWTKey) Upsert ¶
func (o *JWTKey) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type JWTKeyHook ¶
JWTKeyHook is the signature for custom JWTKey hook methods
type JWTKeySlice ¶
type JWTKeySlice []*JWTKey
JWTKeySlice is an alias for a slice of pointers to JWTKey. This should generally be used opposed to []JWTKey.
func (JWTKeySlice) DeleteAll ¶
func (o JWTKeySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*JWTKeySlice) ReloadAll ¶
func (o *JWTKeySlice) 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 (JWTKeySlice) UpdateAll ¶
func (o JWTKeySlice) 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 Password ¶
type Password struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"id"`
UserID int `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"`
Salt []byte `boil:"salt" json:"salt" toml:"salt" yaml:"salt"`
Hash []byte `boil:"hash" json:"hash" toml:"hash" yaml:"hash"`
R *passwordR `boil:"-" json:"-" toml:"-" yaml:"-"`
L passwordL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Password is an object representing the database table.
func FindPassword ¶
func FindPassword(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Password, error)
FindPassword retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Password) Delete ¶
Delete deletes a single Password record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Password) Insert ¶
func (o *Password) 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 (*Password) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Password) SetUser ¶
func (o *Password) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the password to the related item. Sets o.R.User to related. Adds o to related.R.Password.
func (*Password) Update ¶
func (o *Password) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Password. 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 (*Password) Upsert ¶
func (o *Password) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type PasswordHook ¶
PasswordHook is the signature for custom Password hook methods
type PasswordSlice ¶
type PasswordSlice []*Password
PasswordSlice is an alias for a slice of pointers to Password. This should generally be used opposed to []Password.
func (PasswordSlice) DeleteAll ¶
func (o PasswordSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PasswordSlice) ReloadAll ¶
func (o *PasswordSlice) 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 (PasswordSlice) UpdateAll ¶
func (o PasswordSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type User ¶
type User struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"id"`
Email string `boil:"email" json:"email" toml:"email" yaml:"email"`
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 *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 int, 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) AddAudiences ¶
func (o *User) AddAudiences(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Audience) error
AddAudiences adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Audiences. Sets related.R.Users appropriately.
func (*User) AddGroups ¶
func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
AddGroups adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Groups. Sets related.R.Users appropriately.
func (*User) Delete ¶
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) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveAudiences ¶
func (o *User) RemoveAudiences(ctx context.Context, exec boil.ContextExecutor, related ...*Audience) error
RemoveAudiences relationships from objects passed in. Removes related items from R.Audiences (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) RemoveGroups ¶
func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
RemoveGroups relationships from objects passed in. Removes related items from R.Groups (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) SetAudiences ¶
func (o *User) SetAudiences(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Audience) error
SetAudiences removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Audiences accordingly. Replaces o.R.Audiences with related. Sets related.R.Users's Audiences accordingly.
func (*User) SetGroups ¶
func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
SetGroups removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Groups accordingly. Replaces o.R.Groups with related. Sets related.R.Users's Groups accordingly.
func (*User) SetPassword ¶
func (o *User) SetPassword(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Password) error
SetPassword of the user to the related item. Sets o.R.Password to related. Adds o to related.R.User.
func (*User) Update ¶
func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*User) Upsert ¶
func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.