Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Token) predicate.Token
- func CreateTime(v time.Time) predicate.Token
- func CreateTimeEQ(v time.Time) predicate.Token
- func CreateTimeGT(v time.Time) predicate.Token
- func CreateTimeGTE(v time.Time) predicate.Token
- func CreateTimeIn(vs ...time.Time) predicate.Token
- func CreateTimeLT(v time.Time) predicate.Token
- func CreateTimeLTE(v time.Time) predicate.Token
- func CreateTimeNEQ(v time.Time) predicate.Token
- func CreateTimeNotIn(vs ...time.Time) predicate.Token
- func Expiration(v time.Time) predicate.Token
- func ExpirationEQ(v time.Time) predicate.Token
- func ExpirationGT(v time.Time) predicate.Token
- func ExpirationGTE(v time.Time) predicate.Token
- func ExpirationIn(vs ...time.Time) predicate.Token
- func ExpirationIsNil() predicate.Token
- func ExpirationLT(v time.Time) predicate.Token
- func ExpirationLTE(v time.Time) predicate.Token
- func ExpirationNEQ(v time.Time) predicate.Token
- func ExpirationNotIn(vs ...time.Time) predicate.Token
- func ExpirationNotNil() predicate.Token
- func HasSubject() predicate.Token
- func HasSubjectWith(preds ...predicate.Subject) predicate.Token
- func ID(id object.ID) predicate.Token
- func IDEQ(id object.ID) predicate.Token
- func IDGT(id object.ID) predicate.Token
- func IDGTE(id object.ID) predicate.Token
- func IDIn(ids ...object.ID) predicate.Token
- func IDLT(id object.ID) predicate.Token
- func IDLTE(id object.ID) predicate.Token
- func IDNEQ(id object.ID) predicate.Token
- func IDNotIn(ids ...object.ID) predicate.Token
- func Kind(v string) predicate.Token
- func KindContains(v string) predicate.Token
- func KindContainsFold(v string) predicate.Token
- func KindEQ(v string) predicate.Token
- func KindEqualFold(v string) predicate.Token
- func KindGT(v string) predicate.Token
- func KindGTE(v string) predicate.Token
- func KindHasPrefix(v string) predicate.Token
- func KindHasSuffix(v string) predicate.Token
- func KindIn(vs ...string) predicate.Token
- func KindLT(v string) predicate.Token
- func KindLTE(v string) predicate.Token
- func KindNEQ(v string) predicate.Token
- func KindNotIn(vs ...string) predicate.Token
- func Name(v string) predicate.Token
- func NameContains(v string) predicate.Token
- func NameContainsFold(v string) predicate.Token
- func NameEQ(v string) predicate.Token
- func NameEqualFold(v string) predicate.Token
- func NameGT(v string) predicate.Token
- func NameGTE(v string) predicate.Token
- func NameHasPrefix(v string) predicate.Token
- func NameHasSuffix(v string) predicate.Token
- func NameIn(vs ...string) predicate.Token
- func NameLT(v string) predicate.Token
- func NameLTE(v string) predicate.Token
- func NameNEQ(v string) predicate.Token
- func NameNotIn(vs ...string) predicate.Token
- func Not(p predicate.Token) predicate.Token
- func Or(predicates ...predicate.Token) predicate.Token
- func SubjectID(v object.ID) predicate.Token
- func SubjectIDContains(v object.ID) predicate.Token
- func SubjectIDContainsFold(v object.ID) predicate.Token
- func SubjectIDEQ(v object.ID) predicate.Token
- func SubjectIDEqualFold(v object.ID) predicate.Token
- func SubjectIDGT(v object.ID) predicate.Token
- func SubjectIDGTE(v object.ID) predicate.Token
- func SubjectIDHasPrefix(v object.ID) predicate.Token
- func SubjectIDHasSuffix(v object.ID) predicate.Token
- func SubjectIDIn(vs ...object.ID) predicate.Token
- func SubjectIDLT(v object.ID) predicate.Token
- func SubjectIDLTE(v object.ID) predicate.Token
- func SubjectIDNEQ(v object.ID) predicate.Token
- func SubjectIDNotIn(vs ...object.ID) predicate.Token
- func ValidColumn(column string) bool
- func Value(v crypto.String) predicate.Token
- func ValueContains(v crypto.String) predicate.Token
- func ValueContainsFold(v crypto.String) predicate.Token
- func ValueEQ(v crypto.String) predicate.Token
- func ValueEqualFold(v crypto.String) predicate.Token
- func ValueGT(v crypto.String) predicate.Token
- func ValueGTE(v crypto.String) predicate.Token
- func ValueHasPrefix(v crypto.String) predicate.Token
- func ValueHasSuffix(v crypto.String) predicate.Token
- func ValueIn(vs ...crypto.String) predicate.Token
- func ValueLT(v crypto.String) predicate.Token
- func ValueLTE(v crypto.String) predicate.Token
- func ValueNEQ(v crypto.String) predicate.Token
- func ValueNotIn(vs ...crypto.String) predicate.Token
- func WithoutFields(ignores ...string) []string
- type OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByExpiration(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKind(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func BySubjectField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySubjectID(opts ...sql.OrderTermOption) OrderOption
- func ByValue(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the token type in the database. Label = "token" // 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" // FieldSubjectID holds the string denoting the subject_id field in the database. FieldSubjectID = "subject_id" // FieldKind holds the string denoting the kind field in the database. FieldKind = "kind" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldExpiration holds the string denoting the expiration field in the database. FieldExpiration = "expiration" // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgeSubject holds the string denoting the subject edge name in mutations. EdgeSubject = "subject" // Table holds the table name of the token in the database. Table = "tokens" // SubjectTable is the table that holds the subject relation/edge. SubjectTable = "tokens" // SubjectInverseTable is the table name for the Subject entity. // It exists in this package in order to avoid circular dependency with the "subject" package. SubjectInverseTable = "subjects" // SubjectColumn is the table column denoting the subject relation/edge. SubjectColumn = "subject_id" )
Variables ¶
var ( Hooks [1]ent.Hook Interceptors [1]ent.Interceptor // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // SubjectIDValidator is a validator for the "subject_id" field. It is called by the builders before save. SubjectIDValidator func(string) error // DefaultKind holds the default value on creation for the "kind" field. DefaultKind string // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // ValueValidator is a validator for the "value" field. It is called by the builders before save. ValueValidator func(string) error )
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/seal-io/walrus/pkg/dao/model/runtime"
var Columns = []string{ FieldID, FieldCreateTime, FieldSubjectID, FieldKind, FieldName, FieldExpiration, FieldValue, }
Columns holds all SQL columns for token fields.
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 Expiration ¶
Expiration applies equality check predicate on the "expiration" field. It's identical to ExpirationEQ.
func ExpirationEQ ¶
ExpirationEQ applies the EQ predicate on the "expiration" field.
func ExpirationGT ¶
ExpirationGT applies the GT predicate on the "expiration" field.
func ExpirationGTE ¶
ExpirationGTE applies the GTE predicate on the "expiration" field.
func ExpirationIn ¶
ExpirationIn applies the In predicate on the "expiration" field.
func ExpirationIsNil ¶
ExpirationIsNil applies the IsNil predicate on the "expiration" field.
func ExpirationLT ¶
ExpirationLT applies the LT predicate on the "expiration" field.
func ExpirationLTE ¶
ExpirationLTE applies the LTE predicate on the "expiration" field.
func ExpirationNEQ ¶
ExpirationNEQ applies the NEQ predicate on the "expiration" field.
func ExpirationNotIn ¶
ExpirationNotIn applies the NotIn predicate on the "expiration" field.
func ExpirationNotNil ¶
ExpirationNotNil applies the NotNil predicate on the "expiration" field.
func HasSubject ¶
HasSubject applies the HasEdge predicate on the "subject" edge.
func HasSubjectWith ¶
HasSubjectWith applies the HasEdge predicate on the "subject" edge with a given conditions (other predicates).
func KindContains ¶
KindContains applies the Contains predicate on the "kind" field.
func KindContainsFold ¶
KindContainsFold applies the ContainsFold predicate on the "kind" field.
func KindEqualFold ¶
KindEqualFold applies the EqualFold predicate on the "kind" field.
func KindHasPrefix ¶
KindHasPrefix applies the HasPrefix predicate on the "kind" field.
func KindHasSuffix ¶
KindHasSuffix applies the HasSuffix predicate on the "kind" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func SubjectID ¶
SubjectID applies equality check predicate on the "subject_id" field. It's identical to SubjectIDEQ.
func SubjectIDContains ¶
SubjectIDContains applies the Contains predicate on the "subject_id" field.
func SubjectIDContainsFold ¶
SubjectIDContainsFold applies the ContainsFold predicate on the "subject_id" field.
func SubjectIDEQ ¶
SubjectIDEQ applies the EQ predicate on the "subject_id" field.
func SubjectIDEqualFold ¶
SubjectIDEqualFold applies the EqualFold predicate on the "subject_id" field.
func SubjectIDGT ¶
SubjectIDGT applies the GT predicate on the "subject_id" field.
func SubjectIDGTE ¶
SubjectIDGTE applies the GTE predicate on the "subject_id" field.
func SubjectIDHasPrefix ¶
SubjectIDHasPrefix applies the HasPrefix predicate on the "subject_id" field.
func SubjectIDHasSuffix ¶
SubjectIDHasSuffix applies the HasSuffix predicate on the "subject_id" field.
func SubjectIDIn ¶
SubjectIDIn applies the In predicate on the "subject_id" field.
func SubjectIDLT ¶
SubjectIDLT applies the LT predicate on the "subject_id" field.
func SubjectIDLTE ¶
SubjectIDLTE applies the LTE predicate on the "subject_id" field.
func SubjectIDNEQ ¶
SubjectIDNEQ applies the NEQ predicate on the "subject_id" field.
func SubjectIDNotIn ¶
SubjectIDNotIn applies the NotIn predicate on the "subject_id" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Value ¶
Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func ValueContains ¶
ValueContains applies the Contains predicate on the "value" field.
func ValueContainsFold ¶
ValueContainsFold applies the ContainsFold predicate on the "value" field.
func ValueEqualFold ¶
ValueEqualFold applies the EqualFold predicate on the "value" field.
func ValueHasPrefix ¶
ValueHasPrefix applies the HasPrefix predicate on the "value" field.
func ValueHasSuffix ¶
ValueHasSuffix applies the HasSuffix predicate on the "value" field.
func ValueNotIn ¶
ValueNotIn applies the NotIn predicate on the "value" field.
func WithoutFields ¶
WithoutFields returns the fields ignored the given list.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Token queries.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByExpiration ¶
func ByExpiration(opts ...sql.OrderTermOption) OrderOption
ByExpiration orders the results by the expiration field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKind ¶
func ByKind(opts ...sql.OrderTermOption) OrderOption
ByKind orders the results by the kind field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func BySubjectField ¶
func BySubjectField(field string, opts ...sql.OrderTermOption) OrderOption
BySubjectField orders the results by subject field.
func BySubjectID ¶
func BySubjectID(opts ...sql.OrderTermOption) OrderOption
BySubjectID orders the results by the subject_id field.
func ByValue ¶
func ByValue(opts ...sql.OrderTermOption) OrderOption
ByValue orders the results by the value field.