audit

package
v0.0.0-...-481d40d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the audit type in the database.
	Label = "audit"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldOperation holds the string denoting the operation field in the database.
	FieldOperation = "operation"
	// FieldSourceIP holds the string denoting the source_ip field in the database.
	FieldSourceIP = "source_ip"
	// FieldUserAgent holds the string denoting the user_agent field in the database.
	FieldUserAgent = "user_agent"
	// FieldRequest holds the string denoting the request field in the database.
	FieldRequest = "request"
	// FieldResponse holds the string denoting the response field in the database.
	FieldResponse = "response"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the audit in the database.
	Table = "audits"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "audits"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
)

Variables

Columns holds all SQL columns for audit fields.

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Functions

func And

func And(predicates ...predicate.Audit) predicate.Audit

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Audit

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Audit

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Audit

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Audit

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Audit

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Audit

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Audit

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Audit

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Audit

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasUser

func HasUser() predicate.Audit

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Audit

HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).

func ID

func ID(id uuid.UUID) predicate.Audit

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Audit

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Audit

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Audit

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Audit

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Audit

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Audit

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Audit

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Audit

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Operation

func Operation(v string) predicate.Audit

Operation applies equality check predicate on the "operation" field. It's identical to OperationEQ.

func OperationContains

func OperationContains(v string) predicate.Audit

OperationContains applies the Contains predicate on the "operation" field.

func OperationContainsFold

func OperationContainsFold(v string) predicate.Audit

OperationContainsFold applies the ContainsFold predicate on the "operation" field.

func OperationEQ

func OperationEQ(v string) predicate.Audit

OperationEQ applies the EQ predicate on the "operation" field.

func OperationEqualFold

func OperationEqualFold(v string) predicate.Audit

OperationEqualFold applies the EqualFold predicate on the "operation" field.

func OperationGT

func OperationGT(v string) predicate.Audit

OperationGT applies the GT predicate on the "operation" field.

func OperationGTE

func OperationGTE(v string) predicate.Audit

OperationGTE applies the GTE predicate on the "operation" field.

func OperationHasPrefix

func OperationHasPrefix(v string) predicate.Audit

OperationHasPrefix applies the HasPrefix predicate on the "operation" field.

func OperationHasSuffix

func OperationHasSuffix(v string) predicate.Audit

OperationHasSuffix applies the HasSuffix predicate on the "operation" field.

func OperationIn

func OperationIn(vs ...string) predicate.Audit

OperationIn applies the In predicate on the "operation" field.

func OperationLT

func OperationLT(v string) predicate.Audit

OperationLT applies the LT predicate on the "operation" field.

func OperationLTE

func OperationLTE(v string) predicate.Audit

OperationLTE applies the LTE predicate on the "operation" field.

func OperationNEQ

func OperationNEQ(v string) predicate.Audit

OperationNEQ applies the NEQ predicate on the "operation" field.

func OperationNotIn

func OperationNotIn(vs ...string) predicate.Audit

OperationNotIn applies the NotIn predicate on the "operation" field.

func Or

func Or(predicates ...predicate.Audit) predicate.Audit

Or groups predicates with the OR operator between them.

func Request

func Request(v string) predicate.Audit

Request applies equality check predicate on the "request" field. It's identical to RequestEQ.

func RequestContains

func RequestContains(v string) predicate.Audit

RequestContains applies the Contains predicate on the "request" field.

func RequestContainsFold

func RequestContainsFold(v string) predicate.Audit

RequestContainsFold applies the ContainsFold predicate on the "request" field.

func RequestEQ

func RequestEQ(v string) predicate.Audit

RequestEQ applies the EQ predicate on the "request" field.

func RequestEqualFold

func RequestEqualFold(v string) predicate.Audit

RequestEqualFold applies the EqualFold predicate on the "request" field.

func RequestGT

func RequestGT(v string) predicate.Audit

RequestGT applies the GT predicate on the "request" field.

func RequestGTE

func RequestGTE(v string) predicate.Audit

RequestGTE applies the GTE predicate on the "request" field.

func RequestHasPrefix

func RequestHasPrefix(v string) predicate.Audit

RequestHasPrefix applies the HasPrefix predicate on the "request" field.

func RequestHasSuffix

func RequestHasSuffix(v string) predicate.Audit

RequestHasSuffix applies the HasSuffix predicate on the "request" field.

func RequestIn

func RequestIn(vs ...string) predicate.Audit

RequestIn applies the In predicate on the "request" field.

func RequestLT

func RequestLT(v string) predicate.Audit

RequestLT applies the LT predicate on the "request" field.

func RequestLTE

func RequestLTE(v string) predicate.Audit

RequestLTE applies the LTE predicate on the "request" field.

func RequestNEQ

func RequestNEQ(v string) predicate.Audit

RequestNEQ applies the NEQ predicate on the "request" field.

func RequestNotIn

func RequestNotIn(vs ...string) predicate.Audit

RequestNotIn applies the NotIn predicate on the "request" field.

func Response

func Response(v string) predicate.Audit

Response applies equality check predicate on the "response" field. It's identical to ResponseEQ.

func ResponseContains

func ResponseContains(v string) predicate.Audit

ResponseContains applies the Contains predicate on the "response" field.

func ResponseContainsFold

func ResponseContainsFold(v string) predicate.Audit

ResponseContainsFold applies the ContainsFold predicate on the "response" field.

func ResponseEQ

func ResponseEQ(v string) predicate.Audit

ResponseEQ applies the EQ predicate on the "response" field.

func ResponseEqualFold

func ResponseEqualFold(v string) predicate.Audit

ResponseEqualFold applies the EqualFold predicate on the "response" field.

func ResponseGT

func ResponseGT(v string) predicate.Audit

ResponseGT applies the GT predicate on the "response" field.

func ResponseGTE

func ResponseGTE(v string) predicate.Audit

ResponseGTE applies the GTE predicate on the "response" field.

func ResponseHasPrefix

func ResponseHasPrefix(v string) predicate.Audit

ResponseHasPrefix applies the HasPrefix predicate on the "response" field.

func ResponseHasSuffix

func ResponseHasSuffix(v string) predicate.Audit

ResponseHasSuffix applies the HasSuffix predicate on the "response" field.

func ResponseIn

func ResponseIn(vs ...string) predicate.Audit

ResponseIn applies the In predicate on the "response" field.

func ResponseIsNil

func ResponseIsNil() predicate.Audit

ResponseIsNil applies the IsNil predicate on the "response" field.

func ResponseLT

func ResponseLT(v string) predicate.Audit

ResponseLT applies the LT predicate on the "response" field.

func ResponseLTE

func ResponseLTE(v string) predicate.Audit

ResponseLTE applies the LTE predicate on the "response" field.

func ResponseNEQ

func ResponseNEQ(v string) predicate.Audit

ResponseNEQ applies the NEQ predicate on the "response" field.

func ResponseNotIn

func ResponseNotIn(vs ...string) predicate.Audit

ResponseNotIn applies the NotIn predicate on the "response" field.

func ResponseNotNil

func ResponseNotNil() predicate.Audit

ResponseNotNil applies the NotNil predicate on the "response" field.

func SourceIP

func SourceIP(v string) predicate.Audit

SourceIP applies equality check predicate on the "source_ip" field. It's identical to SourceIPEQ.

func SourceIPContains

func SourceIPContains(v string) predicate.Audit

SourceIPContains applies the Contains predicate on the "source_ip" field.

func SourceIPContainsFold

func SourceIPContainsFold(v string) predicate.Audit

SourceIPContainsFold applies the ContainsFold predicate on the "source_ip" field.

func SourceIPEQ

func SourceIPEQ(v string) predicate.Audit

SourceIPEQ applies the EQ predicate on the "source_ip" field.

func SourceIPEqualFold

func SourceIPEqualFold(v string) predicate.Audit

SourceIPEqualFold applies the EqualFold predicate on the "source_ip" field.

func SourceIPGT

func SourceIPGT(v string) predicate.Audit

SourceIPGT applies the GT predicate on the "source_ip" field.

func SourceIPGTE

func SourceIPGTE(v string) predicate.Audit

SourceIPGTE applies the GTE predicate on the "source_ip" field.

func SourceIPHasPrefix

func SourceIPHasPrefix(v string) predicate.Audit

SourceIPHasPrefix applies the HasPrefix predicate on the "source_ip" field.

func SourceIPHasSuffix

func SourceIPHasSuffix(v string) predicate.Audit

SourceIPHasSuffix applies the HasSuffix predicate on the "source_ip" field.

func SourceIPIn

func SourceIPIn(vs ...string) predicate.Audit

SourceIPIn applies the In predicate on the "source_ip" field.

func SourceIPLT

func SourceIPLT(v string) predicate.Audit

SourceIPLT applies the LT predicate on the "source_ip" field.

func SourceIPLTE

func SourceIPLTE(v string) predicate.Audit

SourceIPLTE applies the LTE predicate on the "source_ip" field.

func SourceIPNEQ

func SourceIPNEQ(v string) predicate.Audit

SourceIPNEQ applies the NEQ predicate on the "source_ip" field.

func SourceIPNotIn

func SourceIPNotIn(vs ...string) predicate.Audit

SourceIPNotIn applies the NotIn predicate on the "source_ip" field.

func UserAgent

func UserAgent(v string) predicate.Audit

UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.

func UserAgentContains

func UserAgentContains(v string) predicate.Audit

UserAgentContains applies the Contains predicate on the "user_agent" field.

func UserAgentContainsFold

func UserAgentContainsFold(v string) predicate.Audit

UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.

func UserAgentEQ

func UserAgentEQ(v string) predicate.Audit

UserAgentEQ applies the EQ predicate on the "user_agent" field.

func UserAgentEqualFold

func UserAgentEqualFold(v string) predicate.Audit

UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.

func UserAgentGT

func UserAgentGT(v string) predicate.Audit

UserAgentGT applies the GT predicate on the "user_agent" field.

func UserAgentGTE

func UserAgentGTE(v string) predicate.Audit

UserAgentGTE applies the GTE predicate on the "user_agent" field.

func UserAgentHasPrefix

func UserAgentHasPrefix(v string) predicate.Audit

UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.

func UserAgentHasSuffix

func UserAgentHasSuffix(v string) predicate.Audit

UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.

func UserAgentIn

func UserAgentIn(vs ...string) predicate.Audit

UserAgentIn applies the In predicate on the "user_agent" field.

func UserAgentLT

func UserAgentLT(v string) predicate.Audit

UserAgentLT applies the LT predicate on the "user_agent" field.

func UserAgentLTE

func UserAgentLTE(v string) predicate.Audit

UserAgentLTE applies the LTE predicate on the "user_agent" field.

func UserAgentNEQ

func UserAgentNEQ(v string) predicate.Audit

UserAgentNEQ applies the NEQ predicate on the "user_agent" field.

func UserAgentNotIn

func UserAgentNotIn(vs ...string) predicate.Audit

UserAgentNotIn applies the NotIn predicate on the "user_agent" field.

func UserID

func UserID(v uuid.UUID) predicate.Audit

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v uuid.UUID) predicate.Audit

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...uuid.UUID) predicate.Audit

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v uuid.UUID) predicate.Audit

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...uuid.UUID) predicate.Audit

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Audit queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByOperation

func ByOperation(opts ...sql.OrderTermOption) OrderOption

ByOperation orders the results by the operation field.

func ByRequest

func ByRequest(opts ...sql.OrderTermOption) OrderOption

ByRequest orders the results by the request field.

func ByResponse

func ByResponse(opts ...sql.OrderTermOption) OrderOption

ByResponse orders the results by the response field.

func BySourceIP

func BySourceIP(opts ...sql.OrderTermOption) OrderOption

BySourceIP orders the results by the source_ip field.

func ByUserAgent

func ByUserAgent(opts ...sql.OrderTermOption) OrderOption

ByUserAgent orders the results by the user_agent field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

func ByUserID

func ByUserID(opts ...sql.OrderTermOption) OrderOption

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL