template

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the template type in the database.
	Label = "template"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldSelectionType holds the string denoting the selectiontype field in the database.
	FieldSelectionType = "selection_type"
	// FieldParticipantCount holds the string denoting the participantcount field in the database.
	FieldParticipantCount = "participant_count"
	// FieldInternalCriteria holds the string denoting the internalcriteria field in the database.
	FieldInternalCriteria = "internal_criteria"
	// FieldMturkCriteria holds the string denoting the mturkcriteria field in the database.
	FieldMturkCriteria = "mturk_criteria"
	// FieldAdult holds the string denoting the adult field in the database.
	FieldAdult = "adult"
	// FieldSandbox holds the string denoting the sandbox field in the database.
	FieldSandbox = "sandbox"

	// EdgeSteps holds the string denoting the steps edge name in mutations.
	EdgeSteps = "steps"
	// EdgeProject holds the string denoting the project edge name in mutations.
	EdgeProject = "project"
	// EdgeCreator holds the string denoting the creator edge name in mutations.
	EdgeCreator = "creator"
	// EdgeRun holds the string denoting the run edge name in mutations.
	EdgeRun = "run"

	// Table holds the table name of the template in the database.
	Table = "templates"
	// StepsTable is the table the holds the steps relation/edge.
	StepsTable = "steps"
	// StepsInverseTable is the table name for the Step entity.
	// It exists in this package in order to avoid circular dependency with the "step" package.
	StepsInverseTable = "steps"
	// StepsColumn is the table column denoting the steps relation/edge.
	StepsColumn = "template_steps"
	// ProjectTable is the table the holds the project relation/edge.
	ProjectTable = "templates"
	// ProjectInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ProjectInverseTable = "projects"
	// ProjectColumn is the table column denoting the project relation/edge.
	ProjectColumn = "project_templates"
	// CreatorTable is the table the holds the creator relation/edge.
	CreatorTable = "templates"
	// CreatorInverseTable is the table name for the Admin entity.
	// It exists in this package in order to avoid circular dependency with the "admin" package.
	CreatorInverseTable = "admins"
	// CreatorColumn is the table column denoting the creator relation/edge.
	CreatorColumn = "admin_templates"
	// RunTable is the table the holds the run relation/edge.
	RunTable = "templates"
	// RunInverseTable is the table name for the Run entity.
	// It exists in this package in order to avoid circular dependency with the "run" package.
	RunInverseTable = "runs"
	// RunColumn is the table column denoting the run relation/edge.
	RunColumn = "run_template"
)

Variables

View Source
var (
	// 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
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultParticipantCount holds the default value on creation for the participantCount field.
	DefaultParticipantCount int
	// ParticipantCountValidator is a validator for the "participantCount" field. It is called by the builders before save.
	ParticipantCountValidator func(int) error
	// DefaultAdult holds the default value on creation for the adult field.
	DefaultAdult bool
	// DefaultSandbox holds the default value on creation for the sandbox field.
	DefaultSandbox bool
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for template fields.

View Source
var ForeignKeys = []string{
	"admin_templates",
	"project_templates",
	"run_template",
}

ForeignKeys holds the SQL foreign-keys that are owned by the Template type.

Functions

func Adult

func Adult(v bool) predicate.Template

Adult applies equality check predicate on the "adult" field. It's identical to AdultEQ.

func AdultEQ

func AdultEQ(v bool) predicate.Template

AdultEQ applies the EQ predicate on the "adult" field.

func AdultNEQ

func AdultNEQ(v bool) predicate.Template

AdultNEQ applies the NEQ predicate on the "adult" field.

func And

func And(predicates ...predicate.Template) predicate.Template

And groups list of predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Template

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Template

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Template

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Template

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Template

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Template

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Template

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

func CreatedAtNotIn

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

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

func HasCreator

func HasCreator() predicate.Template

HasCreator applies the HasEdge predicate on the "creator" edge.

func HasCreatorWith

func HasCreatorWith(preds ...predicate.Admin) predicate.Template

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

func HasProject

func HasProject() predicate.Template

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith

func HasProjectWith(preds ...predicate.Project) predicate.Template

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

func HasRun

func HasRun() predicate.Template

HasRun applies the HasEdge predicate on the "run" edge.

func HasRunWith

func HasRunWith(preds ...predicate.Run) predicate.Template

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

func HasSteps

func HasSteps() predicate.Template

HasSteps applies the HasEdge predicate on the "steps" edge.

func HasStepsWith

func HasStepsWith(preds ...predicate.Step) predicate.Template

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

func ID

func ID(id string) predicate.Template

ID filters vertices based on their identifier.

func IDEQ

func IDEQ(id string) predicate.Template

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Template

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Template

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Template

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Template

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Template

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Template

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Template

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Template

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Template

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Template

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Template

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Template

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Template

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Template

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Template

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Template

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Template

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Template

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Template

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Template

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Template

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Template) predicate.Template

Or groups list of predicates with the OR operator between them.

func ParticipantCount

func ParticipantCount(v int) predicate.Template

ParticipantCount applies equality check predicate on the "participantCount" field. It's identical to ParticipantCountEQ.

func ParticipantCountEQ

func ParticipantCountEQ(v int) predicate.Template

ParticipantCountEQ applies the EQ predicate on the "participantCount" field.

func ParticipantCountGT

func ParticipantCountGT(v int) predicate.Template

ParticipantCountGT applies the GT predicate on the "participantCount" field.

func ParticipantCountGTE

func ParticipantCountGTE(v int) predicate.Template

ParticipantCountGTE applies the GTE predicate on the "participantCount" field.

func ParticipantCountIn

func ParticipantCountIn(vs ...int) predicate.Template

ParticipantCountIn applies the In predicate on the "participantCount" field.

func ParticipantCountLT

func ParticipantCountLT(v int) predicate.Template

ParticipantCountLT applies the LT predicate on the "participantCount" field.

func ParticipantCountLTE

func ParticipantCountLTE(v int) predicate.Template

ParticipantCountLTE applies the LTE predicate on the "participantCount" field.

func ParticipantCountNEQ

func ParticipantCountNEQ(v int) predicate.Template

ParticipantCountNEQ applies the NEQ predicate on the "participantCount" field.

func ParticipantCountNotIn

func ParticipantCountNotIn(vs ...int) predicate.Template

ParticipantCountNotIn applies the NotIn predicate on the "participantCount" field.

func Sandbox

func Sandbox(v bool) predicate.Template

Sandbox applies equality check predicate on the "sandbox" field. It's identical to SandboxEQ.

func SandboxEQ

func SandboxEQ(v bool) predicate.Template

SandboxEQ applies the EQ predicate on the "sandbox" field.

func SandboxNEQ

func SandboxNEQ(v bool) predicate.Template

SandboxNEQ applies the NEQ predicate on the "sandbox" field.

func SelectionTypeEQ

func SelectionTypeEQ(v SelectionType) predicate.Template

SelectionTypeEQ applies the EQ predicate on the "selectionType" field.

func SelectionTypeIn

func SelectionTypeIn(vs ...SelectionType) predicate.Template

SelectionTypeIn applies the In predicate on the "selectionType" field.

func SelectionTypeNEQ

func SelectionTypeNEQ(v SelectionType) predicate.Template

SelectionTypeNEQ applies the NEQ predicate on the "selectionType" field.

func SelectionTypeNotIn

func SelectionTypeNotIn(vs ...SelectionType) predicate.Template

SelectionTypeNotIn applies the NotIn predicate on the "selectionType" field.

func SelectionTypeValidator

func SelectionTypeValidator(st SelectionType) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Template

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Template

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Template

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Template

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Template

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Template

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Template

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

func UpdatedAtNotIn

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

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

func ValidColumn

func ValidColumn(column string) bool

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

Types

type SelectionType

type SelectionType string

SelectionType defines the type for the selectionType enum field.

const (
	SelectionTypeINTERNAL_DB          SelectionType = "INTERNAL_DB"
	SelectionTypeMTURK_QUALIFICATIONS SelectionType = "MTURK_QUALIFICATIONS"
)

SelectionType values.

func (SelectionType) String

func (st SelectionType) String() string

Jump to

Keyboard shortcuts

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