Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Session) predicate.Session
- func CreateTime(v time.Time) predicate.Session
- func CreateTimeEQ(v time.Time) predicate.Session
- func CreateTimeGT(v time.Time) predicate.Session
- func CreateTimeGTE(v time.Time) predicate.Session
- func CreateTimeIn(vs ...time.Time) predicate.Session
- func CreateTimeLT(v time.Time) predicate.Session
- func CreateTimeLTE(v time.Time) predicate.Session
- func CreateTimeNEQ(v time.Time) predicate.Session
- func CreateTimeNotIn(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 uint32) predicate.Session
- func IDEQ(id uint32) predicate.Session
- func IDGT(id uint32) predicate.Session
- func IDGTE(id uint32) predicate.Session
- func IDIn(ids ...uint32) predicate.Session
- func IDLT(id uint32) predicate.Session
- func IDLTE(id uint32) predicate.Session
- func IDNEQ(id uint32) predicate.Session
- func IDNotIn(ids ...uint32) predicate.Session
- func IP(v string) predicate.Session
- func IPContains(v string) predicate.Session
- func IPContainsFold(v string) predicate.Session
- func IPEQ(v string) predicate.Session
- func IPEqualFold(v string) predicate.Session
- func IPGT(v string) predicate.Session
- func IPGTE(v string) predicate.Session
- func IPHasPrefix(v string) predicate.Session
- func IPHasSuffix(v string) predicate.Session
- func IPIn(vs ...string) predicate.Session
- func IPIsNil() predicate.Session
- func IPLT(v string) predicate.Session
- func IPLTE(v string) predicate.Session
- func IPNEQ(v string) predicate.Session
- func IPNotIn(vs ...string) predicate.Session
- func IPNotNil() predicate.Session
- func Jti(v string) predicate.Session
- func JtiContains(v string) predicate.Session
- func JtiContainsFold(v string) predicate.Session
- func JtiEQ(v string) predicate.Session
- func JtiEqualFold(v string) predicate.Session
- func JtiGT(v string) predicate.Session
- func JtiGTE(v string) predicate.Session
- func JtiHasPrefix(v string) predicate.Session
- func JtiHasSuffix(v string) predicate.Session
- func JtiIn(vs ...string) predicate.Session
- func JtiLT(v string) predicate.Session
- func JtiLTE(v string) predicate.Session
- func JtiNEQ(v string) predicate.Session
- func JtiNotIn(vs ...string) predicate.Session
- func LastSeenAt(v time.Time) predicate.Session
- func LastSeenAtEQ(v time.Time) predicate.Session
- func LastSeenAtGT(v time.Time) predicate.Session
- func LastSeenAtGTE(v time.Time) predicate.Session
- func LastSeenAtIn(vs ...time.Time) predicate.Session
- func LastSeenAtIsNil() predicate.Session
- func LastSeenAtLT(v time.Time) predicate.Session
- func LastSeenAtLTE(v time.Time) predicate.Session
- func LastSeenAtNEQ(v time.Time) predicate.Session
- func LastSeenAtNotIn(vs ...time.Time) predicate.Session
- func LastSeenAtNotNil() predicate.Session
- func Not(p predicate.Session) predicate.Session
- func Or(predicates ...predicate.Session) predicate.Session
- func RevokedAt(v time.Time) predicate.Session
- func RevokedAtEQ(v time.Time) predicate.Session
- func RevokedAtGT(v time.Time) predicate.Session
- func RevokedAtGTE(v time.Time) predicate.Session
- func RevokedAtIn(vs ...time.Time) predicate.Session
- func RevokedAtIsNil() predicate.Session
- func RevokedAtLT(v time.Time) predicate.Session
- func RevokedAtLTE(v time.Time) predicate.Session
- func RevokedAtNEQ(v time.Time) predicate.Session
- func RevokedAtNotIn(vs ...time.Time) predicate.Session
- func RevokedAtNotNil() predicate.Session
- func UpdateTime(v time.Time) predicate.Session
- func UpdateTimeEQ(v time.Time) predicate.Session
- func UpdateTimeGT(v time.Time) predicate.Session
- func UpdateTimeGTE(v time.Time) predicate.Session
- func UpdateTimeIn(vs ...time.Time) predicate.Session
- func UpdateTimeLT(v time.Time) predicate.Session
- func UpdateTimeLTE(v time.Time) predicate.Session
- func UpdateTimeNEQ(v time.Time) predicate.Session
- func UpdateTimeNotIn(vs ...time.Time) 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 ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIP(opts ...sql.OrderTermOption) OrderOption
- func ByJti(opts ...sql.OrderTermOption) OrderOption
- func ByLastSeenAt(opts ...sql.OrderTermOption) OrderOption
- func ByRevokedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(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" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldJti holds the string denoting the jti field in the database. FieldJti = "jti" // FieldExpiresAt holds the string denoting the expires_at field in the database. FieldExpiresAt = "expires_at" // FieldRevokedAt holds the string denoting the revoked_at field in the database. FieldRevokedAt = "revoked_at" // FieldLastSeenAt holds the string denoting the last_seen_at field in the database. FieldLastSeenAt = "last_seen_at" // FieldIP holds the string denoting the ip field in the database. FieldIP = "ip" // FieldUserAgent holds the string denoting the user_agent field in the database. FieldUserAgent = "user_agent" // 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 ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // JtiValidator is a validator for the "jti" field. It is called by the builders before save. JtiValidator func(string) error // UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save. UserAgentValidator func(string) error )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldJti, FieldExpiresAt, FieldRevokedAt, FieldLastSeenAt, FieldIP, FieldUserAgent, }
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 CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" 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 IPContains ¶
IPContains applies the Contains predicate on the "ip" field.
func IPContainsFold ¶
IPContainsFold applies the ContainsFold predicate on the "ip" field.
func IPEqualFold ¶
IPEqualFold applies the EqualFold predicate on the "ip" field.
func IPHasPrefix ¶
IPHasPrefix applies the HasPrefix predicate on the "ip" field.
func IPHasSuffix ¶
IPHasSuffix applies the HasSuffix predicate on the "ip" field.
func JtiContains ¶
JtiContains applies the Contains predicate on the "jti" field.
func JtiContainsFold ¶
JtiContainsFold applies the ContainsFold predicate on the "jti" field.
func JtiEqualFold ¶
JtiEqualFold applies the EqualFold predicate on the "jti" field.
func JtiHasPrefix ¶
JtiHasPrefix applies the HasPrefix predicate on the "jti" field.
func JtiHasSuffix ¶
JtiHasSuffix applies the HasSuffix predicate on the "jti" field.
func LastSeenAt ¶
LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ.
func LastSeenAtEQ ¶
LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field.
func LastSeenAtGT ¶
LastSeenAtGT applies the GT predicate on the "last_seen_at" field.
func LastSeenAtGTE ¶
LastSeenAtGTE applies the GTE predicate on the "last_seen_at" field.
func LastSeenAtIn ¶
LastSeenAtIn applies the In predicate on the "last_seen_at" field.
func LastSeenAtIsNil ¶
LastSeenAtIsNil applies the IsNil predicate on the "last_seen_at" field.
func LastSeenAtLT ¶
LastSeenAtLT applies the LT predicate on the "last_seen_at" field.
func LastSeenAtLTE ¶
LastSeenAtLTE applies the LTE predicate on the "last_seen_at" field.
func LastSeenAtNEQ ¶
LastSeenAtNEQ applies the NEQ predicate on the "last_seen_at" field.
func LastSeenAtNotIn ¶
LastSeenAtNotIn applies the NotIn predicate on the "last_seen_at" field.
func LastSeenAtNotNil ¶
LastSeenAtNotNil applies the NotNil predicate on the "last_seen_at" field.
func RevokedAt ¶
RevokedAt applies equality check predicate on the "revoked_at" field. It's identical to RevokedAtEQ.
func RevokedAtEQ ¶
RevokedAtEQ applies the EQ predicate on the "revoked_at" field.
func RevokedAtGT ¶
RevokedAtGT applies the GT predicate on the "revoked_at" field.
func RevokedAtGTE ¶
RevokedAtGTE applies the GTE predicate on the "revoked_at" field.
func RevokedAtIn ¶
RevokedAtIn applies the In predicate on the "revoked_at" field.
func RevokedAtIsNil ¶
RevokedAtIsNil applies the IsNil predicate on the "revoked_at" field.
func RevokedAtLT ¶
RevokedAtLT applies the LT predicate on the "revoked_at" field.
func RevokedAtLTE ¶
RevokedAtLTE applies the LTE predicate on the "revoked_at" field.
func RevokedAtNEQ ¶
RevokedAtNEQ applies the NEQ predicate on the "revoked_at" field.
func RevokedAtNotIn ¶
RevokedAtNotIn applies the NotIn predicate on the "revoked_at" field.
func RevokedAtNotNil ¶
RevokedAtNotNil applies the NotNil predicate on the "revoked_at" field.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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 ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time 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 ByIP ¶
func ByIP(opts ...sql.OrderTermOption) OrderOption
ByIP orders the results by the ip field.
func ByJti ¶
func ByJti(opts ...sql.OrderTermOption) OrderOption
ByJti orders the results by the jti field.
func ByLastSeenAt ¶
func ByLastSeenAt(opts ...sql.OrderTermOption) OrderOption
ByLastSeenAt orders the results by the last_seen_at field.
func ByRevokedAt ¶
func ByRevokedAt(opts ...sql.OrderTermOption) OrderOption
ByRevokedAt orders the results by the revoked_at field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time 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.