Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Resource) predicate.Resource
- func CreatedAt(v time.Time) predicate.Resource
- func CreatedAtEQ(v time.Time) predicate.Resource
- func CreatedAtGT(v time.Time) predicate.Resource
- func CreatedAtGTE(v time.Time) predicate.Resource
- func CreatedAtIn(vs ...time.Time) predicate.Resource
- func CreatedAtLT(v time.Time) predicate.Resource
- func CreatedAtLTE(v time.Time) predicate.Resource
- func CreatedAtNEQ(v time.Time) predicate.Resource
- func CreatedAtNotIn(vs ...time.Time) predicate.Resource
- func FeaturesIsNil() predicate.Resource
- func FeaturesNotNil() predicate.Resource
- func HasBlueprint() predicate.Resource
- func HasBlueprintWith(preds ...predicate.Blueprint) predicate.Resource
- func HasDependsOn() predicate.Resource
- func HasDependsOnWith(preds ...predicate.Resource) predicate.Resource
- func HasRequiredBy() predicate.Resource
- func HasRequiredByWith(preds ...predicate.Resource) predicate.Resource
- func ID(id uuid.UUID) predicate.Resource
- func IDEQ(id uuid.UUID) predicate.Resource
- func IDGT(id uuid.UUID) predicate.Resource
- func IDGTE(id uuid.UUID) predicate.Resource
- func IDIn(ids ...uuid.UUID) predicate.Resource
- func IDLT(id uuid.UUID) predicate.Resource
- func IDLTE(id uuid.UUID) predicate.Resource
- func IDNEQ(id uuid.UUID) predicate.Resource
- func IDNotIn(ids ...uuid.UUID) predicate.Resource
- func Key(v string) predicate.Resource
- func KeyContains(v string) predicate.Resource
- func KeyContainsFold(v string) predicate.Resource
- func KeyEQ(v string) predicate.Resource
- func KeyEqualFold(v string) predicate.Resource
- func KeyGT(v string) predicate.Resource
- func KeyGTE(v string) predicate.Resource
- func KeyHasPrefix(v string) predicate.Resource
- func KeyHasSuffix(v string) predicate.Resource
- func KeyIn(vs ...string) predicate.Resource
- func KeyLT(v string) predicate.Resource
- func KeyLTE(v string) predicate.Resource
- func KeyNEQ(v string) predicate.Resource
- func KeyNotIn(vs ...string) predicate.Resource
- func Not(p predicate.Resource) predicate.Resource
- func Or(predicates ...predicate.Resource) predicate.Resource
- func QuotaRequirementsIsNil() predicate.Resource
- func QuotaRequirementsNotNil() predicate.Resource
- func ResourceType(v string) predicate.Resource
- func ResourceTypeContains(v string) predicate.Resource
- func ResourceTypeContainsFold(v string) predicate.Resource
- func ResourceTypeEQ(v string) predicate.Resource
- func ResourceTypeEqualFold(v string) predicate.Resource
- func ResourceTypeGT(v string) predicate.Resource
- func ResourceTypeGTE(v string) predicate.Resource
- func ResourceTypeHasPrefix(v string) predicate.Resource
- func ResourceTypeHasSuffix(v string) predicate.Resource
- func ResourceTypeIn(vs ...string) predicate.Resource
- func ResourceTypeLT(v string) predicate.Resource
- func ResourceTypeLTE(v string) predicate.Resource
- func ResourceTypeNEQ(v string) predicate.Resource
- func ResourceTypeNotIn(vs ...string) predicate.Resource
- func TypeEQ(v Type) predicate.Resource
- func TypeIn(vs ...Type) predicate.Resource
- func TypeNEQ(v Type) predicate.Resource
- func TypeNotIn(vs ...Type) predicate.Resource
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Resource
- func UpdatedAtEQ(v time.Time) predicate.Resource
- func UpdatedAtGT(v time.Time) predicate.Resource
- func UpdatedAtGTE(v time.Time) predicate.Resource
- func UpdatedAtIn(vs ...time.Time) predicate.Resource
- func UpdatedAtLT(v time.Time) predicate.Resource
- func UpdatedAtLTE(v time.Time) predicate.Resource
- func UpdatedAtNEQ(v time.Time) predicate.Resource
- func UpdatedAtNotIn(vs ...time.Time) predicate.Resource
- func ValidColumn(column string) bool
- type OrderOption
- func ByBlueprintField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDependsOn(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDependsOnCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKey(opts ...sql.OrderTermOption) OrderOption
- func ByRequiredBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRequiredByCount(opts ...sql.OrderTermOption) OrderOption
- func ByResourceType(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
const ( // Label holds the string label denoting the resource type in the database. Label = "resource" // 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" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldKey holds the string denoting the key field in the database. FieldKey = "key" // FieldResourceType holds the string denoting the resource_type field in the database. FieldResourceType = "resource_type" // FieldFeatures holds the string denoting the features field in the database. FieldFeatures = "features" // FieldQuotaRequirements holds the string denoting the quota_requirements field in the database. FieldQuotaRequirements = "quota_requirements" // FieldObject holds the string denoting the object field in the database. FieldObject = "object" // EdgeBlueprint holds the string denoting the blueprint edge name in mutations. EdgeBlueprint = "blueprint" // EdgeDependsOn holds the string denoting the depends_on edge name in mutations. EdgeDependsOn = "depends_on" // EdgeRequiredBy holds the string denoting the required_by edge name in mutations. EdgeRequiredBy = "required_by" // Table holds the table name of the resource in the database. Table = "resources" // BlueprintTable is the table that holds the blueprint relation/edge. BlueprintTable = "resources" // BlueprintInverseTable is the table name for the Blueprint entity. // It exists in this package in order to avoid circular dependency with the "blueprint" package. BlueprintInverseTable = "blueprints" // BlueprintColumn is the table column denoting the blueprint relation/edge. BlueprintColumn = "resource_blueprint" // DependsOnTable is the table that holds the depends_on relation/edge. The primary key declared below. DependsOnTable = "resource_required_by" // RequiredByTable is the table that holds the required_by relation/edge. The primary key declared below. RequiredByTable = "resource_required_by" )
const DefaultType = TypeResource
TypeResource is the default value of the Type enum.
Variables ¶
var ( // DependsOnPrimaryKey and DependsOnColumn2 are the table columns denoting the // primary key for the depends_on relation (M2M). DependsOnPrimaryKey = []string{"resource_id", "depends_on_id"} // RequiredByPrimaryKey and RequiredByColumn2 are the table columns denoting the // primary key for the required_by relation (M2M). RequiredByPrimaryKey = []string{"resource_id", "depends_on_id"} )
var ( // 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 // DefaultFeatures holds the default value on creation for the "features" field. DefaultFeatures provider.Features // DefaultQuotaRequirements holds the default value on creation for the "quota_requirements" field. DefaultQuotaRequirements provider.QuotaRequirements // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldType, FieldKey, FieldResourceType, FieldFeatures, FieldQuotaRequirements, FieldObject, }
Columns holds all SQL columns for resource fields.
var ForeignKeys = []string{
"resource_blueprint",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "resources" 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 FeaturesIsNil ¶
FeaturesIsNil applies the IsNil predicate on the "features" field.
func FeaturesNotNil ¶
FeaturesNotNil applies the NotNil predicate on the "features" field.
func HasBlueprint ¶
HasBlueprint applies the HasEdge predicate on the "blueprint" edge.
func HasBlueprintWith ¶
HasBlueprintWith applies the HasEdge predicate on the "blueprint" edge with a given conditions (other predicates).
func HasDependsOn ¶
HasDependsOn applies the HasEdge predicate on the "depends_on" edge.
func HasDependsOnWith ¶
HasDependsOnWith applies the HasEdge predicate on the "depends_on" edge with a given conditions (other predicates).
func HasRequiredBy ¶
HasRequiredBy applies the HasEdge predicate on the "required_by" edge.
func HasRequiredByWith ¶
HasRequiredByWith applies the HasEdge predicate on the "required_by" edge with a given conditions (other predicates).
func KeyContains ¶
KeyContains applies the Contains predicate on the "key" field.
func KeyContainsFold ¶
KeyContainsFold applies the ContainsFold predicate on the "key" field.
func KeyEqualFold ¶
KeyEqualFold applies the EqualFold predicate on the "key" field.
func KeyHasPrefix ¶
KeyHasPrefix applies the HasPrefix predicate on the "key" field.
func KeyHasSuffix ¶
KeyHasSuffix applies the HasSuffix predicate on the "key" field.
func QuotaRequirementsIsNil ¶
QuotaRequirementsIsNil applies the IsNil predicate on the "quota_requirements" field.
func QuotaRequirementsNotNil ¶
QuotaRequirementsNotNil applies the NotNil predicate on the "quota_requirements" field.
func ResourceType ¶
ResourceType applies equality check predicate on the "resource_type" field. It's identical to ResourceTypeEQ.
func ResourceTypeContains ¶
ResourceTypeContains applies the Contains predicate on the "resource_type" field.
func ResourceTypeContainsFold ¶
ResourceTypeContainsFold applies the ContainsFold predicate on the "resource_type" field.
func ResourceTypeEQ ¶
ResourceTypeEQ applies the EQ predicate on the "resource_type" field.
func ResourceTypeEqualFold ¶
ResourceTypeEqualFold applies the EqualFold predicate on the "resource_type" field.
func ResourceTypeGT ¶
ResourceTypeGT applies the GT predicate on the "resource_type" field.
func ResourceTypeGTE ¶
ResourceTypeGTE applies the GTE predicate on the "resource_type" field.
func ResourceTypeHasPrefix ¶
ResourceTypeHasPrefix applies the HasPrefix predicate on the "resource_type" field.
func ResourceTypeHasSuffix ¶
ResourceTypeHasSuffix applies the HasSuffix predicate on the "resource_type" field.
func ResourceTypeIn ¶
ResourceTypeIn applies the In predicate on the "resource_type" field.
func ResourceTypeLT ¶
ResourceTypeLT applies the LT predicate on the "resource_type" field.
func ResourceTypeLTE ¶
ResourceTypeLTE applies the LTE predicate on the "resource_type" field.
func ResourceTypeNEQ ¶
ResourceTypeNEQ applies the NEQ predicate on the "resource_type" field.
func ResourceTypeNotIn ¶
ResourceTypeNotIn applies the NotIn predicate on the "resource_type" field.
func TypeValidator ¶
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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Resource queries.
func ByBlueprintField ¶
func ByBlueprintField(field string, opts ...sql.OrderTermOption) OrderOption
ByBlueprintField orders the results by blueprint field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDependsOn ¶
func ByDependsOn(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDependsOn orders the results by depends_on terms.
func ByDependsOnCount ¶
func ByDependsOnCount(opts ...sql.OrderTermOption) OrderOption
ByDependsOnCount orders the results by depends_on count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKey ¶
func ByKey(opts ...sql.OrderTermOption) OrderOption
ByKey orders the results by the key field.
func ByRequiredBy ¶
func ByRequiredBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRequiredBy orders the results by required_by terms.
func ByRequiredByCount ¶
func ByRequiredByCount(opts ...sql.OrderTermOption) OrderOption
ByRequiredByCount orders the results by required_by count.
func ByResourceType ¶
func ByResourceType(opts ...sql.OrderTermOption) OrderOption
ByResourceType orders the results by the resource_type field.
func ByType ¶
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.