Documentation ¶
Index ¶
- Variables
- func AddHostHook(hookPoint boil.HookPoint, hostHook HostHook)
- func AddHostSgroupHook(hookPoint boil.HookPoint, hostSgroupHook HostSgroupHook)
- func AddPolicyHook(hookPoint boil.HookPoint, policyHook PolicyHook)
- func AddSgroupHook(hookPoint boil.HookPoint, sgroupHook SgroupHook)
- func HostExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func HostSgroupExists(ctx context.Context, exec boil.ContextExecutor, hostID int64, sgroupID int64) (bool, error)
- func HostSgroups(mods ...qm.QueryMod) hostSgroupQuery
- func Hosts(mods ...qm.QueryMod) hostQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func Policies(mods ...qm.QueryMod) policyQuery
- func PolicyExists(ctx context.Context, exec boil.ContextExecutor, sRC int64, dST int64, ...) (bool, error)
- func SgroupExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Sgroups(mods ...qm.QueryMod) sgroupQuery
- type Host
- func (o *Host) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Host) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Host) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Host) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Host) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Host) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type HostHook
- type HostSgroup
- func (o *HostSgroup) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *HostSgroup) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *HostSgroup) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *HostSgroup) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *HostSgroup) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *HostSgroup) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type HostSgroupHook
- type HostSgroupSlice
- type HostSlice
- type M
- type Policy
- func (o *Policy) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Policy) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Policy) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Policy) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Policy) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Policy) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type PolicyHook
- type PolicySlice
- type Sgroup
- func (o *Sgroup) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Sgroup) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Sgroup) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Sgroup) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Sgroup) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Sgroup) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type SgroupHook
- type SgroupSlice
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 HostColumns = struct { ID string Hostname string Ipaddr string Zone string Desc string }{ ID: "id", Hostname: "hostname", Ipaddr: "ipaddr", Zone: "zone", Desc: "desc", }
var HostRels = struct {
}{}
HostRels is where relationship names are stored.
var HostSgroupColumns = struct { HostID string SgroupID string }{ HostID: "host_id", SgroupID: "sgroup_id", }
var HostSgroupRels = struct {
}{}
HostSgroupRels is where relationship names are stored.
var HostSgroupTableColumns = struct { HostID string SgroupID string }{ HostID: "host_sgroup.host_id", SgroupID: "host_sgroup.sgroup_id", }
var HostSgroupWhere = struct { HostID whereHelperint64 SgroupID whereHelperint64 }{ HostID: whereHelperint64{/* contains filtered or unexported fields */}, SgroupID: whereHelperint64{/* contains filtered or unexported fields */}, }
var HostTableColumns = struct { ID string Hostname string Ipaddr string Zone string Desc string }{ ID: "host.id", Hostname: "host.hostname", Ipaddr: "host.ipaddr", Zone: "host.zone", Desc: "host.desc", }
var HostWhere = struct { ID whereHelperint64 Hostname whereHelperstring Ipaddr whereHelperstring Zone whereHelperstring Desc whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Hostname: whereHelperstring{/* contains filtered or unexported fields */}, Ipaddr: whereHelperstring{/* contains filtered or unexported fields */}, Zone: whereHelperstring{/* contains filtered or unexported fields */}, Desc: whereHelperstring{/* contains filtered or unexported fields */}, }
var PolicyColumns = struct { SRC string DST string Port string Protocol string Desc string }{ SRC: "src", DST: "dst", Port: "port", Protocol: "protocol", Desc: "desc", }
var PolicyRels = struct {
}{}
PolicyRels is where relationship names are stored.
var PolicyTableColumns = struct { SRC string DST string Port string Protocol string Desc string }{ SRC: "policy.src", DST: "policy.dst", Port: "policy.port", Protocol: "policy.protocol", Desc: "policy.desc", }
var PolicyWhere = struct { SRC whereHelperint64 DST whereHelperint64 Port whereHelperint64 Protocol whereHelperstring Desc whereHelperstring }{ SRC: whereHelperint64{/* contains filtered or unexported fields */}, DST: whereHelperint64{/* contains filtered or unexported fields */}, Port: whereHelperint64{/* contains filtered or unexported fields */}, Protocol: whereHelperstring{/* contains filtered or unexported fields */}, Desc: whereHelperstring{/* contains filtered or unexported fields */}, }
var SgroupColumns = struct { ID string Name string Ipaddr string Zone string Desc string }{ ID: "id", Name: "name", Ipaddr: "ipaddr", Zone: "zone", Desc: "desc", }
var SgroupRels = struct {
}{}
SgroupRels is where relationship names are stored.
var SgroupTableColumns = struct { ID string Name string Ipaddr string Zone string Desc string }{ ID: "sgroup.id", Name: "sgroup.name", Ipaddr: "sgroup.ipaddr", Zone: "sgroup.zone", Desc: "sgroup.desc", }
var SgroupWhere = struct { ID whereHelperint64 Name whereHelperstring Ipaddr whereHelperstring Zone whereHelperstring Desc whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Ipaddr: whereHelperstring{/* contains filtered or unexported fields */}, Zone: whereHelperstring{/* contains filtered or unexported fields */}, Desc: whereHelperstring{/* contains filtered or unexported fields */}, }
var TableNames = struct { Host string HostSgroup string Policy string Sgroup string }{ Host: "host", HostSgroup: "host_sgroup", Policy: "policy", Sgroup: "sgroup", }
var ViewNames = struct {
}{}
Functions ¶
func AddHostHook ¶
AddHostHook registers your hook function for all future operations.
func AddHostSgroupHook ¶
func AddHostSgroupHook(hookPoint boil.HookPoint, hostSgroupHook HostSgroupHook)
AddHostSgroupHook registers your hook function for all future operations.
func AddPolicyHook ¶
func AddPolicyHook(hookPoint boil.HookPoint, policyHook PolicyHook)
AddPolicyHook registers your hook function for all future operations.
func AddSgroupHook ¶
func AddSgroupHook(hookPoint boil.HookPoint, sgroupHook SgroupHook)
AddSgroupHook registers your hook function for all future operations.
func HostExists ¶
HostExists checks if the Host row exists.
func HostSgroupExists ¶
func HostSgroupExists(ctx context.Context, exec boil.ContextExecutor, hostID int64, sgroupID int64) (bool, error)
HostSgroupExists checks if the HostSgroup row exists.
func HostSgroups ¶
HostSgroups retrieves all the records using an executor.
func PolicyExists ¶
func PolicyExists(ctx context.Context, exec boil.ContextExecutor, sRC int64, dST int64, port int64, protocol string) (bool, error)
PolicyExists checks if the Policy row exists.
func SgroupExists ¶
SgroupExists checks if the Sgroup row exists.
Types ¶
type Host ¶
type Host struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Hostname string `boil:"hostname" json:"hostname" toml:"hostname" yaml:"hostname"` Ipaddr string `boil:"ipaddr" json:"ipaddr" toml:"ipaddr" yaml:"ipaddr"` Zone string `boil:"zone" json:"zone" toml:"zone" yaml:"zone"` Desc string `boil:"desc" json:"desc" toml:"desc" yaml:"desc"` R *hostR `boil:"-" json:"-" toml:"-" yaml:"-"` L hostL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Host is an object representing the database table.
func FindHost ¶
func FindHost(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Host, error)
FindHost retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Host) Delete ¶
Delete deletes a single Host record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Host) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Host) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Host) Update ¶
func (o *Host) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Host. 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 (*Host) Upsert ¶
func (o *Host) 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 HostSgroup ¶
type HostSgroup struct { HostID int64 `boil:"host_id" json:"host_id" toml:"host_id" yaml:"host_id"` SgroupID int64 `boil:"sgroup_id" json:"sgroup_id" toml:"sgroup_id" yaml:"sgroup_id"` R *hostSgroupR `boil:"-" json:"-" toml:"-" yaml:"-"` L hostSgroupL `boil:"-" json:"-" toml:"-" yaml:"-"` }
HostSgroup is an object representing the database table.
func FindHostSgroup ¶
func FindHostSgroup(ctx context.Context, exec boil.ContextExecutor, hostID int64, sgroupID int64, selectCols ...string) (*HostSgroup, error)
FindHostSgroup retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*HostSgroup) Delete ¶
func (o *HostSgroup) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single HostSgroup record with an executor. Delete will match against the primary key column to find the record to delete.
func (*HostSgroup) Exists ¶
func (o *HostSgroup) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the HostSgroup row exists.
func (*HostSgroup) Insert ¶
func (o *HostSgroup) 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 (*HostSgroup) Reload ¶
func (o *HostSgroup) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*HostSgroup) Update ¶
func (o *HostSgroup) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the HostSgroup. 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 (*HostSgroup) Upsert ¶
func (o *HostSgroup) 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 HostSgroupHook ¶
type HostSgroupHook func(context.Context, boil.ContextExecutor, *HostSgroup) error
HostSgroupHook is the signature for custom HostSgroup hook methods
type HostSgroupSlice ¶
type HostSgroupSlice []*HostSgroup
HostSgroupSlice is an alias for a slice of pointers to HostSgroup. This should almost always be used instead of []HostSgroup.
func (HostSgroupSlice) DeleteAll ¶
func (o HostSgroupSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*HostSgroupSlice) ReloadAll ¶
func (o *HostSgroupSlice) 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 (HostSgroupSlice) UpdateAll ¶
func (o HostSgroupSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type HostSlice ¶
type HostSlice []*Host
HostSlice is an alias for a slice of pointers to Host. This should almost always be used instead of []Host.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Policy ¶
type Policy struct { SRC int64 `boil:"src" json:"src" toml:"src" yaml:"src"` DST int64 `boil:"dst" json:"dst" toml:"dst" yaml:"dst"` Port int64 `boil:"port" json:"port" toml:"port" yaml:"port"` Protocol string `boil:"protocol" json:"protocol" toml:"protocol" yaml:"protocol"` Desc string `boil:"desc" json:"desc" toml:"desc" yaml:"desc"` R *policyR `boil:"-" json:"-" toml:"-" yaml:"-"` L policyL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Policy is an object representing the database table.
func FindPolicy ¶
func FindPolicy(ctx context.Context, exec boil.ContextExecutor, sRC int64, dST int64, port int64, protocol string, selectCols ...string) (*Policy, error)
FindPolicy retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Policy) Delete ¶
Delete deletes a single Policy record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Policy) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Policy) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Policy) Update ¶
func (o *Policy) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Policy. 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 (*Policy) Upsert ¶
func (o *Policy) 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 PolicyHook ¶
PolicyHook is the signature for custom Policy hook methods
type PolicySlice ¶
type PolicySlice []*Policy
PolicySlice is an alias for a slice of pointers to Policy. This should almost always be used instead of []Policy.
func (PolicySlice) DeleteAll ¶
func (o PolicySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PolicySlice) ReloadAll ¶
func (o *PolicySlice) 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 (PolicySlice) UpdateAll ¶
func (o PolicySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Sgroup ¶
type Sgroup struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Ipaddr string `boil:"ipaddr" json:"ipaddr" toml:"ipaddr" yaml:"ipaddr"` Zone string `boil:"zone" json:"zone" toml:"zone" yaml:"zone"` Desc string `boil:"desc" json:"desc" toml:"desc" yaml:"desc"` R *sgroupR `boil:"-" json:"-" toml:"-" yaml:"-"` L sgroupL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Sgroup is an object representing the database table.
func FindSgroup ¶
func FindSgroup(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Sgroup, error)
FindSgroup retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Sgroup) Delete ¶
Delete deletes a single Sgroup record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Sgroup) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Sgroup) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Sgroup) Update ¶
func (o *Sgroup) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Sgroup. 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 (*Sgroup) Upsert ¶
func (o *Sgroup) 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 SgroupHook ¶
SgroupHook is the signature for custom Sgroup hook methods
type SgroupSlice ¶
type SgroupSlice []*Sgroup
SgroupSlice is an alias for a slice of pointers to Sgroup. This should almost always be used instead of []Sgroup.
func (SgroupSlice) DeleteAll ¶
func (o SgroupSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*SgroupSlice) ReloadAll ¶
func (o *SgroupSlice) 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 (SgroupSlice) UpdateAll ¶
func (o SgroupSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.