Documentation ¶
Index ¶
- Variables
- func AddPeerHook(hookPoint boil.HookPoint, peerHook PeerHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PeerExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Peers(mods ...qm.QueryMod) peerQuery
- type M
- type Peer
- func (o *Peer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Peer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Peer) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Peer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Peer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type PeerHook
- type PeerSlice
Constants ¶
This section is empty.
Variables ¶
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 PeerColumns = struct { ID string MultiHash string AgentVersion string Protocols string MultiAddresses string IPAddresses string Countries string Continents string Asns string TargetType string TargetName string LastSeenAt string UpdatedAt string CreatedAt string }{ ID: "id", MultiHash: "multi_hash", AgentVersion: "agent_version", Protocols: "protocols", MultiAddresses: "multi_addresses", IPAddresses: "ip_addresses", Countries: "countries", Continents: "continents", Asns: "asns", TargetType: "target_type", TargetName: "target_name", LastSeenAt: "last_seen_at", UpdatedAt: "updated_at", CreatedAt: "created_at", }
var PeerRels = struct {
}{}
PeerRels is where relationship names are stored.
var PeerTableColumns = struct { ID string MultiHash string AgentVersion string Protocols string MultiAddresses string IPAddresses string Countries string Continents string Asns string TargetType string TargetName string LastSeenAt string UpdatedAt string CreatedAt string }{ ID: "peers.id", MultiHash: "peers.multi_hash", AgentVersion: "peers.agent_version", Protocols: "peers.protocols", MultiAddresses: "peers.multi_addresses", IPAddresses: "peers.ip_addresses", Countries: "peers.countries", Continents: "peers.continents", Asns: "peers.asns", TargetType: "peers.target_type", TargetName: "peers.target_name", LastSeenAt: "peers.last_seen_at", UpdatedAt: "peers.updated_at", CreatedAt: "peers.created_at", }
var PeerWhere = struct { ID whereHelperint64 MultiHash whereHelperstring AgentVersion whereHelpernull_String Protocols whereHelpertypes_StringArray MultiAddresses whereHelpertypes_StringArray IPAddresses whereHelpertypes_StringArray Countries whereHelpertypes_StringArray Continents whereHelpertypes_StringArray Asns whereHelpertypes_Int64Array TargetType whereHelperstring TargetName whereHelperstring LastSeenAt whereHelpertime_Time UpdatedAt whereHelpertime_Time CreatedAt whereHelpertime_Time }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, MultiHash: whereHelperstring{/* contains filtered or unexported fields */}, AgentVersion: whereHelpernull_String{/* contains filtered or unexported fields */}, Protocols: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, MultiAddresses: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, IPAddresses: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, Countries: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, Continents: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, Asns: whereHelpertypes_Int64Array{/* contains filtered or unexported fields */}, TargetType: whereHelperstring{/* contains filtered or unexported fields */}, TargetName: whereHelperstring{/* contains filtered or unexported fields */}, LastSeenAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Peers string }{ Peers: "peers", }
var ViewNames = struct {
}{}
Functions ¶
func AddPeerHook ¶
AddPeerHook registers your hook function for all future operations.
func PeerExists ¶
PeerExists checks if the Peer row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Peer ¶
type Peer struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` MultiHash string `boil:"multi_hash" json:"multi_hash" toml:"multi_hash" yaml:"multi_hash"` AgentVersion null.String `boil:"agent_version" json:"agent_version,omitempty" toml:"agent_version" yaml:"agent_version,omitempty"` Protocols types.StringArray `boil:"protocols" json:"protocols,omitempty" toml:"protocols" yaml:"protocols,omitempty"` MultiAddresses types.StringArray `boil:"multi_addresses" json:"multi_addresses" toml:"multi_addresses" yaml:"multi_addresses"` IPAddresses types.StringArray `boil:"ip_addresses" json:"ip_addresses" toml:"ip_addresses" yaml:"ip_addresses"` Countries types.StringArray `boil:"countries" json:"countries" toml:"countries" yaml:"countries"` Continents types.StringArray `boil:"continents" json:"continents" toml:"continents" yaml:"continents"` Asns types.Int64Array `boil:"asns" json:"asns" toml:"asns" yaml:"asns"` TargetType string `boil:"target_type" json:"target_type" toml:"target_type" yaml:"target_type"` TargetName string `boil:"target_name" json:"target_name" toml:"target_name" yaml:"target_name"` LastSeenAt time.Time `boil:"last_seen_at" json:"last_seen_at" toml:"last_seen_at" yaml:"last_seen_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` R *peerR `boil:"-" json:"-" toml:"-" yaml:"-"` L peerL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Peer is an object representing the database table.
func FindPeer ¶
func FindPeer(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Peer, error)
FindPeer retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Peer) Delete ¶
Delete deletes a single Peer record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Peer) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Peer) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Peer) Update ¶
func (o *Peer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Peer. 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 (*Peer) Upsert ¶
func (o *Peer) 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 PeerSlice ¶
type PeerSlice []*Peer
PeerSlice is an alias for a slice of pointers to Peer. This should almost always be used instead of []Peer.