armor

package
v0.0.0-...-67bf1eb Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the armor type in the database.
	Label = "armor"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldArmorCategory holds the string denoting the armor_category field in the database.
	FieldArmorCategory = "armor_category"
	// FieldStrMinimum holds the string denoting the str_minimum field in the database.
	FieldStrMinimum = "str_minimum"
	// FieldStealthDisadvantage holds the string denoting the stealth_disadvantage field in the database.
	FieldStealthDisadvantage = "stealth_disadvantage"
	// FieldAcBase holds the string denoting the ac_base field in the database.
	FieldAcBase = "ac_base"
	// FieldAcDexBonus holds the string denoting the ac_dex_bonus field in the database.
	FieldAcDexBonus = "ac_dex_bonus"
	// FieldAcMaxBonus holds the string denoting the ac_max_bonus field in the database.
	FieldAcMaxBonus = "ac_max_bonus"
	// EdgeEquipment holds the string denoting the equipment edge name in mutations.
	EdgeEquipment = "equipment"
	// Table holds the table name of the armor in the database.
	Table = "armors"
	// EquipmentTable is the table that holds the equipment relation/edge.
	EquipmentTable = "armors"
	// EquipmentInverseTable is the table name for the Equipment entity.
	// It exists in this package in order to avoid circular dependency with the "equipment" package.
	EquipmentInverseTable = "equipment"
	// EquipmentColumn is the table column denoting the equipment relation/edge.
	EquipmentColumn = "equipment_armor"
)

Variables

View Source
var (
	// AcBaseValidator is a validator for the "ac_base" field. It is called by the builders before save.
	AcBaseValidator func(int) error
	// DefaultAcDexBonus holds the default value on creation for the "ac_dex_bonus" field.
	DefaultAcDexBonus bool
	// DefaultAcMaxBonus holds the default value on creation for the "ac_max_bonus" field.
	DefaultAcMaxBonus int
)

Columns holds all SQL columns for armor fields.

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

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

Functions

func AcBase

func AcBase(v int) predicate.Armor

AcBase applies equality check predicate on the "ac_base" field. It's identical to AcBaseEQ.

func AcBaseEQ

func AcBaseEQ(v int) predicate.Armor

AcBaseEQ applies the EQ predicate on the "ac_base" field.

func AcBaseGT

func AcBaseGT(v int) predicate.Armor

AcBaseGT applies the GT predicate on the "ac_base" field.

func AcBaseGTE

func AcBaseGTE(v int) predicate.Armor

AcBaseGTE applies the GTE predicate on the "ac_base" field.

func AcBaseIn

func AcBaseIn(vs ...int) predicate.Armor

AcBaseIn applies the In predicate on the "ac_base" field.

func AcBaseLT

func AcBaseLT(v int) predicate.Armor

AcBaseLT applies the LT predicate on the "ac_base" field.

func AcBaseLTE

func AcBaseLTE(v int) predicate.Armor

AcBaseLTE applies the LTE predicate on the "ac_base" field.

func AcBaseNEQ

func AcBaseNEQ(v int) predicate.Armor

AcBaseNEQ applies the NEQ predicate on the "ac_base" field.

func AcBaseNotIn

func AcBaseNotIn(vs ...int) predicate.Armor

AcBaseNotIn applies the NotIn predicate on the "ac_base" field.

func AcDexBonus

func AcDexBonus(v bool) predicate.Armor

AcDexBonus applies equality check predicate on the "ac_dex_bonus" field. It's identical to AcDexBonusEQ.

func AcDexBonusEQ

func AcDexBonusEQ(v bool) predicate.Armor

AcDexBonusEQ applies the EQ predicate on the "ac_dex_bonus" field.

func AcDexBonusNEQ

func AcDexBonusNEQ(v bool) predicate.Armor

AcDexBonusNEQ applies the NEQ predicate on the "ac_dex_bonus" field.

func AcMaxBonus

func AcMaxBonus(v int) predicate.Armor

AcMaxBonus applies equality check predicate on the "ac_max_bonus" field. It's identical to AcMaxBonusEQ.

func AcMaxBonusEQ

func AcMaxBonusEQ(v int) predicate.Armor

AcMaxBonusEQ applies the EQ predicate on the "ac_max_bonus" field.

func AcMaxBonusGT

func AcMaxBonusGT(v int) predicate.Armor

AcMaxBonusGT applies the GT predicate on the "ac_max_bonus" field.

func AcMaxBonusGTE

func AcMaxBonusGTE(v int) predicate.Armor

AcMaxBonusGTE applies the GTE predicate on the "ac_max_bonus" field.

func AcMaxBonusIn

func AcMaxBonusIn(vs ...int) predicate.Armor

AcMaxBonusIn applies the In predicate on the "ac_max_bonus" field.

func AcMaxBonusLT

func AcMaxBonusLT(v int) predicate.Armor

AcMaxBonusLT applies the LT predicate on the "ac_max_bonus" field.

func AcMaxBonusLTE

func AcMaxBonusLTE(v int) predicate.Armor

AcMaxBonusLTE applies the LTE predicate on the "ac_max_bonus" field.

func AcMaxBonusNEQ

func AcMaxBonusNEQ(v int) predicate.Armor

AcMaxBonusNEQ applies the NEQ predicate on the "ac_max_bonus" field.

func AcMaxBonusNotIn

func AcMaxBonusNotIn(vs ...int) predicate.Armor

AcMaxBonusNotIn applies the NotIn predicate on the "ac_max_bonus" field.

func And

func And(predicates ...predicate.Armor) predicate.Armor

And groups predicates with the AND operator between them.

func ArmorCategoryEQ

func ArmorCategoryEQ(v ArmorCategory) predicate.Armor

ArmorCategoryEQ applies the EQ predicate on the "armor_category" field.

func ArmorCategoryIn

func ArmorCategoryIn(vs ...ArmorCategory) predicate.Armor

ArmorCategoryIn applies the In predicate on the "armor_category" field.

func ArmorCategoryNEQ

func ArmorCategoryNEQ(v ArmorCategory) predicate.Armor

ArmorCategoryNEQ applies the NEQ predicate on the "armor_category" field.

func ArmorCategoryNotIn

func ArmorCategoryNotIn(vs ...ArmorCategory) predicate.Armor

ArmorCategoryNotIn applies the NotIn predicate on the "armor_category" field.

func ArmorCategoryValidator

func ArmorCategoryValidator(ac ArmorCategory) error

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

func HasEquipment

func HasEquipment() predicate.Armor

HasEquipment applies the HasEdge predicate on the "equipment" edge.

func HasEquipmentWith

func HasEquipmentWith(preds ...predicate.Equipment) predicate.Armor

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

func ID

func ID(id int) predicate.Armor

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Armor

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Armor

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Armor

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Armor

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Armor

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Armor

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Armor) predicate.Armor

Or groups predicates with the OR operator between them.

func StealthDisadvantage

func StealthDisadvantage(v bool) predicate.Armor

StealthDisadvantage applies equality check predicate on the "stealth_disadvantage" field. It's identical to StealthDisadvantageEQ.

func StealthDisadvantageEQ

func StealthDisadvantageEQ(v bool) predicate.Armor

StealthDisadvantageEQ applies the EQ predicate on the "stealth_disadvantage" field.

func StealthDisadvantageNEQ

func StealthDisadvantageNEQ(v bool) predicate.Armor

StealthDisadvantageNEQ applies the NEQ predicate on the "stealth_disadvantage" field.

func StrMinimum

func StrMinimum(v int) predicate.Armor

StrMinimum applies equality check predicate on the "str_minimum" field. It's identical to StrMinimumEQ.

func StrMinimumEQ

func StrMinimumEQ(v int) predicate.Armor

StrMinimumEQ applies the EQ predicate on the "str_minimum" field.

func StrMinimumGT

func StrMinimumGT(v int) predicate.Armor

StrMinimumGT applies the GT predicate on the "str_minimum" field.

func StrMinimumGTE

func StrMinimumGTE(v int) predicate.Armor

StrMinimumGTE applies the GTE predicate on the "str_minimum" field.

func StrMinimumIn

func StrMinimumIn(vs ...int) predicate.Armor

StrMinimumIn applies the In predicate on the "str_minimum" field.

func StrMinimumLT

func StrMinimumLT(v int) predicate.Armor

StrMinimumLT applies the LT predicate on the "str_minimum" field.

func StrMinimumLTE

func StrMinimumLTE(v int) predicate.Armor

StrMinimumLTE applies the LTE predicate on the "str_minimum" field.

func StrMinimumNEQ

func StrMinimumNEQ(v int) predicate.Armor

StrMinimumNEQ applies the NEQ predicate on the "str_minimum" field.

func StrMinimumNotIn

func StrMinimumNotIn(vs ...int) predicate.Armor

StrMinimumNotIn applies the NotIn predicate on the "str_minimum" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type ArmorCategory

type ArmorCategory string

ArmorCategory defines the type for the "armor_category" enum field.

const (
	ArmorCategoryLight  ArmorCategory = "light"
	ArmorCategoryMedium ArmorCategory = "medium"
	ArmorCategoryHeavy  ArmorCategory = "heavy"
	ArmorCategoryShield ArmorCategory = "shield"
)

ArmorCategory values.

func (ArmorCategory) MarshalGQL

func (e ArmorCategory) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ArmorCategory) String

func (ac ArmorCategory) String() string

func (*ArmorCategory) UnmarshalGQL

func (e *ArmorCategory) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Armor queries.

func ByAcBase

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

ByAcBase orders the results by the ac_base field.

func ByAcDexBonus

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

ByAcDexBonus orders the results by the ac_dex_bonus field.

func ByAcMaxBonus

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

ByAcMaxBonus orders the results by the ac_max_bonus field.

func ByArmorCategory

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

ByArmorCategory orders the results by the armor_category field.

func ByEquipmentField

func ByEquipmentField(field string, opts ...sql.OrderTermOption) OrderOption

ByEquipmentField orders the results by equipment field.

func ByID

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

ByID orders the results by the id field.

func ByStealthDisadvantage

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

ByStealthDisadvantage orders the results by the stealth_disadvantage field.

func ByStrMinimum

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

ByStrMinimum orders the results by the str_minimum field.

Jump to

Keyboard shortcuts

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