badge

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the badge type in the database.
	Label = "badge"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldColor holds the string denoting the color field in the database.
	FieldColor = "color"
	// FieldMaterial holds the string denoting the material field in the database.
	FieldMaterial = "material"
	// EdgeWearer holds the string denoting the wearer edge name in mutations.
	EdgeWearer = "wearer"
	// Table holds the table name of the badge in the database.
	Table = "badges"
	// WearerTable is the table that holds the wearer relation/edge.
	WearerTable = "badges"
	// WearerInverseTable is the table name for the Pet entity.
	// It exists in this package in order to avoid circular dependency with the "pet" package.
	WearerInverseTable = "pets"
	// WearerColumn is the table column denoting the wearer relation/edge.
	WearerColumn = "pet_badge"
)

Variables

Columns holds all SQL columns for badge fields.

View Source
var ForeignKeys = []string{
	"pet_badge",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "badges" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Badge) predicate.Badge

And groups predicates with the AND operator between them.

func ColorEQ

func ColorEQ(v Color) predicate.Badge

ColorEQ applies the EQ predicate on the "color" field.

func ColorIn

func ColorIn(vs ...Color) predicate.Badge

ColorIn applies the In predicate on the "color" field.

func ColorNEQ

func ColorNEQ(v Color) predicate.Badge

ColorNEQ applies the NEQ predicate on the "color" field.

func ColorNotIn

func ColorNotIn(vs ...Color) predicate.Badge

ColorNotIn applies the NotIn predicate on the "color" field.

func ColorValidator

func ColorValidator(c Color) error

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

func HasWearer

func HasWearer() predicate.Badge

HasWearer applies the HasEdge predicate on the "wearer" edge.

func HasWearerWith

func HasWearerWith(preds ...predicate.Pet) predicate.Badge

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

func ID

func ID(id uint32) predicate.Badge

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint32) predicate.Badge

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint32) predicate.Badge

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint32) predicate.Badge

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint32) predicate.Badge

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint32) predicate.Badge

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint32) predicate.Badge

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint32) predicate.Badge

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint32) predicate.Badge

IDNotIn applies the NotIn predicate on the ID field.

func MaterialEQ

func MaterialEQ(v Material) predicate.Badge

MaterialEQ applies the EQ predicate on the "material" field.

func MaterialIn

func MaterialIn(vs ...Material) predicate.Badge

MaterialIn applies the In predicate on the "material" field.

func MaterialNEQ

func MaterialNEQ(v Material) predicate.Badge

MaterialNEQ applies the NEQ predicate on the "material" field.

func MaterialNotIn

func MaterialNotIn(vs ...Material) predicate.Badge

MaterialNotIn applies the NotIn predicate on the "material" field.

func MaterialValidator

func MaterialValidator(m Material) error

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Badge) predicate.Badge

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 Color

type Color string

Color defines the type for the "color" enum field.

const (
	ColorRed    Color = "red"
	ColorOrange Color = "orange"
	ColorYellow Color = "yellow"
	ColorGreen  Color = "green"
	ColorBlue   Color = "blue"
	ColorIndigo Color = "indigo"
	ColorViolet Color = "violet"
	ColorPurple Color = "purple"
	ColorPink   Color = "pink"
	ColorSilver Color = "silver"
	ColorGold   Color = "gold"
	ColorBeige  Color = "beige"
	ColorBrown  Color = "brown"
	ColorGrey   Color = "grey"
	ColorBlack  Color = "black"
	ColorWhite  Color = "white"
)

Color values.

func (Color) String

func (c Color) String() string

type Material

type Material string

Material defines the type for the "material" enum field.

const (
	MaterialLeather Material = "leather"
	MaterialPlastic Material = "plastic"
	MaterialFabric  Material = "fabric"
)

Material values.

func (Material) String

func (m Material) String() string

Jump to

Keyboard shortcuts

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