Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Version) predicate.Version
- func ChannelEQ(v Channel) predicate.Version
- func ChannelIn(vs ...Channel) predicate.Version
- func ChannelNEQ(v Channel) predicate.Version
- func ChannelNotIn(vs ...Channel) predicate.Version
- func ChannelValidator(c Channel) error
- func CreatedAt(v time.Time) predicate.Version
- func CreatedAtEQ(v time.Time) predicate.Version
- func CreatedAtGT(v time.Time) predicate.Version
- func CreatedAtGTE(v time.Time) predicate.Version
- func CreatedAtIn(vs ...time.Time) predicate.Version
- func CreatedAtLT(v time.Time) predicate.Version
- func CreatedAtLTE(v time.Time) predicate.Version
- func CreatedAtNEQ(v time.Time) predicate.Version
- func CreatedAtNotIn(vs ...time.Time) predicate.Version
- func HasResource() predicate.Version
- func HasResourceWith(preds ...predicate.Resource) predicate.Version
- func HasStorages() predicate.Version
- func HasStoragesWith(preds ...predicate.Storage) predicate.Version
- func ID(id int) predicate.Version
- func IDEQ(id int) predicate.Version
- func IDGT(id int) predicate.Version
- func IDGTE(id int) predicate.Version
- func IDIn(ids ...int) predicate.Version
- func IDLT(id int) predicate.Version
- func IDLTE(id int) predicate.Version
- func IDNEQ(id int) predicate.Version
- func IDNotIn(ids ...int) predicate.Version
- func Name(v string) predicate.Version
- func NameContains(v string) predicate.Version
- func NameContainsFold(v string) predicate.Version
- func NameEQ(v string) predicate.Version
- func NameEqualFold(v string) predicate.Version
- func NameGT(v string) predicate.Version
- func NameGTE(v string) predicate.Version
- func NameHasPrefix(v string) predicate.Version
- func NameHasSuffix(v string) predicate.Version
- func NameIn(vs ...string) predicate.Version
- func NameLT(v string) predicate.Version
- func NameLTE(v string) predicate.Version
- func NameNEQ(v string) predicate.Version
- func NameNotIn(vs ...string) predicate.Version
- func Not(p predicate.Version) predicate.Version
- func Number(v uint64) predicate.Version
- func NumberEQ(v uint64) predicate.Version
- func NumberGT(v uint64) predicate.Version
- func NumberGTE(v uint64) predicate.Version
- func NumberIn(vs ...uint64) predicate.Version
- func NumberLT(v uint64) predicate.Version
- func NumberLTE(v uint64) predicate.Version
- func NumberNEQ(v uint64) predicate.Version
- func NumberNotIn(vs ...uint64) predicate.Version
- func Or(predicates ...predicate.Version) predicate.Version
- func ValidColumn(column string) bool
- type Channel
- type OrderOption
- func ByChannel(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByNumber(opts ...sql.OrderTermOption) OrderOption
- func ByResourceField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByStorages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByStoragesCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the version type in the database. Label = "version" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldChannel holds the string denoting the channel field in the database. FieldChannel = "channel" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldNumber holds the string denoting the number field in the database. FieldNumber = "number" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeStorages holds the string denoting the storages edge name in mutations. EdgeStorages = "storages" // EdgeResource holds the string denoting the resource edge name in mutations. EdgeResource = "resource" // Table holds the table name of the version in the database. Table = "versions" // StoragesTable is the table that holds the storages relation/edge. StoragesTable = "storages" // StoragesInverseTable is the table name for the Storage entity. // It exists in this package in order to avoid circular dependency with the "storage" package. StoragesInverseTable = "storages" // StoragesColumn is the table column denoting the storages relation/edge. StoragesColumn = "version_storages" // ResourceTable is the table that holds the resource relation/edge. ResourceTable = "versions" // ResourceInverseTable is the table name for the Resource entity. // It exists in this package in order to avoid circular dependency with the "resource" package. ResourceInverseTable = "resources" // ResourceColumn is the table column denoting the resource relation/edge. ResourceColumn = "resource_versions" )
const DefaultChannel = ChannelStable
ChannelStable is the default value of the Channel enum.
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldChannel, FieldName, FieldNumber, FieldCreatedAt, }
Columns holds all SQL columns for version fields.
var ForeignKeys = []string{
"resource_versions",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "versions" table and are not defined as standalone fields in the schema.
Functions ¶
func ChannelNEQ ¶ added in v0.3.0
ChannelNEQ applies the NEQ predicate on the "channel" field.
func ChannelNotIn ¶ added in v0.3.0
ChannelNotIn applies the NotIn predicate on the "channel" field.
func ChannelValidator ¶ added in v0.3.0
ChannelValidator is a validator for the "channel" field enum values. It is called by the builders before save.
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 HasResource ¶
HasResource applies the HasEdge predicate on the "resource" edge.
func HasResourceWith ¶
HasResourceWith applies the HasEdge predicate on the "resource" edge with a given conditions (other predicates).
func HasStorages ¶ added in v0.3.0
HasStorages applies the HasEdge predicate on the "storages" edge.
func HasStoragesWith ¶ added in v0.3.0
HasStoragesWith applies the HasEdge predicate on the "storages" edge with a given conditions (other predicates).
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 Number ¶
Number applies equality check predicate on the "number" field. It's identical to NumberEQ.
func NumberNotIn ¶
NumberNotIn applies the NotIn predicate on the "number" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type Channel ¶ added in v0.3.0
type Channel string
Channel defines the type for the "channel" enum field.
type OrderOption ¶
OrderOption defines the ordering options for the Version queries.
func ByChannel ¶ added in v0.3.0
func ByChannel(opts ...sql.OrderTermOption) OrderOption
ByChannel orders the results by the channel field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByNumber ¶
func ByNumber(opts ...sql.OrderTermOption) OrderOption
ByNumber orders the results by the number field.
func ByResourceField ¶
func ByResourceField(field string, opts ...sql.OrderTermOption) OrderOption
ByResourceField orders the results by resource field.
func ByStorages ¶ added in v0.3.0
func ByStorages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByStorages orders the results by storages terms.
func ByStoragesCount ¶ added in v0.3.0
func ByStoragesCount(opts ...sql.OrderTermOption) OrderOption
ByStoragesCount orders the results by storages count.