Documentation ¶
Index ¶
- Variables
- func AddCacheHook(hookPoint boil.HookPoint, cacheHook CacheHook)
- func CacheExists(ctx context.Context, exec boil.ContextExecutor, publicKey ed25519.PublicKey) (bool, error)
- func Caches(mods ...qm.QueryMod) cacheQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Cache
- func (o *Cache) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Cache) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Cache) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Cache) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type CacheHook
- type CacheSlice
- type M
Constants ¶
This section is empty.
Variables ¶
var CacheColumns = struct { PublicKey string Version string FreeMemory string TotalMemory string FreeDisk string TotalDisk string StartupTime string ExternalIP string Port string ContactURL string LastPing string }{ PublicKey: "public_key", Version: "version", FreeMemory: "free_memory", TotalMemory: "total_memory", FreeDisk: "free_disk", TotalDisk: "total_disk", StartupTime: "startup_time", ExternalIP: "external_ip", Port: "port", ContactURL: "contact_url", LastPing: "last_ping", }
var CacheRels = struct {
}{}
CacheRels is where relationship names are stored.
var CacheWhere = struct { PublicKey whereHelpered25519_PublicKey Version whereHelperstring FreeMemory whereHelperuint64 TotalMemory whereHelperuint64 FreeDisk whereHelperuint64 TotalDisk whereHelperuint64 StartupTime whereHelpertime_Time ExternalIP whereHelpernet_IP Port whereHelperuint32 ContactURL whereHelperstring LastPing whereHelpertime_Time }{ PublicKey: whereHelpered25519_PublicKey{/* contains filtered or unexported fields */}, Version: whereHelperstring{/* contains filtered or unexported fields */}, FreeMemory: whereHelperuint64{/* contains filtered or unexported fields */}, TotalMemory: whereHelperuint64{/* contains filtered or unexported fields */}, FreeDisk: whereHelperuint64{/* contains filtered or unexported fields */}, TotalDisk: whereHelperuint64{/* contains filtered or unexported fields */}, StartupTime: whereHelpertime_Time{/* contains filtered or unexported fields */}, ExternalIP: whereHelpernet_IP{/* contains filtered or unexported fields */}, Port: whereHelperuint32{/* contains filtered or unexported fields */}, ContactURL: whereHelperstring{/* contains filtered or unexported fields */}, LastPing: whereHelpertime_Time{/* 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 TableNames = struct { Caches string }{ Caches: "caches", }
Functions ¶
func AddCacheHook ¶
AddCacheHook registers your hook function for all future operations.
func CacheExists ¶
func CacheExists(ctx context.Context, exec boil.ContextExecutor, publicKey ed25519.PublicKey) (bool, error)
CacheExists checks if the Cache row exists.
Types ¶
type Cache ¶
type Cache struct { PublicKey ed25519.PublicKey `boil:"public_key" json:"public_key" toml:"public_key" yaml:"public_key"` Version string `boil:"version" json:"version" toml:"version" yaml:"version"` FreeMemory uint64 `boil:"free_memory" json:"free_memory" toml:"free_memory" yaml:"free_memory"` TotalMemory uint64 `boil:"total_memory" json:"total_memory" toml:"total_memory" yaml:"total_memory"` FreeDisk uint64 `boil:"free_disk" json:"free_disk" toml:"free_disk" yaml:"free_disk"` TotalDisk uint64 `boil:"total_disk" json:"total_disk" toml:"total_disk" yaml:"total_disk"` StartupTime time.Time `boil:"startup_time" json:"startup_time" toml:"startup_time" yaml:"startup_time"` ExternalIP net.IP `boil:"external_ip" json:"external_ip" toml:"external_ip" yaml:"external_ip"` Port uint32 `boil:"port" json:"port" toml:"port" yaml:"port"` ContactURL string `boil:"contact_url" json:"contact_url" toml:"contact_url" yaml:"contact_url"` LastPing time.Time `boil:"last_ping" json:"last_ping" toml:"last_ping" yaml:"last_ping"` R *cacheR `boil:"-" json:"-" toml:"-" yaml:"-"` L cacheL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Cache is an object representing the database table.
func FindCache ¶
func FindCache(ctx context.Context, exec boil.ContextExecutor, publicKey ed25519.PublicKey, selectCols ...string) (*Cache, error)
FindCache retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Cache) Delete ¶
Delete deletes a single Cache record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Cache) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Cache) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Cache) Update ¶
func (o *Cache) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Cache. 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.
type CacheSlice ¶
type CacheSlice []*Cache
CacheSlice is an alias for a slice of pointers to Cache. This should generally be used opposed to []Cache.
func (CacheSlice) DeleteAll ¶
func (o CacheSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CacheSlice) ReloadAll ¶
func (o *CacheSlice) 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 (CacheSlice) UpdateAll ¶
func (o CacheSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.