setting

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the setting type in the database.
	Label = "setting"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldValue holds the string denoting the value field in the database.
	FieldValue = "value"
	// FieldHidden holds the string denoting the hidden field in the database.
	FieldHidden = "hidden"
	// FieldEditable holds the string denoting the editable field in the database.
	FieldEditable = "editable"
	// FieldSensitive holds the string denoting the sensitive field in the database.
	FieldSensitive = "sensitive"
	// FieldPrivate holds the string denoting the private field in the database.
	FieldPrivate = "private"
	// Table holds the table name of the setting in the database.
	Table = "settings"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// 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
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultHidden holds the default value on creation for the "hidden" field.
	DefaultHidden bool
	// DefaultEditable holds the default value on creation for the "editable" field.
	DefaultEditable bool
	// DefaultSensitive holds the default value on creation for the "sensitive" field.
	DefaultSensitive bool
	// DefaultPrivate holds the default value on creation for the "private" field.
	DefaultPrivate bool
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/seal-io/walrus/pkg/dao/model/runtime"

Columns holds all SQL columns for setting fields.

Functions

func And

func And(predicates ...predicate.Setting) predicate.Setting

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Setting

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Setting

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Setting

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Setting

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Setting

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Setting

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Setting

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

func CreateTimeNotIn

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

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

func Editable

func Editable(v bool) predicate.Setting

Editable applies equality check predicate on the "editable" field. It's identical to EditableEQ.

func EditableEQ

func EditableEQ(v bool) predicate.Setting

EditableEQ applies the EQ predicate on the "editable" field.

func EditableIsNil

func EditableIsNil() predicate.Setting

EditableIsNil applies the IsNil predicate on the "editable" field.

func EditableNEQ

func EditableNEQ(v bool) predicate.Setting

EditableNEQ applies the NEQ predicate on the "editable" field.

func EditableNotNil

func EditableNotNil() predicate.Setting

EditableNotNil applies the NotNil predicate on the "editable" field.

func Hidden

func Hidden(v bool) predicate.Setting

Hidden applies equality check predicate on the "hidden" field. It's identical to HiddenEQ.

func HiddenEQ

func HiddenEQ(v bool) predicate.Setting

HiddenEQ applies the EQ predicate on the "hidden" field.

func HiddenIsNil

func HiddenIsNil() predicate.Setting

HiddenIsNil applies the IsNil predicate on the "hidden" field.

func HiddenNEQ

func HiddenNEQ(v bool) predicate.Setting

HiddenNEQ applies the NEQ predicate on the "hidden" field.

func HiddenNotNil

func HiddenNotNil() predicate.Setting

HiddenNotNil applies the NotNil predicate on the "hidden" field.

func ID

func ID(id object.ID) predicate.Setting

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id object.ID) predicate.Setting

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id object.ID) predicate.Setting

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id object.ID) predicate.Setting

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...object.ID) predicate.Setting

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id object.ID) predicate.Setting

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id object.ID) predicate.Setting

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id object.ID) predicate.Setting

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...object.ID) predicate.Setting

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Setting

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

func NameContains

func NameContains(v string) predicate.Setting

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

func NameContainsFold

func NameContainsFold(v string) predicate.Setting

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

func NameEQ

func NameEQ(v string) predicate.Setting

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

func NameEqualFold

func NameEqualFold(v string) predicate.Setting

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

func NameGT

func NameGT(v string) predicate.Setting

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

func NameGTE

func NameGTE(v string) predicate.Setting

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Setting

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Setting

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Setting

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

func NameLTE

func NameLTE(v string) predicate.Setting

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

func NameNEQ

func NameNEQ(v string) predicate.Setting

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func Private

func Private(v bool) predicate.Setting

Private applies equality check predicate on the "private" field. It's identical to PrivateEQ.

func PrivateEQ

func PrivateEQ(v bool) predicate.Setting

PrivateEQ applies the EQ predicate on the "private" field.

func PrivateIsNil

func PrivateIsNil() predicate.Setting

PrivateIsNil applies the IsNil predicate on the "private" field.

func PrivateNEQ

func PrivateNEQ(v bool) predicate.Setting

PrivateNEQ applies the NEQ predicate on the "private" field.

func PrivateNotNil

func PrivateNotNil() predicate.Setting

PrivateNotNil applies the NotNil predicate on the "private" field.

func Sensitive

func Sensitive(v bool) predicate.Setting

Sensitive applies equality check predicate on the "sensitive" field. It's identical to SensitiveEQ.

func SensitiveEQ

func SensitiveEQ(v bool) predicate.Setting

SensitiveEQ applies the EQ predicate on the "sensitive" field.

func SensitiveIsNil

func SensitiveIsNil() predicate.Setting

SensitiveIsNil applies the IsNil predicate on the "sensitive" field.

func SensitiveNEQ

func SensitiveNEQ(v bool) predicate.Setting

SensitiveNEQ applies the NEQ predicate on the "sensitive" field.

func SensitiveNotNil

func SensitiveNotNil() predicate.Setting

SensitiveNotNil applies the NotNil predicate on the "sensitive" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Setting

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Setting

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Setting

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Setting

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Setting

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Setting

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Setting

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

func UpdateTimeNotIn

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

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

func Value

func Value(v crypto.String) predicate.Setting

Value applies equality check predicate on the "value" field. It's identical to ValueEQ.

func ValueContains

func ValueContains(v crypto.String) predicate.Setting

ValueContains applies the Contains predicate on the "value" field.

func ValueContainsFold

func ValueContainsFold(v crypto.String) predicate.Setting

ValueContainsFold applies the ContainsFold predicate on the "value" field.

func ValueEQ

func ValueEQ(v crypto.String) predicate.Setting

ValueEQ applies the EQ predicate on the "value" field.

func ValueEqualFold

func ValueEqualFold(v crypto.String) predicate.Setting

ValueEqualFold applies the EqualFold predicate on the "value" field.

func ValueGT

func ValueGT(v crypto.String) predicate.Setting

ValueGT applies the GT predicate on the "value" field.

func ValueGTE

func ValueGTE(v crypto.String) predicate.Setting

ValueGTE applies the GTE predicate on the "value" field.

func ValueHasPrefix

func ValueHasPrefix(v crypto.String) predicate.Setting

ValueHasPrefix applies the HasPrefix predicate on the "value" field.

func ValueHasSuffix

func ValueHasSuffix(v crypto.String) predicate.Setting

ValueHasSuffix applies the HasSuffix predicate on the "value" field.

func ValueIn

func ValueIn(vs ...crypto.String) predicate.Setting

ValueIn applies the In predicate on the "value" field.

func ValueLT

func ValueLT(v crypto.String) predicate.Setting

ValueLT applies the LT predicate on the "value" field.

func ValueLTE

func ValueLTE(v crypto.String) predicate.Setting

ValueLTE applies the LTE predicate on the "value" field.

func ValueNEQ

func ValueNEQ(v crypto.String) predicate.Setting

ValueNEQ applies the NEQ predicate on the "value" field.

func ValueNotIn

func ValueNotIn(vs ...crypto.String) predicate.Setting

ValueNotIn applies the NotIn predicate on the "value" field.

func WithoutFields

func WithoutFields(ignores ...string) []string

WithoutFields returns the fields ignored the given list.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Setting queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByEditable

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

ByEditable orders the results by the editable field.

func ByHidden

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

ByHidden orders the results by the hidden field.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByPrivate

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

ByPrivate orders the results by the private field.

func BySensitive

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

BySensitive orders the results by the sensitive field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

func ByValue

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

ByValue orders the results by the value field.

Jump to

Keyboard shortcuts

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