template

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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"

Columns holds all SQL columns for template fields.

Functions

func And

func And(predicates ...predicate.Template) predicate.Template

And groups predicates with the AND operator between them.

func CatalogID

func CatalogID(v object.ID) predicate.Template

CatalogID applies equality check predicate on the "catalog_id" field. It's identical to CatalogIDEQ.

func CatalogIDContains

func CatalogIDContains(v object.ID) predicate.Template

CatalogIDContains applies the Contains predicate on the "catalog_id" field.

func CatalogIDContainsFold

func CatalogIDContainsFold(v object.ID) predicate.Template

CatalogIDContainsFold applies the ContainsFold predicate on the "catalog_id" field.

func CatalogIDEQ

func CatalogIDEQ(v object.ID) predicate.Template

CatalogIDEQ applies the EQ predicate on the "catalog_id" field.

func CatalogIDEqualFold

func CatalogIDEqualFold(v object.ID) predicate.Template

CatalogIDEqualFold applies the EqualFold predicate on the "catalog_id" field.

func CatalogIDGT

func CatalogIDGT(v object.ID) predicate.Template

CatalogIDGT applies the GT predicate on the "catalog_id" field.

func CatalogIDGTE

func CatalogIDGTE(v object.ID) predicate.Template

CatalogIDGTE applies the GTE predicate on the "catalog_id" field.

func CatalogIDHasPrefix

func CatalogIDHasPrefix(v object.ID) predicate.Template

CatalogIDHasPrefix applies the HasPrefix predicate on the "catalog_id" field.

func CatalogIDHasSuffix

func CatalogIDHasSuffix(v object.ID) predicate.Template

CatalogIDHasSuffix applies the HasSuffix predicate on the "catalog_id" field.

func CatalogIDIn

func CatalogIDIn(vs ...object.ID) predicate.Template

CatalogIDIn applies the In predicate on the "catalog_id" field.

func CatalogIDIsNil

func CatalogIDIsNil() predicate.Template

CatalogIDIsNil applies the IsNil predicate on the "catalog_id" field.

func CatalogIDLT

func CatalogIDLT(v object.ID) predicate.Template

CatalogIDLT applies the LT predicate on the "catalog_id" field.

func CatalogIDLTE

func CatalogIDLTE(v object.ID) predicate.Template

CatalogIDLTE applies the LTE predicate on the "catalog_id" field.

func CatalogIDNEQ

func CatalogIDNEQ(v object.ID) predicate.Template

CatalogIDNEQ applies the NEQ predicate on the "catalog_id" field.

func CatalogIDNotIn

func CatalogIDNotIn(vs ...object.ID) predicate.Template

CatalogIDNotIn applies the NotIn predicate on the "catalog_id" field.

func CatalogIDNotNil

func CatalogIDNotNil() predicate.Template

CatalogIDNotNil applies the NotNil predicate on the "catalog_id" field.

func CreateTime

func CreateTime(v time.Time) predicate.Template

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Template

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Template

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Template

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Template

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Template

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Template

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Template

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Template

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Description

func Description(v string) predicate.Template

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Template

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Template

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Template

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Template

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Template

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Template

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Template

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Template

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Template

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Template

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Template

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Template

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Template

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Template

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Template

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasCatalog

func HasCatalog() predicate.Template

HasCatalog applies the HasEdge predicate on the "catalog" edge.

func HasCatalogWith

func HasCatalogWith(preds ...predicate.Catalog) predicate.Template

HasCatalogWith applies the HasEdge predicate on the "catalog" edge with a given conditions (other predicates).

func HasProject added in v0.4.0

func HasProject() predicate.Template

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith added in v0.4.0

func HasProjectWith(preds ...predicate.Project) predicate.Template

HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).

func HasVersions

func HasVersions() predicate.Template

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 ID

func ID(id object.ID) predicate.Template

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id object.ID) predicate.Template

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id object.ID) predicate.Template

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id object.ID) predicate.Template

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...object.ID) predicate.Template

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id object.ID) predicate.Template

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id object.ID) predicate.Template

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id object.ID) predicate.Template

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...object.ID) predicate.Template

IDNotIn applies the NotIn predicate on the ID field.

func Icon

func Icon(v string) predicate.Template

Icon applies equality check predicate on the "icon" field. It's identical to IconEQ.

func IconContains

func IconContains(v string) predicate.Template

IconContains applies the Contains predicate on the "icon" field.

func IconContainsFold

func IconContainsFold(v string) predicate.Template

IconContainsFold applies the ContainsFold predicate on the "icon" field.

func IconEQ

func IconEQ(v string) predicate.Template

IconEQ applies the EQ predicate on the "icon" field.

func IconEqualFold

func IconEqualFold(v string) predicate.Template

IconEqualFold applies the EqualFold predicate on the "icon" field.

func IconGT

func IconGT(v string) predicate.Template

IconGT applies the GT predicate on the "icon" field.

func IconGTE

func IconGTE(v string) predicate.Template

IconGTE applies the GTE predicate on the "icon" field.

func IconHasPrefix

func IconHasPrefix(v string) predicate.Template

IconHasPrefix applies the HasPrefix predicate on the "icon" field.

func IconHasSuffix

func IconHasSuffix(v string) predicate.Template

IconHasSuffix applies the HasSuffix predicate on the "icon" field.

func IconIn

func IconIn(vs ...string) predicate.Template

IconIn applies the In predicate on the "icon" field.

func IconIsNil

func IconIsNil() predicate.Template

IconIsNil applies the IsNil predicate on the "icon" field.

func IconLT

func IconLT(v string) predicate.Template

IconLT applies the LT predicate on the "icon" field.

func IconLTE

func IconLTE(v string) predicate.Template

IconLTE applies the LTE predicate on the "icon" field.

func IconNEQ

func IconNEQ(v string) predicate.Template

IconNEQ applies the NEQ predicate on the "icon" field.

func IconNotIn

func IconNotIn(vs ...string) predicate.Template

IconNotIn applies the NotIn predicate on the "icon" field.

func IconNotNil

func IconNotNil() predicate.Template

IconNotNil applies the NotNil predicate on the "icon" field.

func LabelsIsNil

func LabelsIsNil() predicate.Template

LabelsIsNil applies the IsNil predicate on the "labels" field.

func LabelsNotNil

func LabelsNotNil() predicate.Template

LabelsNotNil applies the NotNil predicate on the "labels" field.

func Name

func Name(v string) predicate.Template

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Template

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Template

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Template

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Template

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Template

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Template

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Template

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Template

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Template

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Template

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Template

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Template

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Template

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Template) predicate.Template

Or groups predicates with the OR operator between them.

func ProjectID added in v0.4.0

func ProjectID(v object.ID) predicate.Template

ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.

func ProjectIDContains added in v0.4.0

func ProjectIDContains(v object.ID) predicate.Template

ProjectIDContains applies the Contains predicate on the "project_id" field.

func ProjectIDContainsFold added in v0.4.0

func ProjectIDContainsFold(v object.ID) predicate.Template

ProjectIDContainsFold applies the ContainsFold predicate on the "project_id" field.

func ProjectIDEQ added in v0.4.0

func ProjectIDEQ(v object.ID) predicate.Template

ProjectIDEQ applies the EQ predicate on the "project_id" field.

func ProjectIDEqualFold added in v0.4.0

func ProjectIDEqualFold(v object.ID) predicate.Template

ProjectIDEqualFold applies the EqualFold predicate on the "project_id" field.

func ProjectIDGT added in v0.4.0

func ProjectIDGT(v object.ID) predicate.Template

ProjectIDGT applies the GT predicate on the "project_id" field.

func ProjectIDGTE added in v0.4.0

func ProjectIDGTE(v object.ID) predicate.Template

ProjectIDGTE applies the GTE predicate on the "project_id" field.

func ProjectIDHasPrefix added in v0.4.0

func ProjectIDHasPrefix(v object.ID) predicate.Template

ProjectIDHasPrefix applies the HasPrefix predicate on the "project_id" field.

func ProjectIDHasSuffix added in v0.4.0

func ProjectIDHasSuffix(v object.ID) predicate.Template

ProjectIDHasSuffix applies the HasSuffix predicate on the "project_id" field.

func ProjectIDIn added in v0.4.0

func ProjectIDIn(vs ...object.ID) predicate.Template

ProjectIDIn applies the In predicate on the "project_id" field.

func ProjectIDIsNil added in v0.4.0

func ProjectIDIsNil() predicate.Template

ProjectIDIsNil applies the IsNil predicate on the "project_id" field.

func ProjectIDLT added in v0.4.0

func ProjectIDLT(v object.ID) predicate.Template

ProjectIDLT applies the LT predicate on the "project_id" field.

func ProjectIDLTE added in v0.4.0

func ProjectIDLTE(v object.ID) predicate.Template

ProjectIDLTE applies the LTE predicate on the "project_id" field.

func ProjectIDNEQ added in v0.4.0

func ProjectIDNEQ(v object.ID) predicate.Template

ProjectIDNEQ applies the NEQ predicate on the "project_id" field.

func ProjectIDNotIn added in v0.4.0

func ProjectIDNotIn(vs ...object.ID) predicate.Template

ProjectIDNotIn applies the NotIn predicate on the "project_id" field.

func ProjectIDNotNil added in v0.4.0

func ProjectIDNotNil() predicate.Template

ProjectIDNotNil applies the NotNil predicate on the "project_id" field.

func Source

func Source(v string) predicate.Template

Source applies equality check predicate on the "source" field. It's identical to SourceEQ.

func SourceContains

func SourceContains(v string) predicate.Template

SourceContains applies the Contains predicate on the "source" field.

func SourceContainsFold

func SourceContainsFold(v string) predicate.Template

SourceContainsFold applies the ContainsFold predicate on the "source" field.

func SourceEQ

func SourceEQ(v string) predicate.Template

SourceEQ applies the EQ predicate on the "source" field.

func SourceEqualFold

func SourceEqualFold(v string) predicate.Template

SourceEqualFold applies the EqualFold predicate on the "source" field.

func SourceGT

func SourceGT(v string) predicate.Template

SourceGT applies the GT predicate on the "source" field.

func SourceGTE

func SourceGTE(v string) predicate.Template

SourceGTE applies the GTE predicate on the "source" field.

func SourceHasPrefix

func SourceHasPrefix(v string) predicate.Template

SourceHasPrefix applies the HasPrefix predicate on the "source" field.

func SourceHasSuffix

func SourceHasSuffix(v string) predicate.Template

SourceHasSuffix applies the HasSuffix predicate on the "source" field.

func SourceIn

func SourceIn(vs ...string) predicate.Template

SourceIn applies the In predicate on the "source" field.

func SourceLT

func SourceLT(v string) predicate.Template

SourceLT applies the LT predicate on the "source" field.

func SourceLTE

func SourceLTE(v string) predicate.Template

SourceLTE applies the LTE predicate on the "source" field.

func SourceNEQ

func SourceNEQ(v string) predicate.Template

SourceNEQ applies the NEQ predicate on the "source" field.

func SourceNotIn

func SourceNotIn(vs ...string) predicate.Template

SourceNotIn applies the NotIn predicate on the "source" field.

func StatusIsNil

func StatusIsNil() predicate.Template

StatusIsNil applies the IsNil predicate on the "status" field.

func StatusNotNil

func StatusNotNil() predicate.Template

StatusNotNil applies the NotNil predicate on the "status" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Template

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Template

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Template

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Template

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Template

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Template

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Template

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Template

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Template

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func WithoutFields

func WithoutFields(ignores ...string) []string

WithoutFields returns the fields ignored the given list.

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL