Documentation
¶
Index ¶
- func FixedError(err error) ent.Hook
- func If(hk ent.Hook, cond Condition) ent.Hook
- func On(hk ent.Hook, op ent.Op) ent.Hook
- func Reject(op ent.Op) ent.Hook
- func Unless(hk ent.Hook, op ent.Op) ent.Hook
- type AgentFunc
- type AntivirusFunc
- type AppFunc
- type AuthenticationFunc
- type CertificateFunc
- type Chain
- type ComputerFunc
- type Condition
- func And(first, second Condition, rest ...Condition) Condition
- func HasAddedFields(field string, fields ...string) Condition
- func HasClearedFields(field string, fields ...string) Condition
- func HasFields(field string, fields ...string) Condition
- func HasOp(op ent.Op) Condition
- func Not(cond Condition) Condition
- func Or(first, second Condition, rest ...Condition) Condition
- type DeploymentFunc
- type LogicalDiskFunc
- type MemorySlotFunc
- type MetadataFunc
- type MonitorFunc
- type NetworkAdapterFunc
- type OperatingSystemFunc
- type OrgMetadataFunc
- type PhysicalDiskFunc
- type PrinterFunc
- type ProfileFunc
- type ProfileIssueFunc
- type ReleaseFunc
- type RevocationFunc
- type RustdeskFunc
- type ServerFunc
- type SessionsFunc
- type SettingsFunc
- type ShareFunc
- type SiteFunc
- type SystemUpdateFunc
- type TagFunc
- type TaskFunc
- type TenantFunc
- type UpdateFunc
- type UserFunc
- type WingetConfigExclusionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func If ¶
If executes the given hook under condition.
hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
func On ¶
On executes the given hook only for the given operation.
hook.On(Log, ent.Delete|ent.Create)
Types ¶
type AgentFunc ¶
The AgentFunc type is an adapter to allow the use of ordinary function as Agent mutator.
type AntivirusFunc ¶
The AntivirusFunc type is an adapter to allow the use of ordinary function as Antivirus mutator.
type AuthenticationFunc ¶
The AuthenticationFunc type is an adapter to allow the use of ordinary function as Authentication mutator.
type CertificateFunc ¶
The CertificateFunc type is an adapter to allow the use of ordinary function as Certificate mutator.
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain acts as a list of hooks and is effectively immutable. Once created, it will always hold the same set of hooks in the same order.
func (Chain) Append ¶
Append extends a chain, adding the specified hook as the last ones in the mutation flow.
type ComputerFunc ¶
The ComputerFunc type is an adapter to allow the use of ordinary function as Computer mutator.
type Condition ¶
Condition is a hook condition function.
func HasAddedFields ¶
HasAddedFields is a condition validating `.AddedField` on fields.
func HasClearedFields ¶
HasClearedFields is a condition validating `.FieldCleared` on fields.
type DeploymentFunc ¶
The DeploymentFunc type is an adapter to allow the use of ordinary function as Deployment mutator.
type LogicalDiskFunc ¶
The LogicalDiskFunc type is an adapter to allow the use of ordinary function as LogicalDisk mutator.
type MemorySlotFunc ¶
The MemorySlotFunc type is an adapter to allow the use of ordinary function as MemorySlot mutator.
type MetadataFunc ¶
The MetadataFunc type is an adapter to allow the use of ordinary function as Metadata mutator.
type MonitorFunc ¶
The MonitorFunc type is an adapter to allow the use of ordinary function as Monitor mutator.
type NetworkAdapterFunc ¶
The NetworkAdapterFunc type is an adapter to allow the use of ordinary function as NetworkAdapter mutator.
type OperatingSystemFunc ¶
The OperatingSystemFunc type is an adapter to allow the use of ordinary function as OperatingSystem mutator.
type OrgMetadataFunc ¶
The OrgMetadataFunc type is an adapter to allow the use of ordinary function as OrgMetadata mutator.
type PhysicalDiskFunc ¶
The PhysicalDiskFunc type is an adapter to allow the use of ordinary function as PhysicalDisk mutator.
type PrinterFunc ¶
The PrinterFunc type is an adapter to allow the use of ordinary function as Printer mutator.
type ProfileFunc ¶
The ProfileFunc type is an adapter to allow the use of ordinary function as Profile mutator.
type ProfileIssueFunc ¶
The ProfileIssueFunc type is an adapter to allow the use of ordinary function as ProfileIssue mutator.
type ReleaseFunc ¶
The ReleaseFunc type is an adapter to allow the use of ordinary function as Release mutator.
type RevocationFunc ¶
The RevocationFunc type is an adapter to allow the use of ordinary function as Revocation mutator.
type RustdeskFunc ¶
The RustdeskFunc type is an adapter to allow the use of ordinary function as Rustdesk mutator.
type ServerFunc ¶
The ServerFunc type is an adapter to allow the use of ordinary function as Server mutator.
type SessionsFunc ¶
The SessionsFunc type is an adapter to allow the use of ordinary function as Sessions mutator.
type SettingsFunc ¶
The SettingsFunc type is an adapter to allow the use of ordinary function as Settings mutator.
type ShareFunc ¶
The ShareFunc type is an adapter to allow the use of ordinary function as Share mutator.
type SiteFunc ¶
The SiteFunc type is an adapter to allow the use of ordinary function as Site mutator.
type SystemUpdateFunc ¶
The SystemUpdateFunc type is an adapter to allow the use of ordinary function as SystemUpdate mutator.
type TaskFunc ¶
The TaskFunc type is an adapter to allow the use of ordinary function as Task mutator.
type TenantFunc ¶
The TenantFunc type is an adapter to allow the use of ordinary function as Tenant mutator.
type UpdateFunc ¶
The UpdateFunc type is an adapter to allow the use of ordinary function as Update mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type WingetConfigExclusionFunc ¶
type WingetConfigExclusionFunc func(context.Context, *ent.WingetConfigExclusionMutation) (ent.Value, error)
The WingetConfigExclusionFunc type is an adapter to allow the use of ordinary function as WingetConfigExclusion mutator.