challenge

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the challenge type in the database.
	Label = "challenge"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldOutcome holds the string denoting the outcome field in the database.
	FieldOutcome = "outcome"
	// FieldPublished holds the string denoting the published field in the database.
	FieldPublished = "published"
	// FieldStartTime holds the string denoting the start_time field in the database.
	FieldStartTime = "start_time"
	// FieldEndTime holds the string denoting the end_time field in the database.
	FieldEndTime = "end_time"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgePredictions holds the string denoting the predictions edge name in mutations.
	EdgePredictions = "predictions"
	// EdgeProofs holds the string denoting the proofs edge name in mutations.
	EdgeProofs = "proofs"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// Table holds the table name of the challenge in the database.
	Table = "challenges"
	// PredictionsTable is the table that holds the predictions relation/edge.
	PredictionsTable = "predictions"
	// PredictionsInverseTable is the table name for the Prediction entity.
	// It exists in this package in order to avoid circular dependency with the "prediction" package.
	PredictionsInverseTable = "predictions"
	// PredictionsColumn is the table column denoting the predictions relation/edge.
	PredictionsColumn = "challenge_predictions"
	// ProofsTable is the table that holds the proofs relation/edge.
	ProofsTable = "proofs"
	// ProofsInverseTable is the table name for the Proof entity.
	// It exists in this package in order to avoid circular dependency with the "proof" package.
	ProofsInverseTable = "proofs"
	// ProofsColumn is the table column denoting the proofs relation/edge.
	ProofsColumn = "challenge_proofs"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "challenges"
	// AuthorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	AuthorInverseTable = "users"
	// AuthorColumn is the table column denoting the author relation/edge.
	AuthorColumn = "user_challenges"
)
View Source
const DefaultType = TypeBool

TypeBool is the default value of the Type enum.

Variables

View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	DescriptionValidator func(string) error
	// DefaultPublished holds the default value on creation for the "published" field.
	DefaultPublished bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for challenge fields.

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

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

Functions

func And

func And(predicates ...predicate.Challenge) predicate.Challenge

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Challenge

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Challenge

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Challenge

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Challenge

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Challenge

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Challenge

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Challenge

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Challenge

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Challenge

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Challenge

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Challenge

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Challenge

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Challenge

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Challenge

ContentNotIn applies the NotIn predicate on the "content" field.

func CreateTime

func CreateTime(v time.Time) predicate.Challenge

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Challenge

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Challenge

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Challenge

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Challenge

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Challenge

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Challenge

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Challenge

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Challenge

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Description

func Description(v string) predicate.Challenge

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Challenge

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Challenge

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Challenge

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Challenge

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Challenge

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Challenge

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Challenge

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Challenge

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Challenge

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Challenge

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Challenge

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Challenge

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Challenge

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Challenge

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Challenge

DescriptionNotNil applies the NotNil predicate on the "description" field.

func EndTime

func EndTime(v time.Time) predicate.Challenge

EndTime applies equality check predicate on the "end_time" field. It's identical to EndTimeEQ.

func EndTimeEQ

func EndTimeEQ(v time.Time) predicate.Challenge

EndTimeEQ applies the EQ predicate on the "end_time" field.

func EndTimeGT

func EndTimeGT(v time.Time) predicate.Challenge

EndTimeGT applies the GT predicate on the "end_time" field.

func EndTimeGTE

func EndTimeGTE(v time.Time) predicate.Challenge

EndTimeGTE applies the GTE predicate on the "end_time" field.

func EndTimeIn

func EndTimeIn(vs ...time.Time) predicate.Challenge

EndTimeIn applies the In predicate on the "end_time" field.

func EndTimeLT

func EndTimeLT(v time.Time) predicate.Challenge

EndTimeLT applies the LT predicate on the "end_time" field.

func EndTimeLTE

func EndTimeLTE(v time.Time) predicate.Challenge

EndTimeLTE applies the LTE predicate on the "end_time" field.

func EndTimeNEQ

func EndTimeNEQ(v time.Time) predicate.Challenge

EndTimeNEQ applies the NEQ predicate on the "end_time" field.

func EndTimeNotIn

func EndTimeNotIn(vs ...time.Time) predicate.Challenge

EndTimeNotIn applies the NotIn predicate on the "end_time" field.

func HasAuthor

func HasAuthor() predicate.Challenge

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.Challenge

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

func HasPredictions

func HasPredictions() predicate.Challenge

HasPredictions applies the HasEdge predicate on the "predictions" edge.

func HasPredictionsWith

func HasPredictionsWith(preds ...predicate.Prediction) predicate.Challenge

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

func HasProofs

func HasProofs() predicate.Challenge

HasProofs applies the HasEdge predicate on the "proofs" edge.

func HasProofsWith

func HasProofsWith(preds ...predicate.Proof) predicate.Challenge

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Challenge

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Challenge

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Challenge

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Challenge

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Challenge

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Challenge

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Challenge

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Challenge

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

Or groups predicates with the OR operator between them.

func Outcome

func Outcome(v bool) predicate.Challenge

Outcome applies equality check predicate on the "outcome" field. It's identical to OutcomeEQ.

func OutcomeEQ

func OutcomeEQ(v bool) predicate.Challenge

OutcomeEQ applies the EQ predicate on the "outcome" field.

func OutcomeIsNil

func OutcomeIsNil() predicate.Challenge

OutcomeIsNil applies the IsNil predicate on the "outcome" field.

func OutcomeNEQ

func OutcomeNEQ(v bool) predicate.Challenge

OutcomeNEQ applies the NEQ predicate on the "outcome" field.

func OutcomeNotNil

func OutcomeNotNil() predicate.Challenge

OutcomeNotNil applies the NotNil predicate on the "outcome" field.

func Published

func Published(v bool) predicate.Challenge

Published applies equality check predicate on the "published" field. It's identical to PublishedEQ.

func PublishedEQ

func PublishedEQ(v bool) predicate.Challenge

PublishedEQ applies the EQ predicate on the "published" field.

func PublishedNEQ

func PublishedNEQ(v bool) predicate.Challenge

PublishedNEQ applies the NEQ predicate on the "published" field.

func StartTime

func StartTime(v time.Time) predicate.Challenge

StartTime applies equality check predicate on the "start_time" field. It's identical to StartTimeEQ.

func StartTimeEQ

func StartTimeEQ(v time.Time) predicate.Challenge

StartTimeEQ applies the EQ predicate on the "start_time" field.

func StartTimeGT

func StartTimeGT(v time.Time) predicate.Challenge

StartTimeGT applies the GT predicate on the "start_time" field.

func StartTimeGTE

func StartTimeGTE(v time.Time) predicate.Challenge

StartTimeGTE applies the GTE predicate on the "start_time" field.

func StartTimeIn

func StartTimeIn(vs ...time.Time) predicate.Challenge

StartTimeIn applies the In predicate on the "start_time" field.

func StartTimeLT

func StartTimeLT(v time.Time) predicate.Challenge

StartTimeLT applies the LT predicate on the "start_time" field.

func StartTimeLTE

func StartTimeLTE(v time.Time) predicate.Challenge

StartTimeLTE applies the LTE predicate on the "start_time" field.

func StartTimeNEQ

func StartTimeNEQ(v time.Time) predicate.Challenge

StartTimeNEQ applies the NEQ predicate on the "start_time" field.

func StartTimeNotIn

func StartTimeNotIn(vs ...time.Time) predicate.Challenge

StartTimeNotIn applies the NotIn predicate on the "start_time" field.

func TypeEQ

func TypeEQ(v Type) predicate.Challenge

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Challenge

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Challenge

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Challenge

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func UpdateTime

func UpdateTime(v time.Time) predicate.Challenge

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Challenge

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Challenge

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Challenge

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Challenge

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Challenge

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Challenge

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Challenge

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Challenge

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeBool Type = "bool"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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