Files
shaw 39e05a2dad feat: 新增全局错误透传规则功能
支持管理员配置上游错误如何返回给客户端:
- 新增 ErrorPassthroughRule 数据模型和 Ent Schema
- 实现规则的 CRUD API(/admin/error-passthrough-rules)
- 支持按错误码、关键词匹配,支持 any/all 匹配模式
- 支持按平台过滤(anthropic/openai/gemini/antigravity)
- 支持透传或自定义响应状态码和错误消息
- 实现两级缓存(Redis + 本地内存)和多实例同步
- 集成到 gateway_handler 的错误处理流程
- 新增前端管理界面组件
- 新增单元测试覆盖核心匹配逻辑

优化:
- 移除 refreshLocalCache 中的冗余排序(数据库已排序)
- 后端 Validate() 增加匹配条件非空校验
2026-02-05 21:52:54 +08:00

636 lines
26 KiB
Go

// Code generated by ent, DO NOT EDIT.
package errorpassthroughrule
import (
"time"
"entgo.io/ent/dialect/sql"
"github.com/Wei-Shaw/sub2api/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldID, id))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldUpdatedAt, v))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldName, v))
}
// Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
func Enabled(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldEnabled, v))
}
// Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.
func Priority(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPriority, v))
}
// MatchMode applies equality check predicate on the "match_mode" field. It's identical to MatchModeEQ.
func MatchMode(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldMatchMode, v))
}
// PassthroughCode applies equality check predicate on the "passthrough_code" field. It's identical to PassthroughCodeEQ.
func PassthroughCode(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPassthroughCode, v))
}
// ResponseCode applies equality check predicate on the "response_code" field. It's identical to ResponseCodeEQ.
func ResponseCode(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldResponseCode, v))
}
// PassthroughBody applies equality check predicate on the "passthrough_body" field. It's identical to PassthroughBodyEQ.
func PassthroughBody(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPassthroughBody, v))
}
// CustomMessage applies equality check predicate on the "custom_message" field. It's identical to CustomMessageEQ.
func CustomMessage(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldCustomMessage, v))
}
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func Description(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldDescription, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldUpdatedAt, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContainsFold(FieldName, v))
}
// EnabledEQ applies the EQ predicate on the "enabled" field.
func EnabledEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldEnabled, v))
}
// EnabledNEQ applies the NEQ predicate on the "enabled" field.
func EnabledNEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldEnabled, v))
}
// PriorityEQ applies the EQ predicate on the "priority" field.
func PriorityEQ(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPriority, v))
}
// PriorityNEQ applies the NEQ predicate on the "priority" field.
func PriorityNEQ(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldPriority, v))
}
// PriorityIn applies the In predicate on the "priority" field.
func PriorityIn(vs ...int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldPriority, vs...))
}
// PriorityNotIn applies the NotIn predicate on the "priority" field.
func PriorityNotIn(vs ...int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldPriority, vs...))
}
// PriorityGT applies the GT predicate on the "priority" field.
func PriorityGT(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldPriority, v))
}
// PriorityGTE applies the GTE predicate on the "priority" field.
func PriorityGTE(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldPriority, v))
}
// PriorityLT applies the LT predicate on the "priority" field.
func PriorityLT(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldPriority, v))
}
// PriorityLTE applies the LTE predicate on the "priority" field.
func PriorityLTE(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldPriority, v))
}
// ErrorCodesIsNil applies the IsNil predicate on the "error_codes" field.
func ErrorCodesIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldErrorCodes))
}
// ErrorCodesNotNil applies the NotNil predicate on the "error_codes" field.
func ErrorCodesNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldErrorCodes))
}
// KeywordsIsNil applies the IsNil predicate on the "keywords" field.
func KeywordsIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldKeywords))
}
// KeywordsNotNil applies the NotNil predicate on the "keywords" field.
func KeywordsNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldKeywords))
}
// MatchModeEQ applies the EQ predicate on the "match_mode" field.
func MatchModeEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldMatchMode, v))
}
// MatchModeNEQ applies the NEQ predicate on the "match_mode" field.
func MatchModeNEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldMatchMode, v))
}
// MatchModeIn applies the In predicate on the "match_mode" field.
func MatchModeIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldMatchMode, vs...))
}
// MatchModeNotIn applies the NotIn predicate on the "match_mode" field.
func MatchModeNotIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldMatchMode, vs...))
}
// MatchModeGT applies the GT predicate on the "match_mode" field.
func MatchModeGT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldMatchMode, v))
}
// MatchModeGTE applies the GTE predicate on the "match_mode" field.
func MatchModeGTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldMatchMode, v))
}
// MatchModeLT applies the LT predicate on the "match_mode" field.
func MatchModeLT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldMatchMode, v))
}
// MatchModeLTE applies the LTE predicate on the "match_mode" field.
func MatchModeLTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldMatchMode, v))
}
// MatchModeContains applies the Contains predicate on the "match_mode" field.
func MatchModeContains(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContains(FieldMatchMode, v))
}
// MatchModeHasPrefix applies the HasPrefix predicate on the "match_mode" field.
func MatchModeHasPrefix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasPrefix(FieldMatchMode, v))
}
// MatchModeHasSuffix applies the HasSuffix predicate on the "match_mode" field.
func MatchModeHasSuffix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasSuffix(FieldMatchMode, v))
}
// MatchModeEqualFold applies the EqualFold predicate on the "match_mode" field.
func MatchModeEqualFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEqualFold(FieldMatchMode, v))
}
// MatchModeContainsFold applies the ContainsFold predicate on the "match_mode" field.
func MatchModeContainsFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContainsFold(FieldMatchMode, v))
}
// PlatformsIsNil applies the IsNil predicate on the "platforms" field.
func PlatformsIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldPlatforms))
}
// PlatformsNotNil applies the NotNil predicate on the "platforms" field.
func PlatformsNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldPlatforms))
}
// PassthroughCodeEQ applies the EQ predicate on the "passthrough_code" field.
func PassthroughCodeEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPassthroughCode, v))
}
// PassthroughCodeNEQ applies the NEQ predicate on the "passthrough_code" field.
func PassthroughCodeNEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldPassthroughCode, v))
}
// ResponseCodeEQ applies the EQ predicate on the "response_code" field.
func ResponseCodeEQ(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldResponseCode, v))
}
// ResponseCodeNEQ applies the NEQ predicate on the "response_code" field.
func ResponseCodeNEQ(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldResponseCode, v))
}
// ResponseCodeIn applies the In predicate on the "response_code" field.
func ResponseCodeIn(vs ...int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldResponseCode, vs...))
}
// ResponseCodeNotIn applies the NotIn predicate on the "response_code" field.
func ResponseCodeNotIn(vs ...int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldResponseCode, vs...))
}
// ResponseCodeGT applies the GT predicate on the "response_code" field.
func ResponseCodeGT(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldResponseCode, v))
}
// ResponseCodeGTE applies the GTE predicate on the "response_code" field.
func ResponseCodeGTE(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldResponseCode, v))
}
// ResponseCodeLT applies the LT predicate on the "response_code" field.
func ResponseCodeLT(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldResponseCode, v))
}
// ResponseCodeLTE applies the LTE predicate on the "response_code" field.
func ResponseCodeLTE(v int) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldResponseCode, v))
}
// ResponseCodeIsNil applies the IsNil predicate on the "response_code" field.
func ResponseCodeIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldResponseCode))
}
// ResponseCodeNotNil applies the NotNil predicate on the "response_code" field.
func ResponseCodeNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldResponseCode))
}
// PassthroughBodyEQ applies the EQ predicate on the "passthrough_body" field.
func PassthroughBodyEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldPassthroughBody, v))
}
// PassthroughBodyNEQ applies the NEQ predicate on the "passthrough_body" field.
func PassthroughBodyNEQ(v bool) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldPassthroughBody, v))
}
// CustomMessageEQ applies the EQ predicate on the "custom_message" field.
func CustomMessageEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldCustomMessage, v))
}
// CustomMessageNEQ applies the NEQ predicate on the "custom_message" field.
func CustomMessageNEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldCustomMessage, v))
}
// CustomMessageIn applies the In predicate on the "custom_message" field.
func CustomMessageIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldCustomMessage, vs...))
}
// CustomMessageNotIn applies the NotIn predicate on the "custom_message" field.
func CustomMessageNotIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldCustomMessage, vs...))
}
// CustomMessageGT applies the GT predicate on the "custom_message" field.
func CustomMessageGT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldCustomMessage, v))
}
// CustomMessageGTE applies the GTE predicate on the "custom_message" field.
func CustomMessageGTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldCustomMessage, v))
}
// CustomMessageLT applies the LT predicate on the "custom_message" field.
func CustomMessageLT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldCustomMessage, v))
}
// CustomMessageLTE applies the LTE predicate on the "custom_message" field.
func CustomMessageLTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldCustomMessage, v))
}
// CustomMessageContains applies the Contains predicate on the "custom_message" field.
func CustomMessageContains(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContains(FieldCustomMessage, v))
}
// CustomMessageHasPrefix applies the HasPrefix predicate on the "custom_message" field.
func CustomMessageHasPrefix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasPrefix(FieldCustomMessage, v))
}
// CustomMessageHasSuffix applies the HasSuffix predicate on the "custom_message" field.
func CustomMessageHasSuffix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasSuffix(FieldCustomMessage, v))
}
// CustomMessageIsNil applies the IsNil predicate on the "custom_message" field.
func CustomMessageIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldCustomMessage))
}
// CustomMessageNotNil applies the NotNil predicate on the "custom_message" field.
func CustomMessageNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldCustomMessage))
}
// CustomMessageEqualFold applies the EqualFold predicate on the "custom_message" field.
func CustomMessageEqualFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEqualFold(FieldCustomMessage, v))
}
// CustomMessageContainsFold applies the ContainsFold predicate on the "custom_message" field.
func CustomMessageContainsFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContainsFold(FieldCustomMessage, v))
}
// DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEQ(FieldDescription, v))
}
// DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNEQ(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNEQ(FieldDescription, v))
}
// DescriptionIn applies the In predicate on the "description" field.
func DescriptionIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIn(FieldDescription, vs...))
}
// DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotIn(vs ...string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotIn(FieldDescription, vs...))
}
// DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGT(FieldDescription, v))
}
// DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionGTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldGTE(FieldDescription, v))
}
// DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLT(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLT(FieldDescription, v))
}
// DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionLTE(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldLTE(FieldDescription, v))
}
// DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContains(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContains(FieldDescription, v))
}
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasPrefix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasPrefix(FieldDescription, v))
}
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionHasSuffix(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldHasSuffix(FieldDescription, v))
}
// DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionIsNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldIsNull(FieldDescription))
}
// DescriptionNotNil applies the NotNil predicate on the "description" field.
func DescriptionNotNil() predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldNotNull(FieldDescription))
}
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionEqualFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldEqualFold(FieldDescription, v))
}
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionContainsFold(v string) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.FieldContainsFold(FieldDescription, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.ErrorPassthroughRule) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.ErrorPassthroughRule) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.ErrorPassthroughRule) predicate.ErrorPassthroughRule {
return predicate.ErrorPassthroughRule(sql.NotPredicates(p))
}