doc: add hook helpers to ent website (#729)

This commit is contained in:
Ariel Mashraki
2020-09-06 10:07:41 +03:00
committed by GitHub
parent e4767ed83e
commit feed51d773
27 changed files with 92 additions and 50 deletions

View File

@@ -133,7 +133,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -133,7 +133,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -133,7 +133,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -133,7 +133,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -120,7 +120,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -146,7 +146,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {

View File

@@ -146,7 +146,7 @@ func HasFields(field string, fields ...string) Condition {
// If executes the given hook under condition.
//
// Hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
//
func If(hk ent.Hook, cond Condition) ent.Hook {
return func(next ent.Mutator) ent.Mutator {