Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Session) predicate.Session
- func CreatedAt(v time.Time) predicate.Session
- func CreatedAtEQ(v time.Time) predicate.Session
- func CreatedAtGT(v time.Time) predicate.Session
- func CreatedAtGTE(v time.Time) predicate.Session
- func CreatedAtIn(vs ...time.Time) predicate.Session
- func CreatedAtLT(v time.Time) predicate.Session
- func CreatedAtLTE(v time.Time) predicate.Session
- func CreatedAtNEQ(v time.Time) predicate.Session
- func CreatedAtNotIn(vs ...time.Time) predicate.Session
- func ExpiresAt(v time.Time) predicate.Session
- func ExpiresAtEQ(v time.Time) predicate.Session
- func ExpiresAtGT(v time.Time) predicate.Session
- func ExpiresAtGTE(v time.Time) predicate.Session
- func ExpiresAtIn(vs ...time.Time) predicate.Session
- func ExpiresAtLT(v time.Time) predicate.Session
- func ExpiresAtLTE(v time.Time) predicate.Session
- func ExpiresAtNEQ(v time.Time) predicate.Session
- func ExpiresAtNotIn(vs ...time.Time) predicate.Session
- func HasUser() predicate.Session
- func HasUserWith(preds ...predicate.User) predicate.Session
- func ID(id int) predicate.Session
- func IDEQ(id int) predicate.Session
- func IDGT(id int) predicate.Session
- func IDGTE(id int) predicate.Session
- func IDIn(ids ...int) predicate.Session
- func IDLT(id int) predicate.Session
- func IDLTE(id int) predicate.Session
- func IDNEQ(id int) predicate.Session
- func IDNotIn(ids ...int) predicate.Session
- func IPAddress(v string) predicate.Session
- func IPAddressContains(v string) predicate.Session
- func IPAddressContainsFold(v string) predicate.Session
- func IPAddressEQ(v string) predicate.Session
- func IPAddressEqualFold(v string) predicate.Session
- func IPAddressGT(v string) predicate.Session
- func IPAddressGTE(v string) predicate.Session
- func IPAddressHasPrefix(v string) predicate.Session
- func IPAddressHasSuffix(v string) predicate.Session
- func IPAddressIn(vs ...string) predicate.Session
- func IPAddressIsNil() predicate.Session
- func IPAddressLT(v string) predicate.Session
- func IPAddressLTE(v string) predicate.Session
- func IPAddressNEQ(v string) predicate.Session
- func IPAddressNotIn(vs ...string) predicate.Session
- func IPAddressNotNil() predicate.Session
- func LastActiveAt(v time.Time) predicate.Session
- func LastActiveAtEQ(v time.Time) predicate.Session
- func LastActiveAtGT(v time.Time) predicate.Session
- func LastActiveAtGTE(v time.Time) predicate.Session
- func LastActiveAtIn(vs ...time.Time) predicate.Session
- func LastActiveAtLT(v time.Time) predicate.Session
- func LastActiveAtLTE(v time.Time) predicate.Session
- func LastActiveAtNEQ(v time.Time) predicate.Session
- func LastActiveAtNotIn(vs ...time.Time) predicate.Session
- func Not(p predicate.Session) predicate.Session
- func Or(predicates ...predicate.Session) predicate.Session
- func Token(v string) predicate.Session
- func TokenContains(v string) predicate.Session
- func TokenContainsFold(v string) predicate.Session
- func TokenEQ(v string) predicate.Session
- func TokenEqualFold(v string) predicate.Session
- func TokenGT(v string) predicate.Session
- func TokenGTE(v string) predicate.Session
- func TokenHasPrefix(v string) predicate.Session
- func TokenHasSuffix(v string) predicate.Session
- func TokenIn(vs ...string) predicate.Session
- func TokenLT(v string) predicate.Session
- func TokenLTE(v string) predicate.Session
- func TokenNEQ(v string) predicate.Session
- func TokenNotIn(vs ...string) predicate.Session
- func UserAgent(v string) predicate.Session
- func UserAgentContains(v string) predicate.Session
- func UserAgentContainsFold(v string) predicate.Session
- func UserAgentEQ(v string) predicate.Session
- func UserAgentEqualFold(v string) predicate.Session
- func UserAgentGT(v string) predicate.Session
- func UserAgentGTE(v string) predicate.Session
- func UserAgentHasPrefix(v string) predicate.Session
- func UserAgentHasSuffix(v string) predicate.Session
- func UserAgentIn(vs ...string) predicate.Session
- func UserAgentIsNil() predicate.Session
- func UserAgentLT(v string) predicate.Session
- func UserAgentLTE(v string) predicate.Session
- func UserAgentNEQ(v string) predicate.Session
- func UserAgentNotIn(vs ...string) predicate.Session
- func UserAgentNotNil() predicate.Session
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIPAddress(opts ...sql.OrderTermOption) OrderOption
- func ByLastActiveAt(opts ...sql.OrderTermOption) OrderOption
- func ByToken(opts ...sql.OrderTermOption) OrderOption
- func ByUserAgent(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the session type in the database. Label = "session" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldToken holds the string denoting the token field in the database. FieldToken = "token" // FieldIPAddress holds the string denoting the ip_address field in the database. FieldIPAddress = "ip_address" // FieldUserAgent holds the string denoting the user_agent field in the database. FieldUserAgent = "user_agent" // FieldExpiresAt holds the string denoting the expires_at field in the database. FieldExpiresAt = "expires_at" // FieldLastActiveAt holds the string denoting the last_active_at field in the database. FieldLastActiveAt = "last_active_at" // 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 session in the database. Table = "sessions" // UserTable is the table that holds the user relation/edge. UserTable = "sessions" // 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_sessions" )
Variables ¶
var ( // TokenValidator is a validator for the "token" field. It is called by the builders before save. TokenValidator func(string) error // DefaultLastActiveAt holds the default value on creation for the "last_active_at" field. DefaultLastActiveAt func() time.Time // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldToken, FieldIPAddress, FieldUserAgent, FieldExpiresAt, FieldLastActiveAt, FieldCreatedAt, }
Columns holds all SQL columns for session fields.
var ForeignKeys = []string{
"user_sessions",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "sessions" table and are not defined as standalone fields in the schema.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func ExpiresAt ¶
ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
func ExpiresAtEQ ¶
ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
func ExpiresAtGT ¶
ExpiresAtGT applies the GT predicate on the "expires_at" field.
func ExpiresAtGTE ¶
ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
func ExpiresAtIn ¶
ExpiresAtIn applies the In predicate on the "expires_at" field.
func ExpiresAtLT ¶
ExpiresAtLT applies the LT predicate on the "expires_at" field.
func ExpiresAtLTE ¶
ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
func ExpiresAtNEQ ¶
ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
func ExpiresAtNotIn ¶
ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func IPAddress ¶
IPAddress applies equality check predicate on the "ip_address" field. It's identical to IPAddressEQ.
func IPAddressContains ¶
IPAddressContains applies the Contains predicate on the "ip_address" field.
func IPAddressContainsFold ¶
IPAddressContainsFold applies the ContainsFold predicate on the "ip_address" field.
func IPAddressEQ ¶
IPAddressEQ applies the EQ predicate on the "ip_address" field.
func IPAddressEqualFold ¶
IPAddressEqualFold applies the EqualFold predicate on the "ip_address" field.
func IPAddressGT ¶
IPAddressGT applies the GT predicate on the "ip_address" field.
func IPAddressGTE ¶
IPAddressGTE applies the GTE predicate on the "ip_address" field.
func IPAddressHasPrefix ¶
IPAddressHasPrefix applies the HasPrefix predicate on the "ip_address" field.
func IPAddressHasSuffix ¶
IPAddressHasSuffix applies the HasSuffix predicate on the "ip_address" field.
func IPAddressIn ¶
IPAddressIn applies the In predicate on the "ip_address" field.
func IPAddressIsNil ¶
IPAddressIsNil applies the IsNil predicate on the "ip_address" field.
func IPAddressLT ¶
IPAddressLT applies the LT predicate on the "ip_address" field.
func IPAddressLTE ¶
IPAddressLTE applies the LTE predicate on the "ip_address" field.
func IPAddressNEQ ¶
IPAddressNEQ applies the NEQ predicate on the "ip_address" field.
func IPAddressNotIn ¶
IPAddressNotIn applies the NotIn predicate on the "ip_address" field.
func IPAddressNotNil ¶
IPAddressNotNil applies the NotNil predicate on the "ip_address" field.
func LastActiveAt ¶
LastActiveAt applies equality check predicate on the "last_active_at" field. It's identical to LastActiveAtEQ.
func LastActiveAtEQ ¶
LastActiveAtEQ applies the EQ predicate on the "last_active_at" field.
func LastActiveAtGT ¶
LastActiveAtGT applies the GT predicate on the "last_active_at" field.
func LastActiveAtGTE ¶
LastActiveAtGTE applies the GTE predicate on the "last_active_at" field.
func LastActiveAtIn ¶
LastActiveAtIn applies the In predicate on the "last_active_at" field.
func LastActiveAtLT ¶
LastActiveAtLT applies the LT predicate on the "last_active_at" field.
func LastActiveAtLTE ¶
LastActiveAtLTE applies the LTE predicate on the "last_active_at" field.
func LastActiveAtNEQ ¶
LastActiveAtNEQ applies the NEQ predicate on the "last_active_at" field.
func LastActiveAtNotIn ¶
LastActiveAtNotIn applies the NotIn predicate on the "last_active_at" field.
func Token ¶
Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
func TokenContains ¶
TokenContains applies the Contains predicate on the "token" field.
func TokenContainsFold ¶
TokenContainsFold applies the ContainsFold predicate on the "token" field.
func TokenEqualFold ¶
TokenEqualFold applies the EqualFold predicate on the "token" field.
func TokenHasPrefix ¶
TokenHasPrefix applies the HasPrefix predicate on the "token" field.
func TokenHasSuffix ¶
TokenHasSuffix applies the HasSuffix predicate on the "token" field.
func TokenNotIn ¶
TokenNotIn applies the NotIn predicate on the "token" field.
func UserAgent ¶
UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.
func UserAgentContains ¶
UserAgentContains applies the Contains predicate on the "user_agent" field.
func UserAgentContainsFold ¶
UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.
func UserAgentEQ ¶
UserAgentEQ applies the EQ predicate on the "user_agent" field.
func UserAgentEqualFold ¶
UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.
func UserAgentGT ¶
UserAgentGT applies the GT predicate on the "user_agent" field.
func UserAgentGTE ¶
UserAgentGTE applies the GTE predicate on the "user_agent" field.
func UserAgentHasPrefix ¶
UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.
func UserAgentHasSuffix ¶
UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.
func UserAgentIn ¶
UserAgentIn applies the In predicate on the "user_agent" field.
func UserAgentIsNil ¶
UserAgentIsNil applies the IsNil predicate on the "user_agent" field.
func UserAgentLT ¶
UserAgentLT applies the LT predicate on the "user_agent" field.
func UserAgentLTE ¶
UserAgentLTE applies the LTE predicate on the "user_agent" field.
func UserAgentNEQ ¶
UserAgentNEQ applies the NEQ predicate on the "user_agent" field.
func UserAgentNotIn ¶
UserAgentNotIn applies the NotIn predicate on the "user_agent" field.
func UserAgentNotNil ¶
UserAgentNotNil applies the NotNil predicate on the "user_agent" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Session queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByExpiresAt ¶
func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
ByExpiresAt orders the results by the expires_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIPAddress ¶
func ByIPAddress(opts ...sql.OrderTermOption) OrderOption
ByIPAddress orders the results by the ip_address field.
func ByLastActiveAt ¶
func ByLastActiveAt(opts ...sql.OrderTermOption) OrderOption
ByLastActiveAt orders the results by the last_active_at field.
func ByToken ¶
func ByToken(opts ...sql.OrderTermOption) OrderOption
ByToken orders the results by the token 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.