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 AuthorizationCode
- type AuthorizationCodeClient
- func (c *AuthorizationCodeClient) Create() *AuthorizationCodeCreate
- func (c *AuthorizationCodeClient) CreateBulk(builders ...*AuthorizationCodeCreate) *AuthorizationCodeCreateBulk
- func (c *AuthorizationCodeClient) Delete() *AuthorizationCodeDelete
- func (c *AuthorizationCodeClient) DeleteOne(ac *AuthorizationCode) *AuthorizationCodeDeleteOne
- func (c *AuthorizationCodeClient) DeleteOneID(id int) *AuthorizationCodeDeleteOne
- func (c *AuthorizationCodeClient) Get(ctx context.Context, id int) (*AuthorizationCode, error)
- func (c *AuthorizationCodeClient) GetX(ctx context.Context, id int) *AuthorizationCode
- func (c *AuthorizationCodeClient) Hooks() []Hook
- func (c *AuthorizationCodeClient) Query() *AuthorizationCodeQuery
- func (c *AuthorizationCodeClient) QueryOwner(ac *AuthorizationCode) *ServiceProviderQuery
- func (c *AuthorizationCodeClient) Update() *AuthorizationCodeUpdate
- func (c *AuthorizationCodeClient) UpdateOne(ac *AuthorizationCode) *AuthorizationCodeUpdateOne
- func (c *AuthorizationCodeClient) UpdateOneID(id int) *AuthorizationCodeUpdateOne
- func (c *AuthorizationCodeClient) Use(hooks ...Hook)
- type AuthorizationCodeCreate
- func (acc *AuthorizationCodeCreate) Exec(ctx context.Context) error
- func (acc *AuthorizationCodeCreate) ExecX(ctx context.Context)
- func (acc *AuthorizationCodeCreate) Mutation() *AuthorizationCodeMutation
- func (acc *AuthorizationCodeCreate) Save(ctx context.Context) (*AuthorizationCode, error)
- func (acc *AuthorizationCodeCreate) SaveX(ctx context.Context) *AuthorizationCode
- func (acc *AuthorizationCodeCreate) SetNillableOwnerID(id *int) *AuthorizationCodeCreate
- func (acc *AuthorizationCodeCreate) SetOwner(s *ServiceProvider) *AuthorizationCodeCreate
- func (acc *AuthorizationCodeCreate) SetOwnerID(id int) *AuthorizationCodeCreate
- func (acc *AuthorizationCodeCreate) SetToken(s string) *AuthorizationCodeCreate
- type AuthorizationCodeCreateBulk
- func (accb *AuthorizationCodeCreateBulk) Exec(ctx context.Context) error
- func (accb *AuthorizationCodeCreateBulk) ExecX(ctx context.Context)
- func (accb *AuthorizationCodeCreateBulk) Save(ctx context.Context) ([]*AuthorizationCode, error)
- func (accb *AuthorizationCodeCreateBulk) SaveX(ctx context.Context) []*AuthorizationCode
- type AuthorizationCodeDelete
- type AuthorizationCodeDeleteOne
- type AuthorizationCodeEdges
- type AuthorizationCodeGroupBy
- func (acgb *AuthorizationCodeGroupBy) Aggregate(fns ...AggregateFunc) *AuthorizationCodeGroupBy
- func (s *AuthorizationCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthorizationCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *AuthorizationCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthorizationCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuthorizationCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthorizationCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *AuthorizationCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthorizationCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuthorizationCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuthorizationCodeGroupBy) IntX(ctx context.Context) int
- func (s *AuthorizationCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuthorizationCodeGroupBy) IntsX(ctx context.Context) []int
- func (acgb *AuthorizationCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuthorizationCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuthorizationCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuthorizationCodeGroupBy) StringX(ctx context.Context) string
- func (s *AuthorizationCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuthorizationCodeGroupBy) StringsX(ctx context.Context) []string
- type AuthorizationCodeMutation
- func (m *AuthorizationCodeMutation) AddField(name string, value ent.Value) error
- func (m *AuthorizationCodeMutation) AddedEdges() []string
- func (m *AuthorizationCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthorizationCodeMutation) AddedFields() []string
- func (m *AuthorizationCodeMutation) AddedIDs(name string) []ent.Value
- func (m *AuthorizationCodeMutation) ClearEdge(name string) error
- func (m *AuthorizationCodeMutation) ClearField(name string) error
- func (m *AuthorizationCodeMutation) ClearOwner()
- func (m *AuthorizationCodeMutation) ClearedEdges() []string
- func (m *AuthorizationCodeMutation) ClearedFields() []string
- func (m AuthorizationCodeMutation) Client() *Client
- func (m *AuthorizationCodeMutation) EdgeCleared(name string) bool
- func (m *AuthorizationCodeMutation) Field(name string) (ent.Value, bool)
- func (m *AuthorizationCodeMutation) FieldCleared(name string) bool
- func (m *AuthorizationCodeMutation) Fields() []string
- func (m *AuthorizationCodeMutation) ID() (id int, exists bool)
- func (m *AuthorizationCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AuthorizationCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthorizationCodeMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *AuthorizationCodeMutation) Op() Op
- func (m *AuthorizationCodeMutation) OwnerCleared() bool
- func (m *AuthorizationCodeMutation) OwnerID() (id int, exists bool)
- func (m *AuthorizationCodeMutation) OwnerIDs() (ids []int)
- func (m *AuthorizationCodeMutation) RemovedEdges() []string
- func (m *AuthorizationCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthorizationCodeMutation) ResetEdge(name string) error
- func (m *AuthorizationCodeMutation) ResetField(name string) error
- func (m *AuthorizationCodeMutation) ResetOwner()
- func (m *AuthorizationCodeMutation) ResetToken()
- func (m *AuthorizationCodeMutation) SetField(name string, value ent.Value) error
- func (m *AuthorizationCodeMutation) SetOwnerID(id int)
- func (m *AuthorizationCodeMutation) SetToken(s string)
- func (m *AuthorizationCodeMutation) Token() (r string, exists bool)
- func (m AuthorizationCodeMutation) Tx() (*Tx, error)
- func (m *AuthorizationCodeMutation) Type() string
- func (m *AuthorizationCodeMutation) Where(ps ...predicate.AuthorizationCode)
- type AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) Aggregate(fns ...AggregateFunc) *AuthorizationCodeSelect
- func (acq *AuthorizationCodeQuery) All(ctx context.Context) ([]*AuthorizationCode, error)
- func (acq *AuthorizationCodeQuery) AllX(ctx context.Context) []*AuthorizationCode
- func (acq *AuthorizationCodeQuery) Clone() *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) Count(ctx context.Context) (int, error)
- func (acq *AuthorizationCodeQuery) CountX(ctx context.Context) int
- func (acq *AuthorizationCodeQuery) Exist(ctx context.Context) (bool, error)
- func (acq *AuthorizationCodeQuery) ExistX(ctx context.Context) bool
- func (acq *AuthorizationCodeQuery) First(ctx context.Context) (*AuthorizationCode, error)
- func (acq *AuthorizationCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (acq *AuthorizationCodeQuery) FirstIDX(ctx context.Context) int
- func (acq *AuthorizationCodeQuery) FirstX(ctx context.Context) *AuthorizationCode
- func (acq *AuthorizationCodeQuery) GroupBy(field string, fields ...string) *AuthorizationCodeGroupBy
- func (acq *AuthorizationCodeQuery) IDs(ctx context.Context) ([]int, error)
- func (acq *AuthorizationCodeQuery) IDsX(ctx context.Context) []int
- func (acq *AuthorizationCodeQuery) Limit(limit int) *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) Offset(offset int) *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) Only(ctx context.Context) (*AuthorizationCode, error)
- func (acq *AuthorizationCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (acq *AuthorizationCodeQuery) OnlyIDX(ctx context.Context) int
- func (acq *AuthorizationCodeQuery) OnlyX(ctx context.Context) *AuthorizationCode
- func (acq *AuthorizationCodeQuery) Order(o ...OrderFunc) *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) QueryOwner() *ServiceProviderQuery
- func (acq *AuthorizationCodeQuery) Select(fields ...string) *AuthorizationCodeSelect
- func (acq *AuthorizationCodeQuery) Unique(unique bool) *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) Where(ps ...predicate.AuthorizationCode) *AuthorizationCodeQuery
- func (acq *AuthorizationCodeQuery) WithOwner(opts ...func(*ServiceProviderQuery)) *AuthorizationCodeQuery
- type AuthorizationCodeSelect
- func (acs *AuthorizationCodeSelect) Aggregate(fns ...AggregateFunc) *AuthorizationCodeSelect
- func (s *AuthorizationCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthorizationCodeSelect) BoolX(ctx context.Context) bool
- func (s *AuthorizationCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthorizationCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *AuthorizationCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthorizationCodeSelect) Float64X(ctx context.Context) float64
- func (s *AuthorizationCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthorizationCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *AuthorizationCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuthorizationCodeSelect) IntX(ctx context.Context) int
- func (s *AuthorizationCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuthorizationCodeSelect) IntsX(ctx context.Context) []int
- func (acs *AuthorizationCodeSelect) Scan(ctx context.Context, v any) error
- func (s *AuthorizationCodeSelect) ScanX(ctx context.Context, v any)
- func (s *AuthorizationCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuthorizationCodeSelect) StringX(ctx context.Context) string
- func (s *AuthorizationCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuthorizationCodeSelect) StringsX(ctx context.Context) []string
- type AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) ClearOwner() *AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) Exec(ctx context.Context) error
- func (acu *AuthorizationCodeUpdate) ExecX(ctx context.Context)
- func (acu *AuthorizationCodeUpdate) Mutation() *AuthorizationCodeMutation
- func (acu *AuthorizationCodeUpdate) Save(ctx context.Context) (int, error)
- func (acu *AuthorizationCodeUpdate) SaveX(ctx context.Context) int
- func (acu *AuthorizationCodeUpdate) SetNillableOwnerID(id *int) *AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) SetOwner(s *ServiceProvider) *AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) SetOwnerID(id int) *AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) SetToken(s string) *AuthorizationCodeUpdate
- func (acu *AuthorizationCodeUpdate) Where(ps ...predicate.AuthorizationCode) *AuthorizationCodeUpdate
- type AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) ClearOwner() *AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) Exec(ctx context.Context) error
- func (acuo *AuthorizationCodeUpdateOne) ExecX(ctx context.Context)
- func (acuo *AuthorizationCodeUpdateOne) Mutation() *AuthorizationCodeMutation
- func (acuo *AuthorizationCodeUpdateOne) Save(ctx context.Context) (*AuthorizationCode, error)
- func (acuo *AuthorizationCodeUpdateOne) SaveX(ctx context.Context) *AuthorizationCode
- func (acuo *AuthorizationCodeUpdateOne) Select(field string, fields ...string) *AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) SetNillableOwnerID(id *int) *AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) SetOwner(s *ServiceProvider) *AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) SetOwnerID(id int) *AuthorizationCodeUpdateOne
- func (acuo *AuthorizationCodeUpdateOne) SetToken(s string) *AuthorizationCodeUpdateOne
- type AuthorizationCodes
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type ServiceProvider
- type ServiceProviderClient
- func (c *ServiceProviderClient) Create() *ServiceProviderCreate
- func (c *ServiceProviderClient) CreateBulk(builders ...*ServiceProviderCreate) *ServiceProviderCreateBulk
- func (c *ServiceProviderClient) Delete() *ServiceProviderDelete
- func (c *ServiceProviderClient) DeleteOne(sp *ServiceProvider) *ServiceProviderDeleteOne
- func (c *ServiceProviderClient) DeleteOneID(id int) *ServiceProviderDeleteOne
- func (c *ServiceProviderClient) Get(ctx context.Context, id int) (*ServiceProvider, error)
- func (c *ServiceProviderClient) GetX(ctx context.Context, id int) *ServiceProvider
- func (c *ServiceProviderClient) Hooks() []Hook
- func (c *ServiceProviderClient) Query() *ServiceProviderQuery
- func (c *ServiceProviderClient) QueryAuthorizationCodes(sp *ServiceProvider) *AuthorizationCodeQuery
- func (c *ServiceProviderClient) QueryWhitelists(sp *ServiceProvider) *WhiteListQuery
- func (c *ServiceProviderClient) Update() *ServiceProviderUpdate
- func (c *ServiceProviderClient) UpdateOne(sp *ServiceProvider) *ServiceProviderUpdateOne
- func (c *ServiceProviderClient) UpdateOneID(id int) *ServiceProviderUpdateOne
- func (c *ServiceProviderClient) Use(hooks ...Hook)
- type ServiceProviderCreate
- func (spc *ServiceProviderCreate) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderCreate
- func (spc *ServiceProviderCreate) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderCreate
- func (spc *ServiceProviderCreate) AddWhitelistIDs(ids ...int) *ServiceProviderCreate
- func (spc *ServiceProviderCreate) AddWhitelists(w ...*WhiteList) *ServiceProviderCreate
- func (spc *ServiceProviderCreate) Exec(ctx context.Context) error
- func (spc *ServiceProviderCreate) ExecX(ctx context.Context)
- func (spc *ServiceProviderCreate) Mutation() *ServiceProviderMutation
- func (spc *ServiceProviderCreate) Save(ctx context.Context) (*ServiceProvider, error)
- func (spc *ServiceProviderCreate) SaveX(ctx context.Context) *ServiceProvider
- func (spc *ServiceProviderCreate) SetDestinationIP(s string) *ServiceProviderCreate
- func (spc *ServiceProviderCreate) SetHost(s string) *ServiceProviderCreate
- type ServiceProviderCreateBulk
- func (spcb *ServiceProviderCreateBulk) Exec(ctx context.Context) error
- func (spcb *ServiceProviderCreateBulk) ExecX(ctx context.Context)
- func (spcb *ServiceProviderCreateBulk) Save(ctx context.Context) ([]*ServiceProvider, error)
- func (spcb *ServiceProviderCreateBulk) SaveX(ctx context.Context) []*ServiceProvider
- type ServiceProviderDelete
- type ServiceProviderDeleteOne
- type ServiceProviderEdges
- type ServiceProviderGroupBy
- func (spgb *ServiceProviderGroupBy) Aggregate(fns ...AggregateFunc) *ServiceProviderGroupBy
- func (s *ServiceProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ServiceProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *ServiceProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ServiceProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ServiceProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ServiceProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *ServiceProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ServiceProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ServiceProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ServiceProviderGroupBy) IntX(ctx context.Context) int
- func (s *ServiceProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ServiceProviderGroupBy) IntsX(ctx context.Context) []int
- func (spgb *ServiceProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *ServiceProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *ServiceProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ServiceProviderGroupBy) StringX(ctx context.Context) string
- func (s *ServiceProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ServiceProviderGroupBy) StringsX(ctx context.Context) []string
- type ServiceProviderMutation
- func (m *ServiceProviderMutation) AddAuthorizationCodeIDs(ids ...int)
- func (m *ServiceProviderMutation) AddField(name string, value ent.Value) error
- func (m *ServiceProviderMutation) AddWhitelistIDs(ids ...int)
- func (m *ServiceProviderMutation) AddedEdges() []string
- func (m *ServiceProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *ServiceProviderMutation) AddedFields() []string
- func (m *ServiceProviderMutation) AddedIDs(name string) []ent.Value
- func (m *ServiceProviderMutation) AuthorizationCodesCleared() bool
- func (m *ServiceProviderMutation) AuthorizationCodesIDs() (ids []int)
- func (m *ServiceProviderMutation) ClearAuthorizationCodes()
- func (m *ServiceProviderMutation) ClearEdge(name string) error
- func (m *ServiceProviderMutation) ClearField(name string) error
- func (m *ServiceProviderMutation) ClearWhitelists()
- func (m *ServiceProviderMutation) ClearedEdges() []string
- func (m *ServiceProviderMutation) ClearedFields() []string
- func (m ServiceProviderMutation) Client() *Client
- func (m *ServiceProviderMutation) DestinationIP() (r string, exists bool)
- func (m *ServiceProviderMutation) EdgeCleared(name string) bool
- func (m *ServiceProviderMutation) Field(name string) (ent.Value, bool)
- func (m *ServiceProviderMutation) FieldCleared(name string) bool
- func (m *ServiceProviderMutation) Fields() []string
- func (m *ServiceProviderMutation) Host() (r string, exists bool)
- func (m *ServiceProviderMutation) ID() (id int, exists bool)
- func (m *ServiceProviderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ServiceProviderMutation) OldDestinationIP(ctx context.Context) (v string, err error)
- func (m *ServiceProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ServiceProviderMutation) OldHost(ctx context.Context) (v string, err error)
- func (m *ServiceProviderMutation) Op() Op
- func (m *ServiceProviderMutation) RemoveAuthorizationCodeIDs(ids ...int)
- func (m *ServiceProviderMutation) RemoveWhitelistIDs(ids ...int)
- func (m *ServiceProviderMutation) RemovedAuthorizationCodesIDs() (ids []int)
- func (m *ServiceProviderMutation) RemovedEdges() []string
- func (m *ServiceProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *ServiceProviderMutation) RemovedWhitelistsIDs() (ids []int)
- func (m *ServiceProviderMutation) ResetAuthorizationCodes()
- func (m *ServiceProviderMutation) ResetDestinationIP()
- func (m *ServiceProviderMutation) ResetEdge(name string) error
- func (m *ServiceProviderMutation) ResetField(name string) error
- func (m *ServiceProviderMutation) ResetHost()
- func (m *ServiceProviderMutation) ResetWhitelists()
- func (m *ServiceProviderMutation) SetDestinationIP(s string)
- func (m *ServiceProviderMutation) SetField(name string, value ent.Value) error
- func (m *ServiceProviderMutation) SetHost(s string)
- func (m ServiceProviderMutation) Tx() (*Tx, error)
- func (m *ServiceProviderMutation) Type() string
- func (m *ServiceProviderMutation) Where(ps ...predicate.ServiceProvider)
- func (m *ServiceProviderMutation) WhitelistsCleared() bool
- func (m *ServiceProviderMutation) WhitelistsIDs() (ids []int)
- type ServiceProviderQuery
- func (spq *ServiceProviderQuery) Aggregate(fns ...AggregateFunc) *ServiceProviderSelect
- func (spq *ServiceProviderQuery) All(ctx context.Context) ([]*ServiceProvider, error)
- func (spq *ServiceProviderQuery) AllX(ctx context.Context) []*ServiceProvider
- func (spq *ServiceProviderQuery) Clone() *ServiceProviderQuery
- func (spq *ServiceProviderQuery) Count(ctx context.Context) (int, error)
- func (spq *ServiceProviderQuery) CountX(ctx context.Context) int
- func (spq *ServiceProviderQuery) Exist(ctx context.Context) (bool, error)
- func (spq *ServiceProviderQuery) ExistX(ctx context.Context) bool
- func (spq *ServiceProviderQuery) First(ctx context.Context) (*ServiceProvider, error)
- func (spq *ServiceProviderQuery) FirstID(ctx context.Context) (id int, err error)
- func (spq *ServiceProviderQuery) FirstIDX(ctx context.Context) int
- func (spq *ServiceProviderQuery) FirstX(ctx context.Context) *ServiceProvider
- func (spq *ServiceProviderQuery) GroupBy(field string, fields ...string) *ServiceProviderGroupBy
- func (spq *ServiceProviderQuery) IDs(ctx context.Context) ([]int, error)
- func (spq *ServiceProviderQuery) IDsX(ctx context.Context) []int
- func (spq *ServiceProviderQuery) Limit(limit int) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) Offset(offset int) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) Only(ctx context.Context) (*ServiceProvider, error)
- func (spq *ServiceProviderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (spq *ServiceProviderQuery) OnlyIDX(ctx context.Context) int
- func (spq *ServiceProviderQuery) OnlyX(ctx context.Context) *ServiceProvider
- func (spq *ServiceProviderQuery) Order(o ...OrderFunc) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) QueryAuthorizationCodes() *AuthorizationCodeQuery
- func (spq *ServiceProviderQuery) QueryWhitelists() *WhiteListQuery
- func (spq *ServiceProviderQuery) Select(fields ...string) *ServiceProviderSelect
- func (spq *ServiceProviderQuery) Unique(unique bool) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) Where(ps ...predicate.ServiceProvider) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) WithAuthorizationCodes(opts ...func(*AuthorizationCodeQuery)) *ServiceProviderQuery
- func (spq *ServiceProviderQuery) WithWhitelists(opts ...func(*WhiteListQuery)) *ServiceProviderQuery
- type ServiceProviderSelect
- func (sps *ServiceProviderSelect) Aggregate(fns ...AggregateFunc) *ServiceProviderSelect
- func (s *ServiceProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ServiceProviderSelect) BoolX(ctx context.Context) bool
- func (s *ServiceProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ServiceProviderSelect) BoolsX(ctx context.Context) []bool
- func (s *ServiceProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ServiceProviderSelect) Float64X(ctx context.Context) float64
- func (s *ServiceProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ServiceProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *ServiceProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ServiceProviderSelect) IntX(ctx context.Context) int
- func (s *ServiceProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ServiceProviderSelect) IntsX(ctx context.Context) []int
- func (sps *ServiceProviderSelect) Scan(ctx context.Context, v any) error
- func (s *ServiceProviderSelect) ScanX(ctx context.Context, v any)
- func (s *ServiceProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *ServiceProviderSelect) StringX(ctx context.Context) string
- func (s *ServiceProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ServiceProviderSelect) StringsX(ctx context.Context) []string
- type ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) AddWhitelistIDs(ids ...int) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) AddWhitelists(w ...*WhiteList) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) ClearAuthorizationCodes() *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) ClearWhitelists() *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) Exec(ctx context.Context) error
- func (spu *ServiceProviderUpdate) ExecX(ctx context.Context)
- func (spu *ServiceProviderUpdate) Mutation() *ServiceProviderMutation
- func (spu *ServiceProviderUpdate) RemoveAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) RemoveAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) RemoveWhitelistIDs(ids ...int) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) RemoveWhitelists(w ...*WhiteList) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) Save(ctx context.Context) (int, error)
- func (spu *ServiceProviderUpdate) SaveX(ctx context.Context) int
- func (spu *ServiceProviderUpdate) SetDestinationIP(s string) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) SetHost(s string) *ServiceProviderUpdate
- func (spu *ServiceProviderUpdate) Where(ps ...predicate.ServiceProvider) *ServiceProviderUpdate
- type ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) AddWhitelistIDs(ids ...int) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) AddWhitelists(w ...*WhiteList) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) ClearAuthorizationCodes() *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) ClearWhitelists() *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) Exec(ctx context.Context) error
- func (spuo *ServiceProviderUpdateOne) ExecX(ctx context.Context)
- func (spuo *ServiceProviderUpdateOne) Mutation() *ServiceProviderMutation
- func (spuo *ServiceProviderUpdateOne) RemoveAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) RemoveAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) RemoveWhitelistIDs(ids ...int) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) RemoveWhitelists(w ...*WhiteList) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) Save(ctx context.Context) (*ServiceProvider, error)
- func (spuo *ServiceProviderUpdateOne) SaveX(ctx context.Context) *ServiceProvider
- func (spuo *ServiceProviderUpdateOne) Select(field string, fields ...string) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) SetDestinationIP(s string) *ServiceProviderUpdateOne
- func (spuo *ServiceProviderUpdateOne) SetHost(s string) *ServiceProviderUpdateOne
- type ServiceProviders
- type Tx
- type ValidationError
- type Value
- type WhiteList
- type WhiteListClient
- func (c *WhiteListClient) Create() *WhiteListCreate
- func (c *WhiteListClient) CreateBulk(builders ...*WhiteListCreate) *WhiteListCreateBulk
- func (c *WhiteListClient) Delete() *WhiteListDelete
- func (c *WhiteListClient) DeleteOne(wl *WhiteList) *WhiteListDeleteOne
- func (c *WhiteListClient) DeleteOneID(id int) *WhiteListDeleteOne
- func (c *WhiteListClient) Get(ctx context.Context, id int) (*WhiteList, error)
- func (c *WhiteListClient) GetX(ctx context.Context, id int) *WhiteList
- func (c *WhiteListClient) Hooks() []Hook
- func (c *WhiteListClient) Query() *WhiteListQuery
- func (c *WhiteListClient) QueryOwner(wl *WhiteList) *ServiceProviderQuery
- func (c *WhiteListClient) Update() *WhiteListUpdate
- func (c *WhiteListClient) UpdateOne(wl *WhiteList) *WhiteListUpdateOne
- func (c *WhiteListClient) UpdateOneID(id int) *WhiteListUpdateOne
- func (c *WhiteListClient) Use(hooks ...Hook)
- type WhiteListCreate
- func (wlc *WhiteListCreate) Exec(ctx context.Context) error
- func (wlc *WhiteListCreate) ExecX(ctx context.Context)
- func (wlc *WhiteListCreate) Mutation() *WhiteListMutation
- func (wlc *WhiteListCreate) Save(ctx context.Context) (*WhiteList, error)
- func (wlc *WhiteListCreate) SaveX(ctx context.Context) *WhiteList
- func (wlc *WhiteListCreate) SetNillableOwnerID(id *int) *WhiteListCreate
- func (wlc *WhiteListCreate) SetOwner(s *ServiceProvider) *WhiteListCreate
- func (wlc *WhiteListCreate) SetOwnerID(id int) *WhiteListCreate
- func (wlc *WhiteListCreate) SetPath(s string) *WhiteListCreate
- type WhiteListCreateBulk
- type WhiteListDelete
- type WhiteListDeleteOne
- type WhiteListEdges
- type WhiteListGroupBy
- func (wlgb *WhiteListGroupBy) Aggregate(fns ...AggregateFunc) *WhiteListGroupBy
- func (s *WhiteListGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WhiteListGroupBy) BoolX(ctx context.Context) bool
- func (s *WhiteListGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WhiteListGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WhiteListGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WhiteListGroupBy) Float64X(ctx context.Context) float64
- func (s *WhiteListGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WhiteListGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WhiteListGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WhiteListGroupBy) IntX(ctx context.Context) int
- func (s *WhiteListGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WhiteListGroupBy) IntsX(ctx context.Context) []int
- func (wlgb *WhiteListGroupBy) Scan(ctx context.Context, v any) error
- func (s *WhiteListGroupBy) ScanX(ctx context.Context, v any)
- func (s *WhiteListGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WhiteListGroupBy) StringX(ctx context.Context) string
- func (s *WhiteListGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WhiteListGroupBy) StringsX(ctx context.Context) []string
- type WhiteListMutation
- func (m *WhiteListMutation) AddField(name string, value ent.Value) error
- func (m *WhiteListMutation) AddedEdges() []string
- func (m *WhiteListMutation) AddedField(name string) (ent.Value, bool)
- func (m *WhiteListMutation) AddedFields() []string
- func (m *WhiteListMutation) AddedIDs(name string) []ent.Value
- func (m *WhiteListMutation) ClearEdge(name string) error
- func (m *WhiteListMutation) ClearField(name string) error
- func (m *WhiteListMutation) ClearOwner()
- func (m *WhiteListMutation) ClearedEdges() []string
- func (m *WhiteListMutation) ClearedFields() []string
- func (m WhiteListMutation) Client() *Client
- func (m *WhiteListMutation) EdgeCleared(name string) bool
- func (m *WhiteListMutation) Field(name string) (ent.Value, bool)
- func (m *WhiteListMutation) FieldCleared(name string) bool
- func (m *WhiteListMutation) Fields() []string
- func (m *WhiteListMutation) ID() (id int, exists bool)
- func (m *WhiteListMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WhiteListMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WhiteListMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *WhiteListMutation) Op() Op
- func (m *WhiteListMutation) OwnerCleared() bool
- func (m *WhiteListMutation) OwnerID() (id int, exists bool)
- func (m *WhiteListMutation) OwnerIDs() (ids []int)
- func (m *WhiteListMutation) Path() (r string, exists bool)
- func (m *WhiteListMutation) RemovedEdges() []string
- func (m *WhiteListMutation) RemovedIDs(name string) []ent.Value
- func (m *WhiteListMutation) ResetEdge(name string) error
- func (m *WhiteListMutation) ResetField(name string) error
- func (m *WhiteListMutation) ResetOwner()
- func (m *WhiteListMutation) ResetPath()
- func (m *WhiteListMutation) SetField(name string, value ent.Value) error
- func (m *WhiteListMutation) SetOwnerID(id int)
- func (m *WhiteListMutation) SetPath(s string)
- func (m WhiteListMutation) Tx() (*Tx, error)
- func (m *WhiteListMutation) Type() string
- func (m *WhiteListMutation) Where(ps ...predicate.WhiteList)
- type WhiteListQuery
- func (wlq *WhiteListQuery) Aggregate(fns ...AggregateFunc) *WhiteListSelect
- func (wlq *WhiteListQuery) All(ctx context.Context) ([]*WhiteList, error)
- func (wlq *WhiteListQuery) AllX(ctx context.Context) []*WhiteList
- func (wlq *WhiteListQuery) Clone() *WhiteListQuery
- func (wlq *WhiteListQuery) Count(ctx context.Context) (int, error)
- func (wlq *WhiteListQuery) CountX(ctx context.Context) int
- func (wlq *WhiteListQuery) Exist(ctx context.Context) (bool, error)
- func (wlq *WhiteListQuery) ExistX(ctx context.Context) bool
- func (wlq *WhiteListQuery) First(ctx context.Context) (*WhiteList, error)
- func (wlq *WhiteListQuery) FirstID(ctx context.Context) (id int, err error)
- func (wlq *WhiteListQuery) FirstIDX(ctx context.Context) int
- func (wlq *WhiteListQuery) FirstX(ctx context.Context) *WhiteList
- func (wlq *WhiteListQuery) GroupBy(field string, fields ...string) *WhiteListGroupBy
- func (wlq *WhiteListQuery) IDs(ctx context.Context) ([]int, error)
- func (wlq *WhiteListQuery) IDsX(ctx context.Context) []int
- func (wlq *WhiteListQuery) Limit(limit int) *WhiteListQuery
- func (wlq *WhiteListQuery) Offset(offset int) *WhiteListQuery
- func (wlq *WhiteListQuery) Only(ctx context.Context) (*WhiteList, error)
- func (wlq *WhiteListQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wlq *WhiteListQuery) OnlyIDX(ctx context.Context) int
- func (wlq *WhiteListQuery) OnlyX(ctx context.Context) *WhiteList
- func (wlq *WhiteListQuery) Order(o ...OrderFunc) *WhiteListQuery
- func (wlq *WhiteListQuery) QueryOwner() *ServiceProviderQuery
- func (wlq *WhiteListQuery) Select(fields ...string) *WhiteListSelect
- func (wlq *WhiteListQuery) Unique(unique bool) *WhiteListQuery
- func (wlq *WhiteListQuery) Where(ps ...predicate.WhiteList) *WhiteListQuery
- func (wlq *WhiteListQuery) WithOwner(opts ...func(*ServiceProviderQuery)) *WhiteListQuery
- type WhiteListSelect
- func (wls *WhiteListSelect) Aggregate(fns ...AggregateFunc) *WhiteListSelect
- func (s *WhiteListSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WhiteListSelect) BoolX(ctx context.Context) bool
- func (s *WhiteListSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WhiteListSelect) BoolsX(ctx context.Context) []bool
- func (s *WhiteListSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WhiteListSelect) Float64X(ctx context.Context) float64
- func (s *WhiteListSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WhiteListSelect) Float64sX(ctx context.Context) []float64
- func (s *WhiteListSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WhiteListSelect) IntX(ctx context.Context) int
- func (s *WhiteListSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WhiteListSelect) IntsX(ctx context.Context) []int
- func (wls *WhiteListSelect) Scan(ctx context.Context, v any) error
- func (s *WhiteListSelect) ScanX(ctx context.Context, v any)
- func (s *WhiteListSelect) String(ctx context.Context) (_ string, err error)
- func (s *WhiteListSelect) StringX(ctx context.Context) string
- func (s *WhiteListSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WhiteListSelect) StringsX(ctx context.Context) []string
- type WhiteListUpdate
- func (wlu *WhiteListUpdate) ClearOwner() *WhiteListUpdate
- func (wlu *WhiteListUpdate) Exec(ctx context.Context) error
- func (wlu *WhiteListUpdate) ExecX(ctx context.Context)
- func (wlu *WhiteListUpdate) Mutation() *WhiteListMutation
- func (wlu *WhiteListUpdate) Save(ctx context.Context) (int, error)
- func (wlu *WhiteListUpdate) SaveX(ctx context.Context) int
- func (wlu *WhiteListUpdate) SetNillableOwnerID(id *int) *WhiteListUpdate
- func (wlu *WhiteListUpdate) SetOwner(s *ServiceProvider) *WhiteListUpdate
- func (wlu *WhiteListUpdate) SetOwnerID(id int) *WhiteListUpdate
- func (wlu *WhiteListUpdate) SetPath(s string) *WhiteListUpdate
- func (wlu *WhiteListUpdate) Where(ps ...predicate.WhiteList) *WhiteListUpdate
- type WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) ClearOwner() *WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) Exec(ctx context.Context) error
- func (wluo *WhiteListUpdateOne) ExecX(ctx context.Context)
- func (wluo *WhiteListUpdateOne) Mutation() *WhiteListMutation
- func (wluo *WhiteListUpdateOne) Save(ctx context.Context) (*WhiteList, error)
- func (wluo *WhiteListUpdateOne) SaveX(ctx context.Context) *WhiteList
- func (wluo *WhiteListUpdateOne) Select(field string, fields ...string) *WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) SetNillableOwnerID(id *int) *WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) SetOwner(s *ServiceProvider) *WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) SetOwnerID(id int) *WhiteListUpdateOne
- func (wluo *WhiteListUpdateOne) SetPath(s string) *WhiteListUpdateOne
- type WhiteLists
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAuthorizationCode = "AuthorizationCode" TypeServiceProvider = "ServiceProvider" TypeWhiteList = "WhiteList" )
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 AuthorizationCode ¶
type AuthorizationCode struct { // ID of the ent. ID int `json:"id,omitempty"` // Token holds the value of the "token" field. Token string `json:"token,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AuthorizationCodeQuery when eager-loading is set. Edges AuthorizationCodeEdges `json:"edges"` // contains filtered or unexported fields }
AuthorizationCode is the model entity for the AuthorizationCode schema.
func (*AuthorizationCode) QueryOwner ¶
func (ac *AuthorizationCode) QueryOwner() *ServiceProviderQuery
QueryOwner queries the "owner" edge of the AuthorizationCode entity.
func (*AuthorizationCode) String ¶
func (ac *AuthorizationCode) String() string
String implements the fmt.Stringer.
func (*AuthorizationCode) Unwrap ¶
func (ac *AuthorizationCode) Unwrap() *AuthorizationCode
Unwrap unwraps the AuthorizationCode 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 (*AuthorizationCode) Update ¶
func (ac *AuthorizationCode) Update() *AuthorizationCodeUpdateOne
Update returns a builder for updating this AuthorizationCode. Note that you need to call AuthorizationCode.Unwrap() before calling this method if this AuthorizationCode was returned from a transaction, and the transaction was committed or rolled back.
type AuthorizationCodeClient ¶
type AuthorizationCodeClient struct {
// contains filtered or unexported fields
}
AuthorizationCodeClient is a client for the AuthorizationCode schema.
func NewAuthorizationCodeClient ¶
func NewAuthorizationCodeClient(c config) *AuthorizationCodeClient
NewAuthorizationCodeClient returns a client for the AuthorizationCode from the given config.
func (*AuthorizationCodeClient) Create ¶
func (c *AuthorizationCodeClient) Create() *AuthorizationCodeCreate
Create returns a builder for creating a AuthorizationCode entity.
func (*AuthorizationCodeClient) CreateBulk ¶
func (c *AuthorizationCodeClient) CreateBulk(builders ...*AuthorizationCodeCreate) *AuthorizationCodeCreateBulk
CreateBulk returns a builder for creating a bulk of AuthorizationCode entities.
func (*AuthorizationCodeClient) Delete ¶
func (c *AuthorizationCodeClient) Delete() *AuthorizationCodeDelete
Delete returns a delete builder for AuthorizationCode.
func (*AuthorizationCodeClient) DeleteOne ¶
func (c *AuthorizationCodeClient) DeleteOne(ac *AuthorizationCode) *AuthorizationCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuthorizationCodeClient) DeleteOneID ¶
func (c *AuthorizationCodeClient) DeleteOneID(id int) *AuthorizationCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuthorizationCodeClient) Get ¶
func (c *AuthorizationCodeClient) Get(ctx context.Context, id int) (*AuthorizationCode, error)
Get returns a AuthorizationCode entity by its id.
func (*AuthorizationCodeClient) GetX ¶
func (c *AuthorizationCodeClient) GetX(ctx context.Context, id int) *AuthorizationCode
GetX is like Get, but panics if an error occurs.
func (*AuthorizationCodeClient) Hooks ¶
func (c *AuthorizationCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthorizationCodeClient) Query ¶
func (c *AuthorizationCodeClient) Query() *AuthorizationCodeQuery
Query returns a query builder for AuthorizationCode.
func (*AuthorizationCodeClient) QueryOwner ¶
func (c *AuthorizationCodeClient) QueryOwner(ac *AuthorizationCode) *ServiceProviderQuery
QueryOwner queries the owner edge of a AuthorizationCode.
func (*AuthorizationCodeClient) Update ¶
func (c *AuthorizationCodeClient) Update() *AuthorizationCodeUpdate
Update returns an update builder for AuthorizationCode.
func (*AuthorizationCodeClient) UpdateOne ¶
func (c *AuthorizationCodeClient) UpdateOne(ac *AuthorizationCode) *AuthorizationCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthorizationCodeClient) UpdateOneID ¶
func (c *AuthorizationCodeClient) UpdateOneID(id int) *AuthorizationCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthorizationCodeClient) Use ¶
func (c *AuthorizationCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authorizationcode.Hooks(f(g(h())))`.
type AuthorizationCodeCreate ¶
type AuthorizationCodeCreate struct {
// contains filtered or unexported fields
}
AuthorizationCodeCreate is the builder for creating a AuthorizationCode entity.
func (*AuthorizationCodeCreate) Exec ¶
func (acc *AuthorizationCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthorizationCodeCreate) ExecX ¶
func (acc *AuthorizationCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthorizationCodeCreate) Mutation ¶
func (acc *AuthorizationCodeCreate) Mutation() *AuthorizationCodeMutation
Mutation returns the AuthorizationCodeMutation object of the builder.
func (*AuthorizationCodeCreate) Save ¶
func (acc *AuthorizationCodeCreate) Save(ctx context.Context) (*AuthorizationCode, error)
Save creates the AuthorizationCode in the database.
func (*AuthorizationCodeCreate) SaveX ¶
func (acc *AuthorizationCodeCreate) SaveX(ctx context.Context) *AuthorizationCode
SaveX calls Save and panics if Save returns an error.
func (*AuthorizationCodeCreate) SetNillableOwnerID ¶
func (acc *AuthorizationCodeCreate) SetNillableOwnerID(id *int) *AuthorizationCodeCreate
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*AuthorizationCodeCreate) SetOwner ¶
func (acc *AuthorizationCodeCreate) SetOwner(s *ServiceProvider) *AuthorizationCodeCreate
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeCreate) SetOwnerID ¶
func (acc *AuthorizationCodeCreate) SetOwnerID(id int) *AuthorizationCodeCreate
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*AuthorizationCodeCreate) SetToken ¶
func (acc *AuthorizationCodeCreate) SetToken(s string) *AuthorizationCodeCreate
SetToken sets the "token" field.
type AuthorizationCodeCreateBulk ¶
type AuthorizationCodeCreateBulk struct {
// contains filtered or unexported fields
}
AuthorizationCodeCreateBulk is the builder for creating many AuthorizationCode entities in bulk.
func (*AuthorizationCodeCreateBulk) Exec ¶
func (accb *AuthorizationCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthorizationCodeCreateBulk) ExecX ¶
func (accb *AuthorizationCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthorizationCodeCreateBulk) Save ¶
func (accb *AuthorizationCodeCreateBulk) Save(ctx context.Context) ([]*AuthorizationCode, error)
Save creates the AuthorizationCode entities in the database.
func (*AuthorizationCodeCreateBulk) SaveX ¶
func (accb *AuthorizationCodeCreateBulk) SaveX(ctx context.Context) []*AuthorizationCode
SaveX is like Save, but panics if an error occurs.
type AuthorizationCodeDelete ¶
type AuthorizationCodeDelete struct {
// contains filtered or unexported fields
}
AuthorizationCodeDelete is the builder for deleting a AuthorizationCode entity.
func (*AuthorizationCodeDelete) Exec ¶
func (acd *AuthorizationCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthorizationCodeDelete) ExecX ¶
func (acd *AuthorizationCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthorizationCodeDelete) Where ¶
func (acd *AuthorizationCodeDelete) Where(ps ...predicate.AuthorizationCode) *AuthorizationCodeDelete
Where appends a list predicates to the AuthorizationCodeDelete builder.
type AuthorizationCodeDeleteOne ¶
type AuthorizationCodeDeleteOne struct {
// contains filtered or unexported fields
}
AuthorizationCodeDeleteOne is the builder for deleting a single AuthorizationCode entity.
func (*AuthorizationCodeDeleteOne) Exec ¶
func (acdo *AuthorizationCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthorizationCodeDeleteOne) ExecX ¶
func (acdo *AuthorizationCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuthorizationCodeEdges ¶
type AuthorizationCodeEdges struct { // Owner holds the value of the owner edge. Owner *ServiceProvider `json:"owner,omitempty"` // contains filtered or unexported fields }
AuthorizationCodeEdges holds the relations/edges for other nodes in the graph.
func (AuthorizationCodeEdges) OwnerOrErr ¶
func (e AuthorizationCodeEdges) OwnerOrErr() (*ServiceProvider, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AuthorizationCodeGroupBy ¶
type AuthorizationCodeGroupBy struct {
// contains filtered or unexported fields
}
AuthorizationCodeGroupBy is the group-by builder for AuthorizationCode entities.
func (*AuthorizationCodeGroupBy) Aggregate ¶
func (acgb *AuthorizationCodeGroupBy) Aggregate(fns ...AggregateFunc) *AuthorizationCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthorizationCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*AuthorizationCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AuthorizationCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeGroupBy) Scan ¶
func (acgb *AuthorizationCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*AuthorizationCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthorizationCodeMutation ¶
type AuthorizationCodeMutation struct {
// contains filtered or unexported fields
}
AuthorizationCodeMutation represents an operation that mutates the AuthorizationCode nodes in the graph.
func (*AuthorizationCodeMutation) AddField ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) AddedEdges ¶
func (m *AuthorizationCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthorizationCodeMutation) AddedField ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) AddedFields ¶
func (m *AuthorizationCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuthorizationCodeMutation) AddedIDs ¶
func (m *AuthorizationCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuthorizationCodeMutation) ClearEdge ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ClearField ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ClearOwner ¶
func (m *AuthorizationCodeMutation) ClearOwner()
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeMutation) ClearedEdges ¶
func (m *AuthorizationCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthorizationCodeMutation) ClearedFields ¶
func (m *AuthorizationCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthorizationCodeMutation) Client ¶
func (m AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) EdgeCleared ¶
func (m *AuthorizationCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuthorizationCodeMutation) Field ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) FieldCleared ¶
func (m *AuthorizationCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuthorizationCodeMutation) Fields ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ID ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) IDs ¶
func (m *AuthorizationCodeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AuthorizationCodeMutation) OldField ¶
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 (*AuthorizationCodeMutation) OldToken ¶
func (m *AuthorizationCodeMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the AuthorizationCode entity. If the AuthorizationCode 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 (*AuthorizationCodeMutation) Op ¶
func (m *AuthorizationCodeMutation) Op() Op
Op returns the operation name.
func (*AuthorizationCodeMutation) OwnerCleared ¶
func (m *AuthorizationCodeMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the ServiceProvider entity was cleared.
func (*AuthorizationCodeMutation) OwnerID ¶
func (m *AuthorizationCodeMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*AuthorizationCodeMutation) OwnerIDs ¶
func (m *AuthorizationCodeMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*AuthorizationCodeMutation) RemovedEdges ¶
func (m *AuthorizationCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthorizationCodeMutation) RemovedIDs ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ResetEdge ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ResetField ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) ResetOwner ¶
func (m *AuthorizationCodeMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*AuthorizationCodeMutation) ResetToken ¶
func (m *AuthorizationCodeMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*AuthorizationCodeMutation) SetField ¶
func (m *AuthorizationCodeMutation) 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 (*AuthorizationCodeMutation) SetOwnerID ¶
func (m *AuthorizationCodeMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the ServiceProvider entity by id.
func (*AuthorizationCodeMutation) SetToken ¶
func (m *AuthorizationCodeMutation) SetToken(s string)
SetToken sets the "token" field.
func (*AuthorizationCodeMutation) Token ¶
func (m *AuthorizationCodeMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (AuthorizationCodeMutation) Tx ¶
func (m AuthorizationCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthorizationCodeMutation) Type ¶
func (m *AuthorizationCodeMutation) Type() string
Type returns the node type of this mutation (AuthorizationCode).
func (*AuthorizationCodeMutation) Where ¶
func (m *AuthorizationCodeMutation) Where(ps ...predicate.AuthorizationCode)
Where appends a list predicates to the AuthorizationCodeMutation builder.
type AuthorizationCodeQuery ¶
type AuthorizationCodeQuery struct {
// contains filtered or unexported fields
}
AuthorizationCodeQuery is the builder for querying AuthorizationCode entities.
func (*AuthorizationCodeQuery) Aggregate ¶
func (acq *AuthorizationCodeQuery) Aggregate(fns ...AggregateFunc) *AuthorizationCodeSelect
Aggregate returns a AuthorizationCodeSelect configured with the given aggregations.
func (*AuthorizationCodeQuery) All ¶
func (acq *AuthorizationCodeQuery) All(ctx context.Context) ([]*AuthorizationCode, error)
All executes the query and returns a list of AuthorizationCodes.
func (*AuthorizationCodeQuery) AllX ¶
func (acq *AuthorizationCodeQuery) AllX(ctx context.Context) []*AuthorizationCode
AllX is like All, but panics if an error occurs.
func (*AuthorizationCodeQuery) Clone ¶
func (acq *AuthorizationCodeQuery) Clone() *AuthorizationCodeQuery
Clone returns a duplicate of the AuthorizationCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuthorizationCodeQuery) Count ¶
func (acq *AuthorizationCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthorizationCodeQuery) CountX ¶
func (acq *AuthorizationCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthorizationCodeQuery) Exist ¶
func (acq *AuthorizationCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthorizationCodeQuery) ExistX ¶
func (acq *AuthorizationCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthorizationCodeQuery) First ¶
func (acq *AuthorizationCodeQuery) First(ctx context.Context) (*AuthorizationCode, error)
First returns the first AuthorizationCode entity from the query. Returns a *NotFoundError when no AuthorizationCode was found.
func (*AuthorizationCodeQuery) FirstID ¶
func (acq *AuthorizationCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AuthorizationCode ID from the query. Returns a *NotFoundError when no AuthorizationCode ID was found.
func (*AuthorizationCodeQuery) FirstIDX ¶
func (acq *AuthorizationCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthorizationCodeQuery) FirstX ¶
func (acq *AuthorizationCodeQuery) FirstX(ctx context.Context) *AuthorizationCode
FirstX is like First, but panics if an error occurs.
func (*AuthorizationCodeQuery) GroupBy ¶
func (acq *AuthorizationCodeQuery) GroupBy(field string, fields ...string) *AuthorizationCodeGroupBy
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 { Token string `json:"token,omitempty"` Count int `json:"count,omitempty"` } client.AuthorizationCode.Query(). GroupBy(authorizationcode.FieldToken). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AuthorizationCodeQuery) IDs ¶
func (acq *AuthorizationCodeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of AuthorizationCode IDs.
func (*AuthorizationCodeQuery) IDsX ¶
func (acq *AuthorizationCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AuthorizationCodeQuery) Limit ¶
func (acq *AuthorizationCodeQuery) Limit(limit int) *AuthorizationCodeQuery
Limit adds a limit step to the query.
func (*AuthorizationCodeQuery) Offset ¶
func (acq *AuthorizationCodeQuery) Offset(offset int) *AuthorizationCodeQuery
Offset adds an offset step to the query.
func (*AuthorizationCodeQuery) Only ¶
func (acq *AuthorizationCodeQuery) Only(ctx context.Context) (*AuthorizationCode, error)
Only returns a single AuthorizationCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthorizationCode entity is found. Returns a *NotFoundError when no AuthorizationCode entities are found.
func (*AuthorizationCodeQuery) OnlyID ¶
func (acq *AuthorizationCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AuthorizationCode ID in the query. Returns a *NotSingularError when more than one AuthorizationCode ID is found. Returns a *NotFoundError when no entities are found.
func (*AuthorizationCodeQuery) OnlyIDX ¶
func (acq *AuthorizationCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthorizationCodeQuery) OnlyX ¶
func (acq *AuthorizationCodeQuery) OnlyX(ctx context.Context) *AuthorizationCode
OnlyX is like Only, but panics if an error occurs.
func (*AuthorizationCodeQuery) Order ¶
func (acq *AuthorizationCodeQuery) Order(o ...OrderFunc) *AuthorizationCodeQuery
Order adds an order step to the query.
func (*AuthorizationCodeQuery) QueryOwner ¶
func (acq *AuthorizationCodeQuery) QueryOwner() *ServiceProviderQuery
QueryOwner chains the current query on the "owner" edge.
func (*AuthorizationCodeQuery) Select ¶
func (acq *AuthorizationCodeQuery) Select(fields ...string) *AuthorizationCodeSelect
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 { Token string `json:"token,omitempty"` } client.AuthorizationCode.Query(). Select(authorizationcode.FieldToken). Scan(ctx, &v)
func (*AuthorizationCodeQuery) Unique ¶
func (acq *AuthorizationCodeQuery) Unique(unique bool) *AuthorizationCodeQuery
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 (*AuthorizationCodeQuery) Where ¶
func (acq *AuthorizationCodeQuery) Where(ps ...predicate.AuthorizationCode) *AuthorizationCodeQuery
Where adds a new predicate for the AuthorizationCodeQuery builder.
func (*AuthorizationCodeQuery) WithOwner ¶
func (acq *AuthorizationCodeQuery) WithOwner(opts ...func(*ServiceProviderQuery)) *AuthorizationCodeQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type AuthorizationCodeSelect ¶
type AuthorizationCodeSelect struct { *AuthorizationCodeQuery // contains filtered or unexported fields }
AuthorizationCodeSelect is the builder for selecting fields of AuthorizationCode entities.
func (*AuthorizationCodeSelect) Aggregate ¶
func (acs *AuthorizationCodeSelect) Aggregate(fns ...AggregateFunc) *AuthorizationCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuthorizationCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AuthorizationCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthorizationCodeSelect) Scan ¶
func (acs *AuthorizationCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthorizationCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthorizationCodeUpdate ¶
type AuthorizationCodeUpdate struct {
// contains filtered or unexported fields
}
AuthorizationCodeUpdate is the builder for updating AuthorizationCode entities.
func (*AuthorizationCodeUpdate) ClearOwner ¶
func (acu *AuthorizationCodeUpdate) ClearOwner() *AuthorizationCodeUpdate
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeUpdate) Exec ¶
func (acu *AuthorizationCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthorizationCodeUpdate) ExecX ¶
func (acu *AuthorizationCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthorizationCodeUpdate) Mutation ¶
func (acu *AuthorizationCodeUpdate) Mutation() *AuthorizationCodeMutation
Mutation returns the AuthorizationCodeMutation object of the builder.
func (*AuthorizationCodeUpdate) Save ¶
func (acu *AuthorizationCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthorizationCodeUpdate) SaveX ¶
func (acu *AuthorizationCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthorizationCodeUpdate) SetNillableOwnerID ¶
func (acu *AuthorizationCodeUpdate) SetNillableOwnerID(id *int) *AuthorizationCodeUpdate
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*AuthorizationCodeUpdate) SetOwner ¶
func (acu *AuthorizationCodeUpdate) SetOwner(s *ServiceProvider) *AuthorizationCodeUpdate
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeUpdate) SetOwnerID ¶
func (acu *AuthorizationCodeUpdate) SetOwnerID(id int) *AuthorizationCodeUpdate
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*AuthorizationCodeUpdate) SetToken ¶
func (acu *AuthorizationCodeUpdate) SetToken(s string) *AuthorizationCodeUpdate
SetToken sets the "token" field.
func (*AuthorizationCodeUpdate) Where ¶
func (acu *AuthorizationCodeUpdate) Where(ps ...predicate.AuthorizationCode) *AuthorizationCodeUpdate
Where appends a list predicates to the AuthorizationCodeUpdate builder.
type AuthorizationCodeUpdateOne ¶
type AuthorizationCodeUpdateOne struct {
// contains filtered or unexported fields
}
AuthorizationCodeUpdateOne is the builder for updating a single AuthorizationCode entity.
func (*AuthorizationCodeUpdateOne) ClearOwner ¶
func (acuo *AuthorizationCodeUpdateOne) ClearOwner() *AuthorizationCodeUpdateOne
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeUpdateOne) Exec ¶
func (acuo *AuthorizationCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthorizationCodeUpdateOne) ExecX ¶
func (acuo *AuthorizationCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthorizationCodeUpdateOne) Mutation ¶
func (acuo *AuthorizationCodeUpdateOne) Mutation() *AuthorizationCodeMutation
Mutation returns the AuthorizationCodeMutation object of the builder.
func (*AuthorizationCodeUpdateOne) Save ¶
func (acuo *AuthorizationCodeUpdateOne) Save(ctx context.Context) (*AuthorizationCode, error)
Save executes the query and returns the updated AuthorizationCode entity.
func (*AuthorizationCodeUpdateOne) SaveX ¶
func (acuo *AuthorizationCodeUpdateOne) SaveX(ctx context.Context) *AuthorizationCode
SaveX is like Save, but panics if an error occurs.
func (*AuthorizationCodeUpdateOne) Select ¶
func (acuo *AuthorizationCodeUpdateOne) Select(field string, fields ...string) *AuthorizationCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuthorizationCodeUpdateOne) SetNillableOwnerID ¶
func (acuo *AuthorizationCodeUpdateOne) SetNillableOwnerID(id *int) *AuthorizationCodeUpdateOne
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*AuthorizationCodeUpdateOne) SetOwner ¶
func (acuo *AuthorizationCodeUpdateOne) SetOwner(s *ServiceProvider) *AuthorizationCodeUpdateOne
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*AuthorizationCodeUpdateOne) SetOwnerID ¶
func (acuo *AuthorizationCodeUpdateOne) SetOwnerID(id int) *AuthorizationCodeUpdateOne
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*AuthorizationCodeUpdateOne) SetToken ¶
func (acuo *AuthorizationCodeUpdateOne) SetToken(s string) *AuthorizationCodeUpdateOne
SetToken sets the "token" field.
type AuthorizationCodes ¶
type AuthorizationCodes []*AuthorizationCode
AuthorizationCodes is a parsable slice of AuthorizationCode.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // AuthorizationCode is the client for interacting with the AuthorizationCode builders. AuthorizationCode *AuthorizationCodeClient // ServiceProvider is the client for interacting with the ServiceProvider builders. ServiceProvider *ServiceProviderClient // WhiteList is the client for interacting with the WhiteList builders. WhiteList *WhiteListClient // 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(). AuthorizationCode. 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(ctx 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 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(ctx 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 Rollback method.
type ServiceProvider ¶
type ServiceProvider struct { // ID of the ent. ID int `json:"id,omitempty"` // Host holds the value of the "host" field. Host string `json:"host,omitempty"` // DestinationIP holds the value of the "destination_ip" field. DestinationIP string `json:"destination_ip,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ServiceProviderQuery when eager-loading is set. Edges ServiceProviderEdges `json:"edges"` // contains filtered or unexported fields }
ServiceProvider is the model entity for the ServiceProvider schema.
func (*ServiceProvider) QueryAuthorizationCodes ¶
func (sp *ServiceProvider) QueryAuthorizationCodes() *AuthorizationCodeQuery
QueryAuthorizationCodes queries the "authorization_codes" edge of the ServiceProvider entity.
func (*ServiceProvider) QueryWhitelists ¶
func (sp *ServiceProvider) QueryWhitelists() *WhiteListQuery
QueryWhitelists queries the "whitelists" edge of the ServiceProvider entity.
func (*ServiceProvider) String ¶
func (sp *ServiceProvider) String() string
String implements the fmt.Stringer.
func (*ServiceProvider) Unwrap ¶
func (sp *ServiceProvider) Unwrap() *ServiceProvider
Unwrap unwraps the ServiceProvider 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 (*ServiceProvider) Update ¶
func (sp *ServiceProvider) Update() *ServiceProviderUpdateOne
Update returns a builder for updating this ServiceProvider. Note that you need to call ServiceProvider.Unwrap() before calling this method if this ServiceProvider was returned from a transaction, and the transaction was committed or rolled back.
type ServiceProviderClient ¶
type ServiceProviderClient struct {
// contains filtered or unexported fields
}
ServiceProviderClient is a client for the ServiceProvider schema.
func NewServiceProviderClient ¶
func NewServiceProviderClient(c config) *ServiceProviderClient
NewServiceProviderClient returns a client for the ServiceProvider from the given config.
func (*ServiceProviderClient) Create ¶
func (c *ServiceProviderClient) Create() *ServiceProviderCreate
Create returns a builder for creating a ServiceProvider entity.
func (*ServiceProviderClient) CreateBulk ¶
func (c *ServiceProviderClient) CreateBulk(builders ...*ServiceProviderCreate) *ServiceProviderCreateBulk
CreateBulk returns a builder for creating a bulk of ServiceProvider entities.
func (*ServiceProviderClient) Delete ¶
func (c *ServiceProviderClient) Delete() *ServiceProviderDelete
Delete returns a delete builder for ServiceProvider.
func (*ServiceProviderClient) DeleteOne ¶
func (c *ServiceProviderClient) DeleteOne(sp *ServiceProvider) *ServiceProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ServiceProviderClient) DeleteOneID ¶
func (c *ServiceProviderClient) DeleteOneID(id int) *ServiceProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ServiceProviderClient) Get ¶
func (c *ServiceProviderClient) Get(ctx context.Context, id int) (*ServiceProvider, error)
Get returns a ServiceProvider entity by its id.
func (*ServiceProviderClient) GetX ¶
func (c *ServiceProviderClient) GetX(ctx context.Context, id int) *ServiceProvider
GetX is like Get, but panics if an error occurs.
func (*ServiceProviderClient) Hooks ¶
func (c *ServiceProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ServiceProviderClient) Query ¶
func (c *ServiceProviderClient) Query() *ServiceProviderQuery
Query returns a query builder for ServiceProvider.
func (*ServiceProviderClient) QueryAuthorizationCodes ¶
func (c *ServiceProviderClient) QueryAuthorizationCodes(sp *ServiceProvider) *AuthorizationCodeQuery
QueryAuthorizationCodes queries the authorization_codes edge of a ServiceProvider.
func (*ServiceProviderClient) QueryWhitelists ¶
func (c *ServiceProviderClient) QueryWhitelists(sp *ServiceProvider) *WhiteListQuery
QueryWhitelists queries the whitelists edge of a ServiceProvider.
func (*ServiceProviderClient) Update ¶
func (c *ServiceProviderClient) Update() *ServiceProviderUpdate
Update returns an update builder for ServiceProvider.
func (*ServiceProviderClient) UpdateOne ¶
func (c *ServiceProviderClient) UpdateOne(sp *ServiceProvider) *ServiceProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ServiceProviderClient) UpdateOneID ¶
func (c *ServiceProviderClient) UpdateOneID(id int) *ServiceProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ServiceProviderClient) Use ¶
func (c *ServiceProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `serviceprovider.Hooks(f(g(h())))`.
type ServiceProviderCreate ¶
type ServiceProviderCreate struct {
// contains filtered or unexported fields
}
ServiceProviderCreate is the builder for creating a ServiceProvider entity.
func (*ServiceProviderCreate) AddAuthorizationCodeIDs ¶
func (spc *ServiceProviderCreate) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderCreate
AddAuthorizationCodeIDs adds the "authorization_codes" edge to the AuthorizationCode entity by IDs.
func (*ServiceProviderCreate) AddAuthorizationCodes ¶
func (spc *ServiceProviderCreate) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderCreate
AddAuthorizationCodes adds the "authorization_codes" edges to the AuthorizationCode entity.
func (*ServiceProviderCreate) AddWhitelistIDs ¶
func (spc *ServiceProviderCreate) AddWhitelistIDs(ids ...int) *ServiceProviderCreate
AddWhitelistIDs adds the "whitelists" edge to the WhiteList entity by IDs.
func (*ServiceProviderCreate) AddWhitelists ¶
func (spc *ServiceProviderCreate) AddWhitelists(w ...*WhiteList) *ServiceProviderCreate
AddWhitelists adds the "whitelists" edges to the WhiteList entity.
func (*ServiceProviderCreate) Exec ¶
func (spc *ServiceProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceProviderCreate) ExecX ¶
func (spc *ServiceProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceProviderCreate) Mutation ¶
func (spc *ServiceProviderCreate) Mutation() *ServiceProviderMutation
Mutation returns the ServiceProviderMutation object of the builder.
func (*ServiceProviderCreate) Save ¶
func (spc *ServiceProviderCreate) Save(ctx context.Context) (*ServiceProvider, error)
Save creates the ServiceProvider in the database.
func (*ServiceProviderCreate) SaveX ¶
func (spc *ServiceProviderCreate) SaveX(ctx context.Context) *ServiceProvider
SaveX calls Save and panics if Save returns an error.
func (*ServiceProviderCreate) SetDestinationIP ¶
func (spc *ServiceProviderCreate) SetDestinationIP(s string) *ServiceProviderCreate
SetDestinationIP sets the "destination_ip" field.
func (*ServiceProviderCreate) SetHost ¶
func (spc *ServiceProviderCreate) SetHost(s string) *ServiceProviderCreate
SetHost sets the "host" field.
type ServiceProviderCreateBulk ¶
type ServiceProviderCreateBulk struct {
// contains filtered or unexported fields
}
ServiceProviderCreateBulk is the builder for creating many ServiceProvider entities in bulk.
func (*ServiceProviderCreateBulk) Exec ¶
func (spcb *ServiceProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceProviderCreateBulk) ExecX ¶
func (spcb *ServiceProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceProviderCreateBulk) Save ¶
func (spcb *ServiceProviderCreateBulk) Save(ctx context.Context) ([]*ServiceProvider, error)
Save creates the ServiceProvider entities in the database.
func (*ServiceProviderCreateBulk) SaveX ¶
func (spcb *ServiceProviderCreateBulk) SaveX(ctx context.Context) []*ServiceProvider
SaveX is like Save, but panics if an error occurs.
type ServiceProviderDelete ¶
type ServiceProviderDelete struct {
// contains filtered or unexported fields
}
ServiceProviderDelete is the builder for deleting a ServiceProvider entity.
func (*ServiceProviderDelete) Exec ¶
func (spd *ServiceProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ServiceProviderDelete) ExecX ¶
func (spd *ServiceProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ServiceProviderDelete) Where ¶
func (spd *ServiceProviderDelete) Where(ps ...predicate.ServiceProvider) *ServiceProviderDelete
Where appends a list predicates to the ServiceProviderDelete builder.
type ServiceProviderDeleteOne ¶
type ServiceProviderDeleteOne struct {
// contains filtered or unexported fields
}
ServiceProviderDeleteOne is the builder for deleting a single ServiceProvider entity.
func (*ServiceProviderDeleteOne) Exec ¶
func (spdo *ServiceProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ServiceProviderDeleteOne) ExecX ¶
func (spdo *ServiceProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ServiceProviderEdges ¶
type ServiceProviderEdges struct { // Whitelists holds the value of the whitelists edge. Whitelists []*WhiteList `json:"whitelists,omitempty"` // AuthorizationCodes holds the value of the authorization_codes edge. AuthorizationCodes []*AuthorizationCode `json:"authorization_codes,omitempty"` // contains filtered or unexported fields }
ServiceProviderEdges holds the relations/edges for other nodes in the graph.
func (ServiceProviderEdges) AuthorizationCodesOrErr ¶
func (e ServiceProviderEdges) AuthorizationCodesOrErr() ([]*AuthorizationCode, error)
AuthorizationCodesOrErr returns the AuthorizationCodes value or an error if the edge was not loaded in eager-loading.
func (ServiceProviderEdges) WhitelistsOrErr ¶
func (e ServiceProviderEdges) WhitelistsOrErr() ([]*WhiteList, error)
WhitelistsOrErr returns the Whitelists value or an error if the edge was not loaded in eager-loading.
type ServiceProviderGroupBy ¶
type ServiceProviderGroupBy struct {
// contains filtered or unexported fields
}
ServiceProviderGroupBy is the group-by builder for ServiceProvider entities.
func (*ServiceProviderGroupBy) Aggregate ¶
func (spgb *ServiceProviderGroupBy) Aggregate(fns ...AggregateFunc) *ServiceProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ServiceProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ServiceProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ServiceProviderGroupBy) Scan ¶
func (spgb *ServiceProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*ServiceProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ServiceProviderMutation ¶
type ServiceProviderMutation struct {
// contains filtered or unexported fields
}
ServiceProviderMutation represents an operation that mutates the ServiceProvider nodes in the graph.
func (*ServiceProviderMutation) AddAuthorizationCodeIDs ¶
func (m *ServiceProviderMutation) AddAuthorizationCodeIDs(ids ...int)
AddAuthorizationCodeIDs adds the "authorization_codes" edge to the AuthorizationCode entity by ids.
func (*ServiceProviderMutation) AddField ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) AddWhitelistIDs ¶
func (m *ServiceProviderMutation) AddWhitelistIDs(ids ...int)
AddWhitelistIDs adds the "whitelists" edge to the WhiteList entity by ids.
func (*ServiceProviderMutation) AddedEdges ¶
func (m *ServiceProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ServiceProviderMutation) AddedField ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) AddedFields ¶
func (m *ServiceProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ServiceProviderMutation) AddedIDs ¶
func (m *ServiceProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ServiceProviderMutation) AuthorizationCodesCleared ¶
func (m *ServiceProviderMutation) AuthorizationCodesCleared() bool
AuthorizationCodesCleared reports if the "authorization_codes" edge to the AuthorizationCode entity was cleared.
func (*ServiceProviderMutation) AuthorizationCodesIDs ¶
func (m *ServiceProviderMutation) AuthorizationCodesIDs() (ids []int)
AuthorizationCodesIDs returns the "authorization_codes" edge IDs in the mutation.
func (*ServiceProviderMutation) ClearAuthorizationCodes ¶
func (m *ServiceProviderMutation) ClearAuthorizationCodes()
ClearAuthorizationCodes clears the "authorization_codes" edge to the AuthorizationCode entity.
func (*ServiceProviderMutation) ClearEdge ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) ClearField ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) ClearWhitelists ¶
func (m *ServiceProviderMutation) ClearWhitelists()
ClearWhitelists clears the "whitelists" edge to the WhiteList entity.
func (*ServiceProviderMutation) ClearedEdges ¶
func (m *ServiceProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ServiceProviderMutation) ClearedFields ¶
func (m *ServiceProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ServiceProviderMutation) Client ¶
func (m ServiceProviderMutation) 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 (*ServiceProviderMutation) DestinationIP ¶
func (m *ServiceProviderMutation) DestinationIP() (r string, exists bool)
DestinationIP returns the value of the "destination_ip" field in the mutation.
func (*ServiceProviderMutation) EdgeCleared ¶
func (m *ServiceProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ServiceProviderMutation) Field ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) FieldCleared ¶
func (m *ServiceProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ServiceProviderMutation) Fields ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) Host ¶
func (m *ServiceProviderMutation) Host() (r string, exists bool)
Host returns the value of the "host" field in the mutation.
func (*ServiceProviderMutation) ID ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) IDs ¶
func (m *ServiceProviderMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ServiceProviderMutation) OldDestinationIP ¶
func (m *ServiceProviderMutation) OldDestinationIP(ctx context.Context) (v string, err error)
OldDestinationIP returns the old "destination_ip" field's value of the ServiceProvider entity. If the ServiceProvider 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 (*ServiceProviderMutation) OldField ¶
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 (*ServiceProviderMutation) OldHost ¶
func (m *ServiceProviderMutation) OldHost(ctx context.Context) (v string, err error)
OldHost returns the old "host" field's value of the ServiceProvider entity. If the ServiceProvider 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 (*ServiceProviderMutation) Op ¶
func (m *ServiceProviderMutation) Op() Op
Op returns the operation name.
func (*ServiceProviderMutation) RemoveAuthorizationCodeIDs ¶
func (m *ServiceProviderMutation) RemoveAuthorizationCodeIDs(ids ...int)
RemoveAuthorizationCodeIDs removes the "authorization_codes" edge to the AuthorizationCode entity by IDs.
func (*ServiceProviderMutation) RemoveWhitelistIDs ¶
func (m *ServiceProviderMutation) RemoveWhitelistIDs(ids ...int)
RemoveWhitelistIDs removes the "whitelists" edge to the WhiteList entity by IDs.
func (*ServiceProviderMutation) RemovedAuthorizationCodesIDs ¶
func (m *ServiceProviderMutation) RemovedAuthorizationCodesIDs() (ids []int)
RemovedAuthorizationCodes returns the removed IDs of the "authorization_codes" edge to the AuthorizationCode entity.
func (*ServiceProviderMutation) RemovedEdges ¶
func (m *ServiceProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ServiceProviderMutation) RemovedIDs ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) RemovedWhitelistsIDs ¶
func (m *ServiceProviderMutation) RemovedWhitelistsIDs() (ids []int)
RemovedWhitelists returns the removed IDs of the "whitelists" edge to the WhiteList entity.
func (*ServiceProviderMutation) ResetAuthorizationCodes ¶
func (m *ServiceProviderMutation) ResetAuthorizationCodes()
ResetAuthorizationCodes resets all changes to the "authorization_codes" edge.
func (*ServiceProviderMutation) ResetDestinationIP ¶
func (m *ServiceProviderMutation) ResetDestinationIP()
ResetDestinationIP resets all changes to the "destination_ip" field.
func (*ServiceProviderMutation) ResetEdge ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) ResetField ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) ResetHost ¶
func (m *ServiceProviderMutation) ResetHost()
ResetHost resets all changes to the "host" field.
func (*ServiceProviderMutation) ResetWhitelists ¶
func (m *ServiceProviderMutation) ResetWhitelists()
ResetWhitelists resets all changes to the "whitelists" edge.
func (*ServiceProviderMutation) SetDestinationIP ¶
func (m *ServiceProviderMutation) SetDestinationIP(s string)
SetDestinationIP sets the "destination_ip" field.
func (*ServiceProviderMutation) SetField ¶
func (m *ServiceProviderMutation) 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 (*ServiceProviderMutation) SetHost ¶
func (m *ServiceProviderMutation) SetHost(s string)
SetHost sets the "host" field.
func (ServiceProviderMutation) Tx ¶
func (m ServiceProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ServiceProviderMutation) Type ¶
func (m *ServiceProviderMutation) Type() string
Type returns the node type of this mutation (ServiceProvider).
func (*ServiceProviderMutation) Where ¶
func (m *ServiceProviderMutation) Where(ps ...predicate.ServiceProvider)
Where appends a list predicates to the ServiceProviderMutation builder.
func (*ServiceProviderMutation) WhitelistsCleared ¶
func (m *ServiceProviderMutation) WhitelistsCleared() bool
WhitelistsCleared reports if the "whitelists" edge to the WhiteList entity was cleared.
func (*ServiceProviderMutation) WhitelistsIDs ¶
func (m *ServiceProviderMutation) WhitelistsIDs() (ids []int)
WhitelistsIDs returns the "whitelists" edge IDs in the mutation.
type ServiceProviderQuery ¶
type ServiceProviderQuery struct {
// contains filtered or unexported fields
}
ServiceProviderQuery is the builder for querying ServiceProvider entities.
func (*ServiceProviderQuery) Aggregate ¶
func (spq *ServiceProviderQuery) Aggregate(fns ...AggregateFunc) *ServiceProviderSelect
Aggregate returns a ServiceProviderSelect configured with the given aggregations.
func (*ServiceProviderQuery) All ¶
func (spq *ServiceProviderQuery) All(ctx context.Context) ([]*ServiceProvider, error)
All executes the query and returns a list of ServiceProviders.
func (*ServiceProviderQuery) AllX ¶
func (spq *ServiceProviderQuery) AllX(ctx context.Context) []*ServiceProvider
AllX is like All, but panics if an error occurs.
func (*ServiceProviderQuery) Clone ¶
func (spq *ServiceProviderQuery) Clone() *ServiceProviderQuery
Clone returns a duplicate of the ServiceProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ServiceProviderQuery) Count ¶
func (spq *ServiceProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ServiceProviderQuery) CountX ¶
func (spq *ServiceProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ServiceProviderQuery) Exist ¶
func (spq *ServiceProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ServiceProviderQuery) ExistX ¶
func (spq *ServiceProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ServiceProviderQuery) First ¶
func (spq *ServiceProviderQuery) First(ctx context.Context) (*ServiceProvider, error)
First returns the first ServiceProvider entity from the query. Returns a *NotFoundError when no ServiceProvider was found.
func (*ServiceProviderQuery) FirstID ¶
func (spq *ServiceProviderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ServiceProvider ID from the query. Returns a *NotFoundError when no ServiceProvider ID was found.
func (*ServiceProviderQuery) FirstIDX ¶
func (spq *ServiceProviderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ServiceProviderQuery) FirstX ¶
func (spq *ServiceProviderQuery) FirstX(ctx context.Context) *ServiceProvider
FirstX is like First, but panics if an error occurs.
func (*ServiceProviderQuery) GroupBy ¶
func (spq *ServiceProviderQuery) GroupBy(field string, fields ...string) *ServiceProviderGroupBy
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 { Host string `json:"host,omitempty"` Count int `json:"count,omitempty"` } client.ServiceProvider.Query(). GroupBy(serviceprovider.FieldHost). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ServiceProviderQuery) IDs ¶
func (spq *ServiceProviderQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ServiceProvider IDs.
func (*ServiceProviderQuery) IDsX ¶
func (spq *ServiceProviderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ServiceProviderQuery) Limit ¶
func (spq *ServiceProviderQuery) Limit(limit int) *ServiceProviderQuery
Limit adds a limit step to the query.
func (*ServiceProviderQuery) Offset ¶
func (spq *ServiceProviderQuery) Offset(offset int) *ServiceProviderQuery
Offset adds an offset step to the query.
func (*ServiceProviderQuery) Only ¶
func (spq *ServiceProviderQuery) Only(ctx context.Context) (*ServiceProvider, error)
Only returns a single ServiceProvider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ServiceProvider entity is found. Returns a *NotFoundError when no ServiceProvider entities are found.
func (*ServiceProviderQuery) OnlyID ¶
func (spq *ServiceProviderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ServiceProvider ID in the query. Returns a *NotSingularError when more than one ServiceProvider ID is found. Returns a *NotFoundError when no entities are found.
func (*ServiceProviderQuery) OnlyIDX ¶
func (spq *ServiceProviderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ServiceProviderQuery) OnlyX ¶
func (spq *ServiceProviderQuery) OnlyX(ctx context.Context) *ServiceProvider
OnlyX is like Only, but panics if an error occurs.
func (*ServiceProviderQuery) Order ¶
func (spq *ServiceProviderQuery) Order(o ...OrderFunc) *ServiceProviderQuery
Order adds an order step to the query.
func (*ServiceProviderQuery) QueryAuthorizationCodes ¶
func (spq *ServiceProviderQuery) QueryAuthorizationCodes() *AuthorizationCodeQuery
QueryAuthorizationCodes chains the current query on the "authorization_codes" edge.
func (*ServiceProviderQuery) QueryWhitelists ¶
func (spq *ServiceProviderQuery) QueryWhitelists() *WhiteListQuery
QueryWhitelists chains the current query on the "whitelists" edge.
func (*ServiceProviderQuery) Select ¶
func (spq *ServiceProviderQuery) Select(fields ...string) *ServiceProviderSelect
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 { Host string `json:"host,omitempty"` } client.ServiceProvider.Query(). Select(serviceprovider.FieldHost). Scan(ctx, &v)
func (*ServiceProviderQuery) Unique ¶
func (spq *ServiceProviderQuery) Unique(unique bool) *ServiceProviderQuery
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 (*ServiceProviderQuery) Where ¶
func (spq *ServiceProviderQuery) Where(ps ...predicate.ServiceProvider) *ServiceProviderQuery
Where adds a new predicate for the ServiceProviderQuery builder.
func (*ServiceProviderQuery) WithAuthorizationCodes ¶
func (spq *ServiceProviderQuery) WithAuthorizationCodes(opts ...func(*AuthorizationCodeQuery)) *ServiceProviderQuery
WithAuthorizationCodes tells the query-builder to eager-load the nodes that are connected to the "authorization_codes" edge. The optional arguments are used to configure the query builder of the edge.
func (*ServiceProviderQuery) WithWhitelists ¶
func (spq *ServiceProviderQuery) WithWhitelists(opts ...func(*WhiteListQuery)) *ServiceProviderQuery
WithWhitelists tells the query-builder to eager-load the nodes that are connected to the "whitelists" edge. The optional arguments are used to configure the query builder of the edge.
type ServiceProviderSelect ¶
type ServiceProviderSelect struct { *ServiceProviderQuery // contains filtered or unexported fields }
ServiceProviderSelect is the builder for selecting fields of ServiceProvider entities.
func (*ServiceProviderSelect) Aggregate ¶
func (sps *ServiceProviderSelect) Aggregate(fns ...AggregateFunc) *ServiceProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ServiceProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ServiceProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ServiceProviderSelect) Scan ¶
func (sps *ServiceProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ServiceProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ServiceProviderUpdate ¶
type ServiceProviderUpdate struct {
// contains filtered or unexported fields
}
ServiceProviderUpdate is the builder for updating ServiceProvider entities.
func (*ServiceProviderUpdate) AddAuthorizationCodeIDs ¶
func (spu *ServiceProviderUpdate) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdate
AddAuthorizationCodeIDs adds the "authorization_codes" edge to the AuthorizationCode entity by IDs.
func (*ServiceProviderUpdate) AddAuthorizationCodes ¶
func (spu *ServiceProviderUpdate) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdate
AddAuthorizationCodes adds the "authorization_codes" edges to the AuthorizationCode entity.
func (*ServiceProviderUpdate) AddWhitelistIDs ¶
func (spu *ServiceProviderUpdate) AddWhitelistIDs(ids ...int) *ServiceProviderUpdate
AddWhitelistIDs adds the "whitelists" edge to the WhiteList entity by IDs.
func (*ServiceProviderUpdate) AddWhitelists ¶
func (spu *ServiceProviderUpdate) AddWhitelists(w ...*WhiteList) *ServiceProviderUpdate
AddWhitelists adds the "whitelists" edges to the WhiteList entity.
func (*ServiceProviderUpdate) ClearAuthorizationCodes ¶
func (spu *ServiceProviderUpdate) ClearAuthorizationCodes() *ServiceProviderUpdate
ClearAuthorizationCodes clears all "authorization_codes" edges to the AuthorizationCode entity.
func (*ServiceProviderUpdate) ClearWhitelists ¶
func (spu *ServiceProviderUpdate) ClearWhitelists() *ServiceProviderUpdate
ClearWhitelists clears all "whitelists" edges to the WhiteList entity.
func (*ServiceProviderUpdate) Exec ¶
func (spu *ServiceProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceProviderUpdate) ExecX ¶
func (spu *ServiceProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceProviderUpdate) Mutation ¶
func (spu *ServiceProviderUpdate) Mutation() *ServiceProviderMutation
Mutation returns the ServiceProviderMutation object of the builder.
func (*ServiceProviderUpdate) RemoveAuthorizationCodeIDs ¶
func (spu *ServiceProviderUpdate) RemoveAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdate
RemoveAuthorizationCodeIDs removes the "authorization_codes" edge to AuthorizationCode entities by IDs.
func (*ServiceProviderUpdate) RemoveAuthorizationCodes ¶
func (spu *ServiceProviderUpdate) RemoveAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdate
RemoveAuthorizationCodes removes "authorization_codes" edges to AuthorizationCode entities.
func (*ServiceProviderUpdate) RemoveWhitelistIDs ¶
func (spu *ServiceProviderUpdate) RemoveWhitelistIDs(ids ...int) *ServiceProviderUpdate
RemoveWhitelistIDs removes the "whitelists" edge to WhiteList entities by IDs.
func (*ServiceProviderUpdate) RemoveWhitelists ¶
func (spu *ServiceProviderUpdate) RemoveWhitelists(w ...*WhiteList) *ServiceProviderUpdate
RemoveWhitelists removes "whitelists" edges to WhiteList entities.
func (*ServiceProviderUpdate) Save ¶
func (spu *ServiceProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ServiceProviderUpdate) SaveX ¶
func (spu *ServiceProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ServiceProviderUpdate) SetDestinationIP ¶
func (spu *ServiceProviderUpdate) SetDestinationIP(s string) *ServiceProviderUpdate
SetDestinationIP sets the "destination_ip" field.
func (*ServiceProviderUpdate) SetHost ¶
func (spu *ServiceProviderUpdate) SetHost(s string) *ServiceProviderUpdate
SetHost sets the "host" field.
func (*ServiceProviderUpdate) Where ¶
func (spu *ServiceProviderUpdate) Where(ps ...predicate.ServiceProvider) *ServiceProviderUpdate
Where appends a list predicates to the ServiceProviderUpdate builder.
type ServiceProviderUpdateOne ¶
type ServiceProviderUpdateOne struct {
// contains filtered or unexported fields
}
ServiceProviderUpdateOne is the builder for updating a single ServiceProvider entity.
func (*ServiceProviderUpdateOne) AddAuthorizationCodeIDs ¶
func (spuo *ServiceProviderUpdateOne) AddAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdateOne
AddAuthorizationCodeIDs adds the "authorization_codes" edge to the AuthorizationCode entity by IDs.
func (*ServiceProviderUpdateOne) AddAuthorizationCodes ¶
func (spuo *ServiceProviderUpdateOne) AddAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdateOne
AddAuthorizationCodes adds the "authorization_codes" edges to the AuthorizationCode entity.
func (*ServiceProviderUpdateOne) AddWhitelistIDs ¶
func (spuo *ServiceProviderUpdateOne) AddWhitelistIDs(ids ...int) *ServiceProviderUpdateOne
AddWhitelistIDs adds the "whitelists" edge to the WhiteList entity by IDs.
func (*ServiceProviderUpdateOne) AddWhitelists ¶
func (spuo *ServiceProviderUpdateOne) AddWhitelists(w ...*WhiteList) *ServiceProviderUpdateOne
AddWhitelists adds the "whitelists" edges to the WhiteList entity.
func (*ServiceProviderUpdateOne) ClearAuthorizationCodes ¶
func (spuo *ServiceProviderUpdateOne) ClearAuthorizationCodes() *ServiceProviderUpdateOne
ClearAuthorizationCodes clears all "authorization_codes" edges to the AuthorizationCode entity.
func (*ServiceProviderUpdateOne) ClearWhitelists ¶
func (spuo *ServiceProviderUpdateOne) ClearWhitelists() *ServiceProviderUpdateOne
ClearWhitelists clears all "whitelists" edges to the WhiteList entity.
func (*ServiceProviderUpdateOne) Exec ¶
func (spuo *ServiceProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ServiceProviderUpdateOne) ExecX ¶
func (spuo *ServiceProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceProviderUpdateOne) Mutation ¶
func (spuo *ServiceProviderUpdateOne) Mutation() *ServiceProviderMutation
Mutation returns the ServiceProviderMutation object of the builder.
func (*ServiceProviderUpdateOne) RemoveAuthorizationCodeIDs ¶
func (spuo *ServiceProviderUpdateOne) RemoveAuthorizationCodeIDs(ids ...int) *ServiceProviderUpdateOne
RemoveAuthorizationCodeIDs removes the "authorization_codes" edge to AuthorizationCode entities by IDs.
func (*ServiceProviderUpdateOne) RemoveAuthorizationCodes ¶
func (spuo *ServiceProviderUpdateOne) RemoveAuthorizationCodes(a ...*AuthorizationCode) *ServiceProviderUpdateOne
RemoveAuthorizationCodes removes "authorization_codes" edges to AuthorizationCode entities.
func (*ServiceProviderUpdateOne) RemoveWhitelistIDs ¶
func (spuo *ServiceProviderUpdateOne) RemoveWhitelistIDs(ids ...int) *ServiceProviderUpdateOne
RemoveWhitelistIDs removes the "whitelists" edge to WhiteList entities by IDs.
func (*ServiceProviderUpdateOne) RemoveWhitelists ¶
func (spuo *ServiceProviderUpdateOne) RemoveWhitelists(w ...*WhiteList) *ServiceProviderUpdateOne
RemoveWhitelists removes "whitelists" edges to WhiteList entities.
func (*ServiceProviderUpdateOne) Save ¶
func (spuo *ServiceProviderUpdateOne) Save(ctx context.Context) (*ServiceProvider, error)
Save executes the query and returns the updated ServiceProvider entity.
func (*ServiceProviderUpdateOne) SaveX ¶
func (spuo *ServiceProviderUpdateOne) SaveX(ctx context.Context) *ServiceProvider
SaveX is like Save, but panics if an error occurs.
func (*ServiceProviderUpdateOne) Select ¶
func (spuo *ServiceProviderUpdateOne) Select(field string, fields ...string) *ServiceProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ServiceProviderUpdateOne) SetDestinationIP ¶
func (spuo *ServiceProviderUpdateOne) SetDestinationIP(s string) *ServiceProviderUpdateOne
SetDestinationIP sets the "destination_ip" field.
func (*ServiceProviderUpdateOne) SetHost ¶
func (spuo *ServiceProviderUpdateOne) SetHost(s string) *ServiceProviderUpdateOne
SetHost sets the "host" field.
type ServiceProviders ¶
type ServiceProviders []*ServiceProvider
ServiceProviders is a parsable slice of ServiceProvider.
type Tx ¶
type Tx struct { // AuthorizationCode is the client for interacting with the AuthorizationCode builders. AuthorizationCode *AuthorizationCodeClient // ServiceProvider is the client for interacting with the ServiceProvider builders. ServiceProvider *ServiceProviderClient // WhiteList is the client for interacting with the WhiteList builders. WhiteList *WhiteListClient // 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 or edge 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.
type WhiteList ¶
type WhiteList struct { // ID of the ent. ID int `json:"id,omitempty"` // Path holds the value of the "path" field. Path string `json:"path,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the WhiteListQuery when eager-loading is set. Edges WhiteListEdges `json:"edges"` // contains filtered or unexported fields }
WhiteList is the model entity for the WhiteList schema.
func (*WhiteList) QueryOwner ¶
func (wl *WhiteList) QueryOwner() *ServiceProviderQuery
QueryOwner queries the "owner" edge of the WhiteList entity.
func (*WhiteList) Unwrap ¶
Unwrap unwraps the WhiteList 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 (*WhiteList) Update ¶
func (wl *WhiteList) Update() *WhiteListUpdateOne
Update returns a builder for updating this WhiteList. Note that you need to call WhiteList.Unwrap() before calling this method if this WhiteList was returned from a transaction, and the transaction was committed or rolled back.
type WhiteListClient ¶
type WhiteListClient struct {
// contains filtered or unexported fields
}
WhiteListClient is a client for the WhiteList schema.
func NewWhiteListClient ¶
func NewWhiteListClient(c config) *WhiteListClient
NewWhiteListClient returns a client for the WhiteList from the given config.
func (*WhiteListClient) Create ¶
func (c *WhiteListClient) Create() *WhiteListCreate
Create returns a builder for creating a WhiteList entity.
func (*WhiteListClient) CreateBulk ¶
func (c *WhiteListClient) CreateBulk(builders ...*WhiteListCreate) *WhiteListCreateBulk
CreateBulk returns a builder for creating a bulk of WhiteList entities.
func (*WhiteListClient) Delete ¶
func (c *WhiteListClient) Delete() *WhiteListDelete
Delete returns a delete builder for WhiteList.
func (*WhiteListClient) DeleteOne ¶
func (c *WhiteListClient) DeleteOne(wl *WhiteList) *WhiteListDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WhiteListClient) DeleteOneID ¶
func (c *WhiteListClient) DeleteOneID(id int) *WhiteListDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WhiteListClient) GetX ¶
func (c *WhiteListClient) GetX(ctx context.Context, id int) *WhiteList
GetX is like Get, but panics if an error occurs.
func (*WhiteListClient) Hooks ¶
func (c *WhiteListClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WhiteListClient) Query ¶
func (c *WhiteListClient) Query() *WhiteListQuery
Query returns a query builder for WhiteList.
func (*WhiteListClient) QueryOwner ¶
func (c *WhiteListClient) QueryOwner(wl *WhiteList) *ServiceProviderQuery
QueryOwner queries the owner edge of a WhiteList.
func (*WhiteListClient) Update ¶
func (c *WhiteListClient) Update() *WhiteListUpdate
Update returns an update builder for WhiteList.
func (*WhiteListClient) UpdateOne ¶
func (c *WhiteListClient) UpdateOne(wl *WhiteList) *WhiteListUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WhiteListClient) UpdateOneID ¶
func (c *WhiteListClient) UpdateOneID(id int) *WhiteListUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WhiteListClient) Use ¶
func (c *WhiteListClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `whitelist.Hooks(f(g(h())))`.
type WhiteListCreate ¶
type WhiteListCreate struct {
// contains filtered or unexported fields
}
WhiteListCreate is the builder for creating a WhiteList entity.
func (*WhiteListCreate) Exec ¶
func (wlc *WhiteListCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WhiteListCreate) ExecX ¶
func (wlc *WhiteListCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WhiteListCreate) Mutation ¶
func (wlc *WhiteListCreate) Mutation() *WhiteListMutation
Mutation returns the WhiteListMutation object of the builder.
func (*WhiteListCreate) Save ¶
func (wlc *WhiteListCreate) Save(ctx context.Context) (*WhiteList, error)
Save creates the WhiteList in the database.
func (*WhiteListCreate) SaveX ¶
func (wlc *WhiteListCreate) SaveX(ctx context.Context) *WhiteList
SaveX calls Save and panics if Save returns an error.
func (*WhiteListCreate) SetNillableOwnerID ¶
func (wlc *WhiteListCreate) SetNillableOwnerID(id *int) *WhiteListCreate
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*WhiteListCreate) SetOwner ¶
func (wlc *WhiteListCreate) SetOwner(s *ServiceProvider) *WhiteListCreate
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*WhiteListCreate) SetOwnerID ¶
func (wlc *WhiteListCreate) SetOwnerID(id int) *WhiteListCreate
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*WhiteListCreate) SetPath ¶
func (wlc *WhiteListCreate) SetPath(s string) *WhiteListCreate
SetPath sets the "path" field.
type WhiteListCreateBulk ¶
type WhiteListCreateBulk struct {
// contains filtered or unexported fields
}
WhiteListCreateBulk is the builder for creating many WhiteList entities in bulk.
func (*WhiteListCreateBulk) Exec ¶
func (wlcb *WhiteListCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WhiteListCreateBulk) ExecX ¶
func (wlcb *WhiteListCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WhiteListDelete ¶
type WhiteListDelete struct {
// contains filtered or unexported fields
}
WhiteListDelete is the builder for deleting a WhiteList entity.
func (*WhiteListDelete) Exec ¶
func (wld *WhiteListDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WhiteListDelete) ExecX ¶
func (wld *WhiteListDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WhiteListDelete) Where ¶
func (wld *WhiteListDelete) Where(ps ...predicate.WhiteList) *WhiteListDelete
Where appends a list predicates to the WhiteListDelete builder.
type WhiteListDeleteOne ¶
type WhiteListDeleteOne struct {
// contains filtered or unexported fields
}
WhiteListDeleteOne is the builder for deleting a single WhiteList entity.
func (*WhiteListDeleteOne) Exec ¶
func (wldo *WhiteListDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WhiteListDeleteOne) ExecX ¶
func (wldo *WhiteListDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WhiteListEdges ¶
type WhiteListEdges struct { // Owner holds the value of the owner edge. Owner *ServiceProvider `json:"owner,omitempty"` // contains filtered or unexported fields }
WhiteListEdges holds the relations/edges for other nodes in the graph.
func (WhiteListEdges) OwnerOrErr ¶
func (e WhiteListEdges) OwnerOrErr() (*ServiceProvider, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type WhiteListGroupBy ¶
type WhiteListGroupBy struct {
// contains filtered or unexported fields
}
WhiteListGroupBy is the group-by builder for WhiteList entities.
func (*WhiteListGroupBy) Aggregate ¶
func (wlgb *WhiteListGroupBy) Aggregate(fns ...AggregateFunc) *WhiteListGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WhiteListGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WhiteListGroupBy) Scan ¶
func (wlgb *WhiteListGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*WhiteListGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WhiteListMutation ¶
type WhiteListMutation struct {
// contains filtered or unexported fields
}
WhiteListMutation represents an operation that mutates the WhiteList nodes in the graph.
func (*WhiteListMutation) AddField ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) AddedEdges ¶
func (m *WhiteListMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WhiteListMutation) AddedField ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) AddedFields ¶
func (m *WhiteListMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WhiteListMutation) AddedIDs ¶
func (m *WhiteListMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WhiteListMutation) ClearEdge ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ClearField ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ClearOwner ¶
func (m *WhiteListMutation) ClearOwner()
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*WhiteListMutation) ClearedEdges ¶
func (m *WhiteListMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WhiteListMutation) ClearedFields ¶
func (m *WhiteListMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WhiteListMutation) Client ¶
func (m WhiteListMutation) 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 (*WhiteListMutation) EdgeCleared ¶
func (m *WhiteListMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WhiteListMutation) Field ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) FieldCleared ¶
func (m *WhiteListMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WhiteListMutation) Fields ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ID ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) IDs ¶
func (m *WhiteListMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WhiteListMutation) OldField ¶
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 (*WhiteListMutation) OldPath ¶
func (m *WhiteListMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the WhiteList entity. If the WhiteList 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 (*WhiteListMutation) OwnerCleared ¶
func (m *WhiteListMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the ServiceProvider entity was cleared.
func (*WhiteListMutation) OwnerID ¶
func (m *WhiteListMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*WhiteListMutation) OwnerIDs ¶
func (m *WhiteListMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*WhiteListMutation) Path ¶
func (m *WhiteListMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*WhiteListMutation) RemovedEdges ¶
func (m *WhiteListMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WhiteListMutation) RemovedIDs ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ResetEdge ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ResetField ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) ResetOwner ¶
func (m *WhiteListMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*WhiteListMutation) ResetPath ¶
func (m *WhiteListMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*WhiteListMutation) SetField ¶
func (m *WhiteListMutation) 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 (*WhiteListMutation) SetOwnerID ¶
func (m *WhiteListMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the ServiceProvider entity by id.
func (*WhiteListMutation) SetPath ¶
func (m *WhiteListMutation) SetPath(s string)
SetPath sets the "path" field.
func (WhiteListMutation) Tx ¶
func (m WhiteListMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WhiteListMutation) Type ¶
func (m *WhiteListMutation) Type() string
Type returns the node type of this mutation (WhiteList).
func (*WhiteListMutation) Where ¶
func (m *WhiteListMutation) Where(ps ...predicate.WhiteList)
Where appends a list predicates to the WhiteListMutation builder.
type WhiteListQuery ¶
type WhiteListQuery struct {
// contains filtered or unexported fields
}
WhiteListQuery is the builder for querying WhiteList entities.
func (*WhiteListQuery) Aggregate ¶
func (wlq *WhiteListQuery) Aggregate(fns ...AggregateFunc) *WhiteListSelect
Aggregate returns a WhiteListSelect configured with the given aggregations.
func (*WhiteListQuery) All ¶
func (wlq *WhiteListQuery) All(ctx context.Context) ([]*WhiteList, error)
All executes the query and returns a list of WhiteLists.
func (*WhiteListQuery) AllX ¶
func (wlq *WhiteListQuery) AllX(ctx context.Context) []*WhiteList
AllX is like All, but panics if an error occurs.
func (*WhiteListQuery) Clone ¶
func (wlq *WhiteListQuery) Clone() *WhiteListQuery
Clone returns a duplicate of the WhiteListQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WhiteListQuery) Count ¶
func (wlq *WhiteListQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WhiteListQuery) CountX ¶
func (wlq *WhiteListQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WhiteListQuery) Exist ¶
func (wlq *WhiteListQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WhiteListQuery) ExistX ¶
func (wlq *WhiteListQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WhiteListQuery) First ¶
func (wlq *WhiteListQuery) First(ctx context.Context) (*WhiteList, error)
First returns the first WhiteList entity from the query. Returns a *NotFoundError when no WhiteList was found.
func (*WhiteListQuery) FirstID ¶
func (wlq *WhiteListQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WhiteList ID from the query. Returns a *NotFoundError when no WhiteList ID was found.
func (*WhiteListQuery) FirstIDX ¶
func (wlq *WhiteListQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WhiteListQuery) FirstX ¶
func (wlq *WhiteListQuery) FirstX(ctx context.Context) *WhiteList
FirstX is like First, but panics if an error occurs.
func (*WhiteListQuery) GroupBy ¶
func (wlq *WhiteListQuery) GroupBy(field string, fields ...string) *WhiteListGroupBy
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 { Path string `json:"path,omitempty"` Count int `json:"count,omitempty"` } client.WhiteList.Query(). GroupBy(whitelist.FieldPath). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WhiteListQuery) IDs ¶
func (wlq *WhiteListQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of WhiteList IDs.
func (*WhiteListQuery) IDsX ¶
func (wlq *WhiteListQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WhiteListQuery) Limit ¶
func (wlq *WhiteListQuery) Limit(limit int) *WhiteListQuery
Limit adds a limit step to the query.
func (*WhiteListQuery) Offset ¶
func (wlq *WhiteListQuery) Offset(offset int) *WhiteListQuery
Offset adds an offset step to the query.
func (*WhiteListQuery) Only ¶
func (wlq *WhiteListQuery) Only(ctx context.Context) (*WhiteList, error)
Only returns a single WhiteList entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WhiteList entity is found. Returns a *NotFoundError when no WhiteList entities are found.
func (*WhiteListQuery) OnlyID ¶
func (wlq *WhiteListQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WhiteList ID in the query. Returns a *NotSingularError when more than one WhiteList ID is found. Returns a *NotFoundError when no entities are found.
func (*WhiteListQuery) OnlyIDX ¶
func (wlq *WhiteListQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WhiteListQuery) OnlyX ¶
func (wlq *WhiteListQuery) OnlyX(ctx context.Context) *WhiteList
OnlyX is like Only, but panics if an error occurs.
func (*WhiteListQuery) Order ¶
func (wlq *WhiteListQuery) Order(o ...OrderFunc) *WhiteListQuery
Order adds an order step to the query.
func (*WhiteListQuery) QueryOwner ¶
func (wlq *WhiteListQuery) QueryOwner() *ServiceProviderQuery
QueryOwner chains the current query on the "owner" edge.
func (*WhiteListQuery) Select ¶
func (wlq *WhiteListQuery) Select(fields ...string) *WhiteListSelect
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 { Path string `json:"path,omitempty"` } client.WhiteList.Query(). Select(whitelist.FieldPath). Scan(ctx, &v)
func (*WhiteListQuery) Unique ¶
func (wlq *WhiteListQuery) Unique(unique bool) *WhiteListQuery
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 (*WhiteListQuery) Where ¶
func (wlq *WhiteListQuery) Where(ps ...predicate.WhiteList) *WhiteListQuery
Where adds a new predicate for the WhiteListQuery builder.
func (*WhiteListQuery) WithOwner ¶
func (wlq *WhiteListQuery) WithOwner(opts ...func(*ServiceProviderQuery)) *WhiteListQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type WhiteListSelect ¶
type WhiteListSelect struct { *WhiteListQuery // contains filtered or unexported fields }
WhiteListSelect is the builder for selecting fields of WhiteList entities.
func (*WhiteListSelect) Aggregate ¶
func (wls *WhiteListSelect) Aggregate(fns ...AggregateFunc) *WhiteListSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WhiteListSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WhiteListSelect) Scan ¶
func (wls *WhiteListSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WhiteListSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WhiteListUpdate ¶
type WhiteListUpdate struct {
// contains filtered or unexported fields
}
WhiteListUpdate is the builder for updating WhiteList entities.
func (*WhiteListUpdate) ClearOwner ¶
func (wlu *WhiteListUpdate) ClearOwner() *WhiteListUpdate
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*WhiteListUpdate) Exec ¶
func (wlu *WhiteListUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WhiteListUpdate) ExecX ¶
func (wlu *WhiteListUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WhiteListUpdate) Mutation ¶
func (wlu *WhiteListUpdate) Mutation() *WhiteListMutation
Mutation returns the WhiteListMutation object of the builder.
func (*WhiteListUpdate) Save ¶
func (wlu *WhiteListUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WhiteListUpdate) SaveX ¶
func (wlu *WhiteListUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WhiteListUpdate) SetNillableOwnerID ¶
func (wlu *WhiteListUpdate) SetNillableOwnerID(id *int) *WhiteListUpdate
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*WhiteListUpdate) SetOwner ¶
func (wlu *WhiteListUpdate) SetOwner(s *ServiceProvider) *WhiteListUpdate
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*WhiteListUpdate) SetOwnerID ¶
func (wlu *WhiteListUpdate) SetOwnerID(id int) *WhiteListUpdate
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*WhiteListUpdate) SetPath ¶
func (wlu *WhiteListUpdate) SetPath(s string) *WhiteListUpdate
SetPath sets the "path" field.
func (*WhiteListUpdate) Where ¶
func (wlu *WhiteListUpdate) Where(ps ...predicate.WhiteList) *WhiteListUpdate
Where appends a list predicates to the WhiteListUpdate builder.
type WhiteListUpdateOne ¶
type WhiteListUpdateOne struct {
// contains filtered or unexported fields
}
WhiteListUpdateOne is the builder for updating a single WhiteList entity.
func (*WhiteListUpdateOne) ClearOwner ¶
func (wluo *WhiteListUpdateOne) ClearOwner() *WhiteListUpdateOne
ClearOwner clears the "owner" edge to the ServiceProvider entity.
func (*WhiteListUpdateOne) Exec ¶
func (wluo *WhiteListUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WhiteListUpdateOne) ExecX ¶
func (wluo *WhiteListUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WhiteListUpdateOne) Mutation ¶
func (wluo *WhiteListUpdateOne) Mutation() *WhiteListMutation
Mutation returns the WhiteListMutation object of the builder.
func (*WhiteListUpdateOne) Save ¶
func (wluo *WhiteListUpdateOne) Save(ctx context.Context) (*WhiteList, error)
Save executes the query and returns the updated WhiteList entity.
func (*WhiteListUpdateOne) SaveX ¶
func (wluo *WhiteListUpdateOne) SaveX(ctx context.Context) *WhiteList
SaveX is like Save, but panics if an error occurs.
func (*WhiteListUpdateOne) Select ¶
func (wluo *WhiteListUpdateOne) Select(field string, fields ...string) *WhiteListUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WhiteListUpdateOne) SetNillableOwnerID ¶
func (wluo *WhiteListUpdateOne) SetNillableOwnerID(id *int) *WhiteListUpdateOne
SetNillableOwnerID sets the "owner" edge to the ServiceProvider entity by ID if the given value is not nil.
func (*WhiteListUpdateOne) SetOwner ¶
func (wluo *WhiteListUpdateOne) SetOwner(s *ServiceProvider) *WhiteListUpdateOne
SetOwner sets the "owner" edge to the ServiceProvider entity.
func (*WhiteListUpdateOne) SetOwnerID ¶
func (wluo *WhiteListUpdateOne) SetOwnerID(id int) *WhiteListUpdateOne
SetOwnerID sets the "owner" edge to the ServiceProvider entity by ID.
func (*WhiteListUpdateOne) SetPath ¶
func (wluo *WhiteListUpdateOne) SetPath(s string) *WhiteListUpdateOne
SetPath sets the "path" field.
Source Files ¶
- authorizationcode.go
- authorizationcode_create.go
- authorizationcode_delete.go
- authorizationcode_query.go
- authorizationcode_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- serviceprovider.go
- serviceprovider_create.go
- serviceprovider_delete.go
- serviceprovider_query.go
- serviceprovider_update.go
- tx.go
- whitelist.go
- whitelist_create.go
- whitelist_delete.go
- whitelist_query.go
- whitelist_update.go