Versions in this module Expand all Collapse all v0 v0.0.1 Jan 22, 2024 v0.0.0 Jan 22, 2024 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeKeyboard + const TypeKeycapModel + const TypeSwitchModel + func Asc(fields ...string) func(*sql.Selector) + func Desc(fields ...string) func(*sql.Selector) + func IsConstraintError(err error) bool + func IsNotFound(err error) bool + func IsNotLoaded(err error) bool + func IsNotSingular(err error) bool + func IsValidationError(err error) bool + func KeyboardSliceToOpenAPI(s []*Keyboard) (_ []openapi.Keyboard, err error) + func KeycapModelSliceToOpenAPI(s []*KeycapModel) (_ []openapi.Keycaps, err error) + func MaskNotFound(err error) error + func NewContext(parent context.Context, c *Client) context.Context + func NewTxContext(parent context.Context, tx *Tx) context.Context + func SwitchModelSliceToOpenAPI(s []*SwitchModel) (_ []openapi.Switches, err error) + type AggregateFunc func(*sql.Selector) string + func As(fn AggregateFunc, end string) AggregateFunc + func Count() AggregateFunc + func Max(field string) AggregateFunc + func Mean(field string) AggregateFunc + func Min(field string) AggregateFunc + func Sum(field string) AggregateFunc + type Client struct + Keyboard *KeyboardClient + KeycapModel *KeycapModelClient + Schema *migrate.Schema + SwitchModel *SwitchModelClient + func FromContext(ctx context.Context) *Client + func NewClient(opts ...Option) *Client + func Open(driverName, dataSourceName string, options ...Option) (*Client, error) + func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) + func (c *Client) Close() error + func (c *Client) Debug() *Client + func (c *Client) Intercept(interceptors ...Interceptor) + func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) + func (c *Client) Tx(ctx context.Context) (*Tx, error) + func (c *Client) Use(hooks ...Hook) + type CommitFunc func(context.Context, *Tx) error + func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error + type CommitHook func(Committer) Committer + type Committer interface + Commit func(context.Context, *Tx) error + type ConstraintError struct + func (e *ConstraintError) Unwrap() error + func (e ConstraintError) Error() string + type Hook = ent.Hook + type InterceptFunc = ent.InterceptFunc + type Interceptor = ent.Interceptor + type Keyboard struct + Discount *int64 + Edges KeyboardEdges + ID int64 + Name string + Price int64 + func (e *Keyboard) ToOpenAPI() (*openapi.Keyboard, error) + func (k *Keyboard) QueryKeycaps() *KeycapModelQuery + func (k *Keyboard) QuerySwitches() *SwitchModelQuery + func (k *Keyboard) String() string + func (k *Keyboard) Unwrap() *Keyboard + func (k *Keyboard) Update() *KeyboardUpdateOne + func (k *Keyboard) Value(name string) (ent.Value, error) + type KeyboardClient struct + func NewKeyboardClient(c config) *KeyboardClient + func (c *KeyboardClient) Create() *KeyboardCreate + func (c *KeyboardClient) CreateBulk(builders ...*KeyboardCreate) *KeyboardCreateBulk + func (c *KeyboardClient) Delete() *KeyboardDelete + func (c *KeyboardClient) DeleteOne(k *Keyboard) *KeyboardDeleteOne + func (c *KeyboardClient) DeleteOneID(id int64) *KeyboardDeleteOne + func (c *KeyboardClient) Get(ctx context.Context, id int64) (*Keyboard, error) + func (c *KeyboardClient) GetX(ctx context.Context, id int64) *Keyboard + func (c *KeyboardClient) Hooks() []Hook + func (c *KeyboardClient) Intercept(interceptors ...Interceptor) + func (c *KeyboardClient) Interceptors() []Interceptor + func (c *KeyboardClient) Query() *KeyboardQuery + func (c *KeyboardClient) QueryKeycaps(k *Keyboard) *KeycapModelQuery + func (c *KeyboardClient) QuerySwitches(k *Keyboard) *SwitchModelQuery + func (c *KeyboardClient) Update() *KeyboardUpdate + func (c *KeyboardClient) UpdateOne(k *Keyboard) *KeyboardUpdateOne + func (c *KeyboardClient) UpdateOneID(id int64) *KeyboardUpdateOne + func (c *KeyboardClient) Use(hooks ...Hook) + type KeyboardCreate struct + func (kc *KeyboardCreate) Exec(ctx context.Context) error + func (kc *KeyboardCreate) ExecX(ctx context.Context) + func (kc *KeyboardCreate) Mutation() *KeyboardMutation + func (kc *KeyboardCreate) Save(ctx context.Context) (*Keyboard, error) + func (kc *KeyboardCreate) SaveX(ctx context.Context) *Keyboard + func (kc *KeyboardCreate) SetDiscount(i int64) *KeyboardCreate + func (kc *KeyboardCreate) SetID(i int64) *KeyboardCreate + func (kc *KeyboardCreate) SetKeycaps(k *KeycapModel) *KeyboardCreate + func (kc *KeyboardCreate) SetKeycapsID(id int64) *KeyboardCreate + func (kc *KeyboardCreate) SetName(s string) *KeyboardCreate + func (kc *KeyboardCreate) SetNillableDiscount(i *int64) *KeyboardCreate + func (kc *KeyboardCreate) SetPrice(i int64) *KeyboardCreate + func (kc *KeyboardCreate) SetSwitches(s *SwitchModel) *KeyboardCreate + func (kc *KeyboardCreate) SetSwitchesID(id int64) *KeyboardCreate + type KeyboardCreateBulk struct + func (kcb *KeyboardCreateBulk) Exec(ctx context.Context) error + func (kcb *KeyboardCreateBulk) ExecX(ctx context.Context) + func (kcb *KeyboardCreateBulk) Save(ctx context.Context) ([]*Keyboard, error) + func (kcb *KeyboardCreateBulk) SaveX(ctx context.Context) []*Keyboard + type KeyboardDelete struct + func (kd *KeyboardDelete) Exec(ctx context.Context) (int, error) + func (kd *KeyboardDelete) ExecX(ctx context.Context) int + func (kd *KeyboardDelete) Where(ps ...predicate.Keyboard) *KeyboardDelete + type KeyboardDeleteOne struct + func (kdo *KeyboardDeleteOne) Exec(ctx context.Context) error + func (kdo *KeyboardDeleteOne) ExecX(ctx context.Context) + func (kdo *KeyboardDeleteOne) Where(ps ...predicate.Keyboard) *KeyboardDeleteOne + type KeyboardEdges struct + Keycaps *KeycapModel + Switches *SwitchModel + func (e KeyboardEdges) KeycapsOrErr() (*KeycapModel, error) + func (e KeyboardEdges) SwitchesOrErr() (*SwitchModel, error) + type KeyboardGroupBy struct + func (kgb *KeyboardGroupBy) Aggregate(fns ...AggregateFunc) *KeyboardGroupBy + func (kgb *KeyboardGroupBy) Scan(ctx context.Context, v any) error + func (s *KeyboardGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *KeyboardGroupBy) BoolX(ctx context.Context) bool + func (s *KeyboardGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *KeyboardGroupBy) BoolsX(ctx context.Context) []bool + func (s *KeyboardGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *KeyboardGroupBy) Float64X(ctx context.Context) float64 + func (s *KeyboardGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *KeyboardGroupBy) Float64sX(ctx context.Context) []float64 + func (s *KeyboardGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *KeyboardGroupBy) IntX(ctx context.Context) int + func (s *KeyboardGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *KeyboardGroupBy) IntsX(ctx context.Context) []int + func (s *KeyboardGroupBy) ScanX(ctx context.Context, v any) + func (s *KeyboardGroupBy) String(ctx context.Context) (_ string, err error) + func (s *KeyboardGroupBy) StringX(ctx context.Context) string + func (s *KeyboardGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *KeyboardGroupBy) StringsX(ctx context.Context) []string + type KeyboardMutation struct + func (m *KeyboardMutation) AddDiscount(i int64) + func (m *KeyboardMutation) AddField(name string, value ent.Value) error + func (m *KeyboardMutation) AddPrice(i int64) + func (m *KeyboardMutation) AddedDiscount() (r int64, exists bool) + func (m *KeyboardMutation) AddedEdges() []string + func (m *KeyboardMutation) AddedField(name string) (ent.Value, bool) + func (m *KeyboardMutation) AddedFields() []string + func (m *KeyboardMutation) AddedIDs(name string) []ent.Value + func (m *KeyboardMutation) AddedPrice() (r int64, exists bool) + func (m *KeyboardMutation) ClearDiscount() + func (m *KeyboardMutation) ClearEdge(name string) error + func (m *KeyboardMutation) ClearField(name string) error + func (m *KeyboardMutation) ClearKeycaps() + func (m *KeyboardMutation) ClearSwitches() + func (m *KeyboardMutation) ClearedEdges() []string + func (m *KeyboardMutation) ClearedFields() []string + func (m *KeyboardMutation) Discount() (r int64, exists bool) + func (m *KeyboardMutation) DiscountCleared() bool + func (m *KeyboardMutation) EdgeCleared(name string) bool + func (m *KeyboardMutation) Field(name string) (ent.Value, bool) + func (m *KeyboardMutation) FieldCleared(name string) bool + func (m *KeyboardMutation) Fields() []string + func (m *KeyboardMutation) ID() (id int64, exists bool) + func (m *KeyboardMutation) IDs(ctx context.Context) ([]int64, error) + func (m *KeyboardMutation) KeycapsCleared() bool + func (m *KeyboardMutation) KeycapsID() (id int64, exists bool) + func (m *KeyboardMutation) KeycapsIDs() (ids []int64) + func (m *KeyboardMutation) Name() (r string, exists bool) + func (m *KeyboardMutation) OldDiscount(ctx context.Context) (v *int64, err error) + func (m *KeyboardMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *KeyboardMutation) OldName(ctx context.Context) (v string, err error) + func (m *KeyboardMutation) OldPrice(ctx context.Context) (v int64, err error) + func (m *KeyboardMutation) Op() Op + func (m *KeyboardMutation) Price() (r int64, exists bool) + func (m *KeyboardMutation) RemovedEdges() []string + func (m *KeyboardMutation) RemovedIDs(name string) []ent.Value + func (m *KeyboardMutation) ResetDiscount() + func (m *KeyboardMutation) ResetEdge(name string) error + func (m *KeyboardMutation) ResetField(name string) error + func (m *KeyboardMutation) ResetKeycaps() + func (m *KeyboardMutation) ResetName() + func (m *KeyboardMutation) ResetPrice() + func (m *KeyboardMutation) ResetSwitches() + func (m *KeyboardMutation) SetDiscount(i int64) + func (m *KeyboardMutation) SetField(name string, value ent.Value) error + func (m *KeyboardMutation) SetID(id int64) + func (m *KeyboardMutation) SetKeycapsID(id int64) + func (m *KeyboardMutation) SetName(s string) + func (m *KeyboardMutation) SetOp(op Op) + func (m *KeyboardMutation) SetPrice(i int64) + func (m *KeyboardMutation) SetSwitchesID(id int64) + func (m *KeyboardMutation) SwitchesCleared() bool + func (m *KeyboardMutation) SwitchesID() (id int64, exists bool) + func (m *KeyboardMutation) SwitchesIDs() (ids []int64) + func (m *KeyboardMutation) Type() string + func (m *KeyboardMutation) Where(ps ...predicate.Keyboard) + func (m *KeyboardMutation) WhereP(ps ...func(*sql.Selector)) + func (m KeyboardMutation) Client() *Client + func (m KeyboardMutation) Tx() (*Tx, error) + type KeyboardQuery struct + func (kq *KeyboardQuery) Aggregate(fns ...AggregateFunc) *KeyboardSelect + func (kq *KeyboardQuery) All(ctx context.Context) ([]*Keyboard, error) + func (kq *KeyboardQuery) AllX(ctx context.Context) []*Keyboard + func (kq *KeyboardQuery) Clone() *KeyboardQuery + func (kq *KeyboardQuery) Count(ctx context.Context) (int, error) + func (kq *KeyboardQuery) CountX(ctx context.Context) int + func (kq *KeyboardQuery) Exist(ctx context.Context) (bool, error) + func (kq *KeyboardQuery) ExistX(ctx context.Context) bool + func (kq *KeyboardQuery) First(ctx context.Context) (*Keyboard, error) + func (kq *KeyboardQuery) FirstID(ctx context.Context) (id int64, err error) + func (kq *KeyboardQuery) FirstIDX(ctx context.Context) int64 + func (kq *KeyboardQuery) FirstX(ctx context.Context) *Keyboard + func (kq *KeyboardQuery) GroupBy(field string, fields ...string) *KeyboardGroupBy + func (kq *KeyboardQuery) IDs(ctx context.Context) (ids []int64, err error) + func (kq *KeyboardQuery) IDsX(ctx context.Context) []int64 + func (kq *KeyboardQuery) Limit(limit int) *KeyboardQuery + func (kq *KeyboardQuery) Offset(offset int) *KeyboardQuery + func (kq *KeyboardQuery) Only(ctx context.Context) (*Keyboard, error) + func (kq *KeyboardQuery) OnlyID(ctx context.Context) (id int64, err error) + func (kq *KeyboardQuery) OnlyIDX(ctx context.Context) int64 + func (kq *KeyboardQuery) OnlyX(ctx context.Context) *Keyboard + func (kq *KeyboardQuery) Order(o ...keyboard.OrderOption) *KeyboardQuery + func (kq *KeyboardQuery) QueryKeycaps() *KeycapModelQuery + func (kq *KeyboardQuery) QuerySwitches() *SwitchModelQuery + func (kq *KeyboardQuery) Select(fields ...string) *KeyboardSelect + func (kq *KeyboardQuery) Unique(unique bool) *KeyboardQuery + func (kq *KeyboardQuery) Where(ps ...predicate.Keyboard) *KeyboardQuery + func (kq *KeyboardQuery) WithKeycaps(opts ...func(*KeycapModelQuery)) *KeyboardQuery + func (kq *KeyboardQuery) WithSwitches(opts ...func(*SwitchModelQuery)) *KeyboardQuery + type KeyboardSelect struct + func (ks *KeyboardSelect) Aggregate(fns ...AggregateFunc) *KeyboardSelect + func (ks *KeyboardSelect) Scan(ctx context.Context, v any) error + func (s *KeyboardSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *KeyboardSelect) BoolX(ctx context.Context) bool + func (s *KeyboardSelect) Bools(ctx context.Context) ([]bool, error) + func (s *KeyboardSelect) BoolsX(ctx context.Context) []bool + func (s *KeyboardSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *KeyboardSelect) Float64X(ctx context.Context) float64 + func (s *KeyboardSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *KeyboardSelect) Float64sX(ctx context.Context) []float64 + func (s *KeyboardSelect) Int(ctx context.Context) (_ int, err error) + func (s *KeyboardSelect) IntX(ctx context.Context) int + func (s *KeyboardSelect) Ints(ctx context.Context) ([]int, error) + func (s *KeyboardSelect) IntsX(ctx context.Context) []int + func (s *KeyboardSelect) ScanX(ctx context.Context, v any) + func (s *KeyboardSelect) String(ctx context.Context) (_ string, err error) + func (s *KeyboardSelect) StringX(ctx context.Context) string + func (s *KeyboardSelect) Strings(ctx context.Context) ([]string, error) + func (s *KeyboardSelect) StringsX(ctx context.Context) []string + type KeyboardUpdate struct + func (ku *KeyboardUpdate) AddDiscount(i int64) *KeyboardUpdate + func (ku *KeyboardUpdate) AddPrice(i int64) *KeyboardUpdate + func (ku *KeyboardUpdate) ClearDiscount() *KeyboardUpdate + func (ku *KeyboardUpdate) ClearKeycaps() *KeyboardUpdate + func (ku *KeyboardUpdate) ClearSwitches() *KeyboardUpdate + func (ku *KeyboardUpdate) Exec(ctx context.Context) error + func (ku *KeyboardUpdate) ExecX(ctx context.Context) + func (ku *KeyboardUpdate) Mutation() *KeyboardMutation + func (ku *KeyboardUpdate) Save(ctx context.Context) (int, error) + func (ku *KeyboardUpdate) SaveX(ctx context.Context) int + func (ku *KeyboardUpdate) SetDiscount(i int64) *KeyboardUpdate + func (ku *KeyboardUpdate) SetKeycaps(k *KeycapModel) *KeyboardUpdate + func (ku *KeyboardUpdate) SetKeycapsID(id int64) *KeyboardUpdate + func (ku *KeyboardUpdate) SetName(s string) *KeyboardUpdate + func (ku *KeyboardUpdate) SetNillableDiscount(i *int64) *KeyboardUpdate + func (ku *KeyboardUpdate) SetPrice(i int64) *KeyboardUpdate + func (ku *KeyboardUpdate) SetSwitches(s *SwitchModel) *KeyboardUpdate + func (ku *KeyboardUpdate) SetSwitchesID(id int64) *KeyboardUpdate + func (ku *KeyboardUpdate) Where(ps ...predicate.Keyboard) *KeyboardUpdate + type KeyboardUpdateOne struct + func (kuo *KeyboardUpdateOne) AddDiscount(i int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) AddPrice(i int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) ClearDiscount() *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) ClearKeycaps() *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) ClearSwitches() *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) Exec(ctx context.Context) error + func (kuo *KeyboardUpdateOne) ExecX(ctx context.Context) + func (kuo *KeyboardUpdateOne) Mutation() *KeyboardMutation + func (kuo *KeyboardUpdateOne) Save(ctx context.Context) (*Keyboard, error) + func (kuo *KeyboardUpdateOne) SaveX(ctx context.Context) *Keyboard + func (kuo *KeyboardUpdateOne) Select(field string, fields ...string) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetDiscount(i int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetKeycaps(k *KeycapModel) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetKeycapsID(id int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetName(s string) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetNillableDiscount(i *int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetPrice(i int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetSwitches(s *SwitchModel) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) SetSwitchesID(id int64) *KeyboardUpdateOne + func (kuo *KeyboardUpdateOne) Where(ps ...predicate.Keyboard) *KeyboardUpdateOne + type Keyboards []*Keyboard + type KeycapModel struct + ID int64 + Material keycapmodel.Material + Name string + Profile string + func (e *KeycapModel) ToOpenAPI() (*openapi.Keycaps, error) + func (km *KeycapModel) String() string + func (km *KeycapModel) Unwrap() *KeycapModel + func (km *KeycapModel) Update() *KeycapModelUpdateOne + func (km *KeycapModel) Value(name string) (ent.Value, error) + type KeycapModelClient struct + func NewKeycapModelClient(c config) *KeycapModelClient + func (c *KeycapModelClient) Create() *KeycapModelCreate + func (c *KeycapModelClient) CreateBulk(builders ...*KeycapModelCreate) *KeycapModelCreateBulk + func (c *KeycapModelClient) Delete() *KeycapModelDelete + func (c *KeycapModelClient) DeleteOne(km *KeycapModel) *KeycapModelDeleteOne + func (c *KeycapModelClient) DeleteOneID(id int64) *KeycapModelDeleteOne + func (c *KeycapModelClient) Get(ctx context.Context, id int64) (*KeycapModel, error) + func (c *KeycapModelClient) GetX(ctx context.Context, id int64) *KeycapModel + func (c *KeycapModelClient) Hooks() []Hook + func (c *KeycapModelClient) Intercept(interceptors ...Interceptor) + func (c *KeycapModelClient) Interceptors() []Interceptor + func (c *KeycapModelClient) Query() *KeycapModelQuery + func (c *KeycapModelClient) Update() *KeycapModelUpdate + func (c *KeycapModelClient) UpdateOne(km *KeycapModel) *KeycapModelUpdateOne + func (c *KeycapModelClient) UpdateOneID(id int64) *KeycapModelUpdateOne + func (c *KeycapModelClient) Use(hooks ...Hook) + type KeycapModelCreate struct + func (kmc *KeycapModelCreate) Exec(ctx context.Context) error + func (kmc *KeycapModelCreate) ExecX(ctx context.Context) + func (kmc *KeycapModelCreate) Mutation() *KeycapModelMutation + func (kmc *KeycapModelCreate) Save(ctx context.Context) (*KeycapModel, error) + func (kmc *KeycapModelCreate) SaveX(ctx context.Context) *KeycapModel + func (kmc *KeycapModelCreate) SetID(i int64) *KeycapModelCreate + func (kmc *KeycapModelCreate) SetMaterial(k keycapmodel.Material) *KeycapModelCreate + func (kmc *KeycapModelCreate) SetName(s string) *KeycapModelCreate + func (kmc *KeycapModelCreate) SetProfile(s string) *KeycapModelCreate + type KeycapModelCreateBulk struct + func (kmcb *KeycapModelCreateBulk) Exec(ctx context.Context) error + func (kmcb *KeycapModelCreateBulk) ExecX(ctx context.Context) + func (kmcb *KeycapModelCreateBulk) Save(ctx context.Context) ([]*KeycapModel, error) + func (kmcb *KeycapModelCreateBulk) SaveX(ctx context.Context) []*KeycapModel + type KeycapModelDelete struct + func (kmd *KeycapModelDelete) Exec(ctx context.Context) (int, error) + func (kmd *KeycapModelDelete) ExecX(ctx context.Context) int + func (kmd *KeycapModelDelete) Where(ps ...predicate.KeycapModel) *KeycapModelDelete + type KeycapModelDeleteOne struct + func (kmdo *KeycapModelDeleteOne) Exec(ctx context.Context) error + func (kmdo *KeycapModelDeleteOne) ExecX(ctx context.Context) + func (kmdo *KeycapModelDeleteOne) Where(ps ...predicate.KeycapModel) *KeycapModelDeleteOne + type KeycapModelGroupBy struct + func (kmgb *KeycapModelGroupBy) Aggregate(fns ...AggregateFunc) *KeycapModelGroupBy + func (kmgb *KeycapModelGroupBy) Scan(ctx context.Context, v any) error + func (s *KeycapModelGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *KeycapModelGroupBy) BoolX(ctx context.Context) bool + func (s *KeycapModelGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *KeycapModelGroupBy) BoolsX(ctx context.Context) []bool + func (s *KeycapModelGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *KeycapModelGroupBy) Float64X(ctx context.Context) float64 + func (s *KeycapModelGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *KeycapModelGroupBy) Float64sX(ctx context.Context) []float64 + func (s *KeycapModelGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *KeycapModelGroupBy) IntX(ctx context.Context) int + func (s *KeycapModelGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *KeycapModelGroupBy) IntsX(ctx context.Context) []int + func (s *KeycapModelGroupBy) ScanX(ctx context.Context, v any) + func (s *KeycapModelGroupBy) String(ctx context.Context) (_ string, err error) + func (s *KeycapModelGroupBy) StringX(ctx context.Context) string + func (s *KeycapModelGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *KeycapModelGroupBy) StringsX(ctx context.Context) []string + type KeycapModelMutation struct + func (m *KeycapModelMutation) AddField(name string, value ent.Value) error + func (m *KeycapModelMutation) AddedEdges() []string + func (m *KeycapModelMutation) AddedField(name string) (ent.Value, bool) + func (m *KeycapModelMutation) AddedFields() []string + func (m *KeycapModelMutation) AddedIDs(name string) []ent.Value + func (m *KeycapModelMutation) ClearEdge(name string) error + func (m *KeycapModelMutation) ClearField(name string) error + func (m *KeycapModelMutation) ClearedEdges() []string + func (m *KeycapModelMutation) ClearedFields() []string + func (m *KeycapModelMutation) EdgeCleared(name string) bool + func (m *KeycapModelMutation) Field(name string) (ent.Value, bool) + func (m *KeycapModelMutation) FieldCleared(name string) bool + func (m *KeycapModelMutation) Fields() []string + func (m *KeycapModelMutation) ID() (id int64, exists bool) + func (m *KeycapModelMutation) IDs(ctx context.Context) ([]int64, error) + func (m *KeycapModelMutation) Material() (r keycapmodel.Material, exists bool) + func (m *KeycapModelMutation) Name() (r string, exists bool) + func (m *KeycapModelMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *KeycapModelMutation) OldMaterial(ctx context.Context) (v keycapmodel.Material, err error) + func (m *KeycapModelMutation) OldName(ctx context.Context) (v string, err error) + func (m *KeycapModelMutation) OldProfile(ctx context.Context) (v string, err error) + func (m *KeycapModelMutation) Op() Op + func (m *KeycapModelMutation) Profile() (r string, exists bool) + func (m *KeycapModelMutation) RemovedEdges() []string + func (m *KeycapModelMutation) RemovedIDs(name string) []ent.Value + func (m *KeycapModelMutation) ResetEdge(name string) error + func (m *KeycapModelMutation) ResetField(name string) error + func (m *KeycapModelMutation) ResetMaterial() + func (m *KeycapModelMutation) ResetName() + func (m *KeycapModelMutation) ResetProfile() + func (m *KeycapModelMutation) SetField(name string, value ent.Value) error + func (m *KeycapModelMutation) SetID(id int64) + func (m *KeycapModelMutation) SetMaterial(k keycapmodel.Material) + func (m *KeycapModelMutation) SetName(s string) + func (m *KeycapModelMutation) SetOp(op Op) + func (m *KeycapModelMutation) SetProfile(s string) + func (m *KeycapModelMutation) Type() string + func (m *KeycapModelMutation) Where(ps ...predicate.KeycapModel) + func (m *KeycapModelMutation) WhereP(ps ...func(*sql.Selector)) + func (m KeycapModelMutation) Client() *Client + func (m KeycapModelMutation) Tx() (*Tx, error) + type KeycapModelQuery struct + func (kmq *KeycapModelQuery) Aggregate(fns ...AggregateFunc) *KeycapModelSelect + func (kmq *KeycapModelQuery) All(ctx context.Context) ([]*KeycapModel, error) + func (kmq *KeycapModelQuery) AllX(ctx context.Context) []*KeycapModel + func (kmq *KeycapModelQuery) Clone() *KeycapModelQuery + func (kmq *KeycapModelQuery) Count(ctx context.Context) (int, error) + func (kmq *KeycapModelQuery) CountX(ctx context.Context) int + func (kmq *KeycapModelQuery) Exist(ctx context.Context) (bool, error) + func (kmq *KeycapModelQuery) ExistX(ctx context.Context) bool + func (kmq *KeycapModelQuery) First(ctx context.Context) (*KeycapModel, error) + func (kmq *KeycapModelQuery) FirstID(ctx context.Context) (id int64, err error) + func (kmq *KeycapModelQuery) FirstIDX(ctx context.Context) int64 + func (kmq *KeycapModelQuery) FirstX(ctx context.Context) *KeycapModel + func (kmq *KeycapModelQuery) GroupBy(field string, fields ...string) *KeycapModelGroupBy + func (kmq *KeycapModelQuery) IDs(ctx context.Context) (ids []int64, err error) + func (kmq *KeycapModelQuery) IDsX(ctx context.Context) []int64 + func (kmq *KeycapModelQuery) Limit(limit int) *KeycapModelQuery + func (kmq *KeycapModelQuery) Offset(offset int) *KeycapModelQuery + func (kmq *KeycapModelQuery) Only(ctx context.Context) (*KeycapModel, error) + func (kmq *KeycapModelQuery) OnlyID(ctx context.Context) (id int64, err error) + func (kmq *KeycapModelQuery) OnlyIDX(ctx context.Context) int64 + func (kmq *KeycapModelQuery) OnlyX(ctx context.Context) *KeycapModel + func (kmq *KeycapModelQuery) Order(o ...keycapmodel.OrderOption) *KeycapModelQuery + func (kmq *KeycapModelQuery) Select(fields ...string) *KeycapModelSelect + func (kmq *KeycapModelQuery) Unique(unique bool) *KeycapModelQuery + func (kmq *KeycapModelQuery) Where(ps ...predicate.KeycapModel) *KeycapModelQuery + type KeycapModelSelect struct + func (kms *KeycapModelSelect) Aggregate(fns ...AggregateFunc) *KeycapModelSelect + func (kms *KeycapModelSelect) Scan(ctx context.Context, v any) error + func (s *KeycapModelSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *KeycapModelSelect) BoolX(ctx context.Context) bool + func (s *KeycapModelSelect) Bools(ctx context.Context) ([]bool, error) + func (s *KeycapModelSelect) BoolsX(ctx context.Context) []bool + func (s *KeycapModelSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *KeycapModelSelect) Float64X(ctx context.Context) float64 + func (s *KeycapModelSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *KeycapModelSelect) Float64sX(ctx context.Context) []float64 + func (s *KeycapModelSelect) Int(ctx context.Context) (_ int, err error) + func (s *KeycapModelSelect) IntX(ctx context.Context) int + func (s *KeycapModelSelect) Ints(ctx context.Context) ([]int, error) + func (s *KeycapModelSelect) IntsX(ctx context.Context) []int + func (s *KeycapModelSelect) ScanX(ctx context.Context, v any) + func (s *KeycapModelSelect) String(ctx context.Context) (_ string, err error) + func (s *KeycapModelSelect) StringX(ctx context.Context) string + func (s *KeycapModelSelect) Strings(ctx context.Context) ([]string, error) + func (s *KeycapModelSelect) StringsX(ctx context.Context) []string + type KeycapModelUpdate struct + func (kmu *KeycapModelUpdate) Exec(ctx context.Context) error + func (kmu *KeycapModelUpdate) ExecX(ctx context.Context) + func (kmu *KeycapModelUpdate) Mutation() *KeycapModelMutation + func (kmu *KeycapModelUpdate) Save(ctx context.Context) (int, error) + func (kmu *KeycapModelUpdate) SaveX(ctx context.Context) int + func (kmu *KeycapModelUpdate) SetMaterial(k keycapmodel.Material) *KeycapModelUpdate + func (kmu *KeycapModelUpdate) SetName(s string) *KeycapModelUpdate + func (kmu *KeycapModelUpdate) SetProfile(s string) *KeycapModelUpdate + func (kmu *KeycapModelUpdate) Where(ps ...predicate.KeycapModel) *KeycapModelUpdate + type KeycapModelUpdateOne struct + func (kmuo *KeycapModelUpdateOne) Exec(ctx context.Context) error + func (kmuo *KeycapModelUpdateOne) ExecX(ctx context.Context) + func (kmuo *KeycapModelUpdateOne) Mutation() *KeycapModelMutation + func (kmuo *KeycapModelUpdateOne) Save(ctx context.Context) (*KeycapModel, error) + func (kmuo *KeycapModelUpdateOne) SaveX(ctx context.Context) *KeycapModel + func (kmuo *KeycapModelUpdateOne) Select(field string, fields ...string) *KeycapModelUpdateOne + func (kmuo *KeycapModelUpdateOne) SetMaterial(k keycapmodel.Material) *KeycapModelUpdateOne + func (kmuo *KeycapModelUpdateOne) SetName(s string) *KeycapModelUpdateOne + func (kmuo *KeycapModelUpdateOne) SetProfile(s string) *KeycapModelUpdateOne + func (kmuo *KeycapModelUpdateOne) Where(ps ...predicate.KeycapModel) *KeycapModelUpdateOne + type KeycapModels []*KeycapModel + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + type NotFoundError struct + func (e *NotFoundError) Error() string + type NotLoadedError struct + func (e *NotLoadedError) Error() string + type NotSingularError struct + func (e *NotSingularError) Error() string + type Op = ent.Op + type Option func(*config) + func Debug() Option + func Driver(driver dialect.Driver) Option + func Log(fn func(...any)) Option + type OrderFunc func(*sql.Selector) + type Policy = ent.Policy + type Querier = ent.Querier + type QuerierFunc = ent.QuerierFunc + type Query = ent.Query + type QueryContext = ent.QueryContext + type RollbackFunc func(context.Context, *Tx) error + func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error + type RollbackHook func(Rollbacker) Rollbacker + type Rollbacker interface + Rollback func(context.Context, *Tx) error + type SwitchModel struct + ID int64 + Name string + SwitchType switchmodel.SwitchType + func (e *SwitchModel) ToOpenAPI() (*openapi.Switches, error) + func (sm *SwitchModel) String() string + func (sm *SwitchModel) Unwrap() *SwitchModel + func (sm *SwitchModel) Update() *SwitchModelUpdateOne + func (sm *SwitchModel) Value(name string) (ent.Value, error) + type SwitchModelClient struct + func NewSwitchModelClient(c config) *SwitchModelClient + func (c *SwitchModelClient) Create() *SwitchModelCreate + func (c *SwitchModelClient) CreateBulk(builders ...*SwitchModelCreate) *SwitchModelCreateBulk + func (c *SwitchModelClient) Delete() *SwitchModelDelete + func (c *SwitchModelClient) DeleteOne(sm *SwitchModel) *SwitchModelDeleteOne + func (c *SwitchModelClient) DeleteOneID(id int64) *SwitchModelDeleteOne + func (c *SwitchModelClient) Get(ctx context.Context, id int64) (*SwitchModel, error) + func (c *SwitchModelClient) GetX(ctx context.Context, id int64) *SwitchModel + func (c *SwitchModelClient) Hooks() []Hook + func (c *SwitchModelClient) Intercept(interceptors ...Interceptor) + func (c *SwitchModelClient) Interceptors() []Interceptor + func (c *SwitchModelClient) Query() *SwitchModelQuery + func (c *SwitchModelClient) Update() *SwitchModelUpdate + func (c *SwitchModelClient) UpdateOne(sm *SwitchModel) *SwitchModelUpdateOne + func (c *SwitchModelClient) UpdateOneID(id int64) *SwitchModelUpdateOne + func (c *SwitchModelClient) Use(hooks ...Hook) + type SwitchModelCreate struct + func (smc *SwitchModelCreate) Exec(ctx context.Context) error + func (smc *SwitchModelCreate) ExecX(ctx context.Context) + func (smc *SwitchModelCreate) Mutation() *SwitchModelMutation + func (smc *SwitchModelCreate) Save(ctx context.Context) (*SwitchModel, error) + func (smc *SwitchModelCreate) SaveX(ctx context.Context) *SwitchModel + func (smc *SwitchModelCreate) SetID(i int64) *SwitchModelCreate + func (smc *SwitchModelCreate) SetName(s string) *SwitchModelCreate + func (smc *SwitchModelCreate) SetSwitchType(st switchmodel.SwitchType) *SwitchModelCreate + type SwitchModelCreateBulk struct + func (smcb *SwitchModelCreateBulk) Exec(ctx context.Context) error + func (smcb *SwitchModelCreateBulk) ExecX(ctx context.Context) + func (smcb *SwitchModelCreateBulk) Save(ctx context.Context) ([]*SwitchModel, error) + func (smcb *SwitchModelCreateBulk) SaveX(ctx context.Context) []*SwitchModel + type SwitchModelDelete struct + func (smd *SwitchModelDelete) Exec(ctx context.Context) (int, error) + func (smd *SwitchModelDelete) ExecX(ctx context.Context) int + func (smd *SwitchModelDelete) Where(ps ...predicate.SwitchModel) *SwitchModelDelete + type SwitchModelDeleteOne struct + func (smdo *SwitchModelDeleteOne) Exec(ctx context.Context) error + func (smdo *SwitchModelDeleteOne) ExecX(ctx context.Context) + func (smdo *SwitchModelDeleteOne) Where(ps ...predicate.SwitchModel) *SwitchModelDeleteOne + type SwitchModelGroupBy struct + func (s *SwitchModelGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *SwitchModelGroupBy) BoolX(ctx context.Context) bool + func (s *SwitchModelGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *SwitchModelGroupBy) BoolsX(ctx context.Context) []bool + func (s *SwitchModelGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *SwitchModelGroupBy) Float64X(ctx context.Context) float64 + func (s *SwitchModelGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *SwitchModelGroupBy) Float64sX(ctx context.Context) []float64 + func (s *SwitchModelGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *SwitchModelGroupBy) IntX(ctx context.Context) int + func (s *SwitchModelGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *SwitchModelGroupBy) IntsX(ctx context.Context) []int + func (s *SwitchModelGroupBy) ScanX(ctx context.Context, v any) + func (s *SwitchModelGroupBy) String(ctx context.Context) (_ string, err error) + func (s *SwitchModelGroupBy) StringX(ctx context.Context) string + func (s *SwitchModelGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *SwitchModelGroupBy) StringsX(ctx context.Context) []string + func (smgb *SwitchModelGroupBy) Aggregate(fns ...AggregateFunc) *SwitchModelGroupBy + func (smgb *SwitchModelGroupBy) Scan(ctx context.Context, v any) error + type SwitchModelMutation struct + func (m *SwitchModelMutation) AddField(name string, value ent.Value) error + func (m *SwitchModelMutation) AddedEdges() []string + func (m *SwitchModelMutation) AddedField(name string) (ent.Value, bool) + func (m *SwitchModelMutation) AddedFields() []string + func (m *SwitchModelMutation) AddedIDs(name string) []ent.Value + func (m *SwitchModelMutation) ClearEdge(name string) error + func (m *SwitchModelMutation) ClearField(name string) error + func (m *SwitchModelMutation) ClearedEdges() []string + func (m *SwitchModelMutation) ClearedFields() []string + func (m *SwitchModelMutation) EdgeCleared(name string) bool + func (m *SwitchModelMutation) Field(name string) (ent.Value, bool) + func (m *SwitchModelMutation) FieldCleared(name string) bool + func (m *SwitchModelMutation) Fields() []string + func (m *SwitchModelMutation) ID() (id int64, exists bool) + func (m *SwitchModelMutation) IDs(ctx context.Context) ([]int64, error) + func (m *SwitchModelMutation) Name() (r string, exists bool) + func (m *SwitchModelMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *SwitchModelMutation) OldName(ctx context.Context) (v string, err error) + func (m *SwitchModelMutation) OldSwitchType(ctx context.Context) (v switchmodel.SwitchType, err error) + func (m *SwitchModelMutation) Op() Op + func (m *SwitchModelMutation) RemovedEdges() []string + func (m *SwitchModelMutation) RemovedIDs(name string) []ent.Value + func (m *SwitchModelMutation) ResetEdge(name string) error + func (m *SwitchModelMutation) ResetField(name string) error + func (m *SwitchModelMutation) ResetName() + func (m *SwitchModelMutation) ResetSwitchType() + func (m *SwitchModelMutation) SetField(name string, value ent.Value) error + func (m *SwitchModelMutation) SetID(id int64) + func (m *SwitchModelMutation) SetName(s string) + func (m *SwitchModelMutation) SetOp(op Op) + func (m *SwitchModelMutation) SetSwitchType(st switchmodel.SwitchType) + func (m *SwitchModelMutation) SwitchType() (r switchmodel.SwitchType, exists bool) + func (m *SwitchModelMutation) Type() string + func (m *SwitchModelMutation) Where(ps ...predicate.SwitchModel) + func (m *SwitchModelMutation) WhereP(ps ...func(*sql.Selector)) + func (m SwitchModelMutation) Client() *Client + func (m SwitchModelMutation) Tx() (*Tx, error) + type SwitchModelQuery struct + func (smq *SwitchModelQuery) Aggregate(fns ...AggregateFunc) *SwitchModelSelect + func (smq *SwitchModelQuery) All(ctx context.Context) ([]*SwitchModel, error) + func (smq *SwitchModelQuery) AllX(ctx context.Context) []*SwitchModel + func (smq *SwitchModelQuery) Clone() *SwitchModelQuery + func (smq *SwitchModelQuery) Count(ctx context.Context) (int, error) + func (smq *SwitchModelQuery) CountX(ctx context.Context) int + func (smq *SwitchModelQuery) Exist(ctx context.Context) (bool, error) + func (smq *SwitchModelQuery) ExistX(ctx context.Context) bool + func (smq *SwitchModelQuery) First(ctx context.Context) (*SwitchModel, error) + func (smq *SwitchModelQuery) FirstID(ctx context.Context) (id int64, err error) + func (smq *SwitchModelQuery) FirstIDX(ctx context.Context) int64 + func (smq *SwitchModelQuery) FirstX(ctx context.Context) *SwitchModel + func (smq *SwitchModelQuery) GroupBy(field string, fields ...string) *SwitchModelGroupBy + func (smq *SwitchModelQuery) IDs(ctx context.Context) (ids []int64, err error) + func (smq *SwitchModelQuery) IDsX(ctx context.Context) []int64 + func (smq *SwitchModelQuery) Limit(limit int) *SwitchModelQuery + func (smq *SwitchModelQuery) Offset(offset int) *SwitchModelQuery + func (smq *SwitchModelQuery) Only(ctx context.Context) (*SwitchModel, error) + func (smq *SwitchModelQuery) OnlyID(ctx context.Context) (id int64, err error) + func (smq *SwitchModelQuery) OnlyIDX(ctx context.Context) int64 + func (smq *SwitchModelQuery) OnlyX(ctx context.Context) *SwitchModel + func (smq *SwitchModelQuery) Order(o ...switchmodel.OrderOption) *SwitchModelQuery + func (smq *SwitchModelQuery) Select(fields ...string) *SwitchModelSelect + func (smq *SwitchModelQuery) Unique(unique bool) *SwitchModelQuery + func (smq *SwitchModelQuery) Where(ps ...predicate.SwitchModel) *SwitchModelQuery + type SwitchModelSelect struct + func (s *SwitchModelSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *SwitchModelSelect) BoolX(ctx context.Context) bool + func (s *SwitchModelSelect) Bools(ctx context.Context) ([]bool, error) + func (s *SwitchModelSelect) BoolsX(ctx context.Context) []bool + func (s *SwitchModelSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *SwitchModelSelect) Float64X(ctx context.Context) float64 + func (s *SwitchModelSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *SwitchModelSelect) Float64sX(ctx context.Context) []float64 + func (s *SwitchModelSelect) Int(ctx context.Context) (_ int, err error) + func (s *SwitchModelSelect) IntX(ctx context.Context) int + func (s *SwitchModelSelect) Ints(ctx context.Context) ([]int, error) + func (s *SwitchModelSelect) IntsX(ctx context.Context) []int + func (s *SwitchModelSelect) ScanX(ctx context.Context, v any) + func (s *SwitchModelSelect) String(ctx context.Context) (_ string, err error) + func (s *SwitchModelSelect) StringX(ctx context.Context) string + func (s *SwitchModelSelect) Strings(ctx context.Context) ([]string, error) + func (s *SwitchModelSelect) StringsX(ctx context.Context) []string + func (sms *SwitchModelSelect) Aggregate(fns ...AggregateFunc) *SwitchModelSelect + func (sms *SwitchModelSelect) Scan(ctx context.Context, v any) error + type SwitchModelUpdate struct + func (smu *SwitchModelUpdate) Exec(ctx context.Context) error + func (smu *SwitchModelUpdate) ExecX(ctx context.Context) + func (smu *SwitchModelUpdate) Mutation() *SwitchModelMutation + func (smu *SwitchModelUpdate) Save(ctx context.Context) (int, error) + func (smu *SwitchModelUpdate) SaveX(ctx context.Context) int + func (smu *SwitchModelUpdate) SetName(s string) *SwitchModelUpdate + func (smu *SwitchModelUpdate) SetSwitchType(st switchmodel.SwitchType) *SwitchModelUpdate + func (smu *SwitchModelUpdate) Where(ps ...predicate.SwitchModel) *SwitchModelUpdate + type SwitchModelUpdateOne struct + func (smuo *SwitchModelUpdateOne) Exec(ctx context.Context) error + func (smuo *SwitchModelUpdateOne) ExecX(ctx context.Context) + func (smuo *SwitchModelUpdateOne) Mutation() *SwitchModelMutation + func (smuo *SwitchModelUpdateOne) Save(ctx context.Context) (*SwitchModel, error) + func (smuo *SwitchModelUpdateOne) SaveX(ctx context.Context) *SwitchModel + func (smuo *SwitchModelUpdateOne) Select(field string, fields ...string) *SwitchModelUpdateOne + func (smuo *SwitchModelUpdateOne) SetName(s string) *SwitchModelUpdateOne + func (smuo *SwitchModelUpdateOne) SetSwitchType(st switchmodel.SwitchType) *SwitchModelUpdateOne + func (smuo *SwitchModelUpdateOne) Where(ps ...predicate.SwitchModel) *SwitchModelUpdateOne + type SwitchModels []*SwitchModel + type TraverseFunc = ent.TraverseFunc + type Traverser = ent.Traverser + type Tx struct + Keyboard *KeyboardClient + KeycapModel *KeycapModelClient + SwitchModel *SwitchModelClient + func TxFromContext(ctx context.Context) *Tx + func (tx *Tx) Client() *Client + func (tx *Tx) Commit() error + func (tx *Tx) OnCommit(f CommitHook) + func (tx *Tx) OnRollback(f RollbackHook) + func (tx *Tx) Rollback() error + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value