Documentation ¶
Index ¶
- Constants
- 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 MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NamespaceSecret
- type NamespaceSecretClient
- func (c *NamespaceSecretClient) Create() *NamespaceSecretCreate
- func (c *NamespaceSecretClient) CreateBulk(builders ...*NamespaceSecretCreate) *NamespaceSecretCreateBulk
- func (c *NamespaceSecretClient) Delete() *NamespaceSecretDelete
- func (c *NamespaceSecretClient) DeleteOne(ns *NamespaceSecret) *NamespaceSecretDeleteOne
- func (c *NamespaceSecretClient) DeleteOneID(id int) *NamespaceSecretDeleteOne
- func (c *NamespaceSecretClient) Get(ctx context.Context, id int) (*NamespaceSecret, error)
- func (c *NamespaceSecretClient) GetX(ctx context.Context, id int) *NamespaceSecret
- func (c *NamespaceSecretClient) Hooks() []Hook
- func (c *NamespaceSecretClient) Query() *NamespaceSecretQuery
- func (c *NamespaceSecretClient) Update() *NamespaceSecretUpdate
- func (c *NamespaceSecretClient) UpdateOne(ns *NamespaceSecret) *NamespaceSecretUpdateOne
- func (c *NamespaceSecretClient) UpdateOneID(id int) *NamespaceSecretUpdateOne
- func (c *NamespaceSecretClient) Use(hooks ...Hook)
- type NamespaceSecretCreate
- func (nsc *NamespaceSecretCreate) Exec(ctx context.Context) error
- func (nsc *NamespaceSecretCreate) ExecX(ctx context.Context)
- func (nsc *NamespaceSecretCreate) Mutation() *NamespaceSecretMutation
- func (nsc *NamespaceSecretCreate) Save(ctx context.Context) (*NamespaceSecret, error)
- func (nsc *NamespaceSecretCreate) SaveX(ctx context.Context) *NamespaceSecret
- func (nsc *NamespaceSecretCreate) SetName(s string) *NamespaceSecretCreate
- func (nsc *NamespaceSecretCreate) SetNs(s string) *NamespaceSecretCreate
- func (nsc *NamespaceSecretCreate) SetSecret(b []byte) *NamespaceSecretCreate
- type NamespaceSecretCreateBulk
- func (nscb *NamespaceSecretCreateBulk) Exec(ctx context.Context) error
- func (nscb *NamespaceSecretCreateBulk) ExecX(ctx context.Context)
- func (nscb *NamespaceSecretCreateBulk) Save(ctx context.Context) ([]*NamespaceSecret, error)
- func (nscb *NamespaceSecretCreateBulk) SaveX(ctx context.Context) []*NamespaceSecret
- type NamespaceSecretDelete
- type NamespaceSecretDeleteOne
- type NamespaceSecretGroupBy
- func (nsgb *NamespaceSecretGroupBy) Aggregate(fns ...AggregateFunc) *NamespaceSecretGroupBy
- func (nsgb *NamespaceSecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nsgb *NamespaceSecretGroupBy) BoolX(ctx context.Context) bool
- func (nsgb *NamespaceSecretGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nsgb *NamespaceSecretGroupBy) BoolsX(ctx context.Context) []bool
- func (nsgb *NamespaceSecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nsgb *NamespaceSecretGroupBy) Float64X(ctx context.Context) float64
- func (nsgb *NamespaceSecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nsgb *NamespaceSecretGroupBy) Float64sX(ctx context.Context) []float64
- func (nsgb *NamespaceSecretGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nsgb *NamespaceSecretGroupBy) IntX(ctx context.Context) int
- func (nsgb *NamespaceSecretGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nsgb *NamespaceSecretGroupBy) IntsX(ctx context.Context) []int
- func (nsgb *NamespaceSecretGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nsgb *NamespaceSecretGroupBy) ScanX(ctx context.Context, v interface{})
- func (nsgb *NamespaceSecretGroupBy) String(ctx context.Context) (_ string, err error)
- func (nsgb *NamespaceSecretGroupBy) StringX(ctx context.Context) string
- func (nsgb *NamespaceSecretGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nsgb *NamespaceSecretGroupBy) StringsX(ctx context.Context) []string
- type NamespaceSecretMutation
- func (m *NamespaceSecretMutation) AddField(name string, value ent.Value) error
- func (m *NamespaceSecretMutation) AddedEdges() []string
- func (m *NamespaceSecretMutation) AddedField(name string) (ent.Value, bool)
- func (m *NamespaceSecretMutation) AddedFields() []string
- func (m *NamespaceSecretMutation) AddedIDs(name string) []ent.Value
- func (m *NamespaceSecretMutation) ClearEdge(name string) error
- func (m *NamespaceSecretMutation) ClearField(name string) error
- func (m *NamespaceSecretMutation) ClearedEdges() []string
- func (m *NamespaceSecretMutation) ClearedFields() []string
- func (m NamespaceSecretMutation) Client() *Client
- func (m *NamespaceSecretMutation) EdgeCleared(name string) bool
- func (m *NamespaceSecretMutation) Field(name string) (ent.Value, bool)
- func (m *NamespaceSecretMutation) FieldCleared(name string) bool
- func (m *NamespaceSecretMutation) Fields() []string
- func (m *NamespaceSecretMutation) ID() (id int, exists bool)
- func (m *NamespaceSecretMutation) Name() (r string, exists bool)
- func (m *NamespaceSecretMutation) Ns() (r string, exists bool)
- func (m *NamespaceSecretMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NamespaceSecretMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NamespaceSecretMutation) OldNs(ctx context.Context) (v string, err error)
- func (m *NamespaceSecretMutation) OldSecret(ctx context.Context) (v []byte, err error)
- func (m *NamespaceSecretMutation) Op() Op
- func (m *NamespaceSecretMutation) RemovedEdges() []string
- func (m *NamespaceSecretMutation) RemovedIDs(name string) []ent.Value
- func (m *NamespaceSecretMutation) ResetEdge(name string) error
- func (m *NamespaceSecretMutation) ResetField(name string) error
- func (m *NamespaceSecretMutation) ResetName()
- func (m *NamespaceSecretMutation) ResetNs()
- func (m *NamespaceSecretMutation) ResetSecret()
- func (m *NamespaceSecretMutation) Secret() (r []byte, exists bool)
- func (m *NamespaceSecretMutation) SetField(name string, value ent.Value) error
- func (m *NamespaceSecretMutation) SetName(s string)
- func (m *NamespaceSecretMutation) SetNs(s string)
- func (m *NamespaceSecretMutation) SetSecret(b []byte)
- func (m NamespaceSecretMutation) Tx() (*Tx, error)
- func (m *NamespaceSecretMutation) Type() string
- func (m *NamespaceSecretMutation) Where(ps ...predicate.NamespaceSecret)
- type NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) All(ctx context.Context) ([]*NamespaceSecret, error)
- func (nsq *NamespaceSecretQuery) AllX(ctx context.Context) []*NamespaceSecret
- func (nsq *NamespaceSecretQuery) Clone() *NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) Count(ctx context.Context) (int, error)
- func (nsq *NamespaceSecretQuery) CountX(ctx context.Context) int
- func (nsq *NamespaceSecretQuery) Exist(ctx context.Context) (bool, error)
- func (nsq *NamespaceSecretQuery) ExistX(ctx context.Context) bool
- func (nsq *NamespaceSecretQuery) First(ctx context.Context) (*NamespaceSecret, error)
- func (nsq *NamespaceSecretQuery) FirstID(ctx context.Context) (id int, err error)
- func (nsq *NamespaceSecretQuery) FirstIDX(ctx context.Context) int
- func (nsq *NamespaceSecretQuery) FirstX(ctx context.Context) *NamespaceSecret
- func (nsq *NamespaceSecretQuery) GroupBy(field string, fields ...string) *NamespaceSecretGroupBy
- func (nsq *NamespaceSecretQuery) IDs(ctx context.Context) ([]int, error)
- func (nsq *NamespaceSecretQuery) IDsX(ctx context.Context) []int
- func (nsq *NamespaceSecretQuery) Limit(limit int) *NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) Offset(offset int) *NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) Only(ctx context.Context) (*NamespaceSecret, error)
- func (nsq *NamespaceSecretQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nsq *NamespaceSecretQuery) OnlyIDX(ctx context.Context) int
- func (nsq *NamespaceSecretQuery) OnlyX(ctx context.Context) *NamespaceSecret
- func (nsq *NamespaceSecretQuery) Order(o ...OrderFunc) *NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) Select(fields ...string) *NamespaceSecretSelect
- func (nsq *NamespaceSecretQuery) Unique(unique bool) *NamespaceSecretQuery
- func (nsq *NamespaceSecretQuery) Where(ps ...predicate.NamespaceSecret) *NamespaceSecretQuery
- type NamespaceSecretSelect
- func (nss *NamespaceSecretSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nss *NamespaceSecretSelect) BoolX(ctx context.Context) bool
- func (nss *NamespaceSecretSelect) Bools(ctx context.Context) ([]bool, error)
- func (nss *NamespaceSecretSelect) BoolsX(ctx context.Context) []bool
- func (nss *NamespaceSecretSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nss *NamespaceSecretSelect) Float64X(ctx context.Context) float64
- func (nss *NamespaceSecretSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nss *NamespaceSecretSelect) Float64sX(ctx context.Context) []float64
- func (nss *NamespaceSecretSelect) Int(ctx context.Context) (_ int, err error)
- func (nss *NamespaceSecretSelect) IntX(ctx context.Context) int
- func (nss *NamespaceSecretSelect) Ints(ctx context.Context) ([]int, error)
- func (nss *NamespaceSecretSelect) IntsX(ctx context.Context) []int
- func (nss *NamespaceSecretSelect) Scan(ctx context.Context, v interface{}) error
- func (nss *NamespaceSecretSelect) ScanX(ctx context.Context, v interface{})
- func (nss *NamespaceSecretSelect) String(ctx context.Context) (_ string, err error)
- func (nss *NamespaceSecretSelect) StringX(ctx context.Context) string
- func (nss *NamespaceSecretSelect) Strings(ctx context.Context) ([]string, error)
- func (nss *NamespaceSecretSelect) StringsX(ctx context.Context) []string
- type NamespaceSecretUpdate
- func (nsu *NamespaceSecretUpdate) Exec(ctx context.Context) error
- func (nsu *NamespaceSecretUpdate) ExecX(ctx context.Context)
- func (nsu *NamespaceSecretUpdate) Mutation() *NamespaceSecretMutation
- func (nsu *NamespaceSecretUpdate) Save(ctx context.Context) (int, error)
- func (nsu *NamespaceSecretUpdate) SaveX(ctx context.Context) int
- func (nsu *NamespaceSecretUpdate) SetName(s string) *NamespaceSecretUpdate
- func (nsu *NamespaceSecretUpdate) SetNs(s string) *NamespaceSecretUpdate
- func (nsu *NamespaceSecretUpdate) SetSecret(b []byte) *NamespaceSecretUpdate
- func (nsu *NamespaceSecretUpdate) Where(ps ...predicate.NamespaceSecret) *NamespaceSecretUpdate
- type NamespaceSecretUpdateOne
- func (nsuo *NamespaceSecretUpdateOne) Exec(ctx context.Context) error
- func (nsuo *NamespaceSecretUpdateOne) ExecX(ctx context.Context)
- func (nsuo *NamespaceSecretUpdateOne) Mutation() *NamespaceSecretMutation
- func (nsuo *NamespaceSecretUpdateOne) Save(ctx context.Context) (*NamespaceSecret, error)
- func (nsuo *NamespaceSecretUpdateOne) SaveX(ctx context.Context) *NamespaceSecret
- func (nsuo *NamespaceSecretUpdateOne) Select(field string, fields ...string) *NamespaceSecretUpdateOne
- func (nsuo *NamespaceSecretUpdateOne) SetName(s string) *NamespaceSecretUpdateOne
- func (nsuo *NamespaceSecretUpdateOne) SetNs(s string) *NamespaceSecretUpdateOne
- func (nsuo *NamespaceSecretUpdateOne) SetSecret(b []byte) *NamespaceSecretUpdateOne
- type NamespaceSecrets
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeNamespaceSecret = "NamespaceSecret" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // NamespaceSecret is the client for interacting with the NamespaceSecret builders. NamespaceSecret *NamespaceSecretClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). NamespaceSecret. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NamespaceSecret ¶ added in v0.2.1
type NamespaceSecret struct { // ID of the ent. ID int `json:"id,omitempty"` // Ns holds the value of the "ns" field. Ns string `json:"ns,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Secret holds the value of the "secret" field. Secret []byte `json:"secret,omitempty"` // contains filtered or unexported fields }
NamespaceSecret is the model entity for the NamespaceSecret schema.
func (*NamespaceSecret) String ¶ added in v0.2.1
func (ns *NamespaceSecret) String() string
String implements the fmt.Stringer.
func (*NamespaceSecret) Unwrap ¶ added in v0.2.1
func (ns *NamespaceSecret) Unwrap() *NamespaceSecret
Unwrap unwraps the NamespaceSecret entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*NamespaceSecret) Update ¶ added in v0.2.1
func (ns *NamespaceSecret) Update() *NamespaceSecretUpdateOne
Update returns a builder for updating this NamespaceSecret. Note that you need to call NamespaceSecret.Unwrap() before calling this method if this NamespaceSecret was returned from a transaction, and the transaction was committed or rolled back.
type NamespaceSecretClient ¶ added in v0.2.1
type NamespaceSecretClient struct {
// contains filtered or unexported fields
}
NamespaceSecretClient is a client for the NamespaceSecret schema.
func NewNamespaceSecretClient ¶ added in v0.2.1
func NewNamespaceSecretClient(c config) *NamespaceSecretClient
NewNamespaceSecretClient returns a client for the NamespaceSecret from the given config.
func (*NamespaceSecretClient) Create ¶ added in v0.2.1
func (c *NamespaceSecretClient) Create() *NamespaceSecretCreate
Create returns a create builder for NamespaceSecret.
func (*NamespaceSecretClient) CreateBulk ¶ added in v0.2.1
func (c *NamespaceSecretClient) CreateBulk(builders ...*NamespaceSecretCreate) *NamespaceSecretCreateBulk
CreateBulk returns a builder for creating a bulk of NamespaceSecret entities.
func (*NamespaceSecretClient) Delete ¶ added in v0.2.1
func (c *NamespaceSecretClient) Delete() *NamespaceSecretDelete
Delete returns a delete builder for NamespaceSecret.
func (*NamespaceSecretClient) DeleteOne ¶ added in v0.2.1
func (c *NamespaceSecretClient) DeleteOne(ns *NamespaceSecret) *NamespaceSecretDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NamespaceSecretClient) DeleteOneID ¶ added in v0.2.1
func (c *NamespaceSecretClient) DeleteOneID(id int) *NamespaceSecretDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NamespaceSecretClient) Get ¶ added in v0.2.1
func (c *NamespaceSecretClient) Get(ctx context.Context, id int) (*NamespaceSecret, error)
Get returns a NamespaceSecret entity by its id.
func (*NamespaceSecretClient) GetX ¶ added in v0.2.1
func (c *NamespaceSecretClient) GetX(ctx context.Context, id int) *NamespaceSecret
GetX is like Get, but panics if an error occurs.
func (*NamespaceSecretClient) Hooks ¶ added in v0.2.1
func (c *NamespaceSecretClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NamespaceSecretClient) Query ¶ added in v0.2.1
func (c *NamespaceSecretClient) Query() *NamespaceSecretQuery
Query returns a query builder for NamespaceSecret.
func (*NamespaceSecretClient) Update ¶ added in v0.2.1
func (c *NamespaceSecretClient) Update() *NamespaceSecretUpdate
Update returns an update builder for NamespaceSecret.
func (*NamespaceSecretClient) UpdateOne ¶ added in v0.2.1
func (c *NamespaceSecretClient) UpdateOne(ns *NamespaceSecret) *NamespaceSecretUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NamespaceSecretClient) UpdateOneID ¶ added in v0.2.1
func (c *NamespaceSecretClient) UpdateOneID(id int) *NamespaceSecretUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NamespaceSecretClient) Use ¶ added in v0.2.1
func (c *NamespaceSecretClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `namespacesecret.Hooks(f(g(h())))`.
type NamespaceSecretCreate ¶ added in v0.2.1
type NamespaceSecretCreate struct {
// contains filtered or unexported fields
}
NamespaceSecretCreate is the builder for creating a NamespaceSecret entity.
func (*NamespaceSecretCreate) Exec ¶ added in v0.5.0
func (nsc *NamespaceSecretCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NamespaceSecretCreate) ExecX ¶ added in v0.5.0
func (nsc *NamespaceSecretCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NamespaceSecretCreate) Mutation ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) Mutation() *NamespaceSecretMutation
Mutation returns the NamespaceSecretMutation object of the builder.
func (*NamespaceSecretCreate) Save ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) Save(ctx context.Context) (*NamespaceSecret, error)
Save creates the NamespaceSecret in the database.
func (*NamespaceSecretCreate) SaveX ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) SaveX(ctx context.Context) *NamespaceSecret
SaveX calls Save and panics if Save returns an error.
func (*NamespaceSecretCreate) SetName ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) SetName(s string) *NamespaceSecretCreate
SetName sets the "name" field.
func (*NamespaceSecretCreate) SetNs ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) SetNs(s string) *NamespaceSecretCreate
SetNs sets the "ns" field.
func (*NamespaceSecretCreate) SetSecret ¶ added in v0.2.1
func (nsc *NamespaceSecretCreate) SetSecret(b []byte) *NamespaceSecretCreate
SetSecret sets the "secret" field.
type NamespaceSecretCreateBulk ¶ added in v0.2.1
type NamespaceSecretCreateBulk struct {
// contains filtered or unexported fields
}
NamespaceSecretCreateBulk is the builder for creating many NamespaceSecret entities in bulk.
func (*NamespaceSecretCreateBulk) Exec ¶ added in v0.5.0
func (nscb *NamespaceSecretCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NamespaceSecretCreateBulk) ExecX ¶ added in v0.5.0
func (nscb *NamespaceSecretCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NamespaceSecretCreateBulk) Save ¶ added in v0.2.1
func (nscb *NamespaceSecretCreateBulk) Save(ctx context.Context) ([]*NamespaceSecret, error)
Save creates the NamespaceSecret entities in the database.
func (*NamespaceSecretCreateBulk) SaveX ¶ added in v0.2.1
func (nscb *NamespaceSecretCreateBulk) SaveX(ctx context.Context) []*NamespaceSecret
SaveX is like Save, but panics if an error occurs.
type NamespaceSecretDelete ¶ added in v0.2.1
type NamespaceSecretDelete struct {
// contains filtered or unexported fields
}
NamespaceSecretDelete is the builder for deleting a NamespaceSecret entity.
func (*NamespaceSecretDelete) Exec ¶ added in v0.2.1
func (nsd *NamespaceSecretDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NamespaceSecretDelete) ExecX ¶ added in v0.2.1
func (nsd *NamespaceSecretDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NamespaceSecretDelete) Where ¶ added in v0.2.1
func (nsd *NamespaceSecretDelete) Where(ps ...predicate.NamespaceSecret) *NamespaceSecretDelete
Where appends a list predicates to the NamespaceSecretDelete builder.
type NamespaceSecretDeleteOne ¶ added in v0.2.1
type NamespaceSecretDeleteOne struct {
// contains filtered or unexported fields
}
NamespaceSecretDeleteOne is the builder for deleting a single NamespaceSecret entity.
func (*NamespaceSecretDeleteOne) Exec ¶ added in v0.2.1
func (nsdo *NamespaceSecretDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NamespaceSecretDeleteOne) ExecX ¶ added in v0.2.1
func (nsdo *NamespaceSecretDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NamespaceSecretGroupBy ¶ added in v0.2.1
type NamespaceSecretGroupBy struct {
// contains filtered or unexported fields
}
NamespaceSecretGroupBy is the group-by builder for NamespaceSecret entities.
func (*NamespaceSecretGroupBy) Aggregate ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Aggregate(fns ...AggregateFunc) *NamespaceSecretGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NamespaceSecretGroupBy) Bool ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) BoolX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Bools ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) BoolsX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Float64 ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) Float64X ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Float64s ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) Float64sX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Int ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) IntX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Ints ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) IntsX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NamespaceSecretGroupBy) Scan ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NamespaceSecretGroupBy) ScanX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NamespaceSecretGroupBy) String ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NamespaceSecretGroupBy) StringX ¶ added in v0.2.1
func (nsgb *NamespaceSecretGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NamespaceSecretMutation ¶ added in v0.2.1
type NamespaceSecretMutation struct {
// contains filtered or unexported fields
}
NamespaceSecretMutation represents an operation that mutates the NamespaceSecret nodes in the graph.
func (*NamespaceSecretMutation) AddField ¶ added in v0.2.1
func (m *NamespaceSecretMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*NamespaceSecretMutation) AddedEdges ¶ added in v0.2.1
func (m *NamespaceSecretMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NamespaceSecretMutation) AddedField ¶ added in v0.2.1
func (m *NamespaceSecretMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*NamespaceSecretMutation) AddedFields ¶ added in v0.2.1
func (m *NamespaceSecretMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NamespaceSecretMutation) AddedIDs ¶ added in v0.2.1
func (m *NamespaceSecretMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NamespaceSecretMutation) ClearEdge ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*NamespaceSecretMutation) ClearField ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*NamespaceSecretMutation) ClearedEdges ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NamespaceSecretMutation) ClearedFields ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NamespaceSecretMutation) Client ¶ added in v0.2.1
func (m NamespaceSecretMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*NamespaceSecretMutation) EdgeCleared ¶ added in v0.2.1
func (m *NamespaceSecretMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NamespaceSecretMutation) Field ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*NamespaceSecretMutation) FieldCleared ¶ added in v0.2.1
func (m *NamespaceSecretMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NamespaceSecretMutation) Fields ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*NamespaceSecretMutation) ID ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NamespaceSecretMutation) Name ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NamespaceSecretMutation) Ns ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Ns() (r string, exists bool)
Ns returns the value of the "ns" field in the mutation.
func (*NamespaceSecretMutation) OldField ¶ added in v0.2.1
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*NamespaceSecretMutation) OldName ¶ added in v0.2.1
func (m *NamespaceSecretMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the NamespaceSecret entity. If the NamespaceSecret object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NamespaceSecretMutation) OldNs ¶ added in v0.2.1
func (m *NamespaceSecretMutation) OldNs(ctx context.Context) (v string, err error)
OldNs returns the old "ns" field's value of the NamespaceSecret entity. If the NamespaceSecret object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NamespaceSecretMutation) OldSecret ¶ added in v0.2.1
func (m *NamespaceSecretMutation) OldSecret(ctx context.Context) (v []byte, err error)
OldSecret returns the old "secret" field's value of the NamespaceSecret entity. If the NamespaceSecret object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NamespaceSecretMutation) Op ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Op() Op
Op returns the operation name.
func (*NamespaceSecretMutation) RemovedEdges ¶ added in v0.2.1
func (m *NamespaceSecretMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NamespaceSecretMutation) RemovedIDs ¶ added in v0.2.1
func (m *NamespaceSecretMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*NamespaceSecretMutation) ResetEdge ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*NamespaceSecretMutation) ResetField ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*NamespaceSecretMutation) ResetName ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NamespaceSecretMutation) ResetNs ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ResetNs()
ResetNs resets all changes to the "ns" field.
func (*NamespaceSecretMutation) ResetSecret ¶ added in v0.2.1
func (m *NamespaceSecretMutation) ResetSecret()
ResetSecret resets all changes to the "secret" field.
func (*NamespaceSecretMutation) Secret ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Secret() (r []byte, exists bool)
Secret returns the value of the "secret" field in the mutation.
func (*NamespaceSecretMutation) SetField ¶ added in v0.2.1
func (m *NamespaceSecretMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*NamespaceSecretMutation) SetName ¶ added in v0.2.1
func (m *NamespaceSecretMutation) SetName(s string)
SetName sets the "name" field.
func (*NamespaceSecretMutation) SetNs ¶ added in v0.2.1
func (m *NamespaceSecretMutation) SetNs(s string)
SetNs sets the "ns" field.
func (*NamespaceSecretMutation) SetSecret ¶ added in v0.2.1
func (m *NamespaceSecretMutation) SetSecret(b []byte)
SetSecret sets the "secret" field.
func (NamespaceSecretMutation) Tx ¶ added in v0.2.1
func (m NamespaceSecretMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NamespaceSecretMutation) Type ¶ added in v0.2.1
func (m *NamespaceSecretMutation) Type() string
Type returns the node type of this mutation (NamespaceSecret).
func (*NamespaceSecretMutation) Where ¶ added in v0.5.0
func (m *NamespaceSecretMutation) Where(ps ...predicate.NamespaceSecret)
Where appends a list predicates to the NamespaceSecretMutation builder.
type NamespaceSecretQuery ¶ added in v0.2.1
type NamespaceSecretQuery struct {
// contains filtered or unexported fields
}
NamespaceSecretQuery is the builder for querying NamespaceSecret entities.
func (*NamespaceSecretQuery) All ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) All(ctx context.Context) ([]*NamespaceSecret, error)
All executes the query and returns a list of NamespaceSecrets.
func (*NamespaceSecretQuery) AllX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) AllX(ctx context.Context) []*NamespaceSecret
AllX is like All, but panics if an error occurs.
func (*NamespaceSecretQuery) Clone ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Clone() *NamespaceSecretQuery
Clone returns a duplicate of the NamespaceSecretQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NamespaceSecretQuery) Count ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NamespaceSecretQuery) CountX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NamespaceSecretQuery) Exist ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NamespaceSecretQuery) ExistX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NamespaceSecretQuery) First ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) First(ctx context.Context) (*NamespaceSecret, error)
First returns the first NamespaceSecret entity from the query. Returns a *NotFoundError when no NamespaceSecret was found.
func (*NamespaceSecretQuery) FirstID ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NamespaceSecret ID from the query. Returns a *NotFoundError when no NamespaceSecret ID was found.
func (*NamespaceSecretQuery) FirstIDX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NamespaceSecretQuery) FirstX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) FirstX(ctx context.Context) *NamespaceSecret
FirstX is like First, but panics if an error occurs.
func (*NamespaceSecretQuery) GroupBy ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) GroupBy(field string, fields ...string) *NamespaceSecretGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Ns string `json:"ns,omitempty"` Count int `json:"count,omitempty"` } client.NamespaceSecret.Query(). GroupBy(namespacesecret.FieldNs). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NamespaceSecretQuery) IDs ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NamespaceSecret IDs.
func (*NamespaceSecretQuery) IDsX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NamespaceSecretQuery) Limit ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Limit(limit int) *NamespaceSecretQuery
Limit adds a limit step to the query.
func (*NamespaceSecretQuery) Offset ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Offset(offset int) *NamespaceSecretQuery
Offset adds an offset step to the query.
func (*NamespaceSecretQuery) Only ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Only(ctx context.Context) (*NamespaceSecret, error)
Only returns a single NamespaceSecret entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NamespaceSecret entity is not found. Returns a *NotFoundError when no NamespaceSecret entities are found.
func (*NamespaceSecretQuery) OnlyID ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NamespaceSecret ID in the query. Returns a *NotSingularError when exactly one NamespaceSecret ID is not found. Returns a *NotFoundError when no entities are found.
func (*NamespaceSecretQuery) OnlyIDX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NamespaceSecretQuery) OnlyX ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) OnlyX(ctx context.Context) *NamespaceSecret
OnlyX is like Only, but panics if an error occurs.
func (*NamespaceSecretQuery) Order ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Order(o ...OrderFunc) *NamespaceSecretQuery
Order adds an order step to the query.
func (*NamespaceSecretQuery) Select ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Select(fields ...string) *NamespaceSecretSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Ns string `json:"ns,omitempty"` } client.NamespaceSecret.Query(). Select(namespacesecret.FieldNs). Scan(ctx, &v)
func (*NamespaceSecretQuery) Unique ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Unique(unique bool) *NamespaceSecretQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*NamespaceSecretQuery) Where ¶ added in v0.2.1
func (nsq *NamespaceSecretQuery) Where(ps ...predicate.NamespaceSecret) *NamespaceSecretQuery
Where adds a new predicate for the NamespaceSecretQuery builder.
type NamespaceSecretSelect ¶ added in v0.2.1
type NamespaceSecretSelect struct { *NamespaceSecretQuery // contains filtered or unexported fields }
NamespaceSecretSelect is the builder for selecting fields of NamespaceSecret entities.
func (*NamespaceSecretSelect) Bool ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) BoolX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NamespaceSecretSelect) Bools ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) BoolsX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NamespaceSecretSelect) Float64 ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) Float64X ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NamespaceSecretSelect) Float64s ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) Float64sX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NamespaceSecretSelect) Int ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) IntX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NamespaceSecretSelect) Ints ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) IntsX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NamespaceSecretSelect) Scan ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NamespaceSecretSelect) ScanX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NamespaceSecretSelect) String ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NamespaceSecretSelect) StringX ¶ added in v0.2.1
func (nss *NamespaceSecretSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NamespaceSecretUpdate ¶ added in v0.2.1
type NamespaceSecretUpdate struct {
// contains filtered or unexported fields
}
NamespaceSecretUpdate is the builder for updating NamespaceSecret entities.
func (*NamespaceSecretUpdate) Exec ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NamespaceSecretUpdate) ExecX ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NamespaceSecretUpdate) Mutation ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) Mutation() *NamespaceSecretMutation
Mutation returns the NamespaceSecretMutation object of the builder.
func (*NamespaceSecretUpdate) Save ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NamespaceSecretUpdate) SaveX ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NamespaceSecretUpdate) SetName ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) SetName(s string) *NamespaceSecretUpdate
SetName sets the "name" field.
func (*NamespaceSecretUpdate) SetNs ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) SetNs(s string) *NamespaceSecretUpdate
SetNs sets the "ns" field.
func (*NamespaceSecretUpdate) SetSecret ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) SetSecret(b []byte) *NamespaceSecretUpdate
SetSecret sets the "secret" field.
func (*NamespaceSecretUpdate) Where ¶ added in v0.2.1
func (nsu *NamespaceSecretUpdate) Where(ps ...predicate.NamespaceSecret) *NamespaceSecretUpdate
Where appends a list predicates to the NamespaceSecretUpdate builder.
type NamespaceSecretUpdateOne ¶ added in v0.2.1
type NamespaceSecretUpdateOne struct {
// contains filtered or unexported fields
}
NamespaceSecretUpdateOne is the builder for updating a single NamespaceSecret entity.
func (*NamespaceSecretUpdateOne) Exec ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NamespaceSecretUpdateOne) ExecX ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NamespaceSecretUpdateOne) Mutation ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) Mutation() *NamespaceSecretMutation
Mutation returns the NamespaceSecretMutation object of the builder.
func (*NamespaceSecretUpdateOne) Save ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) Save(ctx context.Context) (*NamespaceSecret, error)
Save executes the query and returns the updated NamespaceSecret entity.
func (*NamespaceSecretUpdateOne) SaveX ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) SaveX(ctx context.Context) *NamespaceSecret
SaveX is like Save, but panics if an error occurs.
func (*NamespaceSecretUpdateOne) Select ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) Select(field string, fields ...string) *NamespaceSecretUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NamespaceSecretUpdateOne) SetName ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) SetName(s string) *NamespaceSecretUpdateOne
SetName sets the "name" field.
func (*NamespaceSecretUpdateOne) SetNs ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) SetNs(s string) *NamespaceSecretUpdateOne
SetNs sets the "ns" field.
func (*NamespaceSecretUpdateOne) SetSecret ¶ added in v0.2.1
func (nsuo *NamespaceSecretUpdateOne) SetSecret(b []byte) *NamespaceSecretUpdateOne
SetSecret sets the "secret" field.
type NamespaceSecrets ¶ added in v0.2.1
type NamespaceSecrets []*NamespaceSecret
NamespaceSecrets is a parsable slice of NamespaceSecret.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Tx ¶
type Tx struct { // NamespaceSecret is the client for interacting with the NamespaceSecret builders. NamespaceSecret *NamespaceSecretClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.