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 ActivityEventFunc
- type AgentActivityInstanceFunc
- type AgentFunc
- type AgentProviderFunc
- type AgentRawEventFunc
- type AgentRunFunc
- type AgentStepEventFunc
- type AgentTokenFunc
- type AgentTraceEventFunc
- type AgentTranscriptEntryFunc
- type ApprovalPolicyRuleFunc
- type AuthAuditEventFunc
- type BrowserSessionFunc
- type Chain
- type ChatConversationFunc
- type ChatEntryFunc
- type ChatPendingInterruptFunc
- type ChatTurnFunc
- 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 InstanceAuthConfigFunc
- type LocalBootstrapAuthRequestFunc
- type MachineChannelTokenFunc
- type MachineFunc
- type NotificationChannelFunc
- type NotificationRuleFunc
- type OrganizationDailyTokenUsageFunc
- type OrganizationFunc
- type OrganizationInvitationFunc
- type OrganizationMembershipFunc
- type ProjectConversationPrincipalFunc
- type ProjectConversationRunFunc
- type ProjectConversationStepEventFunc
- type ProjectConversationTraceEventFunc
- type ProjectDailyTokenUsageFunc
- type ProjectFunc
- type ProjectRepoFunc
- type ProjectUpdateCommentFunc
- type ProjectUpdateCommentRevisionFunc
- type ProjectUpdateThreadFunc
- type ProjectUpdateThreadRevisionFunc
- type RoleBindingFunc
- type ScheduledJobFunc
- type SecretBindingFunc
- type SecretFunc
- type SkillBlobFunc
- type SkillFunc
- type SkillVersionFileFunc
- type SkillVersionFunc
- type TicketCommentFunc
- type TicketCommentRevisionFunc
- type TicketDependencyFunc
- type TicketExternalLinkFunc
- type TicketFunc
- type TicketRepoScopeFunc
- type TicketRepoWorkspaceFunc
- type TicketStatusFunc
- type UserFunc
- type UserGroupMembershipFunc
- type UserIdentityFunc
- type WorkflowFunc
- type WorkflowSkillBindingFunc
- type WorkflowVersionFunc
- type WorkspaceInitLeaseFunc
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 ActivityEventFunc ¶
The ActivityEventFunc type is an adapter to allow the use of ordinary function as ActivityEvent mutator.
type AgentActivityInstanceFunc ¶ added in v0.5.0
type AgentActivityInstanceFunc func(context.Context, *ent.AgentActivityInstanceMutation) (ent.Value, error)
The AgentActivityInstanceFunc type is an adapter to allow the use of ordinary function as AgentActivityInstance mutator.
type AgentFunc ¶
The AgentFunc type is an adapter to allow the use of ordinary function as Agent mutator.
type AgentProviderFunc ¶
The AgentProviderFunc type is an adapter to allow the use of ordinary function as AgentProvider mutator.
type AgentRawEventFunc ¶ added in v0.5.0
The AgentRawEventFunc type is an adapter to allow the use of ordinary function as AgentRawEvent mutator.
type AgentRunFunc ¶
The AgentRunFunc type is an adapter to allow the use of ordinary function as AgentRun mutator.
type AgentStepEventFunc ¶
The AgentStepEventFunc type is an adapter to allow the use of ordinary function as AgentStepEvent mutator.
type AgentTokenFunc ¶
The AgentTokenFunc type is an adapter to allow the use of ordinary function as AgentToken mutator.
type AgentTraceEventFunc ¶
The AgentTraceEventFunc type is an adapter to allow the use of ordinary function as AgentTraceEvent mutator.
type AgentTranscriptEntryFunc ¶ added in v0.5.0
type AgentTranscriptEntryFunc func(context.Context, *ent.AgentTranscriptEntryMutation) (ent.Value, error)
The AgentTranscriptEntryFunc type is an adapter to allow the use of ordinary function as AgentTranscriptEntry mutator.
type ApprovalPolicyRuleFunc ¶
type ApprovalPolicyRuleFunc func(context.Context, *ent.ApprovalPolicyRuleMutation) (ent.Value, error)
The ApprovalPolicyRuleFunc type is an adapter to allow the use of ordinary function as ApprovalPolicyRule mutator.
type AuthAuditEventFunc ¶ added in v0.3.0
The AuthAuditEventFunc type is an adapter to allow the use of ordinary function as AuthAuditEvent mutator.
type BrowserSessionFunc ¶
The BrowserSessionFunc type is an adapter to allow the use of ordinary function as BrowserSession 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 ChatConversationFunc ¶
The ChatConversationFunc type is an adapter to allow the use of ordinary function as ChatConversation mutator.
type ChatEntryFunc ¶
The ChatEntryFunc type is an adapter to allow the use of ordinary function as ChatEntry mutator.
type ChatPendingInterruptFunc ¶
type ChatPendingInterruptFunc func(context.Context, *ent.ChatPendingInterruptMutation) (ent.Value, error)
The ChatPendingInterruptFunc type is an adapter to allow the use of ordinary function as ChatPendingInterrupt mutator.
type ChatTurnFunc ¶
The ChatTurnFunc type is an adapter to allow the use of ordinary function as ChatTurn 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 InstanceAuthConfigFunc ¶ added in v0.3.0
type InstanceAuthConfigFunc func(context.Context, *ent.InstanceAuthConfigMutation) (ent.Value, error)
The InstanceAuthConfigFunc type is an adapter to allow the use of ordinary function as InstanceAuthConfig mutator.
type LocalBootstrapAuthRequestFunc ¶ added in v0.3.0
type LocalBootstrapAuthRequestFunc func(context.Context, *ent.LocalBootstrapAuthRequestMutation) (ent.Value, error)
The LocalBootstrapAuthRequestFunc type is an adapter to allow the use of ordinary function as LocalBootstrapAuthRequest mutator.
type MachineChannelTokenFunc ¶
type MachineChannelTokenFunc func(context.Context, *ent.MachineChannelTokenMutation) (ent.Value, error)
The MachineChannelTokenFunc type is an adapter to allow the use of ordinary function as MachineChannelToken mutator.
type MachineFunc ¶
The MachineFunc type is an adapter to allow the use of ordinary function as Machine mutator.
type NotificationChannelFunc ¶
type NotificationChannelFunc func(context.Context, *ent.NotificationChannelMutation) (ent.Value, error)
The NotificationChannelFunc type is an adapter to allow the use of ordinary function as NotificationChannel mutator.
type NotificationRuleFunc ¶
The NotificationRuleFunc type is an adapter to allow the use of ordinary function as NotificationRule mutator.
type OrganizationDailyTokenUsageFunc ¶
type OrganizationDailyTokenUsageFunc func(context.Context, *ent.OrganizationDailyTokenUsageMutation) (ent.Value, error)
The OrganizationDailyTokenUsageFunc type is an adapter to allow the use of ordinary function as OrganizationDailyTokenUsage mutator.
type OrganizationFunc ¶
The OrganizationFunc type is an adapter to allow the use of ordinary function as Organization mutator.
type OrganizationInvitationFunc ¶ added in v0.3.0
type OrganizationInvitationFunc func(context.Context, *ent.OrganizationInvitationMutation) (ent.Value, error)
The OrganizationInvitationFunc type is an adapter to allow the use of ordinary function as OrganizationInvitation mutator.
type OrganizationMembershipFunc ¶ added in v0.3.0
type OrganizationMembershipFunc func(context.Context, *ent.OrganizationMembershipMutation) (ent.Value, error)
The OrganizationMembershipFunc type is an adapter to allow the use of ordinary function as OrganizationMembership mutator.
type ProjectConversationPrincipalFunc ¶
type ProjectConversationPrincipalFunc func(context.Context, *ent.ProjectConversationPrincipalMutation) (ent.Value, error)
The ProjectConversationPrincipalFunc type is an adapter to allow the use of ordinary function as ProjectConversationPrincipal mutator.
type ProjectConversationRunFunc ¶
type ProjectConversationRunFunc func(context.Context, *ent.ProjectConversationRunMutation) (ent.Value, error)
The ProjectConversationRunFunc type is an adapter to allow the use of ordinary function as ProjectConversationRun mutator.
type ProjectConversationStepEventFunc ¶
type ProjectConversationStepEventFunc func(context.Context, *ent.ProjectConversationStepEventMutation) (ent.Value, error)
The ProjectConversationStepEventFunc type is an adapter to allow the use of ordinary function as ProjectConversationStepEvent mutator.
type ProjectConversationTraceEventFunc ¶
type ProjectConversationTraceEventFunc func(context.Context, *ent.ProjectConversationTraceEventMutation) (ent.Value, error)
The ProjectConversationTraceEventFunc type is an adapter to allow the use of ordinary function as ProjectConversationTraceEvent mutator.
type ProjectDailyTokenUsageFunc ¶ added in v0.4.0
type ProjectDailyTokenUsageFunc func(context.Context, *ent.ProjectDailyTokenUsageMutation) (ent.Value, error)
The ProjectDailyTokenUsageFunc type is an adapter to allow the use of ordinary function as ProjectDailyTokenUsage mutator.
type ProjectFunc ¶
The ProjectFunc type is an adapter to allow the use of ordinary function as Project mutator.
type ProjectRepoFunc ¶
The ProjectRepoFunc type is an adapter to allow the use of ordinary function as ProjectRepo mutator.
type ProjectUpdateCommentFunc ¶
type ProjectUpdateCommentFunc func(context.Context, *ent.ProjectUpdateCommentMutation) (ent.Value, error)
The ProjectUpdateCommentFunc type is an adapter to allow the use of ordinary function as ProjectUpdateComment mutator.
type ProjectUpdateCommentRevisionFunc ¶
type ProjectUpdateCommentRevisionFunc func(context.Context, *ent.ProjectUpdateCommentRevisionMutation) (ent.Value, error)
The ProjectUpdateCommentRevisionFunc type is an adapter to allow the use of ordinary function as ProjectUpdateCommentRevision mutator.
type ProjectUpdateThreadFunc ¶
type ProjectUpdateThreadFunc func(context.Context, *ent.ProjectUpdateThreadMutation) (ent.Value, error)
The ProjectUpdateThreadFunc type is an adapter to allow the use of ordinary function as ProjectUpdateThread mutator.
type ProjectUpdateThreadRevisionFunc ¶
type ProjectUpdateThreadRevisionFunc func(context.Context, *ent.ProjectUpdateThreadRevisionMutation) (ent.Value, error)
The ProjectUpdateThreadRevisionFunc type is an adapter to allow the use of ordinary function as ProjectUpdateThreadRevision mutator.
type RoleBindingFunc ¶
The RoleBindingFunc type is an adapter to allow the use of ordinary function as RoleBinding mutator.
type ScheduledJobFunc ¶
The ScheduledJobFunc type is an adapter to allow the use of ordinary function as ScheduledJob mutator.
type SecretBindingFunc ¶ added in v0.3.0
The SecretBindingFunc type is an adapter to allow the use of ordinary function as SecretBinding mutator.
type SecretFunc ¶ added in v0.3.0
The SecretFunc type is an adapter to allow the use of ordinary function as Secret mutator.
type SkillBlobFunc ¶
The SkillBlobFunc type is an adapter to allow the use of ordinary function as SkillBlob mutator.
type SkillFunc ¶
The SkillFunc type is an adapter to allow the use of ordinary function as Skill mutator.
type SkillVersionFileFunc ¶
The SkillVersionFileFunc type is an adapter to allow the use of ordinary function as SkillVersionFile mutator.
type SkillVersionFunc ¶
The SkillVersionFunc type is an adapter to allow the use of ordinary function as SkillVersion mutator.
type TicketCommentFunc ¶
The TicketCommentFunc type is an adapter to allow the use of ordinary function as TicketComment mutator.
type TicketCommentRevisionFunc ¶
type TicketCommentRevisionFunc func(context.Context, *ent.TicketCommentRevisionMutation) (ent.Value, error)
The TicketCommentRevisionFunc type is an adapter to allow the use of ordinary function as TicketCommentRevision mutator.
type TicketDependencyFunc ¶
The TicketDependencyFunc type is an adapter to allow the use of ordinary function as TicketDependency mutator.
type TicketExternalLinkFunc ¶
type TicketExternalLinkFunc func(context.Context, *ent.TicketExternalLinkMutation) (ent.Value, error)
The TicketExternalLinkFunc type is an adapter to allow the use of ordinary function as TicketExternalLink mutator.
type TicketFunc ¶
The TicketFunc type is an adapter to allow the use of ordinary function as Ticket mutator.
type TicketRepoScopeFunc ¶
The TicketRepoScopeFunc type is an adapter to allow the use of ordinary function as TicketRepoScope mutator.
type TicketRepoWorkspaceFunc ¶
type TicketRepoWorkspaceFunc func(context.Context, *ent.TicketRepoWorkspaceMutation) (ent.Value, error)
The TicketRepoWorkspaceFunc type is an adapter to allow the use of ordinary function as TicketRepoWorkspace mutator.
type TicketStatusFunc ¶
The TicketStatusFunc type is an adapter to allow the use of ordinary function as TicketStatus mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type UserGroupMembershipFunc ¶
type UserGroupMembershipFunc func(context.Context, *ent.UserGroupMembershipMutation) (ent.Value, error)
The UserGroupMembershipFunc type is an adapter to allow the use of ordinary function as UserGroupMembership mutator.
type UserIdentityFunc ¶
The UserIdentityFunc type is an adapter to allow the use of ordinary function as UserIdentity mutator.
type WorkflowFunc ¶
The WorkflowFunc type is an adapter to allow the use of ordinary function as Workflow mutator.
type WorkflowSkillBindingFunc ¶
type WorkflowSkillBindingFunc func(context.Context, *ent.WorkflowSkillBindingMutation) (ent.Value, error)
The WorkflowSkillBindingFunc type is an adapter to allow the use of ordinary function as WorkflowSkillBinding mutator.
type WorkflowVersionFunc ¶
The WorkflowVersionFunc type is an adapter to allow the use of ordinary function as WorkflowVersion mutator.
type WorkspaceInitLeaseFunc ¶ added in v0.4.0
type WorkspaceInitLeaseFunc func(context.Context, *ent.WorkspaceInitLeaseMutation) (ent.Value, error)
The WorkspaceInitLeaseFunc type is an adapter to allow the use of ordinary function as WorkspaceInitLease mutator.