version

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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"
	// FieldReleaseNote holds the string denoting the release_note field in the database.
	FieldReleaseNote = "release_note"
	// FieldCustomData holds the string denoting the custom_data field in the database.
	FieldCustomData = "custom_data"
	// 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
	// DefaultReleaseNote holds the default value on creation for the "release_note" field.
	DefaultReleaseNote string
	// DefaultCustomData holds the default value on creation for the "custom_data" field.
	DefaultCustomData string
	// 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 CustomData added in v0.4.0

func CustomData(v string) predicate.Version

CustomData applies equality check predicate on the "custom_data" field. It's identical to CustomDataEQ.

func CustomDataContains added in v0.4.0

func CustomDataContains(v string) predicate.Version

CustomDataContains applies the Contains predicate on the "custom_data" field.

func CustomDataContainsFold added in v0.4.0

func CustomDataContainsFold(v string) predicate.Version

CustomDataContainsFold applies the ContainsFold predicate on the "custom_data" field.

func CustomDataEQ added in v0.4.0

func CustomDataEQ(v string) predicate.Version

CustomDataEQ applies the EQ predicate on the "custom_data" field.

func CustomDataEqualFold added in v0.4.0

func CustomDataEqualFold(v string) predicate.Version

CustomDataEqualFold applies the EqualFold predicate on the "custom_data" field.

func CustomDataGT added in v0.4.0

func CustomDataGT(v string) predicate.Version

CustomDataGT applies the GT predicate on the "custom_data" field.

func CustomDataGTE added in v0.4.0

func CustomDataGTE(v string) predicate.Version

CustomDataGTE applies the GTE predicate on the "custom_data" field.

func CustomDataHasPrefix added in v0.4.0

func CustomDataHasPrefix(v string) predicate.Version

CustomDataHasPrefix applies the HasPrefix predicate on the "custom_data" field.

func CustomDataHasSuffix added in v0.4.0

func CustomDataHasSuffix(v string) predicate.Version

CustomDataHasSuffix applies the HasSuffix predicate on the "custom_data" field.

func CustomDataIn added in v0.4.0

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

CustomDataIn applies the In predicate on the "custom_data" field.

func CustomDataLT added in v0.4.0

func CustomDataLT(v string) predicate.Version

CustomDataLT applies the LT predicate on the "custom_data" field.

func CustomDataLTE added in v0.4.0

func CustomDataLTE(v string) predicate.Version

CustomDataLTE applies the LTE predicate on the "custom_data" field.

func CustomDataNEQ added in v0.4.0

func CustomDataNEQ(v string) predicate.Version

CustomDataNEQ applies the NEQ predicate on the "custom_data" field.

func CustomDataNotIn added in v0.4.0

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

CustomDataNotIn applies the NotIn predicate on the "custom_data" 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 ReleaseNote added in v0.4.0

func ReleaseNote(v string) predicate.Version

ReleaseNote applies equality check predicate on the "release_note" field. It's identical to ReleaseNoteEQ.

func ReleaseNoteContains added in v0.4.0

func ReleaseNoteContains(v string) predicate.Version

ReleaseNoteContains applies the Contains predicate on the "release_note" field.

func ReleaseNoteContainsFold added in v0.4.0

func ReleaseNoteContainsFold(v string) predicate.Version

ReleaseNoteContainsFold applies the ContainsFold predicate on the "release_note" field.

func ReleaseNoteEQ added in v0.4.0

func ReleaseNoteEQ(v string) predicate.Version

ReleaseNoteEQ applies the EQ predicate on the "release_note" field.

func ReleaseNoteEqualFold added in v0.4.0

func ReleaseNoteEqualFold(v string) predicate.Version

ReleaseNoteEqualFold applies the EqualFold predicate on the "release_note" field.

func ReleaseNoteGT added in v0.4.0

func ReleaseNoteGT(v string) predicate.Version

ReleaseNoteGT applies the GT predicate on the "release_note" field.

func ReleaseNoteGTE added in v0.4.0

func ReleaseNoteGTE(v string) predicate.Version

ReleaseNoteGTE applies the GTE predicate on the "release_note" field.

func ReleaseNoteHasPrefix added in v0.4.0

func ReleaseNoteHasPrefix(v string) predicate.Version

ReleaseNoteHasPrefix applies the HasPrefix predicate on the "release_note" field.

func ReleaseNoteHasSuffix added in v0.4.0

func ReleaseNoteHasSuffix(v string) predicate.Version

ReleaseNoteHasSuffix applies the HasSuffix predicate on the "release_note" field.

func ReleaseNoteIn added in v0.4.0

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

ReleaseNoteIn applies the In predicate on the "release_note" field.

func ReleaseNoteLT added in v0.4.0

func ReleaseNoteLT(v string) predicate.Version

ReleaseNoteLT applies the LT predicate on the "release_note" field.

func ReleaseNoteLTE added in v0.4.0

func ReleaseNoteLTE(v string) predicate.Version

ReleaseNoteLTE applies the LTE predicate on the "release_note" field.

func ReleaseNoteNEQ added in v0.4.0

func ReleaseNoteNEQ(v string) predicate.Version

ReleaseNoteNEQ applies the NEQ predicate on the "release_note" field.

func ReleaseNoteNotIn added in v0.4.0

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

ReleaseNoteNotIn applies the NotIn predicate on the "release_note" field.

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"
	ChannelBeta   Channel = "beta"
	ChannelAlpha  Channel = "alpha"
)

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 ByCustomData added in v0.4.0

func ByCustomData(opts ...sql.OrderTermOption) OrderOption

ByCustomData orders the results by the custom_data 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 ByReleaseNote added in v0.4.0

func ByReleaseNote(opts ...sql.OrderTermOption) OrderOption

ByReleaseNote orders the results by the release_note 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