version

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultChannel = ChannelStable

ChannelStable is the default value of the Channel enum.

Variables

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

Columns holds all SQL columns for version fields.

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

func And(predicates ...predicate.Version) predicate.Version

And groups predicates with the AND operator between them.

func ChannelEQ added in v0.3.0

func ChannelEQ(v Channel) predicate.Version

ChannelEQ applies the EQ predicate on the "channel" field.

func ChannelIn added in v0.3.0

func ChannelIn(vs ...Channel) predicate.Version

ChannelIn applies the In predicate on the "channel" field.

func ChannelNEQ added in v0.3.0

func ChannelNEQ(v Channel) predicate.Version

ChannelNEQ applies the NEQ predicate on the "channel" field.

func ChannelNotIn added in v0.3.0

func ChannelNotIn(vs ...Channel) predicate.Version

ChannelNotIn applies the NotIn predicate on the "channel" field.

func ChannelValidator added in v0.3.0

func ChannelValidator(c Channel) error

ChannelValidator is a validator for the "channel" field enum values. It is called by the builders before save.

func CreatedAt

func CreatedAt(v time.Time) predicate.Version

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Version

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Version

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Version

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Version

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Version

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Version

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Version

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Version

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasResource

func HasResource() predicate.Version

HasResource applies the HasEdge predicate on the "resource" edge.

func HasResourceWith

func HasResourceWith(preds ...predicate.Resource) predicate.Version

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

func HasStorages added in v0.3.0

func HasStorages() predicate.Version

HasStorages applies the HasEdge predicate on the "storages" edge.

func HasStoragesWith added in v0.3.0

func HasStoragesWith(preds ...predicate.Storage) predicate.Version

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

func ID

func ID(id int) predicate.Version

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Version

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Version

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Version

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Version

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Version

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Version

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Version

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Version

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Version

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

func NameContains

func NameContains(v string) predicate.Version

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

func NameContainsFold

func NameContainsFold(v string) predicate.Version

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

func NameEQ

func NameEQ(v string) predicate.Version

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

func NameEqualFold

func NameEqualFold(v string) predicate.Version

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

func NameGT

func NameGT(v string) predicate.Version

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

func NameGTE

func NameGTE(v string) predicate.Version

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Version

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Version

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Version

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

func NameLTE

func NameLTE(v string) predicate.Version

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

func NameNEQ

func NameNEQ(v string) predicate.Version

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Number

func Number(v uint64) predicate.Version

Number applies equality check predicate on the "number" field. It's identical to NumberEQ.

func NumberEQ

func NumberEQ(v uint64) predicate.Version

NumberEQ applies the EQ predicate on the "number" field.

func NumberGT

func NumberGT(v uint64) predicate.Version

NumberGT applies the GT predicate on the "number" field.

func NumberGTE

func NumberGTE(v uint64) predicate.Version

NumberGTE applies the GTE predicate on the "number" field.

func NumberIn

func NumberIn(vs ...uint64) predicate.Version

NumberIn applies the In predicate on the "number" field.

func NumberLT

func NumberLT(v uint64) predicate.Version

NumberLT applies the LT predicate on the "number" field.

func NumberLTE

func NumberLTE(v uint64) predicate.Version

NumberLTE applies the LTE predicate on the "number" field.

func NumberNEQ

func NumberNEQ(v uint64) predicate.Version

NumberNEQ applies the NEQ predicate on the "number" field.

func NumberNotIn

func NumberNotIn(vs ...uint64) predicate.Version

NumberNotIn applies the NotIn predicate on the "number" field.

func Or

func Or(predicates ...predicate.Version) predicate.Version

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

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.

const (
	ChannelStable Channel = "stable"
	ChannelAlpha  Channel = "alpha"
	ChannelBeta   Channel = "beta"
)

Channel values.

func (Channel) String added in v0.3.0

func (c Channel) String() string

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

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