request

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the request type in the database.
	Label = "request"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldGateID holds the string denoting the gate_id field in the database.
	FieldGateID = "gate_id"
	// FieldMethod holds the string denoting the method field in the database.
	FieldMethod = "method"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldRawQuery holds the string denoting the raw_query field in the database.
	FieldRawQuery = "raw_query"
	// FieldHeaders holds the string denoting the headers field in the database.
	FieldHeaders = "headers"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeGate holds the string denoting the gate edge name in mutations.
	EdgeGate = "gate"
	// EdgeResponses holds the string denoting the responses edge name in mutations.
	EdgeResponses = "responses"
	// EdgeDiff holds the string denoting the diff edge name in mutations.
	EdgeDiff = "diff"
	// Table holds the table name of the request in the database.
	Table = "requests"
	// GateTable is the table that holds the gate relation/edge.
	GateTable = "requests"
	// GateInverseTable is the table name for the Gate entity.
	// It exists in this package in order to avoid circular dependency with the "gate" package.
	GateInverseTable = "gates"
	// GateColumn is the table column denoting the gate relation/edge.
	GateColumn = "gate_id"
	// ResponsesTable is the table that holds the responses relation/edge.
	ResponsesTable = "responses"
	// ResponsesInverseTable is the table name for the Response entity.
	// It exists in this package in order to avoid circular dependency with the "response" package.
	ResponsesInverseTable = "responses"
	// ResponsesColumn is the table column denoting the responses relation/edge.
	ResponsesColumn = "request_id"
	// DiffTable is the table that holds the diff relation/edge.
	DiffTable = "diffs"
	// DiffInverseTable is the table name for the Diff entity.
	// It exists in this package in order to avoid circular dependency with the "entdiff" package.
	DiffInverseTable = "diffs"
	// DiffColumn is the table column denoting the diff relation/edge.
	DiffColumn = "request_id"
)

Variables

View Source
var (
	// MethodValidator is a validator for the "method" field. It is called by the builders before save.
	MethodValidator func(string) error
	// PathValidator is a validator for the "path" field. It is called by the builders before save.
	PathValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for request fields.

Functions

func And

func And(predicates ...predicate.Request) predicate.Request

And groups predicates with the AND operator between them.

func BodyIsNil

func BodyIsNil() predicate.Request

BodyIsNil applies the IsNil predicate on the "body" field.

func BodyNotNil

func BodyNotNil() predicate.Request

BodyNotNil applies the NotNil predicate on the "body" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Request

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Request

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Request

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Request

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Request

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Request

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Request

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

func CreatedAtNotIn

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

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

func GateID

func GateID(v uuid.UUID) predicate.Request

GateID applies equality check predicate on the "gate_id" field. It's identical to GateIDEQ.

func GateIDEQ

func GateIDEQ(v uuid.UUID) predicate.Request

GateIDEQ applies the EQ predicate on the "gate_id" field.

func GateIDIn

func GateIDIn(vs ...uuid.UUID) predicate.Request

GateIDIn applies the In predicate on the "gate_id" field.

func GateIDNEQ

func GateIDNEQ(v uuid.UUID) predicate.Request

GateIDNEQ applies the NEQ predicate on the "gate_id" field.

func GateIDNotIn

func GateIDNotIn(vs ...uuid.UUID) predicate.Request

GateIDNotIn applies the NotIn predicate on the "gate_id" field.

func HasDiff

func HasDiff() predicate.Request

HasDiff applies the HasEdge predicate on the "diff" edge.

func HasDiffWith

func HasDiffWith(preds ...predicate.Diff) predicate.Request

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

func HasGate

func HasGate() predicate.Request

HasGate applies the HasEdge predicate on the "gate" edge.

func HasGateWith

func HasGateWith(preds ...predicate.Gate) predicate.Request

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

func HasResponses

func HasResponses() predicate.Request

HasResponses applies the HasEdge predicate on the "responses" edge.

func HasResponsesWith

func HasResponsesWith(preds ...predicate.Response) predicate.Request

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

func HeadersIsNil

func HeadersIsNil() predicate.Request

HeadersIsNil applies the IsNil predicate on the "headers" field.

func HeadersNotNil

func HeadersNotNil() predicate.Request

HeadersNotNil applies the NotNil predicate on the "headers" field.

func ID

func ID(id uuid.UUID) predicate.Request

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Request

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Request

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Request

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Request

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Request

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Request

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Method

func Method(v string) predicate.Request

Method applies equality check predicate on the "method" field. It's identical to MethodEQ.

func MethodContains

func MethodContains(v string) predicate.Request

MethodContains applies the Contains predicate on the "method" field.

func MethodContainsFold

func MethodContainsFold(v string) predicate.Request

MethodContainsFold applies the ContainsFold predicate on the "method" field.

func MethodEQ

func MethodEQ(v string) predicate.Request

MethodEQ applies the EQ predicate on the "method" field.

func MethodEqualFold

func MethodEqualFold(v string) predicate.Request

MethodEqualFold applies the EqualFold predicate on the "method" field.

func MethodGT

func MethodGT(v string) predicate.Request

MethodGT applies the GT predicate on the "method" field.

func MethodGTE

func MethodGTE(v string) predicate.Request

MethodGTE applies the GTE predicate on the "method" field.

func MethodHasPrefix

func MethodHasPrefix(v string) predicate.Request

MethodHasPrefix applies the HasPrefix predicate on the "method" field.

func MethodHasSuffix

func MethodHasSuffix(v string) predicate.Request

MethodHasSuffix applies the HasSuffix predicate on the "method" field.

func MethodIn

func MethodIn(vs ...string) predicate.Request

MethodIn applies the In predicate on the "method" field.

func MethodLT

func MethodLT(v string) predicate.Request

MethodLT applies the LT predicate on the "method" field.

func MethodLTE

func MethodLTE(v string) predicate.Request

MethodLTE applies the LTE predicate on the "method" field.

func MethodNEQ

func MethodNEQ(v string) predicate.Request

MethodNEQ applies the NEQ predicate on the "method" field.

func MethodNotIn

func MethodNotIn(vs ...string) predicate.Request

MethodNotIn applies the NotIn predicate on the "method" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Request) predicate.Request

Or groups predicates with the OR operator between them.

func Path

func Path(v string) predicate.Request

Path applies equality check predicate on the "path" field. It's identical to PathEQ.

func PathContains

func PathContains(v string) predicate.Request

PathContains applies the Contains predicate on the "path" field.

func PathContainsFold

func PathContainsFold(v string) predicate.Request

PathContainsFold applies the ContainsFold predicate on the "path" field.

func PathEQ

func PathEQ(v string) predicate.Request

PathEQ applies the EQ predicate on the "path" field.

func PathEqualFold

func PathEqualFold(v string) predicate.Request

PathEqualFold applies the EqualFold predicate on the "path" field.

func PathGT

func PathGT(v string) predicate.Request

PathGT applies the GT predicate on the "path" field.

func PathGTE

func PathGTE(v string) predicate.Request

PathGTE applies the GTE predicate on the "path" field.

func PathHasPrefix

func PathHasPrefix(v string) predicate.Request

PathHasPrefix applies the HasPrefix predicate on the "path" field.

func PathHasSuffix

func PathHasSuffix(v string) predicate.Request

PathHasSuffix applies the HasSuffix predicate on the "path" field.

func PathIn

func PathIn(vs ...string) predicate.Request

PathIn applies the In predicate on the "path" field.

func PathLT

func PathLT(v string) predicate.Request

PathLT applies the LT predicate on the "path" field.

func PathLTE

func PathLTE(v string) predicate.Request

PathLTE applies the LTE predicate on the "path" field.

func PathNEQ

func PathNEQ(v string) predicate.Request

PathNEQ applies the NEQ predicate on the "path" field.

func PathNotIn

func PathNotIn(vs ...string) predicate.Request

PathNotIn applies the NotIn predicate on the "path" field.

func RawQuery added in v1.2.0

func RawQuery(v string) predicate.Request

RawQuery applies equality check predicate on the "raw_query" field. It's identical to RawQueryEQ.

func RawQueryContains added in v1.2.0

func RawQueryContains(v string) predicate.Request

RawQueryContains applies the Contains predicate on the "raw_query" field.

func RawQueryContainsFold added in v1.2.0

func RawQueryContainsFold(v string) predicate.Request

RawQueryContainsFold applies the ContainsFold predicate on the "raw_query" field.

func RawQueryEQ added in v1.2.0

func RawQueryEQ(v string) predicate.Request

RawQueryEQ applies the EQ predicate on the "raw_query" field.

func RawQueryEqualFold added in v1.2.0

func RawQueryEqualFold(v string) predicate.Request

RawQueryEqualFold applies the EqualFold predicate on the "raw_query" field.

func RawQueryGT added in v1.2.0

func RawQueryGT(v string) predicate.Request

RawQueryGT applies the GT predicate on the "raw_query" field.

func RawQueryGTE added in v1.2.0

func RawQueryGTE(v string) predicate.Request

RawQueryGTE applies the GTE predicate on the "raw_query" field.

func RawQueryHasPrefix added in v1.2.0

func RawQueryHasPrefix(v string) predicate.Request

RawQueryHasPrefix applies the HasPrefix predicate on the "raw_query" field.

func RawQueryHasSuffix added in v1.2.0

func RawQueryHasSuffix(v string) predicate.Request

RawQueryHasSuffix applies the HasSuffix predicate on the "raw_query" field.

func RawQueryIn added in v1.2.0

func RawQueryIn(vs ...string) predicate.Request

RawQueryIn applies the In predicate on the "raw_query" field.

func RawQueryIsNil added in v1.2.0

func RawQueryIsNil() predicate.Request

RawQueryIsNil applies the IsNil predicate on the "raw_query" field.

func RawQueryLT added in v1.2.0

func RawQueryLT(v string) predicate.Request

RawQueryLT applies the LT predicate on the "raw_query" field.

func RawQueryLTE added in v1.2.0

func RawQueryLTE(v string) predicate.Request

RawQueryLTE applies the LTE predicate on the "raw_query" field.

func RawQueryNEQ added in v1.2.0

func RawQueryNEQ(v string) predicate.Request

RawQueryNEQ applies the NEQ predicate on the "raw_query" field.

func RawQueryNotIn added in v1.2.0

func RawQueryNotIn(vs ...string) predicate.Request

RawQueryNotIn applies the NotIn predicate on the "raw_query" field.

func RawQueryNotNil added in v1.2.0

func RawQueryNotNil() predicate.Request

RawQueryNotNil applies the NotNil predicate on the "raw_query" 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 Request queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDiffField

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

ByDiffField orders the results by diff field.

func ByGateField

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

ByGateField orders the results by gate field.

func ByGateID

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

ByGateID orders the results by the gate_id field.

func ByID

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

ByID orders the results by the id field.

func ByMethod

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

ByMethod orders the results by the method field.

func ByPath

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

ByPath orders the results by the path field.

func ByRawQuery added in v1.2.0

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

ByRawQuery orders the results by the raw_query field.

func ByResponses

func ByResponses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByResponses orders the results by responses terms.

func ByResponsesCount

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

ByResponsesCount orders the results by responses count.

Jump to

Keyboard shortcuts

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