Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Template) predicate.Template
- func CatalogID(v object.ID) predicate.Template
- func CatalogIDContains(v object.ID) predicate.Template
- func CatalogIDContainsFold(v object.ID) predicate.Template
- func CatalogIDEQ(v object.ID) predicate.Template
- func CatalogIDEqualFold(v object.ID) predicate.Template
- func CatalogIDGT(v object.ID) predicate.Template
- func CatalogIDGTE(v object.ID) predicate.Template
- func CatalogIDHasPrefix(v object.ID) predicate.Template
- func CatalogIDHasSuffix(v object.ID) predicate.Template
- func CatalogIDIn(vs ...object.ID) predicate.Template
- func CatalogIDIsNil() predicate.Template
- func CatalogIDLT(v object.ID) predicate.Template
- func CatalogIDLTE(v object.ID) predicate.Template
- func CatalogIDNEQ(v object.ID) predicate.Template
- func CatalogIDNotIn(vs ...object.ID) predicate.Template
- func CatalogIDNotNil() predicate.Template
- func CreateTime(v time.Time) predicate.Template
- func CreateTimeEQ(v time.Time) predicate.Template
- func CreateTimeGT(v time.Time) predicate.Template
- func CreateTimeGTE(v time.Time) predicate.Template
- func CreateTimeIn(vs ...time.Time) predicate.Template
- func CreateTimeLT(v time.Time) predicate.Template
- func CreateTimeLTE(v time.Time) predicate.Template
- func CreateTimeNEQ(v time.Time) predicate.Template
- func CreateTimeNotIn(vs ...time.Time) predicate.Template
- func Description(v string) predicate.Template
- func DescriptionContains(v string) predicate.Template
- func DescriptionContainsFold(v string) predicate.Template
- func DescriptionEQ(v string) predicate.Template
- func DescriptionEqualFold(v string) predicate.Template
- func DescriptionGT(v string) predicate.Template
- func DescriptionGTE(v string) predicate.Template
- func DescriptionHasPrefix(v string) predicate.Template
- func DescriptionHasSuffix(v string) predicate.Template
- func DescriptionIn(vs ...string) predicate.Template
- func DescriptionIsNil() predicate.Template
- func DescriptionLT(v string) predicate.Template
- func DescriptionLTE(v string) predicate.Template
- func DescriptionNEQ(v string) predicate.Template
- func DescriptionNotIn(vs ...string) predicate.Template
- func DescriptionNotNil() predicate.Template
- func HasCatalog() predicate.Template
- func HasCatalogWith(preds ...predicate.Catalog) predicate.Template
- func HasProject() predicate.Template
- func HasProjectWith(preds ...predicate.Project) predicate.Template
- func HasVersions() predicate.Template
- func HasVersionsWith(preds ...predicate.TemplateVersion) predicate.Template
- func ID(id object.ID) predicate.Template
- func IDEQ(id object.ID) predicate.Template
- func IDGT(id object.ID) predicate.Template
- func IDGTE(id object.ID) predicate.Template
- func IDIn(ids ...object.ID) predicate.Template
- func IDLT(id object.ID) predicate.Template
- func IDLTE(id object.ID) predicate.Template
- func IDNEQ(id object.ID) predicate.Template
- func IDNotIn(ids ...object.ID) predicate.Template
- func Icon(v string) predicate.Template
- func IconContains(v string) predicate.Template
- func IconContainsFold(v string) predicate.Template
- func IconEQ(v string) predicate.Template
- func IconEqualFold(v string) predicate.Template
- func IconGT(v string) predicate.Template
- func IconGTE(v string) predicate.Template
- func IconHasPrefix(v string) predicate.Template
- func IconHasSuffix(v string) predicate.Template
- func IconIn(vs ...string) predicate.Template
- func IconIsNil() predicate.Template
- func IconLT(v string) predicate.Template
- func IconLTE(v string) predicate.Template
- func IconNEQ(v string) predicate.Template
- func IconNotIn(vs ...string) predicate.Template
- func IconNotNil() predicate.Template
- func LabelsIsNil() predicate.Template
- func LabelsNotNil() predicate.Template
- func Name(v string) predicate.Template
- func NameContains(v string) predicate.Template
- func NameContainsFold(v string) predicate.Template
- func NameEQ(v string) predicate.Template
- func NameEqualFold(v string) predicate.Template
- func NameGT(v string) predicate.Template
- func NameGTE(v string) predicate.Template
- func NameHasPrefix(v string) predicate.Template
- func NameHasSuffix(v string) predicate.Template
- func NameIn(vs ...string) predicate.Template
- func NameLT(v string) predicate.Template
- func NameLTE(v string) predicate.Template
- func NameNEQ(v string) predicate.Template
- func NameNotIn(vs ...string) predicate.Template
- func Not(p predicate.Template) predicate.Template
- func Or(predicates ...predicate.Template) predicate.Template
- func ProjectID(v object.ID) predicate.Template
- func ProjectIDContains(v object.ID) predicate.Template
- func ProjectIDContainsFold(v object.ID) predicate.Template
- func ProjectIDEQ(v object.ID) predicate.Template
- func ProjectIDEqualFold(v object.ID) predicate.Template
- func ProjectIDGT(v object.ID) predicate.Template
- func ProjectIDGTE(v object.ID) predicate.Template
- func ProjectIDHasPrefix(v object.ID) predicate.Template
- func ProjectIDHasSuffix(v object.ID) predicate.Template
- func ProjectIDIn(vs ...object.ID) predicate.Template
- func ProjectIDIsNil() predicate.Template
- func ProjectIDLT(v object.ID) predicate.Template
- func ProjectIDLTE(v object.ID) predicate.Template
- func ProjectIDNEQ(v object.ID) predicate.Template
- func ProjectIDNotIn(vs ...object.ID) predicate.Template
- func ProjectIDNotNil() predicate.Template
- func Source(v string) predicate.Template
- func SourceContains(v string) predicate.Template
- func SourceContainsFold(v string) predicate.Template
- func SourceEQ(v string) predicate.Template
- func SourceEqualFold(v string) predicate.Template
- func SourceGT(v string) predicate.Template
- func SourceGTE(v string) predicate.Template
- func SourceHasPrefix(v string) predicate.Template
- func SourceHasSuffix(v string) predicate.Template
- func SourceIn(vs ...string) predicate.Template
- func SourceLT(v string) predicate.Template
- func SourceLTE(v string) predicate.Template
- func SourceNEQ(v string) predicate.Template
- func SourceNotIn(vs ...string) predicate.Template
- func StatusIsNil() predicate.Template
- func StatusNotNil() predicate.Template
- func UpdateTime(v time.Time) predicate.Template
- func UpdateTimeEQ(v time.Time) predicate.Template
- func UpdateTimeGT(v time.Time) predicate.Template
- func UpdateTimeGTE(v time.Time) predicate.Template
- func UpdateTimeIn(vs ...time.Time) predicate.Template
- func UpdateTimeLT(v time.Time) predicate.Template
- func UpdateTimeLTE(v time.Time) predicate.Template
- func UpdateTimeNEQ(v time.Time) predicate.Template
- func UpdateTimeNotIn(vs ...time.Time) predicate.Template
- func ValidColumn(column string) bool
- func WithoutFields(ignores ...string) []string
- type OrderOption
- func ByCatalogField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCatalogID(opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIcon(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByProjectID(opts ...sql.OrderTermOption) OrderOption
- func BySource(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
- func ByVersions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByVersionsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the template type in the database. Label = "template" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldLabels holds the string denoting the labels field in the database. FieldLabels = "labels" // 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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldIcon holds the string denoting the icon field in the database. FieldIcon = "icon" // FieldSource holds the string denoting the source field in the database. FieldSource = "source" // FieldCatalogID holds the string denoting the catalog_id field in the database. FieldCatalogID = "catalog_id" // FieldProjectID holds the string denoting the project_id field in the database. FieldProjectID = "project_id" // EdgeVersions holds the string denoting the versions edge name in mutations. EdgeVersions = "versions" // EdgeCatalog holds the string denoting the catalog edge name in mutations. EdgeCatalog = "catalog" // EdgeProject holds the string denoting the project edge name in mutations. EdgeProject = "project" // Table holds the table name of the template in the database. Table = "templates" // VersionsTable is the table that holds the versions relation/edge. VersionsTable = "template_versions" // VersionsInverseTable is the table name for the TemplateVersion entity. // It exists in this package in order to avoid circular dependency with the "templateversion" package. VersionsInverseTable = "template_versions" // VersionsColumn is the table column denoting the versions relation/edge. VersionsColumn = "template_id" // CatalogTable is the table that holds the catalog relation/edge. CatalogTable = "templates" // CatalogInverseTable is the table name for the Catalog entity. // It exists in this package in order to avoid circular dependency with the "catalog" package. CatalogInverseTable = "catalogs" // CatalogColumn is the table column denoting the catalog relation/edge. CatalogColumn = "catalog_id" // ProjectTable is the table that holds the project relation/edge. ProjectTable = "templates" // ProjectInverseTable is the table name for the Project entity. // It exists in this package in order to avoid circular dependency with the "project" package. ProjectInverseTable = "projects" // ProjectColumn is the table column denoting the project relation/edge. ProjectColumn = "project_id" )
Variables ¶
var ( Hooks [1]ent.Hook Interceptors [1]ent.Interceptor // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultLabels holds the default value on creation for the "labels" field. DefaultLabels map[string]string // 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 // SourceValidator is a validator for the "source" field. It is called by the builders before save. SourceValidator 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, FieldName, FieldDescription, FieldLabels, FieldCreateTime, FieldUpdateTime, FieldStatus, FieldIcon, FieldSource, FieldCatalogID, FieldProjectID, }
Columns holds all SQL columns for template fields.
Functions ¶
func CatalogID ¶
CatalogID applies equality check predicate on the "catalog_id" field. It's identical to CatalogIDEQ.
func CatalogIDContains ¶
CatalogIDContains applies the Contains predicate on the "catalog_id" field.
func CatalogIDContainsFold ¶
CatalogIDContainsFold applies the ContainsFold predicate on the "catalog_id" field.
func CatalogIDEQ ¶
CatalogIDEQ applies the EQ predicate on the "catalog_id" field.
func CatalogIDEqualFold ¶
CatalogIDEqualFold applies the EqualFold predicate on the "catalog_id" field.
func CatalogIDGT ¶
CatalogIDGT applies the GT predicate on the "catalog_id" field.
func CatalogIDGTE ¶
CatalogIDGTE applies the GTE predicate on the "catalog_id" field.
func CatalogIDHasPrefix ¶
CatalogIDHasPrefix applies the HasPrefix predicate on the "catalog_id" field.
func CatalogIDHasSuffix ¶
CatalogIDHasSuffix applies the HasSuffix predicate on the "catalog_id" field.
func CatalogIDIn ¶
CatalogIDIn applies the In predicate on the "catalog_id" field.
func CatalogIDIsNil ¶
CatalogIDIsNil applies the IsNil predicate on the "catalog_id" field.
func CatalogIDLT ¶
CatalogIDLT applies the LT predicate on the "catalog_id" field.
func CatalogIDLTE ¶
CatalogIDLTE applies the LTE predicate on the "catalog_id" field.
func CatalogIDNEQ ¶
CatalogIDNEQ applies the NEQ predicate on the "catalog_id" field.
func CatalogIDNotIn ¶
CatalogIDNotIn applies the NotIn predicate on the "catalog_id" field.
func CatalogIDNotNil ¶
CatalogIDNotNil applies the NotNil predicate on the "catalog_id" field.
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 Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasCatalog ¶
HasCatalog applies the HasEdge predicate on the "catalog" edge.
func HasCatalogWith ¶
HasCatalogWith applies the HasEdge predicate on the "catalog" edge with a given conditions (other predicates).
func HasProject ¶ added in v0.4.0
HasProject applies the HasEdge predicate on the "project" edge.
func HasProjectWith ¶ added in v0.4.0
HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).
func HasVersions ¶
HasVersions applies the HasEdge predicate on the "versions" edge.
func HasVersionsWith ¶
func HasVersionsWith(preds ...predicate.TemplateVersion) predicate.Template
HasVersionsWith applies the HasEdge predicate on the "versions" edge with a given conditions (other predicates).
func IconContains ¶
IconContains applies the Contains predicate on the "icon" field.
func IconContainsFold ¶
IconContainsFold applies the ContainsFold predicate on the "icon" field.
func IconEqualFold ¶
IconEqualFold applies the EqualFold predicate on the "icon" field.
func IconHasPrefix ¶
IconHasPrefix applies the HasPrefix predicate on the "icon" field.
func IconHasSuffix ¶
IconHasSuffix applies the HasSuffix predicate on the "icon" field.
func IconNotNil ¶
IconNotNil applies the NotNil predicate on the "icon" field.
func LabelsIsNil ¶
LabelsIsNil applies the IsNil predicate on the "labels" field.
func LabelsNotNil ¶
LabelsNotNil applies the NotNil predicate on the "labels" 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 ProjectID ¶ added in v0.4.0
ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.
func ProjectIDContains ¶ added in v0.4.0
ProjectIDContains applies the Contains predicate on the "project_id" field.
func ProjectIDContainsFold ¶ added in v0.4.0
ProjectIDContainsFold applies the ContainsFold predicate on the "project_id" field.
func ProjectIDEQ ¶ added in v0.4.0
ProjectIDEQ applies the EQ predicate on the "project_id" field.
func ProjectIDEqualFold ¶ added in v0.4.0
ProjectIDEqualFold applies the EqualFold predicate on the "project_id" field.
func ProjectIDGT ¶ added in v0.4.0
ProjectIDGT applies the GT predicate on the "project_id" field.
func ProjectIDGTE ¶ added in v0.4.0
ProjectIDGTE applies the GTE predicate on the "project_id" field.
func ProjectIDHasPrefix ¶ added in v0.4.0
ProjectIDHasPrefix applies the HasPrefix predicate on the "project_id" field.
func ProjectIDHasSuffix ¶ added in v0.4.0
ProjectIDHasSuffix applies the HasSuffix predicate on the "project_id" field.
func ProjectIDIn ¶ added in v0.4.0
ProjectIDIn applies the In predicate on the "project_id" field.
func ProjectIDIsNil ¶ added in v0.4.0
ProjectIDIsNil applies the IsNil predicate on the "project_id" field.
func ProjectIDLT ¶ added in v0.4.0
ProjectIDLT applies the LT predicate on the "project_id" field.
func ProjectIDLTE ¶ added in v0.4.0
ProjectIDLTE applies the LTE predicate on the "project_id" field.
func ProjectIDNEQ ¶ added in v0.4.0
ProjectIDNEQ applies the NEQ predicate on the "project_id" field.
func ProjectIDNotIn ¶ added in v0.4.0
ProjectIDNotIn applies the NotIn predicate on the "project_id" field.
func ProjectIDNotNil ¶ added in v0.4.0
ProjectIDNotNil applies the NotNil predicate on the "project_id" field.
func Source ¶
Source applies equality check predicate on the "source" field. It's identical to SourceEQ.
func SourceContains ¶
SourceContains applies the Contains predicate on the "source" field.
func SourceContainsFold ¶
SourceContainsFold applies the ContainsFold predicate on the "source" field.
func SourceEqualFold ¶
SourceEqualFold applies the EqualFold predicate on the "source" field.
func SourceHasPrefix ¶
SourceHasPrefix applies the HasPrefix predicate on the "source" field.
func SourceHasSuffix ¶
SourceHasSuffix applies the HasSuffix predicate on the "source" field.
func SourceNotIn ¶
SourceNotIn applies the NotIn predicate on the "source" field.
func StatusIsNil ¶
StatusIsNil applies the IsNil predicate on the "status" field.
func StatusNotNil ¶
StatusNotNil applies the NotNil predicate on the "status" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func WithoutFields ¶
WithoutFields returns the fields ignored the given list.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Template queries.
func ByCatalogField ¶
func ByCatalogField(field string, opts ...sql.OrderTermOption) OrderOption
ByCatalogField orders the results by catalog field.
func ByCatalogID ¶
func ByCatalogID(opts ...sql.OrderTermOption) OrderOption
ByCatalogID orders the results by the catalog_id field.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIcon ¶
func ByIcon(opts ...sql.OrderTermOption) OrderOption
ByIcon orders the results by the icon field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByProjectField ¶ added in v0.4.0
func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption
ByProjectField orders the results by project field.
func ByProjectID ¶ added in v0.4.0
func ByProjectID(opts ...sql.OrderTermOption) OrderOption
ByProjectID orders the results by the project_id field.
func BySource ¶
func BySource(opts ...sql.OrderTermOption) OrderOption
BySource orders the results by the source field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.
func ByVersions ¶
func ByVersions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByVersions orders the results by versions terms.
func ByVersionsCount ¶
func ByVersionsCount(opts ...sql.OrderTermOption) OrderOption
ByVersionsCount orders the results by versions count.