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 CreatedBy(v string) predicate.Session
- func CreatedByContains(v string) predicate.Session
- func CreatedByContainsFold(v string) predicate.Session
- func CreatedByEQ(v string) predicate.Session
- func CreatedByEqualFold(v string) predicate.Session
- func CreatedByGT(v string) predicate.Session
- func CreatedByGTE(v string) predicate.Session
- func CreatedByHasPrefix(v string) predicate.Session
- func CreatedByHasSuffix(v string) predicate.Session
- func CreatedByIn(vs ...string) predicate.Session
- func CreatedByIsNil() predicate.Session
- func CreatedByLT(v string) predicate.Session
- func CreatedByLTE(v string) predicate.Session
- func CreatedByNEQ(v string) predicate.Session
- func CreatedByNotIn(vs ...string) predicate.Session
- func CreatedByNotNil() predicate.Session
- func Disabled(v bool) predicate.Session
- func DisabledEQ(v bool) predicate.Session
- func DisabledNEQ(v bool) predicate.Session
- func HasUsers() predicate.Session
- func HasUsersWith(preds ...predicate.User) predicate.Session
- func ID(id string) predicate.Session
- func IDContainsFold(id string) predicate.Session
- func IDEQ(id string) predicate.Session
- func IDEqualFold(id string) predicate.Session
- func IDGT(id string) predicate.Session
- func IDGTE(id string) predicate.Session
- func IDIn(ids ...string) predicate.Session
- func IDLT(id string) predicate.Session
- func IDLTE(id string) predicate.Session
- func IDNEQ(id string) predicate.Session
- func IDNotIn(ids ...string) predicate.Session
- func Ips(v string) predicate.Session
- func IpsContains(v string) predicate.Session
- func IpsContainsFold(v string) predicate.Session
- func IpsEQ(v string) predicate.Session
- func IpsEqualFold(v string) predicate.Session
- func IpsGT(v string) predicate.Session
- func IpsGTE(v string) predicate.Session
- func IpsHasPrefix(v string) predicate.Session
- func IpsHasSuffix(v string) predicate.Session
- func IpsIn(vs ...string) predicate.Session
- func IpsLT(v string) predicate.Session
- func IpsLTE(v string) predicate.Session
- func IpsNEQ(v string) predicate.Session
- func IpsNotIn(vs ...string) 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 TypeEQ(v Type) predicate.Session
- func TypeIn(vs ...Type) predicate.Session
- func TypeNEQ(v Type) predicate.Session
- func TypeNotIn(vs ...Type) predicate.Session
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Session
- func UpdatedAtEQ(v time.Time) predicate.Session
- func UpdatedAtGT(v time.Time) predicate.Session
- func UpdatedAtGTE(v time.Time) predicate.Session
- func UpdatedAtIn(vs ...time.Time) predicate.Session
- func UpdatedAtLT(v time.Time) predicate.Session
- func UpdatedAtLTE(v time.Time) predicate.Session
- func UpdatedAtNEQ(v time.Time) predicate.Session
- func UpdatedAtNotIn(vs ...time.Time) predicate.Session
- func UpdatedBy(v string) predicate.Session
- func UpdatedByContains(v string) predicate.Session
- func UpdatedByContainsFold(v string) predicate.Session
- func UpdatedByEQ(v string) predicate.Session
- func UpdatedByEqualFold(v string) predicate.Session
- func UpdatedByGT(v string) predicate.Session
- func UpdatedByGTE(v string) predicate.Session
- func UpdatedByHasPrefix(v string) predicate.Session
- func UpdatedByHasSuffix(v string) predicate.Session
- func UpdatedByIn(vs ...string) predicate.Session
- func UpdatedByIsNil() predicate.Session
- func UpdatedByLT(v string) predicate.Session
- func UpdatedByLTE(v string) predicate.Session
- func UpdatedByNEQ(v string) predicate.Session
- func UpdatedByNotIn(vs ...string) predicate.Session
- func UpdatedByNotNil() 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 ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByDisabled(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIps(opts ...sql.OrderTermOption) OrderOption
- func ByToken(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByUserAgent(opts ...sql.OrderTermOption) OrderOption
- func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption
- type Type
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" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldCreatedBy holds the string denoting the created_by field in the database. FieldCreatedBy = "created_by" // FieldUpdatedBy holds the string denoting the updated_by field in the database. FieldUpdatedBy = "updated_by" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldDisabled holds the string denoting the disabled field in the database. FieldDisabled = "disabled" // FieldToken holds the string denoting the token field in the database. FieldToken = "token" // FieldUserAgent holds the string denoting the user_agent field in the database. FieldUserAgent = "user_agent" // FieldIps holds the string denoting the ips field in the database. FieldIps = "ips" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // Table holds the table name of the session in the database. Table = "sessions" // UsersTable is the table that holds the users relation/edge. UsersTable = "sessions" // UsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UsersInverseTable = "users" // UsersColumn is the table column denoting the users relation/edge. UsersColumn = "session_users" )
Variables ¶
var ( Hooks [1]ent.Hook // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultToken holds the default value on creation for the "token" field. DefaultToken func() string // TokenValidator is a validator for the "token" field. It is called by the builders before save. TokenValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() string )
Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:
import _ "github.com/datumforge/datum/internal/ent/generated/runtime"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldCreatedBy, FieldUpdatedBy, FieldType, FieldDisabled, FieldToken, FieldUserAgent, FieldIps, }
Columns holds all SQL columns for session fields.
var ForeignKeys = []string{
"session_users",
"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 CreatedBy ¶
CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
func CreatedByContains ¶
CreatedByContains applies the Contains predicate on the "created_by" field.
func CreatedByContainsFold ¶
CreatedByContainsFold applies the ContainsFold predicate on the "created_by" field.
func CreatedByEQ ¶
CreatedByEQ applies the EQ predicate on the "created_by" field.
func CreatedByEqualFold ¶
CreatedByEqualFold applies the EqualFold predicate on the "created_by" field.
func CreatedByGT ¶
CreatedByGT applies the GT predicate on the "created_by" field.
func CreatedByGTE ¶
CreatedByGTE applies the GTE predicate on the "created_by" field.
func CreatedByHasPrefix ¶
CreatedByHasPrefix applies the HasPrefix predicate on the "created_by" field.
func CreatedByHasSuffix ¶
CreatedByHasSuffix applies the HasSuffix predicate on the "created_by" field.
func CreatedByIn ¶
CreatedByIn applies the In predicate on the "created_by" field.
func CreatedByIsNil ¶
CreatedByIsNil applies the IsNil predicate on the "created_by" field.
func CreatedByLT ¶
CreatedByLT applies the LT predicate on the "created_by" field.
func CreatedByLTE ¶
CreatedByLTE applies the LTE predicate on the "created_by" field.
func CreatedByNEQ ¶
CreatedByNEQ applies the NEQ predicate on the "created_by" field.
func CreatedByNotIn ¶
CreatedByNotIn applies the NotIn predicate on the "created_by" field.
func CreatedByNotNil ¶
CreatedByNotNil applies the NotNil predicate on the "created_by" field.
func Disabled ¶ added in v0.1.1
Disabled applies equality check predicate on the "disabled" field. It's identical to DisabledEQ.
func DisabledEQ ¶ added in v0.1.1
DisabledEQ applies the EQ predicate on the "disabled" field.
func DisabledNEQ ¶ added in v0.1.1
DisabledNEQ applies the NEQ predicate on the "disabled" field.
func HasUsersWith ¶ added in v0.1.1
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func Ips ¶ added in v0.1.1
Ips applies equality check predicate on the "ips" field. It's identical to IpsEQ.
func IpsContains ¶ added in v0.1.1
IpsContains applies the Contains predicate on the "ips" field.
func IpsContainsFold ¶ added in v0.1.1
IpsContainsFold applies the ContainsFold predicate on the "ips" field.
func IpsEqualFold ¶ added in v0.1.1
IpsEqualFold applies the EqualFold predicate on the "ips" field.
func IpsHasPrefix ¶ added in v0.1.1
IpsHasPrefix applies the HasPrefix predicate on the "ips" field.
func IpsHasSuffix ¶ added in v0.1.1
IpsHasSuffix applies the HasSuffix predicate on the "ips" field.
func Token ¶ added in v0.1.1
Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
func TokenContains ¶ added in v0.1.1
TokenContains applies the Contains predicate on the "token" field.
func TokenContainsFold ¶ added in v0.1.1
TokenContainsFold applies the ContainsFold predicate on the "token" field.
func TokenEqualFold ¶ added in v0.1.1
TokenEqualFold applies the EqualFold predicate on the "token" field.
func TokenHasPrefix ¶ added in v0.1.1
TokenHasPrefix applies the HasPrefix predicate on the "token" field.
func TokenHasSuffix ¶ added in v0.1.1
TokenHasSuffix applies the HasSuffix predicate on the "token" field.
func TokenNotIn ¶ added in v0.1.1
TokenNotIn applies the NotIn predicate on the "token" field.
func TypeValidator ¶ added in v0.1.1
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedBy ¶
UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.
func UpdatedByContains ¶
UpdatedByContains applies the Contains predicate on the "updated_by" field.
func UpdatedByContainsFold ¶
UpdatedByContainsFold applies the ContainsFold predicate on the "updated_by" field.
func UpdatedByEQ ¶
UpdatedByEQ applies the EQ predicate on the "updated_by" field.
func UpdatedByEqualFold ¶
UpdatedByEqualFold applies the EqualFold predicate on the "updated_by" field.
func UpdatedByGT ¶
UpdatedByGT applies the GT predicate on the "updated_by" field.
func UpdatedByGTE ¶
UpdatedByGTE applies the GTE predicate on the "updated_by" field.
func UpdatedByHasPrefix ¶
UpdatedByHasPrefix applies the HasPrefix predicate on the "updated_by" field.
func UpdatedByHasSuffix ¶
UpdatedByHasSuffix applies the HasSuffix predicate on the "updated_by" field.
func UpdatedByIn ¶
UpdatedByIn applies the In predicate on the "updated_by" field.
func UpdatedByIsNil ¶
UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.
func UpdatedByLT ¶
UpdatedByLT applies the LT predicate on the "updated_by" field.
func UpdatedByLTE ¶
UpdatedByLTE applies the LTE predicate on the "updated_by" field.
func UpdatedByNEQ ¶
UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.
func UpdatedByNotIn ¶
UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.
func UpdatedByNotNil ¶
UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.
func UserAgent ¶ added in v0.1.1
UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.
func UserAgentContains ¶ added in v0.1.1
UserAgentContains applies the Contains predicate on the "user_agent" field.
func UserAgentContainsFold ¶ added in v0.1.1
UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.
func UserAgentEQ ¶ added in v0.1.1
UserAgentEQ applies the EQ predicate on the "user_agent" field.
func UserAgentEqualFold ¶ added in v0.1.1
UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.
func UserAgentGT ¶ added in v0.1.1
UserAgentGT applies the GT predicate on the "user_agent" field.
func UserAgentGTE ¶ added in v0.1.1
UserAgentGTE applies the GTE predicate on the "user_agent" field.
func UserAgentHasPrefix ¶ added in v0.1.1
UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.
func UserAgentHasSuffix ¶ added in v0.1.1
UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.
func UserAgentIn ¶ added in v0.1.1
UserAgentIn applies the In predicate on the "user_agent" field.
func UserAgentIsNil ¶ added in v0.1.1
UserAgentIsNil applies the IsNil predicate on the "user_agent" field.
func UserAgentLT ¶ added in v0.1.1
UserAgentLT applies the LT predicate on the "user_agent" field.
func UserAgentLTE ¶ added in v0.1.1
UserAgentLTE applies the LTE predicate on the "user_agent" field.
func UserAgentNEQ ¶ added in v0.1.1
UserAgentNEQ applies the NEQ predicate on the "user_agent" field.
func UserAgentNotIn ¶ added in v0.1.1
UserAgentNotIn applies the NotIn predicate on the "user_agent" field.
func UserAgentNotNil ¶ added in v0.1.1
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 ByCreatedBy ¶
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
ByCreatedBy orders the results by the created_by field.
func ByDisabled ¶ added in v0.1.1
func ByDisabled(opts ...sql.OrderTermOption) OrderOption
ByDisabled orders the results by the disabled field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIps ¶ added in v0.1.1
func ByIps(opts ...sql.OrderTermOption) OrderOption
ByIps orders the results by the ips field.
func ByToken ¶ added in v0.1.1
func ByToken(opts ...sql.OrderTermOption) OrderOption
ByToken orders the results by the token field.
func ByType ¶ added in v0.1.1
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedBy ¶
func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption
ByUpdatedBy orders the results by the updated_by field.
func ByUserAgent ¶ added in v0.1.1
func ByUserAgent(opts ...sql.OrderTermOption) OrderOption
ByUserAgent orders the results by the user_agent field.
func ByUsersField ¶ added in v0.1.1
func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption
ByUsersField orders the results by users field.
type Type ¶ added in v0.1.1
type Type string
Type defines the type for the "type" enum field.
Type values.
func (Type) MarshalGQL ¶ added in v0.1.1
MarshalGQL implements graphql.Marshaler interface.
func (*Type) UnmarshalGQL ¶ added in v0.1.1
UnmarshalGQL implements graphql.Unmarshaler interface.