game

package
v0.0.0-...-214d0a7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the game type in the database.
	Label = "game"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldRoomID holds the string denoting the room_id field in the database.
	FieldRoomID = "room_id"
	// FieldResult holds the string denoting the result field in the database.
	FieldResult = "result"
	// FieldCapacity holds the string denoting the capacity field in the database.
	FieldCapacity = "capacity"
	// FieldTheAssassinatedIds holds the string denoting the the_assassinated_ids field in the database.
	FieldTheAssassinatedIds = "the_assassinated_ids"
	// FieldAssassinChance holds the string denoting the assassin_chance field in the database.
	FieldAssassinChance = "assassin_chance"
	// FieldClosed holds the string denoting the closed field in the database.
	FieldClosed = "closed"
	// EdgeGameUsers holds the string denoting the game_users edge name in mutations.
	EdgeGameUsers = "game_users"
	// EdgeMissions holds the string denoting the missions edge name in mutations.
	EdgeMissions = "missions"
	// EdgeRoom holds the string denoting the room edge name in mutations.
	EdgeRoom = "room"
	// Table holds the table name of the game in the database.
	Table = "games"
	// GameUsersTable is the table that holds the game_users relation/edge.
	GameUsersTable = "game_users"
	// GameUsersInverseTable is the table name for the GameUser entity.
	// It exists in this package in order to avoid circular dependency with the "gameuser" package.
	GameUsersInverseTable = "game_users"
	// GameUsersColumn is the table column denoting the game_users relation/edge.
	GameUsersColumn = "game_id"
	// MissionsTable is the table that holds the missions relation/edge.
	MissionsTable = "missions"
	// MissionsInverseTable is the table name for the Mission entity.
	// It exists in this package in order to avoid circular dependency with the "mission" package.
	MissionsInverseTable = "missions"
	// MissionsColumn is the table column denoting the missions relation/edge.
	MissionsColumn = "game_id"
	// RoomTable is the table that holds the room relation/edge.
	RoomTable = "games"
	// RoomInverseTable is the table name for the Room entity.
	// It exists in this package in order to avoid circular dependency with the "room" package.
	RoomInverseTable = "rooms"
	// RoomColumn is the table column denoting the room relation/edge.
	RoomColumn = "room_id"
)
View Source
const DefaultResult = ResultNone

ResultNone is the default value of the Result enum.

Variables

View Source
var (
	// DefaultCreatedBy holds the default value on creation for the "created_by" field.
	DefaultCreatedBy int64
	// DefaultUpdatedBy holds the default value on creation for the "updated_by" field.
	DefaultUpdatedBy int64
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
	DefaultDeletedAt time.Time
	// DefaultCapacity holds the default value on creation for the "capacity" field.
	DefaultCapacity uint8
	// DefaultAssassinChance holds the default value on creation for the "assassin_chance" field.
	DefaultAssassinChance uint8
	// DefaultClosed holds the default value on creation for the "closed" field.
	DefaultClosed bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() int64
)

Columns holds all SQL columns for game fields.

Functions

func And

func And(predicates ...predicate.Game) predicate.Game

And groups predicates with the AND operator between them.

func AssassinChance

func AssassinChance(v uint8) predicate.Game

AssassinChance applies equality check predicate on the "assassin_chance" field. It's identical to AssassinChanceEQ.

func AssassinChanceEQ

func AssassinChanceEQ(v uint8) predicate.Game

AssassinChanceEQ applies the EQ predicate on the "assassin_chance" field.

func AssassinChanceGT

func AssassinChanceGT(v uint8) predicate.Game

AssassinChanceGT applies the GT predicate on the "assassin_chance" field.

func AssassinChanceGTE

func AssassinChanceGTE(v uint8) predicate.Game

AssassinChanceGTE applies the GTE predicate on the "assassin_chance" field.

func AssassinChanceIn

func AssassinChanceIn(vs ...uint8) predicate.Game

AssassinChanceIn applies the In predicate on the "assassin_chance" field.

func AssassinChanceLT

func AssassinChanceLT(v uint8) predicate.Game

AssassinChanceLT applies the LT predicate on the "assassin_chance" field.

func AssassinChanceLTE

func AssassinChanceLTE(v uint8) predicate.Game

AssassinChanceLTE applies the LTE predicate on the "assassin_chance" field.

func AssassinChanceNEQ

func AssassinChanceNEQ(v uint8) predicate.Game

AssassinChanceNEQ applies the NEQ predicate on the "assassin_chance" field.

func AssassinChanceNotIn

func AssassinChanceNotIn(vs ...uint8) predicate.Game

AssassinChanceNotIn applies the NotIn predicate on the "assassin_chance" field.

func Capacity

func Capacity(v uint8) predicate.Game

Capacity applies equality check predicate on the "capacity" field. It's identical to CapacityEQ.

func CapacityEQ

func CapacityEQ(v uint8) predicate.Game

CapacityEQ applies the EQ predicate on the "capacity" field.

func CapacityGT

func CapacityGT(v uint8) predicate.Game

CapacityGT applies the GT predicate on the "capacity" field.

func CapacityGTE

func CapacityGTE(v uint8) predicate.Game

CapacityGTE applies the GTE predicate on the "capacity" field.

func CapacityIn

func CapacityIn(vs ...uint8) predicate.Game

CapacityIn applies the In predicate on the "capacity" field.

func CapacityLT

func CapacityLT(v uint8) predicate.Game

CapacityLT applies the LT predicate on the "capacity" field.

func CapacityLTE

func CapacityLTE(v uint8) predicate.Game

CapacityLTE applies the LTE predicate on the "capacity" field.

func CapacityNEQ

func CapacityNEQ(v uint8) predicate.Game

CapacityNEQ applies the NEQ predicate on the "capacity" field.

func CapacityNotIn

func CapacityNotIn(vs ...uint8) predicate.Game

CapacityNotIn applies the NotIn predicate on the "capacity" field.

func Closed

func Closed(v bool) predicate.Game

Closed applies equality check predicate on the "closed" field. It's identical to ClosedEQ.

func ClosedEQ

func ClosedEQ(v bool) predicate.Game

ClosedEQ applies the EQ predicate on the "closed" field.

func ClosedNEQ

func ClosedNEQ(v bool) predicate.Game

ClosedNEQ applies the NEQ predicate on the "closed" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Game

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Game

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Game

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Game

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Game

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Game

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Game

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v int64) predicate.Game

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int64) predicate.Game

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v int64) predicate.Game

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int64) predicate.Game

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int64) predicate.Game

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v int64) predicate.Game

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int64) predicate.Game

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int64) predicate.Game

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int64) predicate.Game

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Game

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Game

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Game

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Game

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Game

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Game

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Game

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Game

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Game

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func HasGameUsers

func HasGameUsers() predicate.Game

HasGameUsers applies the HasEdge predicate on the "game_users" edge.

func HasGameUsersWith

func HasGameUsersWith(preds ...predicate.GameUser) predicate.Game

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

func HasMissions

func HasMissions() predicate.Game

HasMissions applies the HasEdge predicate on the "missions" edge.

func HasMissionsWith

func HasMissionsWith(preds ...predicate.Mission) predicate.Game

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

func HasRoom

func HasRoom() predicate.Game

HasRoom applies the HasEdge predicate on the "room" edge.

func HasRoomWith

func HasRoomWith(preds ...predicate.Room) predicate.Game

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

func ID

func ID(id int64) predicate.Game

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Game

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Game

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Game

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Game

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Game

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Game

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Game

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Game

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.Game) predicate.Game

Or groups predicates with the OR operator between them.

func ResultEQ

func ResultEQ(v Result) predicate.Game

ResultEQ applies the EQ predicate on the "result" field.

func ResultIn

func ResultIn(vs ...Result) predicate.Game

ResultIn applies the In predicate on the "result" field.

func ResultNEQ

func ResultNEQ(v Result) predicate.Game

ResultNEQ applies the NEQ predicate on the "result" field.

func ResultNotIn

func ResultNotIn(vs ...Result) predicate.Game

ResultNotIn applies the NotIn predicate on the "result" field.

func ResultValidator

func ResultValidator(r Result) error

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

func RoomID

func RoomID(v int64) predicate.Game

RoomID applies equality check predicate on the "room_id" field. It's identical to RoomIDEQ.

func RoomIDEQ

func RoomIDEQ(v int64) predicate.Game

RoomIDEQ applies the EQ predicate on the "room_id" field.

func RoomIDIn

func RoomIDIn(vs ...int64) predicate.Game

RoomIDIn applies the In predicate on the "room_id" field.

func RoomIDNEQ

func RoomIDNEQ(v int64) predicate.Game

RoomIDNEQ applies the NEQ predicate on the "room_id" field.

func RoomIDNotIn

func RoomIDNotIn(vs ...int64) predicate.Game

RoomIDNotIn applies the NotIn predicate on the "room_id" field.

func TheAssassinatedIdsIsNil

func TheAssassinatedIdsIsNil() predicate.Game

TheAssassinatedIdsIsNil applies the IsNil predicate on the "the_assassinated_ids" field.

func TheAssassinatedIdsNotNil

func TheAssassinatedIdsNotNil() predicate.Game

TheAssassinatedIdsNotNil applies the NotNil predicate on the "the_assassinated_ids" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Game

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Game

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Game

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Game

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Game

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Game

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Game

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Game

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Game

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedBy

func UpdatedBy(v int64) predicate.Game

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int64) predicate.Game

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int64) predicate.Game

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int64) predicate.Game

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int64) predicate.Game

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int64) predicate.Game

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int64) predicate.Game

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int64) predicate.Game

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int64) predicate.Game

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Result

type Result string

Result defines the type for the "result" enum field.

const (
	ResultNone          Result = "none"
	ResultBlue          Result = "blue"
	ResultRed           Result = "red"
	ResultAssassination Result = "assassination"
	ResultHand          Result = "hand"
)

Result values.

func (Result) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (Result) String

func (r Result) String() string

func (*Result) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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