- Implement Audit Service (2.5) - gRPC server with Record and Query operations - Database persistence with audit schema - Service registry integration - Entry point: cmd/audit-service - Implement Identity Service (2.2) - User CRUD operations - Password hashing with argon2id - Email verification and password reset flows - Entry point: cmd/identity-service - Fix package naming conflicts in user_service.go - Implement Auth Service (2.1) - JWT token generation and validation - Login, RefreshToken, ValidateToken, Logout RPCs - Integration with Identity Service - Entry point: cmd/auth-service - Note: RefreshToken entity needs Ent generation - Implement Authz Service (2.3, 2.4) - Permission checking and authorization - User roles and permissions retrieval - RBAC-based authorization - Entry point: cmd/authz-service - Implement gRPC clients for all services - Auth, Identity, Authz, and Audit clients - Service discovery integration - Full gRPC communication - Add service configurations to config/default.yaml - Create SUMMARY.md with implementation details and testing instructions - Fix compilation errors in Identity Service (password package conflicts) - All services build successfully and tests pass
596 lines
21 KiB
Go
596 lines
21 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package auditlog
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"git.dcentral.systems/toolz/goplt/internal/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// IDEqualFold applies the EqualFold predicate on the ID field.
|
|
func IDEqualFold(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldID, id))
|
|
}
|
|
|
|
// IDContainsFold applies the ContainsFold predicate on the ID field.
|
|
func IDContainsFold(id string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldID, id))
|
|
}
|
|
|
|
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
|
func UserID(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// Action applies equality check predicate on the "action" field. It's identical to ActionEQ.
|
|
func Action(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldAction, v))
|
|
}
|
|
|
|
// Resource applies equality check predicate on the "resource" field. It's identical to ResourceEQ.
|
|
func Resource(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldResource, v))
|
|
}
|
|
|
|
// ResourceID applies equality check predicate on the "resource_id" field. It's identical to ResourceIDEQ.
|
|
func ResourceID(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldResourceID, v))
|
|
}
|
|
|
|
// IPAddress applies equality check predicate on the "ip_address" field. It's identical to IPAddressEQ.
|
|
func IPAddress(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldIPAddress, v))
|
|
}
|
|
|
|
// UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.
|
|
func UserAgent(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldUserAgent, v))
|
|
}
|
|
|
|
// Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.
|
|
func Timestamp(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldTimestamp, v))
|
|
}
|
|
|
|
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
|
func UserIDEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
|
func UserIDNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDIn applies the In predicate on the "user_id" field.
|
|
func UserIDIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
|
func UserIDNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDGT applies the GT predicate on the "user_id" field.
|
|
func UserIDGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDGTE applies the GTE predicate on the "user_id" field.
|
|
func UserIDGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDLT applies the LT predicate on the "user_id" field.
|
|
func UserIDLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDLTE applies the LTE predicate on the "user_id" field.
|
|
func UserIDLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDContains applies the Contains predicate on the "user_id" field.
|
|
func UserIDContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.
|
|
func UserIDHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.
|
|
func UserIDHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDEqualFold applies the EqualFold predicate on the "user_id" field.
|
|
func UserIDEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.
|
|
func UserIDContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldUserID, v))
|
|
}
|
|
|
|
// ActionEQ applies the EQ predicate on the "action" field.
|
|
func ActionEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldAction, v))
|
|
}
|
|
|
|
// ActionNEQ applies the NEQ predicate on the "action" field.
|
|
func ActionNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldAction, v))
|
|
}
|
|
|
|
// ActionIn applies the In predicate on the "action" field.
|
|
func ActionIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldAction, vs...))
|
|
}
|
|
|
|
// ActionNotIn applies the NotIn predicate on the "action" field.
|
|
func ActionNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldAction, vs...))
|
|
}
|
|
|
|
// ActionGT applies the GT predicate on the "action" field.
|
|
func ActionGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldAction, v))
|
|
}
|
|
|
|
// ActionGTE applies the GTE predicate on the "action" field.
|
|
func ActionGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldAction, v))
|
|
}
|
|
|
|
// ActionLT applies the LT predicate on the "action" field.
|
|
func ActionLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldAction, v))
|
|
}
|
|
|
|
// ActionLTE applies the LTE predicate on the "action" field.
|
|
func ActionLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldAction, v))
|
|
}
|
|
|
|
// ActionContains applies the Contains predicate on the "action" field.
|
|
func ActionContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldAction, v))
|
|
}
|
|
|
|
// ActionHasPrefix applies the HasPrefix predicate on the "action" field.
|
|
func ActionHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldAction, v))
|
|
}
|
|
|
|
// ActionHasSuffix applies the HasSuffix predicate on the "action" field.
|
|
func ActionHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldAction, v))
|
|
}
|
|
|
|
// ActionEqualFold applies the EqualFold predicate on the "action" field.
|
|
func ActionEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldAction, v))
|
|
}
|
|
|
|
// ActionContainsFold applies the ContainsFold predicate on the "action" field.
|
|
func ActionContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldAction, v))
|
|
}
|
|
|
|
// ResourceEQ applies the EQ predicate on the "resource" field.
|
|
func ResourceEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldResource, v))
|
|
}
|
|
|
|
// ResourceNEQ applies the NEQ predicate on the "resource" field.
|
|
func ResourceNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldResource, v))
|
|
}
|
|
|
|
// ResourceIn applies the In predicate on the "resource" field.
|
|
func ResourceIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldResource, vs...))
|
|
}
|
|
|
|
// ResourceNotIn applies the NotIn predicate on the "resource" field.
|
|
func ResourceNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldResource, vs...))
|
|
}
|
|
|
|
// ResourceGT applies the GT predicate on the "resource" field.
|
|
func ResourceGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldResource, v))
|
|
}
|
|
|
|
// ResourceGTE applies the GTE predicate on the "resource" field.
|
|
func ResourceGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldResource, v))
|
|
}
|
|
|
|
// ResourceLT applies the LT predicate on the "resource" field.
|
|
func ResourceLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldResource, v))
|
|
}
|
|
|
|
// ResourceLTE applies the LTE predicate on the "resource" field.
|
|
func ResourceLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldResource, v))
|
|
}
|
|
|
|
// ResourceContains applies the Contains predicate on the "resource" field.
|
|
func ResourceContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldResource, v))
|
|
}
|
|
|
|
// ResourceHasPrefix applies the HasPrefix predicate on the "resource" field.
|
|
func ResourceHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldResource, v))
|
|
}
|
|
|
|
// ResourceHasSuffix applies the HasSuffix predicate on the "resource" field.
|
|
func ResourceHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldResource, v))
|
|
}
|
|
|
|
// ResourceIsNil applies the IsNil predicate on the "resource" field.
|
|
func ResourceIsNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIsNull(FieldResource))
|
|
}
|
|
|
|
// ResourceNotNil applies the NotNil predicate on the "resource" field.
|
|
func ResourceNotNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotNull(FieldResource))
|
|
}
|
|
|
|
// ResourceEqualFold applies the EqualFold predicate on the "resource" field.
|
|
func ResourceEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldResource, v))
|
|
}
|
|
|
|
// ResourceContainsFold applies the ContainsFold predicate on the "resource" field.
|
|
func ResourceContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldResource, v))
|
|
}
|
|
|
|
// ResourceIDEQ applies the EQ predicate on the "resource_id" field.
|
|
func ResourceIDEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDNEQ applies the NEQ predicate on the "resource_id" field.
|
|
func ResourceIDNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDIn applies the In predicate on the "resource_id" field.
|
|
func ResourceIDIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldResourceID, vs...))
|
|
}
|
|
|
|
// ResourceIDNotIn applies the NotIn predicate on the "resource_id" field.
|
|
func ResourceIDNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldResourceID, vs...))
|
|
}
|
|
|
|
// ResourceIDGT applies the GT predicate on the "resource_id" field.
|
|
func ResourceIDGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDGTE applies the GTE predicate on the "resource_id" field.
|
|
func ResourceIDGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDLT applies the LT predicate on the "resource_id" field.
|
|
func ResourceIDLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDLTE applies the LTE predicate on the "resource_id" field.
|
|
func ResourceIDLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDContains applies the Contains predicate on the "resource_id" field.
|
|
func ResourceIDContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDHasPrefix applies the HasPrefix predicate on the "resource_id" field.
|
|
func ResourceIDHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDHasSuffix applies the HasSuffix predicate on the "resource_id" field.
|
|
func ResourceIDHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDIsNil applies the IsNil predicate on the "resource_id" field.
|
|
func ResourceIDIsNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIsNull(FieldResourceID))
|
|
}
|
|
|
|
// ResourceIDNotNil applies the NotNil predicate on the "resource_id" field.
|
|
func ResourceIDNotNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotNull(FieldResourceID))
|
|
}
|
|
|
|
// ResourceIDEqualFold applies the EqualFold predicate on the "resource_id" field.
|
|
func ResourceIDEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldResourceID, v))
|
|
}
|
|
|
|
// ResourceIDContainsFold applies the ContainsFold predicate on the "resource_id" field.
|
|
func ResourceIDContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldResourceID, v))
|
|
}
|
|
|
|
// IPAddressEQ applies the EQ predicate on the "ip_address" field.
|
|
func IPAddressEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressNEQ applies the NEQ predicate on the "ip_address" field.
|
|
func IPAddressNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressIn applies the In predicate on the "ip_address" field.
|
|
func IPAddressIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldIPAddress, vs...))
|
|
}
|
|
|
|
// IPAddressNotIn applies the NotIn predicate on the "ip_address" field.
|
|
func IPAddressNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldIPAddress, vs...))
|
|
}
|
|
|
|
// IPAddressGT applies the GT predicate on the "ip_address" field.
|
|
func IPAddressGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressGTE applies the GTE predicate on the "ip_address" field.
|
|
func IPAddressGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressLT applies the LT predicate on the "ip_address" field.
|
|
func IPAddressLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressLTE applies the LTE predicate on the "ip_address" field.
|
|
func IPAddressLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressContains applies the Contains predicate on the "ip_address" field.
|
|
func IPAddressContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressHasPrefix applies the HasPrefix predicate on the "ip_address" field.
|
|
func IPAddressHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressHasSuffix applies the HasSuffix predicate on the "ip_address" field.
|
|
func IPAddressHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressIsNil applies the IsNil predicate on the "ip_address" field.
|
|
func IPAddressIsNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIsNull(FieldIPAddress))
|
|
}
|
|
|
|
// IPAddressNotNil applies the NotNil predicate on the "ip_address" field.
|
|
func IPAddressNotNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotNull(FieldIPAddress))
|
|
}
|
|
|
|
// IPAddressEqualFold applies the EqualFold predicate on the "ip_address" field.
|
|
func IPAddressEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldIPAddress, v))
|
|
}
|
|
|
|
// IPAddressContainsFold applies the ContainsFold predicate on the "ip_address" field.
|
|
func IPAddressContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldIPAddress, v))
|
|
}
|
|
|
|
// UserAgentEQ applies the EQ predicate on the "user_agent" field.
|
|
func UserAgentEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentNEQ applies the NEQ predicate on the "user_agent" field.
|
|
func UserAgentNEQ(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentIn applies the In predicate on the "user_agent" field.
|
|
func UserAgentIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldUserAgent, vs...))
|
|
}
|
|
|
|
// UserAgentNotIn applies the NotIn predicate on the "user_agent" field.
|
|
func UserAgentNotIn(vs ...string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldUserAgent, vs...))
|
|
}
|
|
|
|
// UserAgentGT applies the GT predicate on the "user_agent" field.
|
|
func UserAgentGT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentGTE applies the GTE predicate on the "user_agent" field.
|
|
func UserAgentGTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentLT applies the LT predicate on the "user_agent" field.
|
|
func UserAgentLT(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentLTE applies the LTE predicate on the "user_agent" field.
|
|
func UserAgentLTE(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentContains applies the Contains predicate on the "user_agent" field.
|
|
func UserAgentContains(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContains(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.
|
|
func UserAgentHasPrefix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasPrefix(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.
|
|
func UserAgentHasSuffix(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldHasSuffix(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentIsNil applies the IsNil predicate on the "user_agent" field.
|
|
func UserAgentIsNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIsNull(FieldUserAgent))
|
|
}
|
|
|
|
// UserAgentNotNil applies the NotNil predicate on the "user_agent" field.
|
|
func UserAgentNotNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotNull(FieldUserAgent))
|
|
}
|
|
|
|
// UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.
|
|
func UserAgentEqualFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEqualFold(FieldUserAgent, v))
|
|
}
|
|
|
|
// UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.
|
|
func UserAgentContainsFold(v string) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldContainsFold(FieldUserAgent, v))
|
|
}
|
|
|
|
// MetadataIsNil applies the IsNil predicate on the "metadata" field.
|
|
func MetadataIsNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIsNull(FieldMetadata))
|
|
}
|
|
|
|
// MetadataNotNil applies the NotNil predicate on the "metadata" field.
|
|
func MetadataNotNil() predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotNull(FieldMetadata))
|
|
}
|
|
|
|
// TimestampEQ applies the EQ predicate on the "timestamp" field.
|
|
func TimestampEQ(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldEQ(FieldTimestamp, v))
|
|
}
|
|
|
|
// TimestampNEQ applies the NEQ predicate on the "timestamp" field.
|
|
func TimestampNEQ(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNEQ(FieldTimestamp, v))
|
|
}
|
|
|
|
// TimestampIn applies the In predicate on the "timestamp" field.
|
|
func TimestampIn(vs ...time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldIn(FieldTimestamp, vs...))
|
|
}
|
|
|
|
// TimestampNotIn applies the NotIn predicate on the "timestamp" field.
|
|
func TimestampNotIn(vs ...time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldNotIn(FieldTimestamp, vs...))
|
|
}
|
|
|
|
// TimestampGT applies the GT predicate on the "timestamp" field.
|
|
func TimestampGT(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGT(FieldTimestamp, v))
|
|
}
|
|
|
|
// TimestampGTE applies the GTE predicate on the "timestamp" field.
|
|
func TimestampGTE(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldGTE(FieldTimestamp, v))
|
|
}
|
|
|
|
// TimestampLT applies the LT predicate on the "timestamp" field.
|
|
func TimestampLT(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLT(FieldTimestamp, v))
|
|
}
|
|
|
|
// TimestampLTE applies the LTE predicate on the "timestamp" field.
|
|
func TimestampLTE(v time.Time) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.FieldLTE(FieldTimestamp, v))
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.AuditLog) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.AuditLog) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.AuditLog) predicate.AuditLog {
|
|
return predicate.AuditLog(sql.NotPredicates(p))
|
|
}
|