ent

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ent hosts the go:generate trampoline for Ent codegen.

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeAppConfig  = "AppConfig"
	TypeOutage     = "Outage"
	TypeSample     = "Sample"
	TypeSample1h   = "Sample1h"
	TypeSample1min = "Sample1min"
	TypeSample5min = "Sample5min"
	TypeTarget     = "Target"
	TypeWifiSample = "WifiSample"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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 AppConfig

type AppConfig struct {

	// ID of the ent.
	// Always 1 — singleton pattern enforced by application code
	ID int `json:"id,omitempty"`
	// Seconds between probe cycles
	PingIntervalSec float64 `json:"ping_interval_sec,omitempty"`
	// Seconds between disk flushes from in-memory buffer
	FlushIntervalSec int `json:"flush_interval_sec,omitempty"`
	// Per-probe timeout in milliseconds
	PingTimeoutMs int `json:"ping_timeout_ms,omitempty"`
	// Days to retain raw samples before pruning
	RetentionRawDays int `json:"retention_raw_days,omitempty"`
	// Days to retain 1-minute aggregations
	Retention1minDays int `json:"retention_1min_days,omitempty"`
	// Days to retain 5-minute aggregations
	Retention5minDays int `json:"retention_5min_days,omitempty"`
	// WifiSampleEnabled holds the value of the "wifi_sample_enabled" field.
	WifiSampleEnabled bool `json:"wifi_sample_enabled,omitempty"`
	// contains filtered or unexported fields
}

AppConfig is the model entity for the AppConfig schema.

func (*AppConfig) String

func (_m *AppConfig) String() string

String implements the fmt.Stringer.

func (*AppConfig) Unwrap

func (_m *AppConfig) Unwrap() *AppConfig

Unwrap unwraps the AppConfig 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 (*AppConfig) Update

func (_m *AppConfig) Update() *AppConfigUpdateOne

Update returns a builder for updating this AppConfig. Note that you need to call AppConfig.Unwrap() before calling this method if this AppConfig was returned from a transaction, and the transaction was committed or rolled back.

func (*AppConfig) Value

func (_m *AppConfig) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppConfig. This includes values selected through modifiers, order, etc.

type AppConfigClient

type AppConfigClient struct {
	// contains filtered or unexported fields
}

AppConfigClient is a client for the AppConfig schema.

func NewAppConfigClient

func NewAppConfigClient(c config) *AppConfigClient

NewAppConfigClient returns a client for the AppConfig from the given config.

func (*AppConfigClient) Create

func (c *AppConfigClient) Create() *AppConfigCreate

Create returns a builder for creating a AppConfig entity.

func (*AppConfigClient) CreateBulk

func (c *AppConfigClient) CreateBulk(builders ...*AppConfigCreate) *AppConfigCreateBulk

CreateBulk returns a builder for creating a bulk of AppConfig entities.

func (*AppConfigClient) Delete

func (c *AppConfigClient) Delete() *AppConfigDelete

Delete returns a delete builder for AppConfig.

func (*AppConfigClient) DeleteOne

func (c *AppConfigClient) DeleteOne(_m *AppConfig) *AppConfigDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppConfigClient) DeleteOneID

func (c *AppConfigClient) DeleteOneID(id int) *AppConfigDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppConfigClient) Get

func (c *AppConfigClient) Get(ctx context.Context, id int) (*AppConfig, error)

Get returns a AppConfig entity by its id.

func (*AppConfigClient) GetX

func (c *AppConfigClient) GetX(ctx context.Context, id int) *AppConfig

GetX is like Get, but panics if an error occurs.

func (*AppConfigClient) Hooks

func (c *AppConfigClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppConfigClient) Intercept

func (c *AppConfigClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appconfig.Intercept(f(g(h())))`.

func (*AppConfigClient) Interceptors

func (c *AppConfigClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppConfigClient) MapCreateBulk

func (c *AppConfigClient) MapCreateBulk(slice any, setFunc func(*AppConfigCreate, int)) *AppConfigCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppConfigClient) Query

func (c *AppConfigClient) Query() *AppConfigQuery

Query returns a query builder for AppConfig.

func (*AppConfigClient) Update

func (c *AppConfigClient) Update() *AppConfigUpdate

Update returns an update builder for AppConfig.

func (*AppConfigClient) UpdateOne

func (c *AppConfigClient) UpdateOne(_m *AppConfig) *AppConfigUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppConfigClient) UpdateOneID

func (c *AppConfigClient) UpdateOneID(id int) *AppConfigUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppConfigClient) Use

func (c *AppConfigClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appconfig.Hooks(f(g(h())))`.

type AppConfigCreate

type AppConfigCreate struct {
	// contains filtered or unexported fields
}

AppConfigCreate is the builder for creating a AppConfig entity.

func (*AppConfigCreate) Exec

func (_c *AppConfigCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppConfigCreate) ExecX

func (_c *AppConfigCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigCreate) Mutation

func (_c *AppConfigCreate) Mutation() *AppConfigMutation

Mutation returns the AppConfigMutation object of the builder.

func (*AppConfigCreate) Save

func (_c *AppConfigCreate) Save(ctx context.Context) (*AppConfig, error)

Save creates the AppConfig in the database.

func (*AppConfigCreate) SaveX

func (_c *AppConfigCreate) SaveX(ctx context.Context) *AppConfig

SaveX calls Save and panics if Save returns an error.

func (*AppConfigCreate) SetFlushIntervalSec

func (_c *AppConfigCreate) SetFlushIntervalSec(v int) *AppConfigCreate

SetFlushIntervalSec sets the "flush_interval_sec" field.

func (*AppConfigCreate) SetID

func (_c *AppConfigCreate) SetID(v int) *AppConfigCreate

SetID sets the "id" field.

func (*AppConfigCreate) SetNillableFlushIntervalSec

func (_c *AppConfigCreate) SetNillableFlushIntervalSec(v *int) *AppConfigCreate

SetNillableFlushIntervalSec sets the "flush_interval_sec" field if the given value is not nil.

func (*AppConfigCreate) SetNillablePingIntervalSec

func (_c *AppConfigCreate) SetNillablePingIntervalSec(v *float64) *AppConfigCreate

SetNillablePingIntervalSec sets the "ping_interval_sec" field if the given value is not nil.

func (*AppConfigCreate) SetNillablePingTimeoutMs

func (_c *AppConfigCreate) SetNillablePingTimeoutMs(v *int) *AppConfigCreate

SetNillablePingTimeoutMs sets the "ping_timeout_ms" field if the given value is not nil.

func (*AppConfigCreate) SetNillableRetention1minDays

func (_c *AppConfigCreate) SetNillableRetention1minDays(v *int) *AppConfigCreate

SetNillableRetention1minDays sets the "retention_1min_days" field if the given value is not nil.

func (*AppConfigCreate) SetNillableRetention5minDays

func (_c *AppConfigCreate) SetNillableRetention5minDays(v *int) *AppConfigCreate

SetNillableRetention5minDays sets the "retention_5min_days" field if the given value is not nil.

func (*AppConfigCreate) SetNillableRetentionRawDays

func (_c *AppConfigCreate) SetNillableRetentionRawDays(v *int) *AppConfigCreate

SetNillableRetentionRawDays sets the "retention_raw_days" field if the given value is not nil.

func (*AppConfigCreate) SetNillableWifiSampleEnabled

func (_c *AppConfigCreate) SetNillableWifiSampleEnabled(v *bool) *AppConfigCreate

SetNillableWifiSampleEnabled sets the "wifi_sample_enabled" field if the given value is not nil.

func (*AppConfigCreate) SetPingIntervalSec

func (_c *AppConfigCreate) SetPingIntervalSec(v float64) *AppConfigCreate

SetPingIntervalSec sets the "ping_interval_sec" field.

func (*AppConfigCreate) SetPingTimeoutMs

func (_c *AppConfigCreate) SetPingTimeoutMs(v int) *AppConfigCreate

SetPingTimeoutMs sets the "ping_timeout_ms" field.

func (*AppConfigCreate) SetRetention1minDays

func (_c *AppConfigCreate) SetRetention1minDays(v int) *AppConfigCreate

SetRetention1minDays sets the "retention_1min_days" field.

func (*AppConfigCreate) SetRetention5minDays

func (_c *AppConfigCreate) SetRetention5minDays(v int) *AppConfigCreate

SetRetention5minDays sets the "retention_5min_days" field.

func (*AppConfigCreate) SetRetentionRawDays

func (_c *AppConfigCreate) SetRetentionRawDays(v int) *AppConfigCreate

SetRetentionRawDays sets the "retention_raw_days" field.

func (*AppConfigCreate) SetWifiSampleEnabled

func (_c *AppConfigCreate) SetWifiSampleEnabled(v bool) *AppConfigCreate

SetWifiSampleEnabled sets the "wifi_sample_enabled" field.

type AppConfigCreateBulk

type AppConfigCreateBulk struct {
	// contains filtered or unexported fields
}

AppConfigCreateBulk is the builder for creating many AppConfig entities in bulk.

func (*AppConfigCreateBulk) Exec

func (_c *AppConfigCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppConfigCreateBulk) ExecX

func (_c *AppConfigCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigCreateBulk) Save

func (_c *AppConfigCreateBulk) Save(ctx context.Context) ([]*AppConfig, error)

Save creates the AppConfig entities in the database.

func (*AppConfigCreateBulk) SaveX

func (_c *AppConfigCreateBulk) SaveX(ctx context.Context) []*AppConfig

SaveX is like Save, but panics if an error occurs.

type AppConfigDelete

type AppConfigDelete struct {
	// contains filtered or unexported fields
}

AppConfigDelete is the builder for deleting a AppConfig entity.

func (*AppConfigDelete) Exec

func (_d *AppConfigDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppConfigDelete) ExecX

func (_d *AppConfigDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigDelete) Where

Where appends a list predicates to the AppConfigDelete builder.

type AppConfigDeleteOne

type AppConfigDeleteOne struct {
	// contains filtered or unexported fields
}

AppConfigDeleteOne is the builder for deleting a single AppConfig entity.

func (*AppConfigDeleteOne) Exec

func (_d *AppConfigDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppConfigDeleteOne) ExecX

func (_d *AppConfigDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigDeleteOne) Where

Where appends a list predicates to the AppConfigDelete builder.

type AppConfigGroupBy

type AppConfigGroupBy struct {
	// contains filtered or unexported fields
}

AppConfigGroupBy is the group-by builder for AppConfig entities.

func (*AppConfigGroupBy) Aggregate

func (_g *AppConfigGroupBy) Aggregate(fns ...AggregateFunc) *AppConfigGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppConfigGroupBy) Bool

func (s *AppConfigGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) BoolX

func (s *AppConfigGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppConfigGroupBy) Bools

func (s *AppConfigGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) BoolsX

func (s *AppConfigGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppConfigGroupBy) Float64

func (s *AppConfigGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) Float64X

func (s *AppConfigGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppConfigGroupBy) Float64s

func (s *AppConfigGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) Float64sX

func (s *AppConfigGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppConfigGroupBy) Int

func (s *AppConfigGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) IntX

func (s *AppConfigGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppConfigGroupBy) Ints

func (s *AppConfigGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) IntsX

func (s *AppConfigGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppConfigGroupBy) Scan

func (_g *AppConfigGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppConfigGroupBy) ScanX

func (s *AppConfigGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppConfigGroupBy) String

func (s *AppConfigGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) StringX

func (s *AppConfigGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppConfigGroupBy) Strings

func (s *AppConfigGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppConfigGroupBy) StringsX

func (s *AppConfigGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppConfigMutation

type AppConfigMutation struct {
	// contains filtered or unexported fields
}

AppConfigMutation represents an operation that mutates the AppConfig nodes in the graph.

func (*AppConfigMutation) AddField

func (m *AppConfigMutation) 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 (*AppConfigMutation) AddFlushIntervalSec

func (m *AppConfigMutation) AddFlushIntervalSec(i int)

AddFlushIntervalSec adds i to the "flush_interval_sec" field.

func (*AppConfigMutation) AddPingIntervalSec

func (m *AppConfigMutation) AddPingIntervalSec(f float64)

AddPingIntervalSec adds f to the "ping_interval_sec" field.

func (*AppConfigMutation) AddPingTimeoutMs

func (m *AppConfigMutation) AddPingTimeoutMs(i int)

AddPingTimeoutMs adds i to the "ping_timeout_ms" field.

func (*AppConfigMutation) AddRetention1minDays

func (m *AppConfigMutation) AddRetention1minDays(i int)

AddRetention1minDays adds i to the "retention_1min_days" field.

func (*AppConfigMutation) AddRetention5minDays

func (m *AppConfigMutation) AddRetention5minDays(i int)

AddRetention5minDays adds i to the "retention_5min_days" field.

func (*AppConfigMutation) AddRetentionRawDays

func (m *AppConfigMutation) AddRetentionRawDays(i int)

AddRetentionRawDays adds i to the "retention_raw_days" field.

func (*AppConfigMutation) AddedEdges

func (m *AppConfigMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppConfigMutation) AddedField

func (m *AppConfigMutation) 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 (*AppConfigMutation) AddedFields

func (m *AppConfigMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppConfigMutation) AddedFlushIntervalSec

func (m *AppConfigMutation) AddedFlushIntervalSec() (r int, exists bool)

AddedFlushIntervalSec returns the value that was added to the "flush_interval_sec" field in this mutation.

func (*AppConfigMutation) AddedIDs

func (m *AppConfigMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppConfigMutation) AddedPingIntervalSec

func (m *AppConfigMutation) AddedPingIntervalSec() (r float64, exists bool)

AddedPingIntervalSec returns the value that was added to the "ping_interval_sec" field in this mutation.

func (*AppConfigMutation) AddedPingTimeoutMs

func (m *AppConfigMutation) AddedPingTimeoutMs() (r int, exists bool)

AddedPingTimeoutMs returns the value that was added to the "ping_timeout_ms" field in this mutation.

func (*AppConfigMutation) AddedRetention1minDays

func (m *AppConfigMutation) AddedRetention1minDays() (r int, exists bool)

AddedRetention1minDays returns the value that was added to the "retention_1min_days" field in this mutation.

func (*AppConfigMutation) AddedRetention5minDays

func (m *AppConfigMutation) AddedRetention5minDays() (r int, exists bool)

AddedRetention5minDays returns the value that was added to the "retention_5min_days" field in this mutation.

func (*AppConfigMutation) AddedRetentionRawDays

func (m *AppConfigMutation) AddedRetentionRawDays() (r int, exists bool)

AddedRetentionRawDays returns the value that was added to the "retention_raw_days" field in this mutation.

func (*AppConfigMutation) ClearEdge

func (m *AppConfigMutation) 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 (*AppConfigMutation) ClearField

func (m *AppConfigMutation) 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 (*AppConfigMutation) ClearedEdges

func (m *AppConfigMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppConfigMutation) ClearedFields

func (m *AppConfigMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppConfigMutation) Client

func (m AppConfigMutation) 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 (*AppConfigMutation) EdgeCleared

func (m *AppConfigMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppConfigMutation) Field

func (m *AppConfigMutation) 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 (*AppConfigMutation) FieldCleared

func (m *AppConfigMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppConfigMutation) Fields

func (m *AppConfigMutation) 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 (*AppConfigMutation) FlushIntervalSec

func (m *AppConfigMutation) FlushIntervalSec() (r int, exists bool)

FlushIntervalSec returns the value of the "flush_interval_sec" field in the mutation.

func (*AppConfigMutation) ID

func (m *AppConfigMutation) 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 (*AppConfigMutation) IDs

func (m *AppConfigMutation) 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 (*AppConfigMutation) OldField

func (m *AppConfigMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*AppConfigMutation) OldFlushIntervalSec

func (m *AppConfigMutation) OldFlushIntervalSec(ctx context.Context) (v int, err error)

OldFlushIntervalSec returns the old "flush_interval_sec" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldPingIntervalSec

func (m *AppConfigMutation) OldPingIntervalSec(ctx context.Context) (v float64, err error)

OldPingIntervalSec returns the old "ping_interval_sec" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldPingTimeoutMs

func (m *AppConfigMutation) OldPingTimeoutMs(ctx context.Context) (v int, err error)

OldPingTimeoutMs returns the old "ping_timeout_ms" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldRetention1minDays

func (m *AppConfigMutation) OldRetention1minDays(ctx context.Context) (v int, err error)

OldRetention1minDays returns the old "retention_1min_days" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldRetention5minDays

func (m *AppConfigMutation) OldRetention5minDays(ctx context.Context) (v int, err error)

OldRetention5minDays returns the old "retention_5min_days" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldRetentionRawDays

func (m *AppConfigMutation) OldRetentionRawDays(ctx context.Context) (v int, err error)

OldRetentionRawDays returns the old "retention_raw_days" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) OldWifiSampleEnabled

func (m *AppConfigMutation) OldWifiSampleEnabled(ctx context.Context) (v bool, err error)

OldWifiSampleEnabled returns the old "wifi_sample_enabled" field's value of the AppConfig entity. If the AppConfig 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 (*AppConfigMutation) Op

func (m *AppConfigMutation) Op() Op

Op returns the operation name.

func (*AppConfigMutation) PingIntervalSec

func (m *AppConfigMutation) PingIntervalSec() (r float64, exists bool)

PingIntervalSec returns the value of the "ping_interval_sec" field in the mutation.

func (*AppConfigMutation) PingTimeoutMs

func (m *AppConfigMutation) PingTimeoutMs() (r int, exists bool)

PingTimeoutMs returns the value of the "ping_timeout_ms" field in the mutation.

func (*AppConfigMutation) RemovedEdges

func (m *AppConfigMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppConfigMutation) RemovedIDs

func (m *AppConfigMutation) 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 (*AppConfigMutation) ResetEdge

func (m *AppConfigMutation) 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 (*AppConfigMutation) ResetField

func (m *AppConfigMutation) 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 (*AppConfigMutation) ResetFlushIntervalSec

func (m *AppConfigMutation) ResetFlushIntervalSec()

ResetFlushIntervalSec resets all changes to the "flush_interval_sec" field.

func (*AppConfigMutation) ResetPingIntervalSec

func (m *AppConfigMutation) ResetPingIntervalSec()

ResetPingIntervalSec resets all changes to the "ping_interval_sec" field.

func (*AppConfigMutation) ResetPingTimeoutMs

func (m *AppConfigMutation) ResetPingTimeoutMs()

ResetPingTimeoutMs resets all changes to the "ping_timeout_ms" field.

func (*AppConfigMutation) ResetRetention1minDays

func (m *AppConfigMutation) ResetRetention1minDays()

ResetRetention1minDays resets all changes to the "retention_1min_days" field.

func (*AppConfigMutation) ResetRetention5minDays

func (m *AppConfigMutation) ResetRetention5minDays()

ResetRetention5minDays resets all changes to the "retention_5min_days" field.

func (*AppConfigMutation) ResetRetentionRawDays

func (m *AppConfigMutation) ResetRetentionRawDays()

ResetRetentionRawDays resets all changes to the "retention_raw_days" field.

func (*AppConfigMutation) ResetWifiSampleEnabled

func (m *AppConfigMutation) ResetWifiSampleEnabled()

ResetWifiSampleEnabled resets all changes to the "wifi_sample_enabled" field.

func (*AppConfigMutation) Retention1minDays

func (m *AppConfigMutation) Retention1minDays() (r int, exists bool)

Retention1minDays returns the value of the "retention_1min_days" field in the mutation.

func (*AppConfigMutation) Retention5minDays

func (m *AppConfigMutation) Retention5minDays() (r int, exists bool)

Retention5minDays returns the value of the "retention_5min_days" field in the mutation.

func (*AppConfigMutation) RetentionRawDays

func (m *AppConfigMutation) RetentionRawDays() (r int, exists bool)

RetentionRawDays returns the value of the "retention_raw_days" field in the mutation.

func (*AppConfigMutation) SetField

func (m *AppConfigMutation) 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 (*AppConfigMutation) SetFlushIntervalSec

func (m *AppConfigMutation) SetFlushIntervalSec(i int)

SetFlushIntervalSec sets the "flush_interval_sec" field.

func (*AppConfigMutation) SetID

func (m *AppConfigMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppConfig entities.

func (*AppConfigMutation) SetOp

func (m *AppConfigMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppConfigMutation) SetPingIntervalSec

func (m *AppConfigMutation) SetPingIntervalSec(f float64)

SetPingIntervalSec sets the "ping_interval_sec" field.

func (*AppConfigMutation) SetPingTimeoutMs

func (m *AppConfigMutation) SetPingTimeoutMs(i int)

SetPingTimeoutMs sets the "ping_timeout_ms" field.

func (*AppConfigMutation) SetRetention1minDays

func (m *AppConfigMutation) SetRetention1minDays(i int)

SetRetention1minDays sets the "retention_1min_days" field.

func (*AppConfigMutation) SetRetention5minDays

func (m *AppConfigMutation) SetRetention5minDays(i int)

SetRetention5minDays sets the "retention_5min_days" field.

func (*AppConfigMutation) SetRetentionRawDays

func (m *AppConfigMutation) SetRetentionRawDays(i int)

SetRetentionRawDays sets the "retention_raw_days" field.

func (*AppConfigMutation) SetWifiSampleEnabled

func (m *AppConfigMutation) SetWifiSampleEnabled(b bool)

SetWifiSampleEnabled sets the "wifi_sample_enabled" field.

func (AppConfigMutation) Tx

func (m AppConfigMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppConfigMutation) Type

func (m *AppConfigMutation) Type() string

Type returns the node type of this mutation (AppConfig).

func (*AppConfigMutation) Where

func (m *AppConfigMutation) Where(ps ...predicate.AppConfig)

Where appends a list predicates to the AppConfigMutation builder.

func (*AppConfigMutation) WhereP

func (m *AppConfigMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppConfigMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*AppConfigMutation) WifiSampleEnabled

func (m *AppConfigMutation) WifiSampleEnabled() (r bool, exists bool)

WifiSampleEnabled returns the value of the "wifi_sample_enabled" field in the mutation.

type AppConfigQuery

type AppConfigQuery struct {
	// contains filtered or unexported fields
}

AppConfigQuery is the builder for querying AppConfig entities.

func (*AppConfigQuery) Aggregate

func (_q *AppConfigQuery) Aggregate(fns ...AggregateFunc) *AppConfigSelect

Aggregate returns a AppConfigSelect configured with the given aggregations.

func (*AppConfigQuery) All

func (_q *AppConfigQuery) All(ctx context.Context) ([]*AppConfig, error)

All executes the query and returns a list of AppConfigs.

func (*AppConfigQuery) AllX

func (_q *AppConfigQuery) AllX(ctx context.Context) []*AppConfig

AllX is like All, but panics if an error occurs.

func (*AppConfigQuery) Clone

func (_q *AppConfigQuery) Clone() *AppConfigQuery

Clone returns a duplicate of the AppConfigQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppConfigQuery) Count

func (_q *AppConfigQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppConfigQuery) CountX

func (_q *AppConfigQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppConfigQuery) Exist

func (_q *AppConfigQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppConfigQuery) ExistX

func (_q *AppConfigQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppConfigQuery) First

func (_q *AppConfigQuery) First(ctx context.Context) (*AppConfig, error)

First returns the first AppConfig entity from the query. Returns a *NotFoundError when no AppConfig was found.

func (*AppConfigQuery) FirstID

func (_q *AppConfigQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppConfig ID from the query. Returns a *NotFoundError when no AppConfig ID was found.

func (*AppConfigQuery) FirstIDX

func (_q *AppConfigQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppConfigQuery) FirstX

func (_q *AppConfigQuery) FirstX(ctx context.Context) *AppConfig

FirstX is like First, but panics if an error occurs.

func (*AppConfigQuery) GroupBy

func (_q *AppConfigQuery) GroupBy(field string, fields ...string) *AppConfigGroupBy

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 {
	PingIntervalSec float64 `json:"ping_interval_sec,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppConfig.Query().
	GroupBy(appconfig.FieldPingIntervalSec).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppConfigQuery) IDs

func (_q *AppConfigQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppConfig IDs.

func (*AppConfigQuery) IDsX

func (_q *AppConfigQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppConfigQuery) Limit

func (_q *AppConfigQuery) Limit(limit int) *AppConfigQuery

Limit the number of records to be returned by this query.

func (*AppConfigQuery) Offset

func (_q *AppConfigQuery) Offset(offset int) *AppConfigQuery

Offset to start from.

func (*AppConfigQuery) Only

func (_q *AppConfigQuery) Only(ctx context.Context) (*AppConfig, error)

Only returns a single AppConfig entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppConfig entity is found. Returns a *NotFoundError when no AppConfig entities are found.

func (*AppConfigQuery) OnlyID

func (_q *AppConfigQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppConfig ID in the query. Returns a *NotSingularError when more than one AppConfig ID is found. Returns a *NotFoundError when no entities are found.

func (*AppConfigQuery) OnlyIDX

func (_q *AppConfigQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppConfigQuery) OnlyX

func (_q *AppConfigQuery) OnlyX(ctx context.Context) *AppConfig

OnlyX is like Only, but panics if an error occurs.

func (*AppConfigQuery) Order

Order specifies how the records should be ordered.

func (*AppConfigQuery) Select

func (_q *AppConfigQuery) Select(fields ...string) *AppConfigSelect

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 {
	PingIntervalSec float64 `json:"ping_interval_sec,omitempty"`
}

client.AppConfig.Query().
	Select(appconfig.FieldPingIntervalSec).
	Scan(ctx, &v)

func (*AppConfigQuery) Unique

func (_q *AppConfigQuery) Unique(unique bool) *AppConfigQuery

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 (*AppConfigQuery) Where

Where adds a new predicate for the AppConfigQuery builder.

type AppConfigSelect

type AppConfigSelect struct {
	*AppConfigQuery
	// contains filtered or unexported fields
}

AppConfigSelect is the builder for selecting fields of AppConfig entities.

func (*AppConfigSelect) Aggregate

func (_s *AppConfigSelect) Aggregate(fns ...AggregateFunc) *AppConfigSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppConfigSelect) Bool

func (s *AppConfigSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) BoolX

func (s *AppConfigSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppConfigSelect) Bools

func (s *AppConfigSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) BoolsX

func (s *AppConfigSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppConfigSelect) Float64

func (s *AppConfigSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) Float64X

func (s *AppConfigSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppConfigSelect) Float64s

func (s *AppConfigSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) Float64sX

func (s *AppConfigSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppConfigSelect) Int

func (s *AppConfigSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) IntX

func (s *AppConfigSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppConfigSelect) Ints

func (s *AppConfigSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) IntsX

func (s *AppConfigSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppConfigSelect) Scan

func (_s *AppConfigSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppConfigSelect) ScanX

func (s *AppConfigSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppConfigSelect) String

func (s *AppConfigSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) StringX

func (s *AppConfigSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppConfigSelect) Strings

func (s *AppConfigSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppConfigSelect) StringsX

func (s *AppConfigSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppConfigUpdate

type AppConfigUpdate struct {
	// contains filtered or unexported fields
}

AppConfigUpdate is the builder for updating AppConfig entities.

func (*AppConfigUpdate) AddFlushIntervalSec

func (_u *AppConfigUpdate) AddFlushIntervalSec(v int) *AppConfigUpdate

AddFlushIntervalSec adds value to the "flush_interval_sec" field.

func (*AppConfigUpdate) AddPingIntervalSec

func (_u *AppConfigUpdate) AddPingIntervalSec(v float64) *AppConfigUpdate

AddPingIntervalSec adds value to the "ping_interval_sec" field.

func (*AppConfigUpdate) AddPingTimeoutMs

func (_u *AppConfigUpdate) AddPingTimeoutMs(v int) *AppConfigUpdate

AddPingTimeoutMs adds value to the "ping_timeout_ms" field.

func (*AppConfigUpdate) AddRetention1minDays

func (_u *AppConfigUpdate) AddRetention1minDays(v int) *AppConfigUpdate

AddRetention1minDays adds value to the "retention_1min_days" field.

func (*AppConfigUpdate) AddRetention5minDays

func (_u *AppConfigUpdate) AddRetention5minDays(v int) *AppConfigUpdate

AddRetention5minDays adds value to the "retention_5min_days" field.

func (*AppConfigUpdate) AddRetentionRawDays

func (_u *AppConfigUpdate) AddRetentionRawDays(v int) *AppConfigUpdate

AddRetentionRawDays adds value to the "retention_raw_days" field.

func (*AppConfigUpdate) Exec

func (_u *AppConfigUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppConfigUpdate) ExecX

func (_u *AppConfigUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigUpdate) Mutation

func (_u *AppConfigUpdate) Mutation() *AppConfigMutation

Mutation returns the AppConfigMutation object of the builder.

func (*AppConfigUpdate) Save

func (_u *AppConfigUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppConfigUpdate) SaveX

func (_u *AppConfigUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppConfigUpdate) SetFlushIntervalSec

func (_u *AppConfigUpdate) SetFlushIntervalSec(v int) *AppConfigUpdate

SetFlushIntervalSec sets the "flush_interval_sec" field.

func (*AppConfigUpdate) SetNillableFlushIntervalSec

func (_u *AppConfigUpdate) SetNillableFlushIntervalSec(v *int) *AppConfigUpdate

SetNillableFlushIntervalSec sets the "flush_interval_sec" field if the given value is not nil.

func (*AppConfigUpdate) SetNillablePingIntervalSec

func (_u *AppConfigUpdate) SetNillablePingIntervalSec(v *float64) *AppConfigUpdate

SetNillablePingIntervalSec sets the "ping_interval_sec" field if the given value is not nil.

func (*AppConfigUpdate) SetNillablePingTimeoutMs

func (_u *AppConfigUpdate) SetNillablePingTimeoutMs(v *int) *AppConfigUpdate

SetNillablePingTimeoutMs sets the "ping_timeout_ms" field if the given value is not nil.

func (*AppConfigUpdate) SetNillableRetention1minDays

func (_u *AppConfigUpdate) SetNillableRetention1minDays(v *int) *AppConfigUpdate

SetNillableRetention1minDays sets the "retention_1min_days" field if the given value is not nil.

func (*AppConfigUpdate) SetNillableRetention5minDays

func (_u *AppConfigUpdate) SetNillableRetention5minDays(v *int) *AppConfigUpdate

SetNillableRetention5minDays sets the "retention_5min_days" field if the given value is not nil.

func (*AppConfigUpdate) SetNillableRetentionRawDays

func (_u *AppConfigUpdate) SetNillableRetentionRawDays(v *int) *AppConfigUpdate

SetNillableRetentionRawDays sets the "retention_raw_days" field if the given value is not nil.

func (*AppConfigUpdate) SetNillableWifiSampleEnabled

func (_u *AppConfigUpdate) SetNillableWifiSampleEnabled(v *bool) *AppConfigUpdate

SetNillableWifiSampleEnabled sets the "wifi_sample_enabled" field if the given value is not nil.

func (*AppConfigUpdate) SetPingIntervalSec

func (_u *AppConfigUpdate) SetPingIntervalSec(v float64) *AppConfigUpdate

SetPingIntervalSec sets the "ping_interval_sec" field.

func (*AppConfigUpdate) SetPingTimeoutMs

func (_u *AppConfigUpdate) SetPingTimeoutMs(v int) *AppConfigUpdate

SetPingTimeoutMs sets the "ping_timeout_ms" field.

func (*AppConfigUpdate) SetRetention1minDays

func (_u *AppConfigUpdate) SetRetention1minDays(v int) *AppConfigUpdate

SetRetention1minDays sets the "retention_1min_days" field.

func (*AppConfigUpdate) SetRetention5minDays

func (_u *AppConfigUpdate) SetRetention5minDays(v int) *AppConfigUpdate

SetRetention5minDays sets the "retention_5min_days" field.

func (*AppConfigUpdate) SetRetentionRawDays

func (_u *AppConfigUpdate) SetRetentionRawDays(v int) *AppConfigUpdate

SetRetentionRawDays sets the "retention_raw_days" field.

func (*AppConfigUpdate) SetWifiSampleEnabled

func (_u *AppConfigUpdate) SetWifiSampleEnabled(v bool) *AppConfigUpdate

SetWifiSampleEnabled sets the "wifi_sample_enabled" field.

func (*AppConfigUpdate) Where

Where appends a list predicates to the AppConfigUpdate builder.

type AppConfigUpdateOne

type AppConfigUpdateOne struct {
	// contains filtered or unexported fields
}

AppConfigUpdateOne is the builder for updating a single AppConfig entity.

func (*AppConfigUpdateOne) AddFlushIntervalSec

func (_u *AppConfigUpdateOne) AddFlushIntervalSec(v int) *AppConfigUpdateOne

AddFlushIntervalSec adds value to the "flush_interval_sec" field.

func (*AppConfigUpdateOne) AddPingIntervalSec

func (_u *AppConfigUpdateOne) AddPingIntervalSec(v float64) *AppConfigUpdateOne

AddPingIntervalSec adds value to the "ping_interval_sec" field.

func (*AppConfigUpdateOne) AddPingTimeoutMs

func (_u *AppConfigUpdateOne) AddPingTimeoutMs(v int) *AppConfigUpdateOne

AddPingTimeoutMs adds value to the "ping_timeout_ms" field.

func (*AppConfigUpdateOne) AddRetention1minDays

func (_u *AppConfigUpdateOne) AddRetention1minDays(v int) *AppConfigUpdateOne

AddRetention1minDays adds value to the "retention_1min_days" field.

func (*AppConfigUpdateOne) AddRetention5minDays

func (_u *AppConfigUpdateOne) AddRetention5minDays(v int) *AppConfigUpdateOne

AddRetention5minDays adds value to the "retention_5min_days" field.

func (*AppConfigUpdateOne) AddRetentionRawDays

func (_u *AppConfigUpdateOne) AddRetentionRawDays(v int) *AppConfigUpdateOne

AddRetentionRawDays adds value to the "retention_raw_days" field.

func (*AppConfigUpdateOne) Exec

func (_u *AppConfigUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppConfigUpdateOne) ExecX

func (_u *AppConfigUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppConfigUpdateOne) Mutation

func (_u *AppConfigUpdateOne) Mutation() *AppConfigMutation

Mutation returns the AppConfigMutation object of the builder.

func (*AppConfigUpdateOne) Save

func (_u *AppConfigUpdateOne) Save(ctx context.Context) (*AppConfig, error)

Save executes the query and returns the updated AppConfig entity.

func (*AppConfigUpdateOne) SaveX

func (_u *AppConfigUpdateOne) SaveX(ctx context.Context) *AppConfig

SaveX is like Save, but panics if an error occurs.

func (*AppConfigUpdateOne) Select

func (_u *AppConfigUpdateOne) Select(field string, fields ...string) *AppConfigUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppConfigUpdateOne) SetFlushIntervalSec

func (_u *AppConfigUpdateOne) SetFlushIntervalSec(v int) *AppConfigUpdateOne

SetFlushIntervalSec sets the "flush_interval_sec" field.

func (*AppConfigUpdateOne) SetNillableFlushIntervalSec

func (_u *AppConfigUpdateOne) SetNillableFlushIntervalSec(v *int) *AppConfigUpdateOne

SetNillableFlushIntervalSec sets the "flush_interval_sec" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillablePingIntervalSec

func (_u *AppConfigUpdateOne) SetNillablePingIntervalSec(v *float64) *AppConfigUpdateOne

SetNillablePingIntervalSec sets the "ping_interval_sec" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillablePingTimeoutMs

func (_u *AppConfigUpdateOne) SetNillablePingTimeoutMs(v *int) *AppConfigUpdateOne

SetNillablePingTimeoutMs sets the "ping_timeout_ms" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillableRetention1minDays

func (_u *AppConfigUpdateOne) SetNillableRetention1minDays(v *int) *AppConfigUpdateOne

SetNillableRetention1minDays sets the "retention_1min_days" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillableRetention5minDays

func (_u *AppConfigUpdateOne) SetNillableRetention5minDays(v *int) *AppConfigUpdateOne

SetNillableRetention5minDays sets the "retention_5min_days" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillableRetentionRawDays

func (_u *AppConfigUpdateOne) SetNillableRetentionRawDays(v *int) *AppConfigUpdateOne

SetNillableRetentionRawDays sets the "retention_raw_days" field if the given value is not nil.

func (*AppConfigUpdateOne) SetNillableWifiSampleEnabled

func (_u *AppConfigUpdateOne) SetNillableWifiSampleEnabled(v *bool) *AppConfigUpdateOne

SetNillableWifiSampleEnabled sets the "wifi_sample_enabled" field if the given value is not nil.

func (*AppConfigUpdateOne) SetPingIntervalSec

func (_u *AppConfigUpdateOne) SetPingIntervalSec(v float64) *AppConfigUpdateOne

SetPingIntervalSec sets the "ping_interval_sec" field.

func (*AppConfigUpdateOne) SetPingTimeoutMs

func (_u *AppConfigUpdateOne) SetPingTimeoutMs(v int) *AppConfigUpdateOne

SetPingTimeoutMs sets the "ping_timeout_ms" field.

func (*AppConfigUpdateOne) SetRetention1minDays

func (_u *AppConfigUpdateOne) SetRetention1minDays(v int) *AppConfigUpdateOne

SetRetention1minDays sets the "retention_1min_days" field.

func (*AppConfigUpdateOne) SetRetention5minDays

func (_u *AppConfigUpdateOne) SetRetention5minDays(v int) *AppConfigUpdateOne

SetRetention5minDays sets the "retention_5min_days" field.

func (*AppConfigUpdateOne) SetRetentionRawDays

func (_u *AppConfigUpdateOne) SetRetentionRawDays(v int) *AppConfigUpdateOne

SetRetentionRawDays sets the "retention_raw_days" field.

func (*AppConfigUpdateOne) SetWifiSampleEnabled

func (_u *AppConfigUpdateOne) SetWifiSampleEnabled(v bool) *AppConfigUpdateOne

SetWifiSampleEnabled sets the "wifi_sample_enabled" field.

func (*AppConfigUpdateOne) Where

Where appends a list predicates to the AppConfigUpdate builder.

type AppConfigs

type AppConfigs []*AppConfig

AppConfigs is a parsable slice of AppConfig.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AppConfig is the client for interacting with the AppConfig builders.
	AppConfig *AppConfigClient
	// Outage is the client for interacting with the Outage builders.
	Outage *OutageClient
	// Sample is the client for interacting with the Sample builders.
	Sample *SampleClient
	// Sample1h is the client for interacting with the Sample1h builders.
	Sample1h *Sample1hClient
	// Sample1min is the client for interacting with the Sample1min builders.
	Sample1min *Sample1minClient
	// Sample5min is the client for interacting with the Sample5min builders.
	Sample5min *Sample5minClient
	// Target is the client for interacting with the Target builders.
	Target *TargetClient
	// WifiSample is the client for interacting with the WifiSample builders.
	WifiSample *WifiSampleClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	AppConfig.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Outage

type Outage struct {

	// ID of the ent.
	// UUID set at creation
	ID string `json:"id,omitempty"`
	// 'network' or 'target:<label>'
	Scope string `json:"scope,omitempty"`
	// StartTsUnixMs holds the value of the "start_ts_unix_ms" field.
	StartTsUnixMs int64 `json:"start_ts_unix_ms,omitempty"`
	// Null while ongoing
	EndTsUnixMs *int64 `json:"end_ts_unix_ms,omitempty"`
	// ConsecutiveFailures holds the value of the "consecutive_failures" field.
	ConsecutiveFailures int `json:"consecutive_failures,omitempty"`
	// Error code → count across the failure run
	Errors map[string]int `json:"errors,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Outage is the model entity for the Outage schema.

func (*Outage) String

func (_m *Outage) String() string

String implements the fmt.Stringer.

func (*Outage) Unwrap

func (_m *Outage) Unwrap() *Outage

Unwrap unwraps the Outage 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 (*Outage) Update

func (_m *Outage) Update() *OutageUpdateOne

Update returns a builder for updating this Outage. Note that you need to call Outage.Unwrap() before calling this method if this Outage was returned from a transaction, and the transaction was committed or rolled back.

func (*Outage) Value

func (_m *Outage) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Outage. This includes values selected through modifiers, order, etc.

type OutageClient

type OutageClient struct {
	// contains filtered or unexported fields
}

OutageClient is a client for the Outage schema.

func NewOutageClient

func NewOutageClient(c config) *OutageClient

NewOutageClient returns a client for the Outage from the given config.

func (*OutageClient) Create

func (c *OutageClient) Create() *OutageCreate

Create returns a builder for creating a Outage entity.

func (*OutageClient) CreateBulk

func (c *OutageClient) CreateBulk(builders ...*OutageCreate) *OutageCreateBulk

CreateBulk returns a builder for creating a bulk of Outage entities.

func (*OutageClient) Delete

func (c *OutageClient) Delete() *OutageDelete

Delete returns a delete builder for Outage.

func (*OutageClient) DeleteOne

func (c *OutageClient) DeleteOne(_m *Outage) *OutageDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OutageClient) DeleteOneID

func (c *OutageClient) DeleteOneID(id string) *OutageDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OutageClient) Get

func (c *OutageClient) Get(ctx context.Context, id string) (*Outage, error)

Get returns a Outage entity by its id.

func (*OutageClient) GetX

func (c *OutageClient) GetX(ctx context.Context, id string) *Outage

GetX is like Get, but panics if an error occurs.

func (*OutageClient) Hooks

func (c *OutageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OutageClient) Intercept

func (c *OutageClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `outage.Intercept(f(g(h())))`.

func (*OutageClient) Interceptors

func (c *OutageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OutageClient) MapCreateBulk

func (c *OutageClient) MapCreateBulk(slice any, setFunc func(*OutageCreate, int)) *OutageCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OutageClient) Query

func (c *OutageClient) Query() *OutageQuery

Query returns a query builder for Outage.

func (*OutageClient) Update

func (c *OutageClient) Update() *OutageUpdate

Update returns an update builder for Outage.

func (*OutageClient) UpdateOne

func (c *OutageClient) UpdateOne(_m *Outage) *OutageUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OutageClient) UpdateOneID

func (c *OutageClient) UpdateOneID(id string) *OutageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OutageClient) Use

func (c *OutageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `outage.Hooks(f(g(h())))`.

type OutageCreate

type OutageCreate struct {
	// contains filtered or unexported fields
}

OutageCreate is the builder for creating a Outage entity.

func (*OutageCreate) Exec

func (_c *OutageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OutageCreate) ExecX

func (_c *OutageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutageCreate) Mutation

func (_c *OutageCreate) Mutation() *OutageMutation

Mutation returns the OutageMutation object of the builder.

func (*OutageCreate) Save

func (_c *OutageCreate) Save(ctx context.Context) (*Outage, error)

Save creates the Outage in the database.

func (*OutageCreate) SaveX

func (_c *OutageCreate) SaveX(ctx context.Context) *Outage

SaveX calls Save and panics if Save returns an error.

func (*OutageCreate) SetConsecutiveFailures

func (_c *OutageCreate) SetConsecutiveFailures(v int) *OutageCreate

SetConsecutiveFailures sets the "consecutive_failures" field.

func (*OutageCreate) SetCreatedAt

func (_c *OutageCreate) SetCreatedAt(v time.Time) *OutageCreate

SetCreatedAt sets the "created_at" field.

func (*OutageCreate) SetEndTsUnixMs

func (_c *OutageCreate) SetEndTsUnixMs(v int64) *OutageCreate

SetEndTsUnixMs sets the "end_ts_unix_ms" field.

func (*OutageCreate) SetErrors

func (_c *OutageCreate) SetErrors(v map[string]int) *OutageCreate

SetErrors sets the "errors" field.

func (*OutageCreate) SetID

func (_c *OutageCreate) SetID(v string) *OutageCreate

SetID sets the "id" field.

func (*OutageCreate) SetNillableCreatedAt

func (_c *OutageCreate) SetNillableCreatedAt(v *time.Time) *OutageCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OutageCreate) SetNillableEndTsUnixMs

func (_c *OutageCreate) SetNillableEndTsUnixMs(v *int64) *OutageCreate

SetNillableEndTsUnixMs sets the "end_ts_unix_ms" field if the given value is not nil.

func (*OutageCreate) SetScope

func (_c *OutageCreate) SetScope(v string) *OutageCreate

SetScope sets the "scope" field.

func (*OutageCreate) SetStartTsUnixMs

func (_c *OutageCreate) SetStartTsUnixMs(v int64) *OutageCreate

SetStartTsUnixMs sets the "start_ts_unix_ms" field.

type OutageCreateBulk

type OutageCreateBulk struct {
	// contains filtered or unexported fields
}

OutageCreateBulk is the builder for creating many Outage entities in bulk.

func (*OutageCreateBulk) Exec

func (_c *OutageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OutageCreateBulk) ExecX

func (_c *OutageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutageCreateBulk) Save

func (_c *OutageCreateBulk) Save(ctx context.Context) ([]*Outage, error)

Save creates the Outage entities in the database.

func (*OutageCreateBulk) SaveX

func (_c *OutageCreateBulk) SaveX(ctx context.Context) []*Outage

SaveX is like Save, but panics if an error occurs.

type OutageDelete

type OutageDelete struct {
	// contains filtered or unexported fields
}

OutageDelete is the builder for deleting a Outage entity.

func (*OutageDelete) Exec

func (_d *OutageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OutageDelete) ExecX

func (_d *OutageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OutageDelete) Where

func (_d *OutageDelete) Where(ps ...predicate.Outage) *OutageDelete

Where appends a list predicates to the OutageDelete builder.

type OutageDeleteOne

type OutageDeleteOne struct {
	// contains filtered or unexported fields
}

OutageDeleteOne is the builder for deleting a single Outage entity.

func (*OutageDeleteOne) Exec

func (_d *OutageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OutageDeleteOne) ExecX

func (_d *OutageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutageDeleteOne) Where

func (_d *OutageDeleteOne) Where(ps ...predicate.Outage) *OutageDeleteOne

Where appends a list predicates to the OutageDelete builder.

type OutageGroupBy

type OutageGroupBy struct {
	// contains filtered or unexported fields
}

OutageGroupBy is the group-by builder for Outage entities.

func (*OutageGroupBy) Aggregate

func (_g *OutageGroupBy) Aggregate(fns ...AggregateFunc) *OutageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OutageGroupBy) Bool

func (s *OutageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) BoolX

func (s *OutageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OutageGroupBy) Bools

func (s *OutageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) BoolsX

func (s *OutageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OutageGroupBy) Float64

func (s *OutageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) Float64X

func (s *OutageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OutageGroupBy) Float64s

func (s *OutageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) Float64sX

func (s *OutageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OutageGroupBy) Int

func (s *OutageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) IntX

func (s *OutageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OutageGroupBy) Ints

func (s *OutageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) IntsX

func (s *OutageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OutageGroupBy) Scan

func (_g *OutageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OutageGroupBy) ScanX

func (s *OutageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OutageGroupBy) String

func (s *OutageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) StringX

func (s *OutageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OutageGroupBy) Strings

func (s *OutageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OutageGroupBy) StringsX

func (s *OutageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OutageMutation

type OutageMutation struct {
	// contains filtered or unexported fields
}

OutageMutation represents an operation that mutates the Outage nodes in the graph.

func (*OutageMutation) AddConsecutiveFailures

func (m *OutageMutation) AddConsecutiveFailures(i int)

AddConsecutiveFailures adds i to the "consecutive_failures" field.

func (*OutageMutation) AddEndTsUnixMs

func (m *OutageMutation) AddEndTsUnixMs(i int64)

AddEndTsUnixMs adds i to the "end_ts_unix_ms" field.

func (*OutageMutation) AddField

func (m *OutageMutation) 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 (*OutageMutation) AddStartTsUnixMs

func (m *OutageMutation) AddStartTsUnixMs(i int64)

AddStartTsUnixMs adds i to the "start_ts_unix_ms" field.

func (*OutageMutation) AddedConsecutiveFailures

func (m *OutageMutation) AddedConsecutiveFailures() (r int, exists bool)

AddedConsecutiveFailures returns the value that was added to the "consecutive_failures" field in this mutation.

func (*OutageMutation) AddedEdges

func (m *OutageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OutageMutation) AddedEndTsUnixMs

func (m *OutageMutation) AddedEndTsUnixMs() (r int64, exists bool)

AddedEndTsUnixMs returns the value that was added to the "end_ts_unix_ms" field in this mutation.

func (*OutageMutation) AddedField

func (m *OutageMutation) 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 (*OutageMutation) AddedFields

func (m *OutageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OutageMutation) AddedIDs

func (m *OutageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OutageMutation) AddedStartTsUnixMs

func (m *OutageMutation) AddedStartTsUnixMs() (r int64, exists bool)

AddedStartTsUnixMs returns the value that was added to the "start_ts_unix_ms" field in this mutation.

func (*OutageMutation) ClearEdge

func (m *OutageMutation) 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 (*OutageMutation) ClearEndTsUnixMs

func (m *OutageMutation) ClearEndTsUnixMs()

ClearEndTsUnixMs clears the value of the "end_ts_unix_ms" field.

func (*OutageMutation) ClearErrors

func (m *OutageMutation) ClearErrors()

ClearErrors clears the value of the "errors" field.

func (*OutageMutation) ClearField

func (m *OutageMutation) 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 (*OutageMutation) ClearedEdges

func (m *OutageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OutageMutation) ClearedFields

func (m *OutageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OutageMutation) Client

func (m OutageMutation) 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 (*OutageMutation) ConsecutiveFailures

func (m *OutageMutation) ConsecutiveFailures() (r int, exists bool)

ConsecutiveFailures returns the value of the "consecutive_failures" field in the mutation.

func (*OutageMutation) CreatedAt

func (m *OutageMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OutageMutation) EdgeCleared

func (m *OutageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OutageMutation) EndTsUnixMs

func (m *OutageMutation) EndTsUnixMs() (r int64, exists bool)

EndTsUnixMs returns the value of the "end_ts_unix_ms" field in the mutation.

func (*OutageMutation) EndTsUnixMsCleared

func (m *OutageMutation) EndTsUnixMsCleared() bool

EndTsUnixMsCleared returns if the "end_ts_unix_ms" field was cleared in this mutation.

func (*OutageMutation) Errors

func (m *OutageMutation) Errors() (r map[string]int, exists bool)

Errors returns the value of the "errors" field in the mutation.

func (*OutageMutation) ErrorsCleared

func (m *OutageMutation) ErrorsCleared() bool

ErrorsCleared returns if the "errors" field was cleared in this mutation.

func (*OutageMutation) Field

func (m *OutageMutation) 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 (*OutageMutation) FieldCleared

func (m *OutageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OutageMutation) Fields

func (m *OutageMutation) 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 (*OutageMutation) ID

func (m *OutageMutation) ID() (id string, 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 (*OutageMutation) IDs

func (m *OutageMutation) IDs(ctx context.Context) ([]string, 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 (*OutageMutation) OldConsecutiveFailures

func (m *OutageMutation) OldConsecutiveFailures(ctx context.Context) (v int, err error)

OldConsecutiveFailures returns the old "consecutive_failures" field's value of the Outage entity. If the Outage 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 (*OutageMutation) OldCreatedAt

func (m *OutageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Outage entity. If the Outage 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 (*OutageMutation) OldEndTsUnixMs

func (m *OutageMutation) OldEndTsUnixMs(ctx context.Context) (v *int64, err error)

OldEndTsUnixMs returns the old "end_ts_unix_ms" field's value of the Outage entity. If the Outage 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 (*OutageMutation) OldErrors

func (m *OutageMutation) OldErrors(ctx context.Context) (v map[string]int, err error)

OldErrors returns the old "errors" field's value of the Outage entity. If the Outage 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 (*OutageMutation) OldField

func (m *OutageMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*OutageMutation) OldScope

func (m *OutageMutation) OldScope(ctx context.Context) (v string, err error)

OldScope returns the old "scope" field's value of the Outage entity. If the Outage 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 (*OutageMutation) OldStartTsUnixMs

func (m *OutageMutation) OldStartTsUnixMs(ctx context.Context) (v int64, err error)

OldStartTsUnixMs returns the old "start_ts_unix_ms" field's value of the Outage entity. If the Outage 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 (*OutageMutation) Op

func (m *OutageMutation) Op() Op

Op returns the operation name.

func (*OutageMutation) RemovedEdges

func (m *OutageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OutageMutation) RemovedIDs

func (m *OutageMutation) 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 (*OutageMutation) ResetConsecutiveFailures

func (m *OutageMutation) ResetConsecutiveFailures()

ResetConsecutiveFailures resets all changes to the "consecutive_failures" field.

func (*OutageMutation) ResetCreatedAt

func (m *OutageMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OutageMutation) ResetEdge

func (m *OutageMutation) 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 (*OutageMutation) ResetEndTsUnixMs

func (m *OutageMutation) ResetEndTsUnixMs()

ResetEndTsUnixMs resets all changes to the "end_ts_unix_ms" field.

func (*OutageMutation) ResetErrors

func (m *OutageMutation) ResetErrors()

ResetErrors resets all changes to the "errors" field.

func (*OutageMutation) ResetField

func (m *OutageMutation) 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 (*OutageMutation) ResetScope

func (m *OutageMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*OutageMutation) ResetStartTsUnixMs

func (m *OutageMutation) ResetStartTsUnixMs()

ResetStartTsUnixMs resets all changes to the "start_ts_unix_ms" field.

func (*OutageMutation) Scope

func (m *OutageMutation) Scope() (r string, exists bool)

Scope returns the value of the "scope" field in the mutation.

func (*OutageMutation) SetConsecutiveFailures

func (m *OutageMutation) SetConsecutiveFailures(i int)

SetConsecutiveFailures sets the "consecutive_failures" field.

func (*OutageMutation) SetCreatedAt

func (m *OutageMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OutageMutation) SetEndTsUnixMs

func (m *OutageMutation) SetEndTsUnixMs(i int64)

SetEndTsUnixMs sets the "end_ts_unix_ms" field.

func (*OutageMutation) SetErrors

func (m *OutageMutation) SetErrors(value map[string]int)

SetErrors sets the "errors" field.

func (*OutageMutation) SetField

func (m *OutageMutation) 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 (*OutageMutation) SetID

func (m *OutageMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Outage entities.

func (*OutageMutation) SetOp

func (m *OutageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OutageMutation) SetScope

func (m *OutageMutation) SetScope(s string)

SetScope sets the "scope" field.

func (*OutageMutation) SetStartTsUnixMs

func (m *OutageMutation) SetStartTsUnixMs(i int64)

SetStartTsUnixMs sets the "start_ts_unix_ms" field.

func (*OutageMutation) StartTsUnixMs

func (m *OutageMutation) StartTsUnixMs() (r int64, exists bool)

StartTsUnixMs returns the value of the "start_ts_unix_ms" field in the mutation.

func (OutageMutation) Tx

func (m OutageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OutageMutation) Type

func (m *OutageMutation) Type() string

Type returns the node type of this mutation (Outage).

func (*OutageMutation) Where

func (m *OutageMutation) Where(ps ...predicate.Outage)

Where appends a list predicates to the OutageMutation builder.

func (*OutageMutation) WhereP

func (m *OutageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OutageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OutageQuery

type OutageQuery struct {
	// contains filtered or unexported fields
}

OutageQuery is the builder for querying Outage entities.

func (*OutageQuery) Aggregate

func (_q *OutageQuery) Aggregate(fns ...AggregateFunc) *OutageSelect

Aggregate returns a OutageSelect configured with the given aggregations.

func (*OutageQuery) All

func (_q *OutageQuery) All(ctx context.Context) ([]*Outage, error)

All executes the query and returns a list of Outages.

func (*OutageQuery) AllX

func (_q *OutageQuery) AllX(ctx context.Context) []*Outage

AllX is like All, but panics if an error occurs.

func (*OutageQuery) Clone

func (_q *OutageQuery) Clone() *OutageQuery

Clone returns a duplicate of the OutageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OutageQuery) Count

func (_q *OutageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OutageQuery) CountX

func (_q *OutageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OutageQuery) Exist

func (_q *OutageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OutageQuery) ExistX

func (_q *OutageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OutageQuery) First

func (_q *OutageQuery) First(ctx context.Context) (*Outage, error)

First returns the first Outage entity from the query. Returns a *NotFoundError when no Outage was found.

func (*OutageQuery) FirstID

func (_q *OutageQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Outage ID from the query. Returns a *NotFoundError when no Outage ID was found.

func (*OutageQuery) FirstIDX

func (_q *OutageQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*OutageQuery) FirstX

func (_q *OutageQuery) FirstX(ctx context.Context) *Outage

FirstX is like First, but panics if an error occurs.

func (*OutageQuery) GroupBy

func (_q *OutageQuery) GroupBy(field string, fields ...string) *OutageGroupBy

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 {
	Scope string `json:"scope,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Outage.Query().
	GroupBy(outage.FieldScope).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OutageQuery) IDs

func (_q *OutageQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Outage IDs.

func (*OutageQuery) IDsX

func (_q *OutageQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*OutageQuery) Limit

func (_q *OutageQuery) Limit(limit int) *OutageQuery

Limit the number of records to be returned by this query.

func (*OutageQuery) Offset

func (_q *OutageQuery) Offset(offset int) *OutageQuery

Offset to start from.

func (*OutageQuery) Only

func (_q *OutageQuery) Only(ctx context.Context) (*Outage, error)

Only returns a single Outage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Outage entity is found. Returns a *NotFoundError when no Outage entities are found.

func (*OutageQuery) OnlyID

func (_q *OutageQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Outage ID in the query. Returns a *NotSingularError when more than one Outage ID is found. Returns a *NotFoundError when no entities are found.

func (*OutageQuery) OnlyIDX

func (_q *OutageQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OutageQuery) OnlyX

func (_q *OutageQuery) OnlyX(ctx context.Context) *Outage

OnlyX is like Only, but panics if an error occurs.

func (*OutageQuery) Order

func (_q *OutageQuery) Order(o ...outage.OrderOption) *OutageQuery

Order specifies how the records should be ordered.

func (*OutageQuery) Select

func (_q *OutageQuery) Select(fields ...string) *OutageSelect

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 {
	Scope string `json:"scope,omitempty"`
}

client.Outage.Query().
	Select(outage.FieldScope).
	Scan(ctx, &v)

func (*OutageQuery) Unique

func (_q *OutageQuery) Unique(unique bool) *OutageQuery

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 (*OutageQuery) Where

func (_q *OutageQuery) Where(ps ...predicate.Outage) *OutageQuery

Where adds a new predicate for the OutageQuery builder.

type OutageSelect

type OutageSelect struct {
	*OutageQuery
	// contains filtered or unexported fields
}

OutageSelect is the builder for selecting fields of Outage entities.

func (*OutageSelect) Aggregate

func (_s *OutageSelect) Aggregate(fns ...AggregateFunc) *OutageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OutageSelect) Bool

func (s *OutageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OutageSelect) BoolX

func (s *OutageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OutageSelect) Bools

func (s *OutageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OutageSelect) BoolsX

func (s *OutageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OutageSelect) Float64

func (s *OutageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OutageSelect) Float64X

func (s *OutageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OutageSelect) Float64s

func (s *OutageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OutageSelect) Float64sX

func (s *OutageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OutageSelect) Int

func (s *OutageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OutageSelect) IntX

func (s *OutageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OutageSelect) Ints

func (s *OutageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OutageSelect) IntsX

func (s *OutageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OutageSelect) Scan

func (_s *OutageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OutageSelect) ScanX

func (s *OutageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OutageSelect) String

func (s *OutageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OutageSelect) StringX

func (s *OutageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OutageSelect) Strings

func (s *OutageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OutageSelect) StringsX

func (s *OutageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OutageUpdate

type OutageUpdate struct {
	// contains filtered or unexported fields
}

OutageUpdate is the builder for updating Outage entities.

func (*OutageUpdate) AddConsecutiveFailures

func (_u *OutageUpdate) AddConsecutiveFailures(v int) *OutageUpdate

AddConsecutiveFailures adds value to the "consecutive_failures" field.

func (*OutageUpdate) AddEndTsUnixMs

func (_u *OutageUpdate) AddEndTsUnixMs(v int64) *OutageUpdate

AddEndTsUnixMs adds value to the "end_ts_unix_ms" field.

func (*OutageUpdate) AddStartTsUnixMs

func (_u *OutageUpdate) AddStartTsUnixMs(v int64) *OutageUpdate

AddStartTsUnixMs adds value to the "start_ts_unix_ms" field.

func (*OutageUpdate) ClearEndTsUnixMs

func (_u *OutageUpdate) ClearEndTsUnixMs() *OutageUpdate

ClearEndTsUnixMs clears the value of the "end_ts_unix_ms" field.

func (*OutageUpdate) ClearErrors

func (_u *OutageUpdate) ClearErrors() *OutageUpdate

ClearErrors clears the value of the "errors" field.

func (*OutageUpdate) Exec

func (_u *OutageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OutageUpdate) ExecX

func (_u *OutageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutageUpdate) Mutation

func (_u *OutageUpdate) Mutation() *OutageMutation

Mutation returns the OutageMutation object of the builder.

func (*OutageUpdate) Save

func (_u *OutageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OutageUpdate) SaveX

func (_u *OutageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OutageUpdate) SetConsecutiveFailures

func (_u *OutageUpdate) SetConsecutiveFailures(v int) *OutageUpdate

SetConsecutiveFailures sets the "consecutive_failures" field.

func (*OutageUpdate) SetEndTsUnixMs

func (_u *OutageUpdate) SetEndTsUnixMs(v int64) *OutageUpdate

SetEndTsUnixMs sets the "end_ts_unix_ms" field.

func (*OutageUpdate) SetErrors

func (_u *OutageUpdate) SetErrors(v map[string]int) *OutageUpdate

SetErrors sets the "errors" field.

func (*OutageUpdate) SetNillableConsecutiveFailures

func (_u *OutageUpdate) SetNillableConsecutiveFailures(v *int) *OutageUpdate

SetNillableConsecutiveFailures sets the "consecutive_failures" field if the given value is not nil.

func (*OutageUpdate) SetNillableEndTsUnixMs

func (_u *OutageUpdate) SetNillableEndTsUnixMs(v *int64) *OutageUpdate

SetNillableEndTsUnixMs sets the "end_ts_unix_ms" field if the given value is not nil.

func (*OutageUpdate) SetNillableScope

func (_u *OutageUpdate) SetNillableScope(v *string) *OutageUpdate

SetNillableScope sets the "scope" field if the given value is not nil.

func (*OutageUpdate) SetNillableStartTsUnixMs

func (_u *OutageUpdate) SetNillableStartTsUnixMs(v *int64) *OutageUpdate

SetNillableStartTsUnixMs sets the "start_ts_unix_ms" field if the given value is not nil.

func (*OutageUpdate) SetScope

func (_u *OutageUpdate) SetScope(v string) *OutageUpdate

SetScope sets the "scope" field.

func (*OutageUpdate) SetStartTsUnixMs

func (_u *OutageUpdate) SetStartTsUnixMs(v int64) *OutageUpdate

SetStartTsUnixMs sets the "start_ts_unix_ms" field.

func (*OutageUpdate) Where

func (_u *OutageUpdate) Where(ps ...predicate.Outage) *OutageUpdate

Where appends a list predicates to the OutageUpdate builder.

type OutageUpdateOne

type OutageUpdateOne struct {
	// contains filtered or unexported fields
}

OutageUpdateOne is the builder for updating a single Outage entity.

func (*OutageUpdateOne) AddConsecutiveFailures

func (_u *OutageUpdateOne) AddConsecutiveFailures(v int) *OutageUpdateOne

AddConsecutiveFailures adds value to the "consecutive_failures" field.

func (*OutageUpdateOne) AddEndTsUnixMs

func (_u *OutageUpdateOne) AddEndTsUnixMs(v int64) *OutageUpdateOne

AddEndTsUnixMs adds value to the "end_ts_unix_ms" field.

func (*OutageUpdateOne) AddStartTsUnixMs

func (_u *OutageUpdateOne) AddStartTsUnixMs(v int64) *OutageUpdateOne

AddStartTsUnixMs adds value to the "start_ts_unix_ms" field.

func (*OutageUpdateOne) ClearEndTsUnixMs

func (_u *OutageUpdateOne) ClearEndTsUnixMs() *OutageUpdateOne

ClearEndTsUnixMs clears the value of the "end_ts_unix_ms" field.

func (*OutageUpdateOne) ClearErrors

func (_u *OutageUpdateOne) ClearErrors() *OutageUpdateOne

ClearErrors clears the value of the "errors" field.

func (*OutageUpdateOne) Exec

func (_u *OutageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OutageUpdateOne) ExecX

func (_u *OutageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutageUpdateOne) Mutation

func (_u *OutageUpdateOne) Mutation() *OutageMutation

Mutation returns the OutageMutation object of the builder.

func (*OutageUpdateOne) Save

func (_u *OutageUpdateOne) Save(ctx context.Context) (*Outage, error)

Save executes the query and returns the updated Outage entity.

func (*OutageUpdateOne) SaveX

func (_u *OutageUpdateOne) SaveX(ctx context.Context) *Outage

SaveX is like Save, but panics if an error occurs.

func (*OutageUpdateOne) Select

func (_u *OutageUpdateOne) Select(field string, fields ...string) *OutageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OutageUpdateOne) SetConsecutiveFailures

func (_u *OutageUpdateOne) SetConsecutiveFailures(v int) *OutageUpdateOne

SetConsecutiveFailures sets the "consecutive_failures" field.

func (*OutageUpdateOne) SetEndTsUnixMs

func (_u *OutageUpdateOne) SetEndTsUnixMs(v int64) *OutageUpdateOne

SetEndTsUnixMs sets the "end_ts_unix_ms" field.

func (*OutageUpdateOne) SetErrors

func (_u *OutageUpdateOne) SetErrors(v map[string]int) *OutageUpdateOne

SetErrors sets the "errors" field.

func (*OutageUpdateOne) SetNillableConsecutiveFailures

func (_u *OutageUpdateOne) SetNillableConsecutiveFailures(v *int) *OutageUpdateOne

SetNillableConsecutiveFailures sets the "consecutive_failures" field if the given value is not nil.

func (*OutageUpdateOne) SetNillableEndTsUnixMs

func (_u *OutageUpdateOne) SetNillableEndTsUnixMs(v *int64) *OutageUpdateOne

SetNillableEndTsUnixMs sets the "end_ts_unix_ms" field if the given value is not nil.

func (*OutageUpdateOne) SetNillableScope

func (_u *OutageUpdateOne) SetNillableScope(v *string) *OutageUpdateOne

SetNillableScope sets the "scope" field if the given value is not nil.

func (*OutageUpdateOne) SetNillableStartTsUnixMs

func (_u *OutageUpdateOne) SetNillableStartTsUnixMs(v *int64) *OutageUpdateOne

SetNillableStartTsUnixMs sets the "start_ts_unix_ms" field if the given value is not nil.

func (*OutageUpdateOne) SetScope

func (_u *OutageUpdateOne) SetScope(v string) *OutageUpdateOne

SetScope sets the "scope" field.

func (*OutageUpdateOne) SetStartTsUnixMs

func (_u *OutageUpdateOne) SetStartTsUnixMs(v int64) *OutageUpdateOne

SetStartTsUnixMs sets the "start_ts_unix_ms" field.

func (*OutageUpdateOne) Where

func (_u *OutageUpdateOne) Where(ps ...predicate.Outage) *OutageUpdateOne

Where appends a list predicates to the OutageUpdate builder.

type Outages

type Outages []*Outage

Outages is a parsable slice of Outage.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Sample

type Sample struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Probe timestamp, milliseconds since unix epoch
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
	// TargetLabel holds the value of the "target_label" field.
	TargetLabel string `json:"target_label,omitempty"`
	// TargetKind holds the value of the "target_kind" field.
	TargetKind string `json:"target_kind,omitempty"`
	// TargetHost holds the value of the "target_host" field.
	TargetHost string `json:"target_host,omitempty"`
	// TargetPort holds the value of the "target_port" field.
	TargetPort *int `json:"target_port,omitempty"`
	// Success holds the value of the "success" field.
	Success bool `json:"success,omitempty"`
	// Round-trip time, only set when success=true
	RttMs *float64 `json:"rtt_ms,omitempty"`
	// Stable machine-readable error code: timeout, host_unreachable, dns, conn_refused, etc.
	Error *string `json:"error,omitempty"`
	// contains filtered or unexported fields
}

Sample is the model entity for the Sample schema.

func (*Sample) String

func (_m *Sample) String() string

String implements the fmt.Stringer.

func (*Sample) Unwrap

func (_m *Sample) Unwrap() *Sample

Unwrap unwraps the Sample 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 (*Sample) Update

func (_m *Sample) Update() *SampleUpdateOne

Update returns a builder for updating this Sample. Note that you need to call Sample.Unwrap() before calling this method if this Sample was returned from a transaction, and the transaction was committed or rolled back.

func (*Sample) Value

func (_m *Sample) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Sample. This includes values selected through modifiers, order, etc.

type Sample1h

type Sample1h struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Unix-ms of the 1-hour window start, multiple of 3_600_000
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	// TargetLabel holds the value of the "target_label" field.
	TargetLabel string `json:"target_label,omitempty"`
	// Count holds the value of the "count" field.
	Count int `json:"count,omitempty"`
	// SuccessCount holds the value of the "success_count" field.
	SuccessCount int `json:"success_count,omitempty"`
	// FailCount holds the value of the "fail_count" field.
	FailCount int `json:"fail_count,omitempty"`
	// RttP50Ms holds the value of the "rtt_p50_ms" field.
	RttP50Ms *float64 `json:"rtt_p50_ms,omitempty"`
	// RttP95Ms holds the value of the "rtt_p95_ms" field.
	RttP95Ms *float64 `json:"rtt_p95_ms,omitempty"`
	// RttP99Ms holds the value of the "rtt_p99_ms" field.
	RttP99Ms *float64 `json:"rtt_p99_ms,omitempty"`
	// RttMaxMs holds the value of the "rtt_max_ms" field.
	RttMaxMs *float64 `json:"rtt_max_ms,omitempty"`
	// RttMeanMs holds the value of the "rtt_mean_ms" field.
	RttMeanMs *float64 `json:"rtt_mean_ms,omitempty"`
	// JitterMs holds the value of the "jitter_ms" field.
	JitterMs *float64 `json:"jitter_ms,omitempty"`
	// Errors holds the value of the "errors" field.
	Errors map[string]int `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

Sample1h is the model entity for the Sample1h schema.

func (*Sample1h) String

func (_m *Sample1h) String() string

String implements the fmt.Stringer.

func (*Sample1h) Unwrap

func (_m *Sample1h) Unwrap() *Sample1h

Unwrap unwraps the Sample1h 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 (*Sample1h) Update

func (_m *Sample1h) Update() *Sample1hUpdateOne

Update returns a builder for updating this Sample1h. Note that you need to call Sample1h.Unwrap() before calling this method if this Sample1h was returned from a transaction, and the transaction was committed or rolled back.

func (*Sample1h) Value

func (_m *Sample1h) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Sample1h. This includes values selected through modifiers, order, etc.

type Sample1hClient

type Sample1hClient struct {
	// contains filtered or unexported fields
}

Sample1hClient is a client for the Sample1h schema.

func NewSample1hClient

func NewSample1hClient(c config) *Sample1hClient

NewSample1hClient returns a client for the Sample1h from the given config.

func (*Sample1hClient) Create

func (c *Sample1hClient) Create() *Sample1hCreate

Create returns a builder for creating a Sample1h entity.

func (*Sample1hClient) CreateBulk

func (c *Sample1hClient) CreateBulk(builders ...*Sample1hCreate) *Sample1hCreateBulk

CreateBulk returns a builder for creating a bulk of Sample1h entities.

func (*Sample1hClient) Delete

func (c *Sample1hClient) Delete() *Sample1hDelete

Delete returns a delete builder for Sample1h.

func (*Sample1hClient) DeleteOne

func (c *Sample1hClient) DeleteOne(_m *Sample1h) *Sample1hDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Sample1hClient) DeleteOneID

func (c *Sample1hClient) DeleteOneID(id int) *Sample1hDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*Sample1hClient) Get

func (c *Sample1hClient) Get(ctx context.Context, id int) (*Sample1h, error)

Get returns a Sample1h entity by its id.

func (*Sample1hClient) GetX

func (c *Sample1hClient) GetX(ctx context.Context, id int) *Sample1h

GetX is like Get, but panics if an error occurs.

func (*Sample1hClient) Hooks

func (c *Sample1hClient) Hooks() []Hook

Hooks returns the client hooks.

func (*Sample1hClient) Intercept

func (c *Sample1hClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sample1h.Intercept(f(g(h())))`.

func (*Sample1hClient) Interceptors

func (c *Sample1hClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*Sample1hClient) MapCreateBulk

func (c *Sample1hClient) MapCreateBulk(slice any, setFunc func(*Sample1hCreate, int)) *Sample1hCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*Sample1hClient) Query

func (c *Sample1hClient) Query() *Sample1hQuery

Query returns a query builder for Sample1h.

func (*Sample1hClient) Update

func (c *Sample1hClient) Update() *Sample1hUpdate

Update returns an update builder for Sample1h.

func (*Sample1hClient) UpdateOne

func (c *Sample1hClient) UpdateOne(_m *Sample1h) *Sample1hUpdateOne

UpdateOne returns an update builder for the given entity.

func (*Sample1hClient) UpdateOneID

func (c *Sample1hClient) UpdateOneID(id int) *Sample1hUpdateOne

UpdateOneID returns an update builder for the given id.

func (*Sample1hClient) Use

func (c *Sample1hClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sample1h.Hooks(f(g(h())))`.

type Sample1hCreate

type Sample1hCreate struct {
	// contains filtered or unexported fields
}

Sample1hCreate is the builder for creating a Sample1h entity.

func (*Sample1hCreate) Exec

func (_c *Sample1hCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1hCreate) ExecX

func (_c *Sample1hCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hCreate) Mutation

func (_c *Sample1hCreate) Mutation() *Sample1hMutation

Mutation returns the Sample1hMutation object of the builder.

func (*Sample1hCreate) Save

func (_c *Sample1hCreate) Save(ctx context.Context) (*Sample1h, error)

Save creates the Sample1h in the database.

func (*Sample1hCreate) SaveX

func (_c *Sample1hCreate) SaveX(ctx context.Context) *Sample1h

SaveX calls Save and panics if Save returns an error.

func (*Sample1hCreate) SetBucketStartUnixMs

func (_c *Sample1hCreate) SetBucketStartUnixMs(v int64) *Sample1hCreate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1hCreate) SetCount

func (_c *Sample1hCreate) SetCount(v int) *Sample1hCreate

SetCount sets the "count" field.

func (*Sample1hCreate) SetErrors

func (_c *Sample1hCreate) SetErrors(v map[string]int) *Sample1hCreate

SetErrors sets the "errors" field.

func (*Sample1hCreate) SetFailCount

func (_c *Sample1hCreate) SetFailCount(v int) *Sample1hCreate

SetFailCount sets the "fail_count" field.

func (*Sample1hCreate) SetJitterMs

func (_c *Sample1hCreate) SetJitterMs(v float64) *Sample1hCreate

SetJitterMs sets the "jitter_ms" field.

func (*Sample1hCreate) SetNillableJitterMs

func (_c *Sample1hCreate) SetNillableJitterMs(v *float64) *Sample1hCreate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1hCreate) SetNillableRttMaxMs

func (_c *Sample1hCreate) SetNillableRttMaxMs(v *float64) *Sample1hCreate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1hCreate) SetNillableRttMeanMs

func (_c *Sample1hCreate) SetNillableRttMeanMs(v *float64) *Sample1hCreate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1hCreate) SetNillableRttP50Ms

func (_c *Sample1hCreate) SetNillableRttP50Ms(v *float64) *Sample1hCreate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1hCreate) SetNillableRttP95Ms

func (_c *Sample1hCreate) SetNillableRttP95Ms(v *float64) *Sample1hCreate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1hCreate) SetNillableRttP99Ms

func (_c *Sample1hCreate) SetNillableRttP99Ms(v *float64) *Sample1hCreate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1hCreate) SetRttMaxMs

func (_c *Sample1hCreate) SetRttMaxMs(v float64) *Sample1hCreate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1hCreate) SetRttMeanMs

func (_c *Sample1hCreate) SetRttMeanMs(v float64) *Sample1hCreate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1hCreate) SetRttP50Ms

func (_c *Sample1hCreate) SetRttP50Ms(v float64) *Sample1hCreate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1hCreate) SetRttP95Ms

func (_c *Sample1hCreate) SetRttP95Ms(v float64) *Sample1hCreate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1hCreate) SetRttP99Ms

func (_c *Sample1hCreate) SetRttP99Ms(v float64) *Sample1hCreate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1hCreate) SetSuccessCount

func (_c *Sample1hCreate) SetSuccessCount(v int) *Sample1hCreate

SetSuccessCount sets the "success_count" field.

func (*Sample1hCreate) SetTargetLabel

func (_c *Sample1hCreate) SetTargetLabel(v string) *Sample1hCreate

SetTargetLabel sets the "target_label" field.

type Sample1hCreateBulk

type Sample1hCreateBulk struct {
	// contains filtered or unexported fields
}

Sample1hCreateBulk is the builder for creating many Sample1h entities in bulk.

func (*Sample1hCreateBulk) Exec

func (_c *Sample1hCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1hCreateBulk) ExecX

func (_c *Sample1hCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hCreateBulk) Save

func (_c *Sample1hCreateBulk) Save(ctx context.Context) ([]*Sample1h, error)

Save creates the Sample1h entities in the database.

func (*Sample1hCreateBulk) SaveX

func (_c *Sample1hCreateBulk) SaveX(ctx context.Context) []*Sample1h

SaveX is like Save, but panics if an error occurs.

type Sample1hDelete

type Sample1hDelete struct {
	// contains filtered or unexported fields
}

Sample1hDelete is the builder for deleting a Sample1h entity.

func (*Sample1hDelete) Exec

func (_d *Sample1hDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*Sample1hDelete) ExecX

func (_d *Sample1hDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hDelete) Where

func (_d *Sample1hDelete) Where(ps ...predicate.Sample1h) *Sample1hDelete

Where appends a list predicates to the Sample1hDelete builder.

type Sample1hDeleteOne

type Sample1hDeleteOne struct {
	// contains filtered or unexported fields
}

Sample1hDeleteOne is the builder for deleting a single Sample1h entity.

func (*Sample1hDeleteOne) Exec

func (_d *Sample1hDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*Sample1hDeleteOne) ExecX

func (_d *Sample1hDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hDeleteOne) Where

Where appends a list predicates to the Sample1hDelete builder.

type Sample1hGroupBy

type Sample1hGroupBy struct {
	// contains filtered or unexported fields
}

Sample1hGroupBy is the group-by builder for Sample1h entities.

func (*Sample1hGroupBy) Aggregate

func (_g *Sample1hGroupBy) Aggregate(fns ...AggregateFunc) *Sample1hGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*Sample1hGroupBy) Bool

func (s *Sample1hGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) BoolX

func (s *Sample1hGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample1hGroupBy) Bools

func (s *Sample1hGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) BoolsX

func (s *Sample1hGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample1hGroupBy) Float64

func (s *Sample1hGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) Float64X

func (s *Sample1hGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample1hGroupBy) Float64s

func (s *Sample1hGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) Float64sX

func (s *Sample1hGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample1hGroupBy) Int

func (s *Sample1hGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) IntX

func (s *Sample1hGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample1hGroupBy) Ints

func (s *Sample1hGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) IntsX

func (s *Sample1hGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample1hGroupBy) Scan

func (_g *Sample1hGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample1hGroupBy) ScanX

func (s *Sample1hGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample1hGroupBy) String

func (s *Sample1hGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) StringX

func (s *Sample1hGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample1hGroupBy) Strings

func (s *Sample1hGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample1hGroupBy) StringsX

func (s *Sample1hGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample1hMutation

type Sample1hMutation struct {
	// contains filtered or unexported fields
}

Sample1hMutation represents an operation that mutates the Sample1h nodes in the graph.

func (*Sample1hMutation) AddBucketStartUnixMs

func (m *Sample1hMutation) AddBucketStartUnixMs(i int64)

AddBucketStartUnixMs adds i to the "bucket_start_unix_ms" field.

func (*Sample1hMutation) AddCount

func (m *Sample1hMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*Sample1hMutation) AddFailCount

func (m *Sample1hMutation) AddFailCount(i int)

AddFailCount adds i to the "fail_count" field.

func (*Sample1hMutation) AddField

func (m *Sample1hMutation) 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 (*Sample1hMutation) AddJitterMs

func (m *Sample1hMutation) AddJitterMs(f float64)

AddJitterMs adds f to the "jitter_ms" field.

func (*Sample1hMutation) AddRttMaxMs

func (m *Sample1hMutation) AddRttMaxMs(f float64)

AddRttMaxMs adds f to the "rtt_max_ms" field.

func (*Sample1hMutation) AddRttMeanMs

func (m *Sample1hMutation) AddRttMeanMs(f float64)

AddRttMeanMs adds f to the "rtt_mean_ms" field.

func (*Sample1hMutation) AddRttP50Ms

func (m *Sample1hMutation) AddRttP50Ms(f float64)

AddRttP50Ms adds f to the "rtt_p50_ms" field.

func (*Sample1hMutation) AddRttP95Ms

func (m *Sample1hMutation) AddRttP95Ms(f float64)

AddRttP95Ms adds f to the "rtt_p95_ms" field.

func (*Sample1hMutation) AddRttP99Ms

func (m *Sample1hMutation) AddRttP99Ms(f float64)

AddRttP99Ms adds f to the "rtt_p99_ms" field.

func (*Sample1hMutation) AddSuccessCount

func (m *Sample1hMutation) AddSuccessCount(i int)

AddSuccessCount adds i to the "success_count" field.

func (*Sample1hMutation) AddedBucketStartUnixMs

func (m *Sample1hMutation) AddedBucketStartUnixMs() (r int64, exists bool)

AddedBucketStartUnixMs returns the value that was added to the "bucket_start_unix_ms" field in this mutation.

func (*Sample1hMutation) AddedCount

func (m *Sample1hMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*Sample1hMutation) AddedEdges

func (m *Sample1hMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*Sample1hMutation) AddedFailCount

func (m *Sample1hMutation) AddedFailCount() (r int, exists bool)

AddedFailCount returns the value that was added to the "fail_count" field in this mutation.

func (*Sample1hMutation) AddedField

func (m *Sample1hMutation) 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 (*Sample1hMutation) AddedFields

func (m *Sample1hMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*Sample1hMutation) AddedIDs

func (m *Sample1hMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*Sample1hMutation) AddedJitterMs

func (m *Sample1hMutation) AddedJitterMs() (r float64, exists bool)

AddedJitterMs returns the value that was added to the "jitter_ms" field in this mutation.

func (*Sample1hMutation) AddedRttMaxMs

func (m *Sample1hMutation) AddedRttMaxMs() (r float64, exists bool)

AddedRttMaxMs returns the value that was added to the "rtt_max_ms" field in this mutation.

func (*Sample1hMutation) AddedRttMeanMs

func (m *Sample1hMutation) AddedRttMeanMs() (r float64, exists bool)

AddedRttMeanMs returns the value that was added to the "rtt_mean_ms" field in this mutation.

func (*Sample1hMutation) AddedRttP50Ms

func (m *Sample1hMutation) AddedRttP50Ms() (r float64, exists bool)

AddedRttP50Ms returns the value that was added to the "rtt_p50_ms" field in this mutation.

func (*Sample1hMutation) AddedRttP95Ms

func (m *Sample1hMutation) AddedRttP95Ms() (r float64, exists bool)

AddedRttP95Ms returns the value that was added to the "rtt_p95_ms" field in this mutation.

func (*Sample1hMutation) AddedRttP99Ms

func (m *Sample1hMutation) AddedRttP99Ms() (r float64, exists bool)

AddedRttP99Ms returns the value that was added to the "rtt_p99_ms" field in this mutation.

func (*Sample1hMutation) AddedSuccessCount

func (m *Sample1hMutation) AddedSuccessCount() (r int, exists bool)

AddedSuccessCount returns the value that was added to the "success_count" field in this mutation.

func (*Sample1hMutation) BucketStartUnixMs

func (m *Sample1hMutation) BucketStartUnixMs() (r int64, exists bool)

BucketStartUnixMs returns the value of the "bucket_start_unix_ms" field in the mutation.

func (*Sample1hMutation) ClearEdge

func (m *Sample1hMutation) 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 (*Sample1hMutation) ClearErrors

func (m *Sample1hMutation) ClearErrors()

ClearErrors clears the value of the "errors" field.

func (*Sample1hMutation) ClearField

func (m *Sample1hMutation) 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 (*Sample1hMutation) ClearJitterMs

func (m *Sample1hMutation) ClearJitterMs()

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1hMutation) ClearRttMaxMs

func (m *Sample1hMutation) ClearRttMaxMs()

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1hMutation) ClearRttMeanMs

func (m *Sample1hMutation) ClearRttMeanMs()

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1hMutation) ClearRttP50Ms

func (m *Sample1hMutation) ClearRttP50Ms()

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1hMutation) ClearRttP95Ms

func (m *Sample1hMutation) ClearRttP95Ms()

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1hMutation) ClearRttP99Ms

func (m *Sample1hMutation) ClearRttP99Ms()

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1hMutation) ClearedEdges

func (m *Sample1hMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*Sample1hMutation) ClearedFields

func (m *Sample1hMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (Sample1hMutation) Client

func (m Sample1hMutation) 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 (*Sample1hMutation) Count

func (m *Sample1hMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*Sample1hMutation) EdgeCleared

func (m *Sample1hMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*Sample1hMutation) Errors

func (m *Sample1hMutation) Errors() (r map[string]int, exists bool)

Errors returns the value of the "errors" field in the mutation.

func (*Sample1hMutation) ErrorsCleared

func (m *Sample1hMutation) ErrorsCleared() bool

ErrorsCleared returns if the "errors" field was cleared in this mutation.

func (*Sample1hMutation) FailCount

func (m *Sample1hMutation) FailCount() (r int, exists bool)

FailCount returns the value of the "fail_count" field in the mutation.

func (*Sample1hMutation) Field

func (m *Sample1hMutation) 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 (*Sample1hMutation) FieldCleared

func (m *Sample1hMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*Sample1hMutation) Fields

func (m *Sample1hMutation) 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 (*Sample1hMutation) ID

func (m *Sample1hMutation) 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 (*Sample1hMutation) IDs

func (m *Sample1hMutation) 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 (*Sample1hMutation) JitterMs

func (m *Sample1hMutation) JitterMs() (r float64, exists bool)

JitterMs returns the value of the "jitter_ms" field in the mutation.

func (*Sample1hMutation) JitterMsCleared

func (m *Sample1hMutation) JitterMsCleared() bool

JitterMsCleared returns if the "jitter_ms" field was cleared in this mutation.

func (*Sample1hMutation) OldBucketStartUnixMs

func (m *Sample1hMutation) OldBucketStartUnixMs(ctx context.Context) (v int64, err error)

OldBucketStartUnixMs returns the old "bucket_start_unix_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldCount

func (m *Sample1hMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldErrors

func (m *Sample1hMutation) OldErrors(ctx context.Context) (v map[string]int, err error)

OldErrors returns the old "errors" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldFailCount

func (m *Sample1hMutation) OldFailCount(ctx context.Context) (v int, err error)

OldFailCount returns the old "fail_count" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldField

func (m *Sample1hMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*Sample1hMutation) OldJitterMs

func (m *Sample1hMutation) OldJitterMs(ctx context.Context) (v *float64, err error)

OldJitterMs returns the old "jitter_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldRttMaxMs

func (m *Sample1hMutation) OldRttMaxMs(ctx context.Context) (v *float64, err error)

OldRttMaxMs returns the old "rtt_max_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldRttMeanMs

func (m *Sample1hMutation) OldRttMeanMs(ctx context.Context) (v *float64, err error)

OldRttMeanMs returns the old "rtt_mean_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldRttP50Ms

func (m *Sample1hMutation) OldRttP50Ms(ctx context.Context) (v *float64, err error)

OldRttP50Ms returns the old "rtt_p50_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldRttP95Ms

func (m *Sample1hMutation) OldRttP95Ms(ctx context.Context) (v *float64, err error)

OldRttP95Ms returns the old "rtt_p95_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldRttP99Ms

func (m *Sample1hMutation) OldRttP99Ms(ctx context.Context) (v *float64, err error)

OldRttP99Ms returns the old "rtt_p99_ms" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldSuccessCount

func (m *Sample1hMutation) OldSuccessCount(ctx context.Context) (v int, err error)

OldSuccessCount returns the old "success_count" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) OldTargetLabel

func (m *Sample1hMutation) OldTargetLabel(ctx context.Context) (v string, err error)

OldTargetLabel returns the old "target_label" field's value of the Sample1h entity. If the Sample1h 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 (*Sample1hMutation) Op

func (m *Sample1hMutation) Op() Op

Op returns the operation name.

func (*Sample1hMutation) RemovedEdges

func (m *Sample1hMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*Sample1hMutation) RemovedIDs

func (m *Sample1hMutation) 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 (*Sample1hMutation) ResetBucketStartUnixMs

func (m *Sample1hMutation) ResetBucketStartUnixMs()

ResetBucketStartUnixMs resets all changes to the "bucket_start_unix_ms" field.

func (*Sample1hMutation) ResetCount

func (m *Sample1hMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*Sample1hMutation) ResetEdge

func (m *Sample1hMutation) 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 (*Sample1hMutation) ResetErrors

func (m *Sample1hMutation) ResetErrors()

ResetErrors resets all changes to the "errors" field.

func (*Sample1hMutation) ResetFailCount

func (m *Sample1hMutation) ResetFailCount()

ResetFailCount resets all changes to the "fail_count" field.

func (*Sample1hMutation) ResetField

func (m *Sample1hMutation) 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 (*Sample1hMutation) ResetJitterMs

func (m *Sample1hMutation) ResetJitterMs()

ResetJitterMs resets all changes to the "jitter_ms" field.

func (*Sample1hMutation) ResetRttMaxMs

func (m *Sample1hMutation) ResetRttMaxMs()

ResetRttMaxMs resets all changes to the "rtt_max_ms" field.

func (*Sample1hMutation) ResetRttMeanMs

func (m *Sample1hMutation) ResetRttMeanMs()

ResetRttMeanMs resets all changes to the "rtt_mean_ms" field.

func (*Sample1hMutation) ResetRttP50Ms

func (m *Sample1hMutation) ResetRttP50Ms()

ResetRttP50Ms resets all changes to the "rtt_p50_ms" field.

func (*Sample1hMutation) ResetRttP95Ms

func (m *Sample1hMutation) ResetRttP95Ms()

ResetRttP95Ms resets all changes to the "rtt_p95_ms" field.

func (*Sample1hMutation) ResetRttP99Ms

func (m *Sample1hMutation) ResetRttP99Ms()

ResetRttP99Ms resets all changes to the "rtt_p99_ms" field.

func (*Sample1hMutation) ResetSuccessCount

func (m *Sample1hMutation) ResetSuccessCount()

ResetSuccessCount resets all changes to the "success_count" field.

func (*Sample1hMutation) ResetTargetLabel

func (m *Sample1hMutation) ResetTargetLabel()

ResetTargetLabel resets all changes to the "target_label" field.

func (*Sample1hMutation) RttMaxMs

func (m *Sample1hMutation) RttMaxMs() (r float64, exists bool)

RttMaxMs returns the value of the "rtt_max_ms" field in the mutation.

func (*Sample1hMutation) RttMaxMsCleared

func (m *Sample1hMutation) RttMaxMsCleared() bool

RttMaxMsCleared returns if the "rtt_max_ms" field was cleared in this mutation.

func (*Sample1hMutation) RttMeanMs

func (m *Sample1hMutation) RttMeanMs() (r float64, exists bool)

RttMeanMs returns the value of the "rtt_mean_ms" field in the mutation.

func (*Sample1hMutation) RttMeanMsCleared

func (m *Sample1hMutation) RttMeanMsCleared() bool

RttMeanMsCleared returns if the "rtt_mean_ms" field was cleared in this mutation.

func (*Sample1hMutation) RttP50Ms

func (m *Sample1hMutation) RttP50Ms() (r float64, exists bool)

RttP50Ms returns the value of the "rtt_p50_ms" field in the mutation.

func (*Sample1hMutation) RttP50MsCleared

func (m *Sample1hMutation) RttP50MsCleared() bool

RttP50MsCleared returns if the "rtt_p50_ms" field was cleared in this mutation.

func (*Sample1hMutation) RttP95Ms

func (m *Sample1hMutation) RttP95Ms() (r float64, exists bool)

RttP95Ms returns the value of the "rtt_p95_ms" field in the mutation.

func (*Sample1hMutation) RttP95MsCleared

func (m *Sample1hMutation) RttP95MsCleared() bool

RttP95MsCleared returns if the "rtt_p95_ms" field was cleared in this mutation.

func (*Sample1hMutation) RttP99Ms

func (m *Sample1hMutation) RttP99Ms() (r float64, exists bool)

RttP99Ms returns the value of the "rtt_p99_ms" field in the mutation.

func (*Sample1hMutation) RttP99MsCleared

func (m *Sample1hMutation) RttP99MsCleared() bool

RttP99MsCleared returns if the "rtt_p99_ms" field was cleared in this mutation.

func (*Sample1hMutation) SetBucketStartUnixMs

func (m *Sample1hMutation) SetBucketStartUnixMs(i int64)

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1hMutation) SetCount

func (m *Sample1hMutation) SetCount(i int)

SetCount sets the "count" field.

func (*Sample1hMutation) SetErrors

func (m *Sample1hMutation) SetErrors(value map[string]int)

SetErrors sets the "errors" field.

func (*Sample1hMutation) SetFailCount

func (m *Sample1hMutation) SetFailCount(i int)

SetFailCount sets the "fail_count" field.

func (*Sample1hMutation) SetField

func (m *Sample1hMutation) 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 (*Sample1hMutation) SetJitterMs

func (m *Sample1hMutation) SetJitterMs(f float64)

SetJitterMs sets the "jitter_ms" field.

func (*Sample1hMutation) SetOp

func (m *Sample1hMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*Sample1hMutation) SetRttMaxMs

func (m *Sample1hMutation) SetRttMaxMs(f float64)

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1hMutation) SetRttMeanMs

func (m *Sample1hMutation) SetRttMeanMs(f float64)

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1hMutation) SetRttP50Ms

func (m *Sample1hMutation) SetRttP50Ms(f float64)

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1hMutation) SetRttP95Ms

func (m *Sample1hMutation) SetRttP95Ms(f float64)

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1hMutation) SetRttP99Ms

func (m *Sample1hMutation) SetRttP99Ms(f float64)

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1hMutation) SetSuccessCount

func (m *Sample1hMutation) SetSuccessCount(i int)

SetSuccessCount sets the "success_count" field.

func (*Sample1hMutation) SetTargetLabel

func (m *Sample1hMutation) SetTargetLabel(s string)

SetTargetLabel sets the "target_label" field.

func (*Sample1hMutation) SuccessCount

func (m *Sample1hMutation) SuccessCount() (r int, exists bool)

SuccessCount returns the value of the "success_count" field in the mutation.

func (*Sample1hMutation) TargetLabel

func (m *Sample1hMutation) TargetLabel() (r string, exists bool)

TargetLabel returns the value of the "target_label" field in the mutation.

func (Sample1hMutation) Tx

func (m Sample1hMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*Sample1hMutation) Type

func (m *Sample1hMutation) Type() string

Type returns the node type of this mutation (Sample1h).

func (*Sample1hMutation) Where

func (m *Sample1hMutation) Where(ps ...predicate.Sample1h)

Where appends a list predicates to the Sample1hMutation builder.

func (*Sample1hMutation) WhereP

func (m *Sample1hMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the Sample1hMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type Sample1hQuery

type Sample1hQuery struct {
	// contains filtered or unexported fields
}

Sample1hQuery is the builder for querying Sample1h entities.

func (*Sample1hQuery) Aggregate

func (_q *Sample1hQuery) Aggregate(fns ...AggregateFunc) *Sample1hSelect

Aggregate returns a Sample1hSelect configured with the given aggregations.

func (*Sample1hQuery) All

func (_q *Sample1hQuery) All(ctx context.Context) ([]*Sample1h, error)

All executes the query and returns a list of Sample1hs.

func (*Sample1hQuery) AllX

func (_q *Sample1hQuery) AllX(ctx context.Context) []*Sample1h

AllX is like All, but panics if an error occurs.

func (*Sample1hQuery) Clone

func (_q *Sample1hQuery) Clone() *Sample1hQuery

Clone returns a duplicate of the Sample1hQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*Sample1hQuery) Count

func (_q *Sample1hQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*Sample1hQuery) CountX

func (_q *Sample1hQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*Sample1hQuery) Exist

func (_q *Sample1hQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*Sample1hQuery) ExistX

func (_q *Sample1hQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*Sample1hQuery) First

func (_q *Sample1hQuery) First(ctx context.Context) (*Sample1h, error)

First returns the first Sample1h entity from the query. Returns a *NotFoundError when no Sample1h was found.

func (*Sample1hQuery) FirstID

func (_q *Sample1hQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Sample1h ID from the query. Returns a *NotFoundError when no Sample1h ID was found.

func (*Sample1hQuery) FirstIDX

func (_q *Sample1hQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*Sample1hQuery) FirstX

func (_q *Sample1hQuery) FirstX(ctx context.Context) *Sample1h

FirstX is like First, but panics if an error occurs.

func (*Sample1hQuery) GroupBy

func (_q *Sample1hQuery) GroupBy(field string, fields ...string) *Sample1hGroupBy

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Sample1h.Query().
	GroupBy(sample1h.FieldBucketStartUnixMs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*Sample1hQuery) IDs

func (_q *Sample1hQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Sample1h IDs.

func (*Sample1hQuery) IDsX

func (_q *Sample1hQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*Sample1hQuery) Limit

func (_q *Sample1hQuery) Limit(limit int) *Sample1hQuery

Limit the number of records to be returned by this query.

func (*Sample1hQuery) Offset

func (_q *Sample1hQuery) Offset(offset int) *Sample1hQuery

Offset to start from.

func (*Sample1hQuery) Only

func (_q *Sample1hQuery) Only(ctx context.Context) (*Sample1h, error)

Only returns a single Sample1h entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sample1h entity is found. Returns a *NotFoundError when no Sample1h entities are found.

func (*Sample1hQuery) OnlyID

func (_q *Sample1hQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Sample1h ID in the query. Returns a *NotSingularError when more than one Sample1h ID is found. Returns a *NotFoundError when no entities are found.

func (*Sample1hQuery) OnlyIDX

func (_q *Sample1hQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*Sample1hQuery) OnlyX

func (_q *Sample1hQuery) OnlyX(ctx context.Context) *Sample1h

OnlyX is like Only, but panics if an error occurs.

func (*Sample1hQuery) Order

Order specifies how the records should be ordered.

func (*Sample1hQuery) Select

func (_q *Sample1hQuery) Select(fields ...string) *Sample1hSelect

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
}

client.Sample1h.Query().
	Select(sample1h.FieldBucketStartUnixMs).
	Scan(ctx, &v)

func (*Sample1hQuery) Unique

func (_q *Sample1hQuery) Unique(unique bool) *Sample1hQuery

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 (*Sample1hQuery) Where

func (_q *Sample1hQuery) Where(ps ...predicate.Sample1h) *Sample1hQuery

Where adds a new predicate for the Sample1hQuery builder.

type Sample1hSelect

type Sample1hSelect struct {
	*Sample1hQuery
	// contains filtered or unexported fields
}

Sample1hSelect is the builder for selecting fields of Sample1h entities.

func (*Sample1hSelect) Aggregate

func (_s *Sample1hSelect) Aggregate(fns ...AggregateFunc) *Sample1hSelect

Aggregate adds the given aggregation functions to the selector query.

func (*Sample1hSelect) Bool

func (s *Sample1hSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) BoolX

func (s *Sample1hSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample1hSelect) Bools

func (s *Sample1hSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) BoolsX

func (s *Sample1hSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample1hSelect) Float64

func (s *Sample1hSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) Float64X

func (s *Sample1hSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample1hSelect) Float64s

func (s *Sample1hSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) Float64sX

func (s *Sample1hSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample1hSelect) Int

func (s *Sample1hSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) IntX

func (s *Sample1hSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample1hSelect) Ints

func (s *Sample1hSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) IntsX

func (s *Sample1hSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample1hSelect) Scan

func (_s *Sample1hSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample1hSelect) ScanX

func (s *Sample1hSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample1hSelect) String

func (s *Sample1hSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) StringX

func (s *Sample1hSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample1hSelect) Strings

func (s *Sample1hSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample1hSelect) StringsX

func (s *Sample1hSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample1hUpdate

type Sample1hUpdate struct {
	// contains filtered or unexported fields
}

Sample1hUpdate is the builder for updating Sample1h entities.

func (*Sample1hUpdate) AddBucketStartUnixMs

func (_u *Sample1hUpdate) AddBucketStartUnixMs(v int64) *Sample1hUpdate

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample1hUpdate) AddCount

func (_u *Sample1hUpdate) AddCount(v int) *Sample1hUpdate

AddCount adds value to the "count" field.

func (*Sample1hUpdate) AddFailCount

func (_u *Sample1hUpdate) AddFailCount(v int) *Sample1hUpdate

AddFailCount adds value to the "fail_count" field.

func (*Sample1hUpdate) AddJitterMs

func (_u *Sample1hUpdate) AddJitterMs(v float64) *Sample1hUpdate

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample1hUpdate) AddRttMaxMs

func (_u *Sample1hUpdate) AddRttMaxMs(v float64) *Sample1hUpdate

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample1hUpdate) AddRttMeanMs

func (_u *Sample1hUpdate) AddRttMeanMs(v float64) *Sample1hUpdate

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample1hUpdate) AddRttP50Ms

func (_u *Sample1hUpdate) AddRttP50Ms(v float64) *Sample1hUpdate

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample1hUpdate) AddRttP95Ms

func (_u *Sample1hUpdate) AddRttP95Ms(v float64) *Sample1hUpdate

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample1hUpdate) AddRttP99Ms

func (_u *Sample1hUpdate) AddRttP99Ms(v float64) *Sample1hUpdate

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample1hUpdate) AddSuccessCount

func (_u *Sample1hUpdate) AddSuccessCount(v int) *Sample1hUpdate

AddSuccessCount adds value to the "success_count" field.

func (*Sample1hUpdate) ClearErrors

func (_u *Sample1hUpdate) ClearErrors() *Sample1hUpdate

ClearErrors clears the value of the "errors" field.

func (*Sample1hUpdate) ClearJitterMs

func (_u *Sample1hUpdate) ClearJitterMs() *Sample1hUpdate

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1hUpdate) ClearRttMaxMs

func (_u *Sample1hUpdate) ClearRttMaxMs() *Sample1hUpdate

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1hUpdate) ClearRttMeanMs

func (_u *Sample1hUpdate) ClearRttMeanMs() *Sample1hUpdate

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1hUpdate) ClearRttP50Ms

func (_u *Sample1hUpdate) ClearRttP50Ms() *Sample1hUpdate

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1hUpdate) ClearRttP95Ms

func (_u *Sample1hUpdate) ClearRttP95Ms() *Sample1hUpdate

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1hUpdate) ClearRttP99Ms

func (_u *Sample1hUpdate) ClearRttP99Ms() *Sample1hUpdate

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1hUpdate) Exec

func (_u *Sample1hUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1hUpdate) ExecX

func (_u *Sample1hUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hUpdate) Mutation

func (_u *Sample1hUpdate) Mutation() *Sample1hMutation

Mutation returns the Sample1hMutation object of the builder.

func (*Sample1hUpdate) Save

func (_u *Sample1hUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*Sample1hUpdate) SaveX

func (_u *Sample1hUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*Sample1hUpdate) SetBucketStartUnixMs

func (_u *Sample1hUpdate) SetBucketStartUnixMs(v int64) *Sample1hUpdate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1hUpdate) SetCount

func (_u *Sample1hUpdate) SetCount(v int) *Sample1hUpdate

SetCount sets the "count" field.

func (*Sample1hUpdate) SetErrors

func (_u *Sample1hUpdate) SetErrors(v map[string]int) *Sample1hUpdate

SetErrors sets the "errors" field.

func (*Sample1hUpdate) SetFailCount

func (_u *Sample1hUpdate) SetFailCount(v int) *Sample1hUpdate

SetFailCount sets the "fail_count" field.

func (*Sample1hUpdate) SetJitterMs

func (_u *Sample1hUpdate) SetJitterMs(v float64) *Sample1hUpdate

SetJitterMs sets the "jitter_ms" field.

func (*Sample1hUpdate) SetNillableBucketStartUnixMs

func (_u *Sample1hUpdate) SetNillableBucketStartUnixMs(v *int64) *Sample1hUpdate

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableCount

func (_u *Sample1hUpdate) SetNillableCount(v *int) *Sample1hUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableFailCount

func (_u *Sample1hUpdate) SetNillableFailCount(v *int) *Sample1hUpdate

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableJitterMs

func (_u *Sample1hUpdate) SetNillableJitterMs(v *float64) *Sample1hUpdate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableRttMaxMs

func (_u *Sample1hUpdate) SetNillableRttMaxMs(v *float64) *Sample1hUpdate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableRttMeanMs

func (_u *Sample1hUpdate) SetNillableRttMeanMs(v *float64) *Sample1hUpdate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableRttP50Ms

func (_u *Sample1hUpdate) SetNillableRttP50Ms(v *float64) *Sample1hUpdate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableRttP95Ms

func (_u *Sample1hUpdate) SetNillableRttP95Ms(v *float64) *Sample1hUpdate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableRttP99Ms

func (_u *Sample1hUpdate) SetNillableRttP99Ms(v *float64) *Sample1hUpdate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableSuccessCount

func (_u *Sample1hUpdate) SetNillableSuccessCount(v *int) *Sample1hUpdate

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample1hUpdate) SetNillableTargetLabel

func (_u *Sample1hUpdate) SetNillableTargetLabel(v *string) *Sample1hUpdate

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample1hUpdate) SetRttMaxMs

func (_u *Sample1hUpdate) SetRttMaxMs(v float64) *Sample1hUpdate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1hUpdate) SetRttMeanMs

func (_u *Sample1hUpdate) SetRttMeanMs(v float64) *Sample1hUpdate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1hUpdate) SetRttP50Ms

func (_u *Sample1hUpdate) SetRttP50Ms(v float64) *Sample1hUpdate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1hUpdate) SetRttP95Ms

func (_u *Sample1hUpdate) SetRttP95Ms(v float64) *Sample1hUpdate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1hUpdate) SetRttP99Ms

func (_u *Sample1hUpdate) SetRttP99Ms(v float64) *Sample1hUpdate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1hUpdate) SetSuccessCount

func (_u *Sample1hUpdate) SetSuccessCount(v int) *Sample1hUpdate

SetSuccessCount sets the "success_count" field.

func (*Sample1hUpdate) SetTargetLabel

func (_u *Sample1hUpdate) SetTargetLabel(v string) *Sample1hUpdate

SetTargetLabel sets the "target_label" field.

func (*Sample1hUpdate) Where

func (_u *Sample1hUpdate) Where(ps ...predicate.Sample1h) *Sample1hUpdate

Where appends a list predicates to the Sample1hUpdate builder.

type Sample1hUpdateOne

type Sample1hUpdateOne struct {
	// contains filtered or unexported fields
}

Sample1hUpdateOne is the builder for updating a single Sample1h entity.

func (*Sample1hUpdateOne) AddBucketStartUnixMs

func (_u *Sample1hUpdateOne) AddBucketStartUnixMs(v int64) *Sample1hUpdateOne

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample1hUpdateOne) AddCount

func (_u *Sample1hUpdateOne) AddCount(v int) *Sample1hUpdateOne

AddCount adds value to the "count" field.

func (*Sample1hUpdateOne) AddFailCount

func (_u *Sample1hUpdateOne) AddFailCount(v int) *Sample1hUpdateOne

AddFailCount adds value to the "fail_count" field.

func (*Sample1hUpdateOne) AddJitterMs

func (_u *Sample1hUpdateOne) AddJitterMs(v float64) *Sample1hUpdateOne

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample1hUpdateOne) AddRttMaxMs

func (_u *Sample1hUpdateOne) AddRttMaxMs(v float64) *Sample1hUpdateOne

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample1hUpdateOne) AddRttMeanMs

func (_u *Sample1hUpdateOne) AddRttMeanMs(v float64) *Sample1hUpdateOne

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample1hUpdateOne) AddRttP50Ms

func (_u *Sample1hUpdateOne) AddRttP50Ms(v float64) *Sample1hUpdateOne

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample1hUpdateOne) AddRttP95Ms

func (_u *Sample1hUpdateOne) AddRttP95Ms(v float64) *Sample1hUpdateOne

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample1hUpdateOne) AddRttP99Ms

func (_u *Sample1hUpdateOne) AddRttP99Ms(v float64) *Sample1hUpdateOne

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample1hUpdateOne) AddSuccessCount

func (_u *Sample1hUpdateOne) AddSuccessCount(v int) *Sample1hUpdateOne

AddSuccessCount adds value to the "success_count" field.

func (*Sample1hUpdateOne) ClearErrors

func (_u *Sample1hUpdateOne) ClearErrors() *Sample1hUpdateOne

ClearErrors clears the value of the "errors" field.

func (*Sample1hUpdateOne) ClearJitterMs

func (_u *Sample1hUpdateOne) ClearJitterMs() *Sample1hUpdateOne

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1hUpdateOne) ClearRttMaxMs

func (_u *Sample1hUpdateOne) ClearRttMaxMs() *Sample1hUpdateOne

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1hUpdateOne) ClearRttMeanMs

func (_u *Sample1hUpdateOne) ClearRttMeanMs() *Sample1hUpdateOne

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1hUpdateOne) ClearRttP50Ms

func (_u *Sample1hUpdateOne) ClearRttP50Ms() *Sample1hUpdateOne

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1hUpdateOne) ClearRttP95Ms

func (_u *Sample1hUpdateOne) ClearRttP95Ms() *Sample1hUpdateOne

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1hUpdateOne) ClearRttP99Ms

func (_u *Sample1hUpdateOne) ClearRttP99Ms() *Sample1hUpdateOne

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1hUpdateOne) Exec

func (_u *Sample1hUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*Sample1hUpdateOne) ExecX

func (_u *Sample1hUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1hUpdateOne) Mutation

func (_u *Sample1hUpdateOne) Mutation() *Sample1hMutation

Mutation returns the Sample1hMutation object of the builder.

func (*Sample1hUpdateOne) Save

func (_u *Sample1hUpdateOne) Save(ctx context.Context) (*Sample1h, error)

Save executes the query and returns the updated Sample1h entity.

func (*Sample1hUpdateOne) SaveX

func (_u *Sample1hUpdateOne) SaveX(ctx context.Context) *Sample1h

SaveX is like Save, but panics if an error occurs.

func (*Sample1hUpdateOne) Select

func (_u *Sample1hUpdateOne) Select(field string, fields ...string) *Sample1hUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*Sample1hUpdateOne) SetBucketStartUnixMs

func (_u *Sample1hUpdateOne) SetBucketStartUnixMs(v int64) *Sample1hUpdateOne

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1hUpdateOne) SetCount

func (_u *Sample1hUpdateOne) SetCount(v int) *Sample1hUpdateOne

SetCount sets the "count" field.

func (*Sample1hUpdateOne) SetErrors

func (_u *Sample1hUpdateOne) SetErrors(v map[string]int) *Sample1hUpdateOne

SetErrors sets the "errors" field.

func (*Sample1hUpdateOne) SetFailCount

func (_u *Sample1hUpdateOne) SetFailCount(v int) *Sample1hUpdateOne

SetFailCount sets the "fail_count" field.

func (*Sample1hUpdateOne) SetJitterMs

func (_u *Sample1hUpdateOne) SetJitterMs(v float64) *Sample1hUpdateOne

SetJitterMs sets the "jitter_ms" field.

func (*Sample1hUpdateOne) SetNillableBucketStartUnixMs

func (_u *Sample1hUpdateOne) SetNillableBucketStartUnixMs(v *int64) *Sample1hUpdateOne

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableCount

func (_u *Sample1hUpdateOne) SetNillableCount(v *int) *Sample1hUpdateOne

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableFailCount

func (_u *Sample1hUpdateOne) SetNillableFailCount(v *int) *Sample1hUpdateOne

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableJitterMs

func (_u *Sample1hUpdateOne) SetNillableJitterMs(v *float64) *Sample1hUpdateOne

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableRttMaxMs

func (_u *Sample1hUpdateOne) SetNillableRttMaxMs(v *float64) *Sample1hUpdateOne

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableRttMeanMs

func (_u *Sample1hUpdateOne) SetNillableRttMeanMs(v *float64) *Sample1hUpdateOne

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableRttP50Ms

func (_u *Sample1hUpdateOne) SetNillableRttP50Ms(v *float64) *Sample1hUpdateOne

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableRttP95Ms

func (_u *Sample1hUpdateOne) SetNillableRttP95Ms(v *float64) *Sample1hUpdateOne

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableRttP99Ms

func (_u *Sample1hUpdateOne) SetNillableRttP99Ms(v *float64) *Sample1hUpdateOne

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableSuccessCount

func (_u *Sample1hUpdateOne) SetNillableSuccessCount(v *int) *Sample1hUpdateOne

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample1hUpdateOne) SetNillableTargetLabel

func (_u *Sample1hUpdateOne) SetNillableTargetLabel(v *string) *Sample1hUpdateOne

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample1hUpdateOne) SetRttMaxMs

func (_u *Sample1hUpdateOne) SetRttMaxMs(v float64) *Sample1hUpdateOne

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1hUpdateOne) SetRttMeanMs

func (_u *Sample1hUpdateOne) SetRttMeanMs(v float64) *Sample1hUpdateOne

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1hUpdateOne) SetRttP50Ms

func (_u *Sample1hUpdateOne) SetRttP50Ms(v float64) *Sample1hUpdateOne

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1hUpdateOne) SetRttP95Ms

func (_u *Sample1hUpdateOne) SetRttP95Ms(v float64) *Sample1hUpdateOne

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1hUpdateOne) SetRttP99Ms

func (_u *Sample1hUpdateOne) SetRttP99Ms(v float64) *Sample1hUpdateOne

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1hUpdateOne) SetSuccessCount

func (_u *Sample1hUpdateOne) SetSuccessCount(v int) *Sample1hUpdateOne

SetSuccessCount sets the "success_count" field.

func (*Sample1hUpdateOne) SetTargetLabel

func (_u *Sample1hUpdateOne) SetTargetLabel(v string) *Sample1hUpdateOne

SetTargetLabel sets the "target_label" field.

func (*Sample1hUpdateOne) Where

Where appends a list predicates to the Sample1hUpdate builder.

type Sample1hs

type Sample1hs []*Sample1h

Sample1hs is a parsable slice of Sample1h.

type Sample1min

type Sample1min struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Unix-ms of the 1-minute window start, multiple of 60_000
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	// TargetLabel holds the value of the "target_label" field.
	TargetLabel string `json:"target_label,omitempty"`
	// Total samples in the bucket
	Count int `json:"count,omitempty"`
	// SuccessCount holds the value of the "success_count" field.
	SuccessCount int `json:"success_count,omitempty"`
	// FailCount holds the value of the "fail_count" field.
	FailCount int `json:"fail_count,omitempty"`
	// RttP50Ms holds the value of the "rtt_p50_ms" field.
	RttP50Ms *float64 `json:"rtt_p50_ms,omitempty"`
	// RttP95Ms holds the value of the "rtt_p95_ms" field.
	RttP95Ms *float64 `json:"rtt_p95_ms,omitempty"`
	// RttP99Ms holds the value of the "rtt_p99_ms" field.
	RttP99Ms *float64 `json:"rtt_p99_ms,omitempty"`
	// RttMaxMs holds the value of the "rtt_max_ms" field.
	RttMaxMs *float64 `json:"rtt_max_ms,omitempty"`
	// RttMeanMs holds the value of the "rtt_mean_ms" field.
	RttMeanMs *float64 `json:"rtt_mean_ms,omitempty"`
	// RFC 3550-style jitter: mean abs delta of consecutive RTTs in this bucket
	JitterMs *float64 `json:"jitter_ms,omitempty"`
	// Error code → count for failed samples in this bucket
	Errors map[string]int `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

Sample1min is the model entity for the Sample1min schema.

func (*Sample1min) String

func (_m *Sample1min) String() string

String implements the fmt.Stringer.

func (*Sample1min) Unwrap

func (_m *Sample1min) Unwrap() *Sample1min

Unwrap unwraps the Sample1min 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 (*Sample1min) Update

func (_m *Sample1min) Update() *Sample1minUpdateOne

Update returns a builder for updating this Sample1min. Note that you need to call Sample1min.Unwrap() before calling this method if this Sample1min was returned from a transaction, and the transaction was committed or rolled back.

func (*Sample1min) Value

func (_m *Sample1min) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Sample1min. This includes values selected through modifiers, order, etc.

type Sample1minClient

type Sample1minClient struct {
	// contains filtered or unexported fields
}

Sample1minClient is a client for the Sample1min schema.

func NewSample1minClient

func NewSample1minClient(c config) *Sample1minClient

NewSample1minClient returns a client for the Sample1min from the given config.

func (*Sample1minClient) Create

func (c *Sample1minClient) Create() *Sample1minCreate

Create returns a builder for creating a Sample1min entity.

func (*Sample1minClient) CreateBulk

func (c *Sample1minClient) CreateBulk(builders ...*Sample1minCreate) *Sample1minCreateBulk

CreateBulk returns a builder for creating a bulk of Sample1min entities.

func (*Sample1minClient) Delete

func (c *Sample1minClient) Delete() *Sample1minDelete

Delete returns a delete builder for Sample1min.

func (*Sample1minClient) DeleteOne

func (c *Sample1minClient) DeleteOne(_m *Sample1min) *Sample1minDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Sample1minClient) DeleteOneID

func (c *Sample1minClient) DeleteOneID(id int) *Sample1minDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*Sample1minClient) Get

func (c *Sample1minClient) Get(ctx context.Context, id int) (*Sample1min, error)

Get returns a Sample1min entity by its id.

func (*Sample1minClient) GetX

func (c *Sample1minClient) GetX(ctx context.Context, id int) *Sample1min

GetX is like Get, but panics if an error occurs.

func (*Sample1minClient) Hooks

func (c *Sample1minClient) Hooks() []Hook

Hooks returns the client hooks.

func (*Sample1minClient) Intercept

func (c *Sample1minClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sample1min.Intercept(f(g(h())))`.

func (*Sample1minClient) Interceptors

func (c *Sample1minClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*Sample1minClient) MapCreateBulk

func (c *Sample1minClient) MapCreateBulk(slice any, setFunc func(*Sample1minCreate, int)) *Sample1minCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*Sample1minClient) Query

func (c *Sample1minClient) Query() *Sample1minQuery

Query returns a query builder for Sample1min.

func (*Sample1minClient) Update

func (c *Sample1minClient) Update() *Sample1minUpdate

Update returns an update builder for Sample1min.

func (*Sample1minClient) UpdateOne

func (c *Sample1minClient) UpdateOne(_m *Sample1min) *Sample1minUpdateOne

UpdateOne returns an update builder for the given entity.

func (*Sample1minClient) UpdateOneID

func (c *Sample1minClient) UpdateOneID(id int) *Sample1minUpdateOne

UpdateOneID returns an update builder for the given id.

func (*Sample1minClient) Use

func (c *Sample1minClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sample1min.Hooks(f(g(h())))`.

type Sample1minCreate

type Sample1minCreate struct {
	// contains filtered or unexported fields
}

Sample1minCreate is the builder for creating a Sample1min entity.

func (*Sample1minCreate) Exec

func (_c *Sample1minCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1minCreate) ExecX

func (_c *Sample1minCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minCreate) Mutation

func (_c *Sample1minCreate) Mutation() *Sample1minMutation

Mutation returns the Sample1minMutation object of the builder.

func (*Sample1minCreate) Save

func (_c *Sample1minCreate) Save(ctx context.Context) (*Sample1min, error)

Save creates the Sample1min in the database.

func (*Sample1minCreate) SaveX

func (_c *Sample1minCreate) SaveX(ctx context.Context) *Sample1min

SaveX calls Save and panics if Save returns an error.

func (*Sample1minCreate) SetBucketStartUnixMs

func (_c *Sample1minCreate) SetBucketStartUnixMs(v int64) *Sample1minCreate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1minCreate) SetCount

func (_c *Sample1minCreate) SetCount(v int) *Sample1minCreate

SetCount sets the "count" field.

func (*Sample1minCreate) SetErrors

func (_c *Sample1minCreate) SetErrors(v map[string]int) *Sample1minCreate

SetErrors sets the "errors" field.

func (*Sample1minCreate) SetFailCount

func (_c *Sample1minCreate) SetFailCount(v int) *Sample1minCreate

SetFailCount sets the "fail_count" field.

func (*Sample1minCreate) SetJitterMs

func (_c *Sample1minCreate) SetJitterMs(v float64) *Sample1minCreate

SetJitterMs sets the "jitter_ms" field.

func (*Sample1minCreate) SetNillableJitterMs

func (_c *Sample1minCreate) SetNillableJitterMs(v *float64) *Sample1minCreate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1minCreate) SetNillableRttMaxMs

func (_c *Sample1minCreate) SetNillableRttMaxMs(v *float64) *Sample1minCreate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1minCreate) SetNillableRttMeanMs

func (_c *Sample1minCreate) SetNillableRttMeanMs(v *float64) *Sample1minCreate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1minCreate) SetNillableRttP50Ms

func (_c *Sample1minCreate) SetNillableRttP50Ms(v *float64) *Sample1minCreate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1minCreate) SetNillableRttP95Ms

func (_c *Sample1minCreate) SetNillableRttP95Ms(v *float64) *Sample1minCreate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1minCreate) SetNillableRttP99Ms

func (_c *Sample1minCreate) SetNillableRttP99Ms(v *float64) *Sample1minCreate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1minCreate) SetRttMaxMs

func (_c *Sample1minCreate) SetRttMaxMs(v float64) *Sample1minCreate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1minCreate) SetRttMeanMs

func (_c *Sample1minCreate) SetRttMeanMs(v float64) *Sample1minCreate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1minCreate) SetRttP50Ms

func (_c *Sample1minCreate) SetRttP50Ms(v float64) *Sample1minCreate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1minCreate) SetRttP95Ms

func (_c *Sample1minCreate) SetRttP95Ms(v float64) *Sample1minCreate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1minCreate) SetRttP99Ms

func (_c *Sample1minCreate) SetRttP99Ms(v float64) *Sample1minCreate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1minCreate) SetSuccessCount

func (_c *Sample1minCreate) SetSuccessCount(v int) *Sample1minCreate

SetSuccessCount sets the "success_count" field.

func (*Sample1minCreate) SetTargetLabel

func (_c *Sample1minCreate) SetTargetLabel(v string) *Sample1minCreate

SetTargetLabel sets the "target_label" field.

type Sample1minCreateBulk

type Sample1minCreateBulk struct {
	// contains filtered or unexported fields
}

Sample1minCreateBulk is the builder for creating many Sample1min entities in bulk.

func (*Sample1minCreateBulk) Exec

func (_c *Sample1minCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1minCreateBulk) ExecX

func (_c *Sample1minCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minCreateBulk) Save

func (_c *Sample1minCreateBulk) Save(ctx context.Context) ([]*Sample1min, error)

Save creates the Sample1min entities in the database.

func (*Sample1minCreateBulk) SaveX

func (_c *Sample1minCreateBulk) SaveX(ctx context.Context) []*Sample1min

SaveX is like Save, but panics if an error occurs.

type Sample1minDelete

type Sample1minDelete struct {
	// contains filtered or unexported fields
}

Sample1minDelete is the builder for deleting a Sample1min entity.

func (*Sample1minDelete) Exec

func (_d *Sample1minDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*Sample1minDelete) ExecX

func (_d *Sample1minDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minDelete) Where

Where appends a list predicates to the Sample1minDelete builder.

type Sample1minDeleteOne

type Sample1minDeleteOne struct {
	// contains filtered or unexported fields
}

Sample1minDeleteOne is the builder for deleting a single Sample1min entity.

func (*Sample1minDeleteOne) Exec

func (_d *Sample1minDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*Sample1minDeleteOne) ExecX

func (_d *Sample1minDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minDeleteOne) Where

Where appends a list predicates to the Sample1minDelete builder.

type Sample1minGroupBy

type Sample1minGroupBy struct {
	// contains filtered or unexported fields
}

Sample1minGroupBy is the group-by builder for Sample1min entities.

func (*Sample1minGroupBy) Aggregate

func (_g *Sample1minGroupBy) Aggregate(fns ...AggregateFunc) *Sample1minGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*Sample1minGroupBy) Bool

func (s *Sample1minGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) BoolX

func (s *Sample1minGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample1minGroupBy) Bools

func (s *Sample1minGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) BoolsX

func (s *Sample1minGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample1minGroupBy) Float64

func (s *Sample1minGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) Float64X

func (s *Sample1minGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample1minGroupBy) Float64s

func (s *Sample1minGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) Float64sX

func (s *Sample1minGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample1minGroupBy) Int

func (s *Sample1minGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) IntX

func (s *Sample1minGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample1minGroupBy) Ints

func (s *Sample1minGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) IntsX

func (s *Sample1minGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample1minGroupBy) Scan

func (_g *Sample1minGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample1minGroupBy) ScanX

func (s *Sample1minGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample1minGroupBy) String

func (s *Sample1minGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) StringX

func (s *Sample1minGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample1minGroupBy) Strings

func (s *Sample1minGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample1minGroupBy) StringsX

func (s *Sample1minGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample1minMutation

type Sample1minMutation struct {
	// contains filtered or unexported fields
}

Sample1minMutation represents an operation that mutates the Sample1min nodes in the graph.

func (*Sample1minMutation) AddBucketStartUnixMs

func (m *Sample1minMutation) AddBucketStartUnixMs(i int64)

AddBucketStartUnixMs adds i to the "bucket_start_unix_ms" field.

func (*Sample1minMutation) AddCount

func (m *Sample1minMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*Sample1minMutation) AddFailCount

func (m *Sample1minMutation) AddFailCount(i int)

AddFailCount adds i to the "fail_count" field.

func (*Sample1minMutation) AddField

func (m *Sample1minMutation) 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 (*Sample1minMutation) AddJitterMs

func (m *Sample1minMutation) AddJitterMs(f float64)

AddJitterMs adds f to the "jitter_ms" field.

func (*Sample1minMutation) AddRttMaxMs

func (m *Sample1minMutation) AddRttMaxMs(f float64)

AddRttMaxMs adds f to the "rtt_max_ms" field.

func (*Sample1minMutation) AddRttMeanMs

func (m *Sample1minMutation) AddRttMeanMs(f float64)

AddRttMeanMs adds f to the "rtt_mean_ms" field.

func (*Sample1minMutation) AddRttP50Ms

func (m *Sample1minMutation) AddRttP50Ms(f float64)

AddRttP50Ms adds f to the "rtt_p50_ms" field.

func (*Sample1minMutation) AddRttP95Ms

func (m *Sample1minMutation) AddRttP95Ms(f float64)

AddRttP95Ms adds f to the "rtt_p95_ms" field.

func (*Sample1minMutation) AddRttP99Ms

func (m *Sample1minMutation) AddRttP99Ms(f float64)

AddRttP99Ms adds f to the "rtt_p99_ms" field.

func (*Sample1minMutation) AddSuccessCount

func (m *Sample1minMutation) AddSuccessCount(i int)

AddSuccessCount adds i to the "success_count" field.

func (*Sample1minMutation) AddedBucketStartUnixMs

func (m *Sample1minMutation) AddedBucketStartUnixMs() (r int64, exists bool)

AddedBucketStartUnixMs returns the value that was added to the "bucket_start_unix_ms" field in this mutation.

func (*Sample1minMutation) AddedCount

func (m *Sample1minMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*Sample1minMutation) AddedEdges

func (m *Sample1minMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*Sample1minMutation) AddedFailCount

func (m *Sample1minMutation) AddedFailCount() (r int, exists bool)

AddedFailCount returns the value that was added to the "fail_count" field in this mutation.

func (*Sample1minMutation) AddedField

func (m *Sample1minMutation) 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 (*Sample1minMutation) AddedFields

func (m *Sample1minMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*Sample1minMutation) AddedIDs

func (m *Sample1minMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*Sample1minMutation) AddedJitterMs

func (m *Sample1minMutation) AddedJitterMs() (r float64, exists bool)

AddedJitterMs returns the value that was added to the "jitter_ms" field in this mutation.

func (*Sample1minMutation) AddedRttMaxMs

func (m *Sample1minMutation) AddedRttMaxMs() (r float64, exists bool)

AddedRttMaxMs returns the value that was added to the "rtt_max_ms" field in this mutation.

func (*Sample1minMutation) AddedRttMeanMs

func (m *Sample1minMutation) AddedRttMeanMs() (r float64, exists bool)

AddedRttMeanMs returns the value that was added to the "rtt_mean_ms" field in this mutation.

func (*Sample1minMutation) AddedRttP50Ms

func (m *Sample1minMutation) AddedRttP50Ms() (r float64, exists bool)

AddedRttP50Ms returns the value that was added to the "rtt_p50_ms" field in this mutation.

func (*Sample1minMutation) AddedRttP95Ms

func (m *Sample1minMutation) AddedRttP95Ms() (r float64, exists bool)

AddedRttP95Ms returns the value that was added to the "rtt_p95_ms" field in this mutation.

func (*Sample1minMutation) AddedRttP99Ms

func (m *Sample1minMutation) AddedRttP99Ms() (r float64, exists bool)

AddedRttP99Ms returns the value that was added to the "rtt_p99_ms" field in this mutation.

func (*Sample1minMutation) AddedSuccessCount

func (m *Sample1minMutation) AddedSuccessCount() (r int, exists bool)

AddedSuccessCount returns the value that was added to the "success_count" field in this mutation.

func (*Sample1minMutation) BucketStartUnixMs

func (m *Sample1minMutation) BucketStartUnixMs() (r int64, exists bool)

BucketStartUnixMs returns the value of the "bucket_start_unix_ms" field in the mutation.

func (*Sample1minMutation) ClearEdge

func (m *Sample1minMutation) 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 (*Sample1minMutation) ClearErrors

func (m *Sample1minMutation) ClearErrors()

ClearErrors clears the value of the "errors" field.

func (*Sample1minMutation) ClearField

func (m *Sample1minMutation) 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 (*Sample1minMutation) ClearJitterMs

func (m *Sample1minMutation) ClearJitterMs()

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1minMutation) ClearRttMaxMs

func (m *Sample1minMutation) ClearRttMaxMs()

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1minMutation) ClearRttMeanMs

func (m *Sample1minMutation) ClearRttMeanMs()

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1minMutation) ClearRttP50Ms

func (m *Sample1minMutation) ClearRttP50Ms()

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1minMutation) ClearRttP95Ms

func (m *Sample1minMutation) ClearRttP95Ms()

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1minMutation) ClearRttP99Ms

func (m *Sample1minMutation) ClearRttP99Ms()

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1minMutation) ClearedEdges

func (m *Sample1minMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*Sample1minMutation) ClearedFields

func (m *Sample1minMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (Sample1minMutation) Client

func (m Sample1minMutation) 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 (*Sample1minMutation) Count

func (m *Sample1minMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*Sample1minMutation) EdgeCleared

func (m *Sample1minMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*Sample1minMutation) Errors

func (m *Sample1minMutation) Errors() (r map[string]int, exists bool)

Errors returns the value of the "errors" field in the mutation.

func (*Sample1minMutation) ErrorsCleared

func (m *Sample1minMutation) ErrorsCleared() bool

ErrorsCleared returns if the "errors" field was cleared in this mutation.

func (*Sample1minMutation) FailCount

func (m *Sample1minMutation) FailCount() (r int, exists bool)

FailCount returns the value of the "fail_count" field in the mutation.

func (*Sample1minMutation) Field

func (m *Sample1minMutation) 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 (*Sample1minMutation) FieldCleared

func (m *Sample1minMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*Sample1minMutation) Fields

func (m *Sample1minMutation) 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 (*Sample1minMutation) ID

func (m *Sample1minMutation) 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 (*Sample1minMutation) IDs

func (m *Sample1minMutation) 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 (*Sample1minMutation) JitterMs

func (m *Sample1minMutation) JitterMs() (r float64, exists bool)

JitterMs returns the value of the "jitter_ms" field in the mutation.

func (*Sample1minMutation) JitterMsCleared

func (m *Sample1minMutation) JitterMsCleared() bool

JitterMsCleared returns if the "jitter_ms" field was cleared in this mutation.

func (*Sample1minMutation) OldBucketStartUnixMs

func (m *Sample1minMutation) OldBucketStartUnixMs(ctx context.Context) (v int64, err error)

OldBucketStartUnixMs returns the old "bucket_start_unix_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldCount

func (m *Sample1minMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldErrors

func (m *Sample1minMutation) OldErrors(ctx context.Context) (v map[string]int, err error)

OldErrors returns the old "errors" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldFailCount

func (m *Sample1minMutation) OldFailCount(ctx context.Context) (v int, err error)

OldFailCount returns the old "fail_count" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldField

func (m *Sample1minMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*Sample1minMutation) OldJitterMs

func (m *Sample1minMutation) OldJitterMs(ctx context.Context) (v *float64, err error)

OldJitterMs returns the old "jitter_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldRttMaxMs

func (m *Sample1minMutation) OldRttMaxMs(ctx context.Context) (v *float64, err error)

OldRttMaxMs returns the old "rtt_max_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldRttMeanMs

func (m *Sample1minMutation) OldRttMeanMs(ctx context.Context) (v *float64, err error)

OldRttMeanMs returns the old "rtt_mean_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldRttP50Ms

func (m *Sample1minMutation) OldRttP50Ms(ctx context.Context) (v *float64, err error)

OldRttP50Ms returns the old "rtt_p50_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldRttP95Ms

func (m *Sample1minMutation) OldRttP95Ms(ctx context.Context) (v *float64, err error)

OldRttP95Ms returns the old "rtt_p95_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldRttP99Ms

func (m *Sample1minMutation) OldRttP99Ms(ctx context.Context) (v *float64, err error)

OldRttP99Ms returns the old "rtt_p99_ms" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldSuccessCount

func (m *Sample1minMutation) OldSuccessCount(ctx context.Context) (v int, err error)

OldSuccessCount returns the old "success_count" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) OldTargetLabel

func (m *Sample1minMutation) OldTargetLabel(ctx context.Context) (v string, err error)

OldTargetLabel returns the old "target_label" field's value of the Sample1min entity. If the Sample1min 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 (*Sample1minMutation) Op

func (m *Sample1minMutation) Op() Op

Op returns the operation name.

func (*Sample1minMutation) RemovedEdges

func (m *Sample1minMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*Sample1minMutation) RemovedIDs

func (m *Sample1minMutation) 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 (*Sample1minMutation) ResetBucketStartUnixMs

func (m *Sample1minMutation) ResetBucketStartUnixMs()

ResetBucketStartUnixMs resets all changes to the "bucket_start_unix_ms" field.

func (*Sample1minMutation) ResetCount

func (m *Sample1minMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*Sample1minMutation) ResetEdge

func (m *Sample1minMutation) 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 (*Sample1minMutation) ResetErrors

func (m *Sample1minMutation) ResetErrors()

ResetErrors resets all changes to the "errors" field.

func (*Sample1minMutation) ResetFailCount

func (m *Sample1minMutation) ResetFailCount()

ResetFailCount resets all changes to the "fail_count" field.

func (*Sample1minMutation) ResetField

func (m *Sample1minMutation) 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 (*Sample1minMutation) ResetJitterMs

func (m *Sample1minMutation) ResetJitterMs()

ResetJitterMs resets all changes to the "jitter_ms" field.

func (*Sample1minMutation) ResetRttMaxMs

func (m *Sample1minMutation) ResetRttMaxMs()

ResetRttMaxMs resets all changes to the "rtt_max_ms" field.

func (*Sample1minMutation) ResetRttMeanMs

func (m *Sample1minMutation) ResetRttMeanMs()

ResetRttMeanMs resets all changes to the "rtt_mean_ms" field.

func (*Sample1minMutation) ResetRttP50Ms

func (m *Sample1minMutation) ResetRttP50Ms()

ResetRttP50Ms resets all changes to the "rtt_p50_ms" field.

func (*Sample1minMutation) ResetRttP95Ms

func (m *Sample1minMutation) ResetRttP95Ms()

ResetRttP95Ms resets all changes to the "rtt_p95_ms" field.

func (*Sample1minMutation) ResetRttP99Ms

func (m *Sample1minMutation) ResetRttP99Ms()

ResetRttP99Ms resets all changes to the "rtt_p99_ms" field.

func (*Sample1minMutation) ResetSuccessCount

func (m *Sample1minMutation) ResetSuccessCount()

ResetSuccessCount resets all changes to the "success_count" field.

func (*Sample1minMutation) ResetTargetLabel

func (m *Sample1minMutation) ResetTargetLabel()

ResetTargetLabel resets all changes to the "target_label" field.

func (*Sample1minMutation) RttMaxMs

func (m *Sample1minMutation) RttMaxMs() (r float64, exists bool)

RttMaxMs returns the value of the "rtt_max_ms" field in the mutation.

func (*Sample1minMutation) RttMaxMsCleared

func (m *Sample1minMutation) RttMaxMsCleared() bool

RttMaxMsCleared returns if the "rtt_max_ms" field was cleared in this mutation.

func (*Sample1minMutation) RttMeanMs

func (m *Sample1minMutation) RttMeanMs() (r float64, exists bool)

RttMeanMs returns the value of the "rtt_mean_ms" field in the mutation.

func (*Sample1minMutation) RttMeanMsCleared

func (m *Sample1minMutation) RttMeanMsCleared() bool

RttMeanMsCleared returns if the "rtt_mean_ms" field was cleared in this mutation.

func (*Sample1minMutation) RttP50Ms

func (m *Sample1minMutation) RttP50Ms() (r float64, exists bool)

RttP50Ms returns the value of the "rtt_p50_ms" field in the mutation.

func (*Sample1minMutation) RttP50MsCleared

func (m *Sample1minMutation) RttP50MsCleared() bool

RttP50MsCleared returns if the "rtt_p50_ms" field was cleared in this mutation.

func (*Sample1minMutation) RttP95Ms

func (m *Sample1minMutation) RttP95Ms() (r float64, exists bool)

RttP95Ms returns the value of the "rtt_p95_ms" field in the mutation.

func (*Sample1minMutation) RttP95MsCleared

func (m *Sample1minMutation) RttP95MsCleared() bool

RttP95MsCleared returns if the "rtt_p95_ms" field was cleared in this mutation.

func (*Sample1minMutation) RttP99Ms

func (m *Sample1minMutation) RttP99Ms() (r float64, exists bool)

RttP99Ms returns the value of the "rtt_p99_ms" field in the mutation.

func (*Sample1minMutation) RttP99MsCleared

func (m *Sample1minMutation) RttP99MsCleared() bool

RttP99MsCleared returns if the "rtt_p99_ms" field was cleared in this mutation.

func (*Sample1minMutation) SetBucketStartUnixMs

func (m *Sample1minMutation) SetBucketStartUnixMs(i int64)

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1minMutation) SetCount

func (m *Sample1minMutation) SetCount(i int)

SetCount sets the "count" field.

func (*Sample1minMutation) SetErrors

func (m *Sample1minMutation) SetErrors(value map[string]int)

SetErrors sets the "errors" field.

func (*Sample1minMutation) SetFailCount

func (m *Sample1minMutation) SetFailCount(i int)

SetFailCount sets the "fail_count" field.

func (*Sample1minMutation) SetField

func (m *Sample1minMutation) 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 (*Sample1minMutation) SetJitterMs

func (m *Sample1minMutation) SetJitterMs(f float64)

SetJitterMs sets the "jitter_ms" field.

func (*Sample1minMutation) SetOp

func (m *Sample1minMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*Sample1minMutation) SetRttMaxMs

func (m *Sample1minMutation) SetRttMaxMs(f float64)

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1minMutation) SetRttMeanMs

func (m *Sample1minMutation) SetRttMeanMs(f float64)

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1minMutation) SetRttP50Ms

func (m *Sample1minMutation) SetRttP50Ms(f float64)

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1minMutation) SetRttP95Ms

func (m *Sample1minMutation) SetRttP95Ms(f float64)

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1minMutation) SetRttP99Ms

func (m *Sample1minMutation) SetRttP99Ms(f float64)

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1minMutation) SetSuccessCount

func (m *Sample1minMutation) SetSuccessCount(i int)

SetSuccessCount sets the "success_count" field.

func (*Sample1minMutation) SetTargetLabel

func (m *Sample1minMutation) SetTargetLabel(s string)

SetTargetLabel sets the "target_label" field.

func (*Sample1minMutation) SuccessCount

func (m *Sample1minMutation) SuccessCount() (r int, exists bool)

SuccessCount returns the value of the "success_count" field in the mutation.

func (*Sample1minMutation) TargetLabel

func (m *Sample1minMutation) TargetLabel() (r string, exists bool)

TargetLabel returns the value of the "target_label" field in the mutation.

func (Sample1minMutation) Tx

func (m Sample1minMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*Sample1minMutation) Type

func (m *Sample1minMutation) Type() string

Type returns the node type of this mutation (Sample1min).

func (*Sample1minMutation) Where

func (m *Sample1minMutation) Where(ps ...predicate.Sample1min)

Where appends a list predicates to the Sample1minMutation builder.

func (*Sample1minMutation) WhereP

func (m *Sample1minMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the Sample1minMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type Sample1minQuery

type Sample1minQuery struct {
	// contains filtered or unexported fields
}

Sample1minQuery is the builder for querying Sample1min entities.

func (*Sample1minQuery) Aggregate

func (_q *Sample1minQuery) Aggregate(fns ...AggregateFunc) *Sample1minSelect

Aggregate returns a Sample1minSelect configured with the given aggregations.

func (*Sample1minQuery) All

func (_q *Sample1minQuery) All(ctx context.Context) ([]*Sample1min, error)

All executes the query and returns a list of Sample1mins.

func (*Sample1minQuery) AllX

func (_q *Sample1minQuery) AllX(ctx context.Context) []*Sample1min

AllX is like All, but panics if an error occurs.

func (*Sample1minQuery) Clone

func (_q *Sample1minQuery) Clone() *Sample1minQuery

Clone returns a duplicate of the Sample1minQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*Sample1minQuery) Count

func (_q *Sample1minQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*Sample1minQuery) CountX

func (_q *Sample1minQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*Sample1minQuery) Exist

func (_q *Sample1minQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*Sample1minQuery) ExistX

func (_q *Sample1minQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*Sample1minQuery) First

func (_q *Sample1minQuery) First(ctx context.Context) (*Sample1min, error)

First returns the first Sample1min entity from the query. Returns a *NotFoundError when no Sample1min was found.

func (*Sample1minQuery) FirstID

func (_q *Sample1minQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Sample1min ID from the query. Returns a *NotFoundError when no Sample1min ID was found.

func (*Sample1minQuery) FirstIDX

func (_q *Sample1minQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*Sample1minQuery) FirstX

func (_q *Sample1minQuery) FirstX(ctx context.Context) *Sample1min

FirstX is like First, but panics if an error occurs.

func (*Sample1minQuery) GroupBy

func (_q *Sample1minQuery) GroupBy(field string, fields ...string) *Sample1minGroupBy

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Sample1min.Query().
	GroupBy(sample1min.FieldBucketStartUnixMs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*Sample1minQuery) IDs

func (_q *Sample1minQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Sample1min IDs.

func (*Sample1minQuery) IDsX

func (_q *Sample1minQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*Sample1minQuery) Limit

func (_q *Sample1minQuery) Limit(limit int) *Sample1minQuery

Limit the number of records to be returned by this query.

func (*Sample1minQuery) Offset

func (_q *Sample1minQuery) Offset(offset int) *Sample1minQuery

Offset to start from.

func (*Sample1minQuery) Only

func (_q *Sample1minQuery) Only(ctx context.Context) (*Sample1min, error)

Only returns a single Sample1min entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sample1min entity is found. Returns a *NotFoundError when no Sample1min entities are found.

func (*Sample1minQuery) OnlyID

func (_q *Sample1minQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Sample1min ID in the query. Returns a *NotSingularError when more than one Sample1min ID is found. Returns a *NotFoundError when no entities are found.

func (*Sample1minQuery) OnlyIDX

func (_q *Sample1minQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*Sample1minQuery) OnlyX

func (_q *Sample1minQuery) OnlyX(ctx context.Context) *Sample1min

OnlyX is like Only, but panics if an error occurs.

func (*Sample1minQuery) Order

Order specifies how the records should be ordered.

func (*Sample1minQuery) Select

func (_q *Sample1minQuery) Select(fields ...string) *Sample1minSelect

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
}

client.Sample1min.Query().
	Select(sample1min.FieldBucketStartUnixMs).
	Scan(ctx, &v)

func (*Sample1minQuery) Unique

func (_q *Sample1minQuery) Unique(unique bool) *Sample1minQuery

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 (*Sample1minQuery) Where

Where adds a new predicate for the Sample1minQuery builder.

type Sample1minSelect

type Sample1minSelect struct {
	*Sample1minQuery
	// contains filtered or unexported fields
}

Sample1minSelect is the builder for selecting fields of Sample1min entities.

func (*Sample1minSelect) Aggregate

func (_s *Sample1minSelect) Aggregate(fns ...AggregateFunc) *Sample1minSelect

Aggregate adds the given aggregation functions to the selector query.

func (*Sample1minSelect) Bool

func (s *Sample1minSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) BoolX

func (s *Sample1minSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample1minSelect) Bools

func (s *Sample1minSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) BoolsX

func (s *Sample1minSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample1minSelect) Float64

func (s *Sample1minSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) Float64X

func (s *Sample1minSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample1minSelect) Float64s

func (s *Sample1minSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) Float64sX

func (s *Sample1minSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample1minSelect) Int

func (s *Sample1minSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) IntX

func (s *Sample1minSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample1minSelect) Ints

func (s *Sample1minSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) IntsX

func (s *Sample1minSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample1minSelect) Scan

func (_s *Sample1minSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample1minSelect) ScanX

func (s *Sample1minSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample1minSelect) String

func (s *Sample1minSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) StringX

func (s *Sample1minSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample1minSelect) Strings

func (s *Sample1minSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample1minSelect) StringsX

func (s *Sample1minSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample1minUpdate

type Sample1minUpdate struct {
	// contains filtered or unexported fields
}

Sample1minUpdate is the builder for updating Sample1min entities.

func (*Sample1minUpdate) AddBucketStartUnixMs

func (_u *Sample1minUpdate) AddBucketStartUnixMs(v int64) *Sample1minUpdate

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample1minUpdate) AddCount

func (_u *Sample1minUpdate) AddCount(v int) *Sample1minUpdate

AddCount adds value to the "count" field.

func (*Sample1minUpdate) AddFailCount

func (_u *Sample1minUpdate) AddFailCount(v int) *Sample1minUpdate

AddFailCount adds value to the "fail_count" field.

func (*Sample1minUpdate) AddJitterMs

func (_u *Sample1minUpdate) AddJitterMs(v float64) *Sample1minUpdate

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample1minUpdate) AddRttMaxMs

func (_u *Sample1minUpdate) AddRttMaxMs(v float64) *Sample1minUpdate

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample1minUpdate) AddRttMeanMs

func (_u *Sample1minUpdate) AddRttMeanMs(v float64) *Sample1minUpdate

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample1minUpdate) AddRttP50Ms

func (_u *Sample1minUpdate) AddRttP50Ms(v float64) *Sample1minUpdate

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample1minUpdate) AddRttP95Ms

func (_u *Sample1minUpdate) AddRttP95Ms(v float64) *Sample1minUpdate

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample1minUpdate) AddRttP99Ms

func (_u *Sample1minUpdate) AddRttP99Ms(v float64) *Sample1minUpdate

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample1minUpdate) AddSuccessCount

func (_u *Sample1minUpdate) AddSuccessCount(v int) *Sample1minUpdate

AddSuccessCount adds value to the "success_count" field.

func (*Sample1minUpdate) ClearErrors

func (_u *Sample1minUpdate) ClearErrors() *Sample1minUpdate

ClearErrors clears the value of the "errors" field.

func (*Sample1minUpdate) ClearJitterMs

func (_u *Sample1minUpdate) ClearJitterMs() *Sample1minUpdate

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1minUpdate) ClearRttMaxMs

func (_u *Sample1minUpdate) ClearRttMaxMs() *Sample1minUpdate

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1minUpdate) ClearRttMeanMs

func (_u *Sample1minUpdate) ClearRttMeanMs() *Sample1minUpdate

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1minUpdate) ClearRttP50Ms

func (_u *Sample1minUpdate) ClearRttP50Ms() *Sample1minUpdate

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1minUpdate) ClearRttP95Ms

func (_u *Sample1minUpdate) ClearRttP95Ms() *Sample1minUpdate

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1minUpdate) ClearRttP99Ms

func (_u *Sample1minUpdate) ClearRttP99Ms() *Sample1minUpdate

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1minUpdate) Exec

func (_u *Sample1minUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample1minUpdate) ExecX

func (_u *Sample1minUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minUpdate) Mutation

func (_u *Sample1minUpdate) Mutation() *Sample1minMutation

Mutation returns the Sample1minMutation object of the builder.

func (*Sample1minUpdate) Save

func (_u *Sample1minUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*Sample1minUpdate) SaveX

func (_u *Sample1minUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*Sample1minUpdate) SetBucketStartUnixMs

func (_u *Sample1minUpdate) SetBucketStartUnixMs(v int64) *Sample1minUpdate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1minUpdate) SetCount

func (_u *Sample1minUpdate) SetCount(v int) *Sample1minUpdate

SetCount sets the "count" field.

func (*Sample1minUpdate) SetErrors

func (_u *Sample1minUpdate) SetErrors(v map[string]int) *Sample1minUpdate

SetErrors sets the "errors" field.

func (*Sample1minUpdate) SetFailCount

func (_u *Sample1minUpdate) SetFailCount(v int) *Sample1minUpdate

SetFailCount sets the "fail_count" field.

func (*Sample1minUpdate) SetJitterMs

func (_u *Sample1minUpdate) SetJitterMs(v float64) *Sample1minUpdate

SetJitterMs sets the "jitter_ms" field.

func (*Sample1minUpdate) SetNillableBucketStartUnixMs

func (_u *Sample1minUpdate) SetNillableBucketStartUnixMs(v *int64) *Sample1minUpdate

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableCount

func (_u *Sample1minUpdate) SetNillableCount(v *int) *Sample1minUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableFailCount

func (_u *Sample1minUpdate) SetNillableFailCount(v *int) *Sample1minUpdate

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableJitterMs

func (_u *Sample1minUpdate) SetNillableJitterMs(v *float64) *Sample1minUpdate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableRttMaxMs

func (_u *Sample1minUpdate) SetNillableRttMaxMs(v *float64) *Sample1minUpdate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableRttMeanMs

func (_u *Sample1minUpdate) SetNillableRttMeanMs(v *float64) *Sample1minUpdate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableRttP50Ms

func (_u *Sample1minUpdate) SetNillableRttP50Ms(v *float64) *Sample1minUpdate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableRttP95Ms

func (_u *Sample1minUpdate) SetNillableRttP95Ms(v *float64) *Sample1minUpdate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableRttP99Ms

func (_u *Sample1minUpdate) SetNillableRttP99Ms(v *float64) *Sample1minUpdate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableSuccessCount

func (_u *Sample1minUpdate) SetNillableSuccessCount(v *int) *Sample1minUpdate

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample1minUpdate) SetNillableTargetLabel

func (_u *Sample1minUpdate) SetNillableTargetLabel(v *string) *Sample1minUpdate

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample1minUpdate) SetRttMaxMs

func (_u *Sample1minUpdate) SetRttMaxMs(v float64) *Sample1minUpdate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1minUpdate) SetRttMeanMs

func (_u *Sample1minUpdate) SetRttMeanMs(v float64) *Sample1minUpdate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1minUpdate) SetRttP50Ms

func (_u *Sample1minUpdate) SetRttP50Ms(v float64) *Sample1minUpdate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1minUpdate) SetRttP95Ms

func (_u *Sample1minUpdate) SetRttP95Ms(v float64) *Sample1minUpdate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1minUpdate) SetRttP99Ms

func (_u *Sample1minUpdate) SetRttP99Ms(v float64) *Sample1minUpdate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1minUpdate) SetSuccessCount

func (_u *Sample1minUpdate) SetSuccessCount(v int) *Sample1minUpdate

SetSuccessCount sets the "success_count" field.

func (*Sample1minUpdate) SetTargetLabel

func (_u *Sample1minUpdate) SetTargetLabel(v string) *Sample1minUpdate

SetTargetLabel sets the "target_label" field.

func (*Sample1minUpdate) Where

Where appends a list predicates to the Sample1minUpdate builder.

type Sample1minUpdateOne

type Sample1minUpdateOne struct {
	// contains filtered or unexported fields
}

Sample1minUpdateOne is the builder for updating a single Sample1min entity.

func (*Sample1minUpdateOne) AddBucketStartUnixMs

func (_u *Sample1minUpdateOne) AddBucketStartUnixMs(v int64) *Sample1minUpdateOne

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample1minUpdateOne) AddCount

func (_u *Sample1minUpdateOne) AddCount(v int) *Sample1minUpdateOne

AddCount adds value to the "count" field.

func (*Sample1minUpdateOne) AddFailCount

func (_u *Sample1minUpdateOne) AddFailCount(v int) *Sample1minUpdateOne

AddFailCount adds value to the "fail_count" field.

func (*Sample1minUpdateOne) AddJitterMs

func (_u *Sample1minUpdateOne) AddJitterMs(v float64) *Sample1minUpdateOne

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample1minUpdateOne) AddRttMaxMs

func (_u *Sample1minUpdateOne) AddRttMaxMs(v float64) *Sample1minUpdateOne

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample1minUpdateOne) AddRttMeanMs

func (_u *Sample1minUpdateOne) AddRttMeanMs(v float64) *Sample1minUpdateOne

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample1minUpdateOne) AddRttP50Ms

func (_u *Sample1minUpdateOne) AddRttP50Ms(v float64) *Sample1minUpdateOne

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample1minUpdateOne) AddRttP95Ms

func (_u *Sample1minUpdateOne) AddRttP95Ms(v float64) *Sample1minUpdateOne

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample1minUpdateOne) AddRttP99Ms

func (_u *Sample1minUpdateOne) AddRttP99Ms(v float64) *Sample1minUpdateOne

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample1minUpdateOne) AddSuccessCount

func (_u *Sample1minUpdateOne) AddSuccessCount(v int) *Sample1minUpdateOne

AddSuccessCount adds value to the "success_count" field.

func (*Sample1minUpdateOne) ClearErrors

func (_u *Sample1minUpdateOne) ClearErrors() *Sample1minUpdateOne

ClearErrors clears the value of the "errors" field.

func (*Sample1minUpdateOne) ClearJitterMs

func (_u *Sample1minUpdateOne) ClearJitterMs() *Sample1minUpdateOne

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample1minUpdateOne) ClearRttMaxMs

func (_u *Sample1minUpdateOne) ClearRttMaxMs() *Sample1minUpdateOne

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample1minUpdateOne) ClearRttMeanMs

func (_u *Sample1minUpdateOne) ClearRttMeanMs() *Sample1minUpdateOne

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample1minUpdateOne) ClearRttP50Ms

func (_u *Sample1minUpdateOne) ClearRttP50Ms() *Sample1minUpdateOne

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample1minUpdateOne) ClearRttP95Ms

func (_u *Sample1minUpdateOne) ClearRttP95Ms() *Sample1minUpdateOne

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample1minUpdateOne) ClearRttP99Ms

func (_u *Sample1minUpdateOne) ClearRttP99Ms() *Sample1minUpdateOne

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample1minUpdateOne) Exec

func (_u *Sample1minUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*Sample1minUpdateOne) ExecX

func (_u *Sample1minUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample1minUpdateOne) Mutation

func (_u *Sample1minUpdateOne) Mutation() *Sample1minMutation

Mutation returns the Sample1minMutation object of the builder.

func (*Sample1minUpdateOne) Save

Save executes the query and returns the updated Sample1min entity.

func (*Sample1minUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*Sample1minUpdateOne) Select

func (_u *Sample1minUpdateOne) Select(field string, fields ...string) *Sample1minUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*Sample1minUpdateOne) SetBucketStartUnixMs

func (_u *Sample1minUpdateOne) SetBucketStartUnixMs(v int64) *Sample1minUpdateOne

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample1minUpdateOne) SetCount

func (_u *Sample1minUpdateOne) SetCount(v int) *Sample1minUpdateOne

SetCount sets the "count" field.

func (*Sample1minUpdateOne) SetErrors

func (_u *Sample1minUpdateOne) SetErrors(v map[string]int) *Sample1minUpdateOne

SetErrors sets the "errors" field.

func (*Sample1minUpdateOne) SetFailCount

func (_u *Sample1minUpdateOne) SetFailCount(v int) *Sample1minUpdateOne

SetFailCount sets the "fail_count" field.

func (*Sample1minUpdateOne) SetJitterMs

func (_u *Sample1minUpdateOne) SetJitterMs(v float64) *Sample1minUpdateOne

SetJitterMs sets the "jitter_ms" field.

func (*Sample1minUpdateOne) SetNillableBucketStartUnixMs

func (_u *Sample1minUpdateOne) SetNillableBucketStartUnixMs(v *int64) *Sample1minUpdateOne

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableCount

func (_u *Sample1minUpdateOne) SetNillableCount(v *int) *Sample1minUpdateOne

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableFailCount

func (_u *Sample1minUpdateOne) SetNillableFailCount(v *int) *Sample1minUpdateOne

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableJitterMs

func (_u *Sample1minUpdateOne) SetNillableJitterMs(v *float64) *Sample1minUpdateOne

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableRttMaxMs

func (_u *Sample1minUpdateOne) SetNillableRttMaxMs(v *float64) *Sample1minUpdateOne

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableRttMeanMs

func (_u *Sample1minUpdateOne) SetNillableRttMeanMs(v *float64) *Sample1minUpdateOne

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableRttP50Ms

func (_u *Sample1minUpdateOne) SetNillableRttP50Ms(v *float64) *Sample1minUpdateOne

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableRttP95Ms

func (_u *Sample1minUpdateOne) SetNillableRttP95Ms(v *float64) *Sample1minUpdateOne

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableRttP99Ms

func (_u *Sample1minUpdateOne) SetNillableRttP99Ms(v *float64) *Sample1minUpdateOne

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableSuccessCount

func (_u *Sample1minUpdateOne) SetNillableSuccessCount(v *int) *Sample1minUpdateOne

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample1minUpdateOne) SetNillableTargetLabel

func (_u *Sample1minUpdateOne) SetNillableTargetLabel(v *string) *Sample1minUpdateOne

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample1minUpdateOne) SetRttMaxMs

func (_u *Sample1minUpdateOne) SetRttMaxMs(v float64) *Sample1minUpdateOne

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample1minUpdateOne) SetRttMeanMs

func (_u *Sample1minUpdateOne) SetRttMeanMs(v float64) *Sample1minUpdateOne

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample1minUpdateOne) SetRttP50Ms

func (_u *Sample1minUpdateOne) SetRttP50Ms(v float64) *Sample1minUpdateOne

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample1minUpdateOne) SetRttP95Ms

func (_u *Sample1minUpdateOne) SetRttP95Ms(v float64) *Sample1minUpdateOne

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample1minUpdateOne) SetRttP99Ms

func (_u *Sample1minUpdateOne) SetRttP99Ms(v float64) *Sample1minUpdateOne

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample1minUpdateOne) SetSuccessCount

func (_u *Sample1minUpdateOne) SetSuccessCount(v int) *Sample1minUpdateOne

SetSuccessCount sets the "success_count" field.

func (*Sample1minUpdateOne) SetTargetLabel

func (_u *Sample1minUpdateOne) SetTargetLabel(v string) *Sample1minUpdateOne

SetTargetLabel sets the "target_label" field.

func (*Sample1minUpdateOne) Where

Where appends a list predicates to the Sample1minUpdate builder.

type Sample1mins

type Sample1mins []*Sample1min

Sample1mins is a parsable slice of Sample1min.

type Sample5min

type Sample5min struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Unix-ms of the 5-minute window start, multiple of 300_000
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	// TargetLabel holds the value of the "target_label" field.
	TargetLabel string `json:"target_label,omitempty"`
	// Total samples in the bucket
	Count int `json:"count,omitempty"`
	// SuccessCount holds the value of the "success_count" field.
	SuccessCount int `json:"success_count,omitempty"`
	// FailCount holds the value of the "fail_count" field.
	FailCount int `json:"fail_count,omitempty"`
	// RttP50Ms holds the value of the "rtt_p50_ms" field.
	RttP50Ms *float64 `json:"rtt_p50_ms,omitempty"`
	// RttP95Ms holds the value of the "rtt_p95_ms" field.
	RttP95Ms *float64 `json:"rtt_p95_ms,omitempty"`
	// RttP99Ms holds the value of the "rtt_p99_ms" field.
	RttP99Ms *float64 `json:"rtt_p99_ms,omitempty"`
	// RttMaxMs holds the value of the "rtt_max_ms" field.
	RttMaxMs *float64 `json:"rtt_max_ms,omitempty"`
	// RttMeanMs holds the value of the "rtt_mean_ms" field.
	RttMeanMs *float64 `json:"rtt_mean_ms,omitempty"`
	// RFC 3550-style jitter: mean abs delta of consecutive RTTs in this bucket
	JitterMs *float64 `json:"jitter_ms,omitempty"`
	// Error code → count for failed samples in this bucket
	Errors map[string]int `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

Sample5min is the model entity for the Sample5min schema.

func (*Sample5min) String

func (_m *Sample5min) String() string

String implements the fmt.Stringer.

func (*Sample5min) Unwrap

func (_m *Sample5min) Unwrap() *Sample5min

Unwrap unwraps the Sample5min 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 (*Sample5min) Update

func (_m *Sample5min) Update() *Sample5minUpdateOne

Update returns a builder for updating this Sample5min. Note that you need to call Sample5min.Unwrap() before calling this method if this Sample5min was returned from a transaction, and the transaction was committed or rolled back.

func (*Sample5min) Value

func (_m *Sample5min) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Sample5min. This includes values selected through modifiers, order, etc.

type Sample5minClient

type Sample5minClient struct {
	// contains filtered or unexported fields
}

Sample5minClient is a client for the Sample5min schema.

func NewSample5minClient

func NewSample5minClient(c config) *Sample5minClient

NewSample5minClient returns a client for the Sample5min from the given config.

func (*Sample5minClient) Create

func (c *Sample5minClient) Create() *Sample5minCreate

Create returns a builder for creating a Sample5min entity.

func (*Sample5minClient) CreateBulk

func (c *Sample5minClient) CreateBulk(builders ...*Sample5minCreate) *Sample5minCreateBulk

CreateBulk returns a builder for creating a bulk of Sample5min entities.

func (*Sample5minClient) Delete

func (c *Sample5minClient) Delete() *Sample5minDelete

Delete returns a delete builder for Sample5min.

func (*Sample5minClient) DeleteOne

func (c *Sample5minClient) DeleteOne(_m *Sample5min) *Sample5minDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Sample5minClient) DeleteOneID

func (c *Sample5minClient) DeleteOneID(id int) *Sample5minDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*Sample5minClient) Get

func (c *Sample5minClient) Get(ctx context.Context, id int) (*Sample5min, error)

Get returns a Sample5min entity by its id.

func (*Sample5minClient) GetX

func (c *Sample5minClient) GetX(ctx context.Context, id int) *Sample5min

GetX is like Get, but panics if an error occurs.

func (*Sample5minClient) Hooks

func (c *Sample5minClient) Hooks() []Hook

Hooks returns the client hooks.

func (*Sample5minClient) Intercept

func (c *Sample5minClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sample5min.Intercept(f(g(h())))`.

func (*Sample5minClient) Interceptors

func (c *Sample5minClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*Sample5minClient) MapCreateBulk

func (c *Sample5minClient) MapCreateBulk(slice any, setFunc func(*Sample5minCreate, int)) *Sample5minCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*Sample5minClient) Query

func (c *Sample5minClient) Query() *Sample5minQuery

Query returns a query builder for Sample5min.

func (*Sample5minClient) Update

func (c *Sample5minClient) Update() *Sample5minUpdate

Update returns an update builder for Sample5min.

func (*Sample5minClient) UpdateOne

func (c *Sample5minClient) UpdateOne(_m *Sample5min) *Sample5minUpdateOne

UpdateOne returns an update builder for the given entity.

func (*Sample5minClient) UpdateOneID

func (c *Sample5minClient) UpdateOneID(id int) *Sample5minUpdateOne

UpdateOneID returns an update builder for the given id.

func (*Sample5minClient) Use

func (c *Sample5minClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sample5min.Hooks(f(g(h())))`.

type Sample5minCreate

type Sample5minCreate struct {
	// contains filtered or unexported fields
}

Sample5minCreate is the builder for creating a Sample5min entity.

func (*Sample5minCreate) Exec

func (_c *Sample5minCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample5minCreate) ExecX

func (_c *Sample5minCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minCreate) Mutation

func (_c *Sample5minCreate) Mutation() *Sample5minMutation

Mutation returns the Sample5minMutation object of the builder.

func (*Sample5minCreate) Save

func (_c *Sample5minCreate) Save(ctx context.Context) (*Sample5min, error)

Save creates the Sample5min in the database.

func (*Sample5minCreate) SaveX

func (_c *Sample5minCreate) SaveX(ctx context.Context) *Sample5min

SaveX calls Save and panics if Save returns an error.

func (*Sample5minCreate) SetBucketStartUnixMs

func (_c *Sample5minCreate) SetBucketStartUnixMs(v int64) *Sample5minCreate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample5minCreate) SetCount

func (_c *Sample5minCreate) SetCount(v int) *Sample5minCreate

SetCount sets the "count" field.

func (*Sample5minCreate) SetErrors

func (_c *Sample5minCreate) SetErrors(v map[string]int) *Sample5minCreate

SetErrors sets the "errors" field.

func (*Sample5minCreate) SetFailCount

func (_c *Sample5minCreate) SetFailCount(v int) *Sample5minCreate

SetFailCount sets the "fail_count" field.

func (*Sample5minCreate) SetJitterMs

func (_c *Sample5minCreate) SetJitterMs(v float64) *Sample5minCreate

SetJitterMs sets the "jitter_ms" field.

func (*Sample5minCreate) SetNillableJitterMs

func (_c *Sample5minCreate) SetNillableJitterMs(v *float64) *Sample5minCreate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample5minCreate) SetNillableRttMaxMs

func (_c *Sample5minCreate) SetNillableRttMaxMs(v *float64) *Sample5minCreate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample5minCreate) SetNillableRttMeanMs

func (_c *Sample5minCreate) SetNillableRttMeanMs(v *float64) *Sample5minCreate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample5minCreate) SetNillableRttP50Ms

func (_c *Sample5minCreate) SetNillableRttP50Ms(v *float64) *Sample5minCreate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample5minCreate) SetNillableRttP95Ms

func (_c *Sample5minCreate) SetNillableRttP95Ms(v *float64) *Sample5minCreate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample5minCreate) SetNillableRttP99Ms

func (_c *Sample5minCreate) SetNillableRttP99Ms(v *float64) *Sample5minCreate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample5minCreate) SetRttMaxMs

func (_c *Sample5minCreate) SetRttMaxMs(v float64) *Sample5minCreate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample5minCreate) SetRttMeanMs

func (_c *Sample5minCreate) SetRttMeanMs(v float64) *Sample5minCreate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample5minCreate) SetRttP50Ms

func (_c *Sample5minCreate) SetRttP50Ms(v float64) *Sample5minCreate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample5minCreate) SetRttP95Ms

func (_c *Sample5minCreate) SetRttP95Ms(v float64) *Sample5minCreate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample5minCreate) SetRttP99Ms

func (_c *Sample5minCreate) SetRttP99Ms(v float64) *Sample5minCreate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample5minCreate) SetSuccessCount

func (_c *Sample5minCreate) SetSuccessCount(v int) *Sample5minCreate

SetSuccessCount sets the "success_count" field.

func (*Sample5minCreate) SetTargetLabel

func (_c *Sample5minCreate) SetTargetLabel(v string) *Sample5minCreate

SetTargetLabel sets the "target_label" field.

type Sample5minCreateBulk

type Sample5minCreateBulk struct {
	// contains filtered or unexported fields
}

Sample5minCreateBulk is the builder for creating many Sample5min entities in bulk.

func (*Sample5minCreateBulk) Exec

func (_c *Sample5minCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample5minCreateBulk) ExecX

func (_c *Sample5minCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minCreateBulk) Save

func (_c *Sample5minCreateBulk) Save(ctx context.Context) ([]*Sample5min, error)

Save creates the Sample5min entities in the database.

func (*Sample5minCreateBulk) SaveX

func (_c *Sample5minCreateBulk) SaveX(ctx context.Context) []*Sample5min

SaveX is like Save, but panics if an error occurs.

type Sample5minDelete

type Sample5minDelete struct {
	// contains filtered or unexported fields
}

Sample5minDelete is the builder for deleting a Sample5min entity.

func (*Sample5minDelete) Exec

func (_d *Sample5minDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*Sample5minDelete) ExecX

func (_d *Sample5minDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minDelete) Where

Where appends a list predicates to the Sample5minDelete builder.

type Sample5minDeleteOne

type Sample5minDeleteOne struct {
	// contains filtered or unexported fields
}

Sample5minDeleteOne is the builder for deleting a single Sample5min entity.

func (*Sample5minDeleteOne) Exec

func (_d *Sample5minDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*Sample5minDeleteOne) ExecX

func (_d *Sample5minDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minDeleteOne) Where

Where appends a list predicates to the Sample5minDelete builder.

type Sample5minGroupBy

type Sample5minGroupBy struct {
	// contains filtered or unexported fields
}

Sample5minGroupBy is the group-by builder for Sample5min entities.

func (*Sample5minGroupBy) Aggregate

func (_g *Sample5minGroupBy) Aggregate(fns ...AggregateFunc) *Sample5minGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*Sample5minGroupBy) Bool

func (s *Sample5minGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) BoolX

func (s *Sample5minGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample5minGroupBy) Bools

func (s *Sample5minGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) BoolsX

func (s *Sample5minGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample5minGroupBy) Float64

func (s *Sample5minGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) Float64X

func (s *Sample5minGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample5minGroupBy) Float64s

func (s *Sample5minGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) Float64sX

func (s *Sample5minGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample5minGroupBy) Int

func (s *Sample5minGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) IntX

func (s *Sample5minGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample5minGroupBy) Ints

func (s *Sample5minGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) IntsX

func (s *Sample5minGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample5minGroupBy) Scan

func (_g *Sample5minGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample5minGroupBy) ScanX

func (s *Sample5minGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample5minGroupBy) String

func (s *Sample5minGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) StringX

func (s *Sample5minGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample5minGroupBy) Strings

func (s *Sample5minGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample5minGroupBy) StringsX

func (s *Sample5minGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample5minMutation

type Sample5minMutation struct {
	// contains filtered or unexported fields
}

Sample5minMutation represents an operation that mutates the Sample5min nodes in the graph.

func (*Sample5minMutation) AddBucketStartUnixMs

func (m *Sample5minMutation) AddBucketStartUnixMs(i int64)

AddBucketStartUnixMs adds i to the "bucket_start_unix_ms" field.

func (*Sample5minMutation) AddCount

func (m *Sample5minMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*Sample5minMutation) AddFailCount

func (m *Sample5minMutation) AddFailCount(i int)

AddFailCount adds i to the "fail_count" field.

func (*Sample5minMutation) AddField

func (m *Sample5minMutation) 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 (*Sample5minMutation) AddJitterMs

func (m *Sample5minMutation) AddJitterMs(f float64)

AddJitterMs adds f to the "jitter_ms" field.

func (*Sample5minMutation) AddRttMaxMs

func (m *Sample5minMutation) AddRttMaxMs(f float64)

AddRttMaxMs adds f to the "rtt_max_ms" field.

func (*Sample5minMutation) AddRttMeanMs

func (m *Sample5minMutation) AddRttMeanMs(f float64)

AddRttMeanMs adds f to the "rtt_mean_ms" field.

func (*Sample5minMutation) AddRttP50Ms

func (m *Sample5minMutation) AddRttP50Ms(f float64)

AddRttP50Ms adds f to the "rtt_p50_ms" field.

func (*Sample5minMutation) AddRttP95Ms

func (m *Sample5minMutation) AddRttP95Ms(f float64)

AddRttP95Ms adds f to the "rtt_p95_ms" field.

func (*Sample5minMutation) AddRttP99Ms

func (m *Sample5minMutation) AddRttP99Ms(f float64)

AddRttP99Ms adds f to the "rtt_p99_ms" field.

func (*Sample5minMutation) AddSuccessCount

func (m *Sample5minMutation) AddSuccessCount(i int)

AddSuccessCount adds i to the "success_count" field.

func (*Sample5minMutation) AddedBucketStartUnixMs

func (m *Sample5minMutation) AddedBucketStartUnixMs() (r int64, exists bool)

AddedBucketStartUnixMs returns the value that was added to the "bucket_start_unix_ms" field in this mutation.

func (*Sample5minMutation) AddedCount

func (m *Sample5minMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*Sample5minMutation) AddedEdges

func (m *Sample5minMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*Sample5minMutation) AddedFailCount

func (m *Sample5minMutation) AddedFailCount() (r int, exists bool)

AddedFailCount returns the value that was added to the "fail_count" field in this mutation.

func (*Sample5minMutation) AddedField

func (m *Sample5minMutation) 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 (*Sample5minMutation) AddedFields

func (m *Sample5minMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*Sample5minMutation) AddedIDs

func (m *Sample5minMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*Sample5minMutation) AddedJitterMs

func (m *Sample5minMutation) AddedJitterMs() (r float64, exists bool)

AddedJitterMs returns the value that was added to the "jitter_ms" field in this mutation.

func (*Sample5minMutation) AddedRttMaxMs

func (m *Sample5minMutation) AddedRttMaxMs() (r float64, exists bool)

AddedRttMaxMs returns the value that was added to the "rtt_max_ms" field in this mutation.

func (*Sample5minMutation) AddedRttMeanMs

func (m *Sample5minMutation) AddedRttMeanMs() (r float64, exists bool)

AddedRttMeanMs returns the value that was added to the "rtt_mean_ms" field in this mutation.

func (*Sample5minMutation) AddedRttP50Ms

func (m *Sample5minMutation) AddedRttP50Ms() (r float64, exists bool)

AddedRttP50Ms returns the value that was added to the "rtt_p50_ms" field in this mutation.

func (*Sample5minMutation) AddedRttP95Ms

func (m *Sample5minMutation) AddedRttP95Ms() (r float64, exists bool)

AddedRttP95Ms returns the value that was added to the "rtt_p95_ms" field in this mutation.

func (*Sample5minMutation) AddedRttP99Ms

func (m *Sample5minMutation) AddedRttP99Ms() (r float64, exists bool)

AddedRttP99Ms returns the value that was added to the "rtt_p99_ms" field in this mutation.

func (*Sample5minMutation) AddedSuccessCount

func (m *Sample5minMutation) AddedSuccessCount() (r int, exists bool)

AddedSuccessCount returns the value that was added to the "success_count" field in this mutation.

func (*Sample5minMutation) BucketStartUnixMs

func (m *Sample5minMutation) BucketStartUnixMs() (r int64, exists bool)

BucketStartUnixMs returns the value of the "bucket_start_unix_ms" field in the mutation.

func (*Sample5minMutation) ClearEdge

func (m *Sample5minMutation) 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 (*Sample5minMutation) ClearErrors

func (m *Sample5minMutation) ClearErrors()

ClearErrors clears the value of the "errors" field.

func (*Sample5minMutation) ClearField

func (m *Sample5minMutation) 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 (*Sample5minMutation) ClearJitterMs

func (m *Sample5minMutation) ClearJitterMs()

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample5minMutation) ClearRttMaxMs

func (m *Sample5minMutation) ClearRttMaxMs()

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample5minMutation) ClearRttMeanMs

func (m *Sample5minMutation) ClearRttMeanMs()

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample5minMutation) ClearRttP50Ms

func (m *Sample5minMutation) ClearRttP50Ms()

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample5minMutation) ClearRttP95Ms

func (m *Sample5minMutation) ClearRttP95Ms()

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample5minMutation) ClearRttP99Ms

func (m *Sample5minMutation) ClearRttP99Ms()

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample5minMutation) ClearedEdges

func (m *Sample5minMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*Sample5minMutation) ClearedFields

func (m *Sample5minMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (Sample5minMutation) Client

func (m Sample5minMutation) 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 (*Sample5minMutation) Count

func (m *Sample5minMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*Sample5minMutation) EdgeCleared

func (m *Sample5minMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*Sample5minMutation) Errors

func (m *Sample5minMutation) Errors() (r map[string]int, exists bool)

Errors returns the value of the "errors" field in the mutation.

func (*Sample5minMutation) ErrorsCleared

func (m *Sample5minMutation) ErrorsCleared() bool

ErrorsCleared returns if the "errors" field was cleared in this mutation.

func (*Sample5minMutation) FailCount

func (m *Sample5minMutation) FailCount() (r int, exists bool)

FailCount returns the value of the "fail_count" field in the mutation.

func (*Sample5minMutation) Field

func (m *Sample5minMutation) 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 (*Sample5minMutation) FieldCleared

func (m *Sample5minMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*Sample5minMutation) Fields

func (m *Sample5minMutation) 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 (*Sample5minMutation) ID

func (m *Sample5minMutation) 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 (*Sample5minMutation) IDs

func (m *Sample5minMutation) 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 (*Sample5minMutation) JitterMs

func (m *Sample5minMutation) JitterMs() (r float64, exists bool)

JitterMs returns the value of the "jitter_ms" field in the mutation.

func (*Sample5minMutation) JitterMsCleared

func (m *Sample5minMutation) JitterMsCleared() bool

JitterMsCleared returns if the "jitter_ms" field was cleared in this mutation.

func (*Sample5minMutation) OldBucketStartUnixMs

func (m *Sample5minMutation) OldBucketStartUnixMs(ctx context.Context) (v int64, err error)

OldBucketStartUnixMs returns the old "bucket_start_unix_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldCount

func (m *Sample5minMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldErrors

func (m *Sample5minMutation) OldErrors(ctx context.Context) (v map[string]int, err error)

OldErrors returns the old "errors" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldFailCount

func (m *Sample5minMutation) OldFailCount(ctx context.Context) (v int, err error)

OldFailCount returns the old "fail_count" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldField

func (m *Sample5minMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*Sample5minMutation) OldJitterMs

func (m *Sample5minMutation) OldJitterMs(ctx context.Context) (v *float64, err error)

OldJitterMs returns the old "jitter_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldRttMaxMs

func (m *Sample5minMutation) OldRttMaxMs(ctx context.Context) (v *float64, err error)

OldRttMaxMs returns the old "rtt_max_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldRttMeanMs

func (m *Sample5minMutation) OldRttMeanMs(ctx context.Context) (v *float64, err error)

OldRttMeanMs returns the old "rtt_mean_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldRttP50Ms

func (m *Sample5minMutation) OldRttP50Ms(ctx context.Context) (v *float64, err error)

OldRttP50Ms returns the old "rtt_p50_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldRttP95Ms

func (m *Sample5minMutation) OldRttP95Ms(ctx context.Context) (v *float64, err error)

OldRttP95Ms returns the old "rtt_p95_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldRttP99Ms

func (m *Sample5minMutation) OldRttP99Ms(ctx context.Context) (v *float64, err error)

OldRttP99Ms returns the old "rtt_p99_ms" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldSuccessCount

func (m *Sample5minMutation) OldSuccessCount(ctx context.Context) (v int, err error)

OldSuccessCount returns the old "success_count" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) OldTargetLabel

func (m *Sample5minMutation) OldTargetLabel(ctx context.Context) (v string, err error)

OldTargetLabel returns the old "target_label" field's value of the Sample5min entity. If the Sample5min 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 (*Sample5minMutation) Op

func (m *Sample5minMutation) Op() Op

Op returns the operation name.

func (*Sample5minMutation) RemovedEdges

func (m *Sample5minMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*Sample5minMutation) RemovedIDs

func (m *Sample5minMutation) 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 (*Sample5minMutation) ResetBucketStartUnixMs

func (m *Sample5minMutation) ResetBucketStartUnixMs()

ResetBucketStartUnixMs resets all changes to the "bucket_start_unix_ms" field.

func (*Sample5minMutation) ResetCount

func (m *Sample5minMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*Sample5minMutation) ResetEdge

func (m *Sample5minMutation) 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 (*Sample5minMutation) ResetErrors

func (m *Sample5minMutation) ResetErrors()

ResetErrors resets all changes to the "errors" field.

func (*Sample5minMutation) ResetFailCount

func (m *Sample5minMutation) ResetFailCount()

ResetFailCount resets all changes to the "fail_count" field.

func (*Sample5minMutation) ResetField

func (m *Sample5minMutation) 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 (*Sample5minMutation) ResetJitterMs

func (m *Sample5minMutation) ResetJitterMs()

ResetJitterMs resets all changes to the "jitter_ms" field.

func (*Sample5minMutation) ResetRttMaxMs

func (m *Sample5minMutation) ResetRttMaxMs()

ResetRttMaxMs resets all changes to the "rtt_max_ms" field.

func (*Sample5minMutation) ResetRttMeanMs

func (m *Sample5minMutation) ResetRttMeanMs()

ResetRttMeanMs resets all changes to the "rtt_mean_ms" field.

func (*Sample5minMutation) ResetRttP50Ms

func (m *Sample5minMutation) ResetRttP50Ms()

ResetRttP50Ms resets all changes to the "rtt_p50_ms" field.

func (*Sample5minMutation) ResetRttP95Ms

func (m *Sample5minMutation) ResetRttP95Ms()

ResetRttP95Ms resets all changes to the "rtt_p95_ms" field.

func (*Sample5minMutation) ResetRttP99Ms

func (m *Sample5minMutation) ResetRttP99Ms()

ResetRttP99Ms resets all changes to the "rtt_p99_ms" field.

func (*Sample5minMutation) ResetSuccessCount

func (m *Sample5minMutation) ResetSuccessCount()

ResetSuccessCount resets all changes to the "success_count" field.

func (*Sample5minMutation) ResetTargetLabel

func (m *Sample5minMutation) ResetTargetLabel()

ResetTargetLabel resets all changes to the "target_label" field.

func (*Sample5minMutation) RttMaxMs

func (m *Sample5minMutation) RttMaxMs() (r float64, exists bool)

RttMaxMs returns the value of the "rtt_max_ms" field in the mutation.

func (*Sample5minMutation) RttMaxMsCleared

func (m *Sample5minMutation) RttMaxMsCleared() bool

RttMaxMsCleared returns if the "rtt_max_ms" field was cleared in this mutation.

func (*Sample5minMutation) RttMeanMs

func (m *Sample5minMutation) RttMeanMs() (r float64, exists bool)

RttMeanMs returns the value of the "rtt_mean_ms" field in the mutation.

func (*Sample5minMutation) RttMeanMsCleared

func (m *Sample5minMutation) RttMeanMsCleared() bool

RttMeanMsCleared returns if the "rtt_mean_ms" field was cleared in this mutation.

func (*Sample5minMutation) RttP50Ms

func (m *Sample5minMutation) RttP50Ms() (r float64, exists bool)

RttP50Ms returns the value of the "rtt_p50_ms" field in the mutation.

func (*Sample5minMutation) RttP50MsCleared

func (m *Sample5minMutation) RttP50MsCleared() bool

RttP50MsCleared returns if the "rtt_p50_ms" field was cleared in this mutation.

func (*Sample5minMutation) RttP95Ms

func (m *Sample5minMutation) RttP95Ms() (r float64, exists bool)

RttP95Ms returns the value of the "rtt_p95_ms" field in the mutation.

func (*Sample5minMutation) RttP95MsCleared

func (m *Sample5minMutation) RttP95MsCleared() bool

RttP95MsCleared returns if the "rtt_p95_ms" field was cleared in this mutation.

func (*Sample5minMutation) RttP99Ms

func (m *Sample5minMutation) RttP99Ms() (r float64, exists bool)

RttP99Ms returns the value of the "rtt_p99_ms" field in the mutation.

func (*Sample5minMutation) RttP99MsCleared

func (m *Sample5minMutation) RttP99MsCleared() bool

RttP99MsCleared returns if the "rtt_p99_ms" field was cleared in this mutation.

func (*Sample5minMutation) SetBucketStartUnixMs

func (m *Sample5minMutation) SetBucketStartUnixMs(i int64)

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample5minMutation) SetCount

func (m *Sample5minMutation) SetCount(i int)

SetCount sets the "count" field.

func (*Sample5minMutation) SetErrors

func (m *Sample5minMutation) SetErrors(value map[string]int)

SetErrors sets the "errors" field.

func (*Sample5minMutation) SetFailCount

func (m *Sample5minMutation) SetFailCount(i int)

SetFailCount sets the "fail_count" field.

func (*Sample5minMutation) SetField

func (m *Sample5minMutation) 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 (*Sample5minMutation) SetJitterMs

func (m *Sample5minMutation) SetJitterMs(f float64)

SetJitterMs sets the "jitter_ms" field.

func (*Sample5minMutation) SetOp

func (m *Sample5minMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*Sample5minMutation) SetRttMaxMs

func (m *Sample5minMutation) SetRttMaxMs(f float64)

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample5minMutation) SetRttMeanMs

func (m *Sample5minMutation) SetRttMeanMs(f float64)

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample5minMutation) SetRttP50Ms

func (m *Sample5minMutation) SetRttP50Ms(f float64)

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample5minMutation) SetRttP95Ms

func (m *Sample5minMutation) SetRttP95Ms(f float64)

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample5minMutation) SetRttP99Ms

func (m *Sample5minMutation) SetRttP99Ms(f float64)

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample5minMutation) SetSuccessCount

func (m *Sample5minMutation) SetSuccessCount(i int)

SetSuccessCount sets the "success_count" field.

func (*Sample5minMutation) SetTargetLabel

func (m *Sample5minMutation) SetTargetLabel(s string)

SetTargetLabel sets the "target_label" field.

func (*Sample5minMutation) SuccessCount

func (m *Sample5minMutation) SuccessCount() (r int, exists bool)

SuccessCount returns the value of the "success_count" field in the mutation.

func (*Sample5minMutation) TargetLabel

func (m *Sample5minMutation) TargetLabel() (r string, exists bool)

TargetLabel returns the value of the "target_label" field in the mutation.

func (Sample5minMutation) Tx

func (m Sample5minMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*Sample5minMutation) Type

func (m *Sample5minMutation) Type() string

Type returns the node type of this mutation (Sample5min).

func (*Sample5minMutation) Where

func (m *Sample5minMutation) Where(ps ...predicate.Sample5min)

Where appends a list predicates to the Sample5minMutation builder.

func (*Sample5minMutation) WhereP

func (m *Sample5minMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the Sample5minMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type Sample5minQuery

type Sample5minQuery struct {
	// contains filtered or unexported fields
}

Sample5minQuery is the builder for querying Sample5min entities.

func (*Sample5minQuery) Aggregate

func (_q *Sample5minQuery) Aggregate(fns ...AggregateFunc) *Sample5minSelect

Aggregate returns a Sample5minSelect configured with the given aggregations.

func (*Sample5minQuery) All

func (_q *Sample5minQuery) All(ctx context.Context) ([]*Sample5min, error)

All executes the query and returns a list of Sample5mins.

func (*Sample5minQuery) AllX

func (_q *Sample5minQuery) AllX(ctx context.Context) []*Sample5min

AllX is like All, but panics if an error occurs.

func (*Sample5minQuery) Clone

func (_q *Sample5minQuery) Clone() *Sample5minQuery

Clone returns a duplicate of the Sample5minQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*Sample5minQuery) Count

func (_q *Sample5minQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*Sample5minQuery) CountX

func (_q *Sample5minQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*Sample5minQuery) Exist

func (_q *Sample5minQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*Sample5minQuery) ExistX

func (_q *Sample5minQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*Sample5minQuery) First

func (_q *Sample5minQuery) First(ctx context.Context) (*Sample5min, error)

First returns the first Sample5min entity from the query. Returns a *NotFoundError when no Sample5min was found.

func (*Sample5minQuery) FirstID

func (_q *Sample5minQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Sample5min ID from the query. Returns a *NotFoundError when no Sample5min ID was found.

func (*Sample5minQuery) FirstIDX

func (_q *Sample5minQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*Sample5minQuery) FirstX

func (_q *Sample5minQuery) FirstX(ctx context.Context) *Sample5min

FirstX is like First, but panics if an error occurs.

func (*Sample5minQuery) GroupBy

func (_q *Sample5minQuery) GroupBy(field string, fields ...string) *Sample5minGroupBy

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Sample5min.Query().
	GroupBy(sample5min.FieldBucketStartUnixMs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*Sample5minQuery) IDs

func (_q *Sample5minQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Sample5min IDs.

func (*Sample5minQuery) IDsX

func (_q *Sample5minQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*Sample5minQuery) Limit

func (_q *Sample5minQuery) Limit(limit int) *Sample5minQuery

Limit the number of records to be returned by this query.

func (*Sample5minQuery) Offset

func (_q *Sample5minQuery) Offset(offset int) *Sample5minQuery

Offset to start from.

func (*Sample5minQuery) Only

func (_q *Sample5minQuery) Only(ctx context.Context) (*Sample5min, error)

Only returns a single Sample5min entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sample5min entity is found. Returns a *NotFoundError when no Sample5min entities are found.

func (*Sample5minQuery) OnlyID

func (_q *Sample5minQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Sample5min ID in the query. Returns a *NotSingularError when more than one Sample5min ID is found. Returns a *NotFoundError when no entities are found.

func (*Sample5minQuery) OnlyIDX

func (_q *Sample5minQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*Sample5minQuery) OnlyX

func (_q *Sample5minQuery) OnlyX(ctx context.Context) *Sample5min

OnlyX is like Only, but panics if an error occurs.

func (*Sample5minQuery) Order

Order specifies how the records should be ordered.

func (*Sample5minQuery) Select

func (_q *Sample5minQuery) Select(fields ...string) *Sample5minSelect

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 {
	BucketStartUnixMs int64 `json:"bucket_start_unix_ms,omitempty"`
}

client.Sample5min.Query().
	Select(sample5min.FieldBucketStartUnixMs).
	Scan(ctx, &v)

func (*Sample5minQuery) Unique

func (_q *Sample5minQuery) Unique(unique bool) *Sample5minQuery

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 (*Sample5minQuery) Where

Where adds a new predicate for the Sample5minQuery builder.

type Sample5minSelect

type Sample5minSelect struct {
	*Sample5minQuery
	// contains filtered or unexported fields
}

Sample5minSelect is the builder for selecting fields of Sample5min entities.

func (*Sample5minSelect) Aggregate

func (_s *Sample5minSelect) Aggregate(fns ...AggregateFunc) *Sample5minSelect

Aggregate adds the given aggregation functions to the selector query.

func (*Sample5minSelect) Bool

func (s *Sample5minSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) BoolX

func (s *Sample5minSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*Sample5minSelect) Bools

func (s *Sample5minSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) BoolsX

func (s *Sample5minSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*Sample5minSelect) Float64

func (s *Sample5minSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) Float64X

func (s *Sample5minSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*Sample5minSelect) Float64s

func (s *Sample5minSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) Float64sX

func (s *Sample5minSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*Sample5minSelect) Int

func (s *Sample5minSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) IntX

func (s *Sample5minSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*Sample5minSelect) Ints

func (s *Sample5minSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) IntsX

func (s *Sample5minSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*Sample5minSelect) Scan

func (_s *Sample5minSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*Sample5minSelect) ScanX

func (s *Sample5minSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*Sample5minSelect) String

func (s *Sample5minSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) StringX

func (s *Sample5minSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*Sample5minSelect) Strings

func (s *Sample5minSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*Sample5minSelect) StringsX

func (s *Sample5minSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type Sample5minUpdate

type Sample5minUpdate struct {
	// contains filtered or unexported fields
}

Sample5minUpdate is the builder for updating Sample5min entities.

func (*Sample5minUpdate) AddBucketStartUnixMs

func (_u *Sample5minUpdate) AddBucketStartUnixMs(v int64) *Sample5minUpdate

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample5minUpdate) AddCount

func (_u *Sample5minUpdate) AddCount(v int) *Sample5minUpdate

AddCount adds value to the "count" field.

func (*Sample5minUpdate) AddFailCount

func (_u *Sample5minUpdate) AddFailCount(v int) *Sample5minUpdate

AddFailCount adds value to the "fail_count" field.

func (*Sample5minUpdate) AddJitterMs

func (_u *Sample5minUpdate) AddJitterMs(v float64) *Sample5minUpdate

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample5minUpdate) AddRttMaxMs

func (_u *Sample5minUpdate) AddRttMaxMs(v float64) *Sample5minUpdate

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample5minUpdate) AddRttMeanMs

func (_u *Sample5minUpdate) AddRttMeanMs(v float64) *Sample5minUpdate

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample5minUpdate) AddRttP50Ms

func (_u *Sample5minUpdate) AddRttP50Ms(v float64) *Sample5minUpdate

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample5minUpdate) AddRttP95Ms

func (_u *Sample5minUpdate) AddRttP95Ms(v float64) *Sample5minUpdate

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample5minUpdate) AddRttP99Ms

func (_u *Sample5minUpdate) AddRttP99Ms(v float64) *Sample5minUpdate

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample5minUpdate) AddSuccessCount

func (_u *Sample5minUpdate) AddSuccessCount(v int) *Sample5minUpdate

AddSuccessCount adds value to the "success_count" field.

func (*Sample5minUpdate) ClearErrors

func (_u *Sample5minUpdate) ClearErrors() *Sample5minUpdate

ClearErrors clears the value of the "errors" field.

func (*Sample5minUpdate) ClearJitterMs

func (_u *Sample5minUpdate) ClearJitterMs() *Sample5minUpdate

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample5minUpdate) ClearRttMaxMs

func (_u *Sample5minUpdate) ClearRttMaxMs() *Sample5minUpdate

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample5minUpdate) ClearRttMeanMs

func (_u *Sample5minUpdate) ClearRttMeanMs() *Sample5minUpdate

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample5minUpdate) ClearRttP50Ms

func (_u *Sample5minUpdate) ClearRttP50Ms() *Sample5minUpdate

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample5minUpdate) ClearRttP95Ms

func (_u *Sample5minUpdate) ClearRttP95Ms() *Sample5minUpdate

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample5minUpdate) ClearRttP99Ms

func (_u *Sample5minUpdate) ClearRttP99Ms() *Sample5minUpdate

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample5minUpdate) Exec

func (_u *Sample5minUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*Sample5minUpdate) ExecX

func (_u *Sample5minUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minUpdate) Mutation

func (_u *Sample5minUpdate) Mutation() *Sample5minMutation

Mutation returns the Sample5minMutation object of the builder.

func (*Sample5minUpdate) Save

func (_u *Sample5minUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*Sample5minUpdate) SaveX

func (_u *Sample5minUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*Sample5minUpdate) SetBucketStartUnixMs

func (_u *Sample5minUpdate) SetBucketStartUnixMs(v int64) *Sample5minUpdate

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample5minUpdate) SetCount

func (_u *Sample5minUpdate) SetCount(v int) *Sample5minUpdate

SetCount sets the "count" field.

func (*Sample5minUpdate) SetErrors

func (_u *Sample5minUpdate) SetErrors(v map[string]int) *Sample5minUpdate

SetErrors sets the "errors" field.

func (*Sample5minUpdate) SetFailCount

func (_u *Sample5minUpdate) SetFailCount(v int) *Sample5minUpdate

SetFailCount sets the "fail_count" field.

func (*Sample5minUpdate) SetJitterMs

func (_u *Sample5minUpdate) SetJitterMs(v float64) *Sample5minUpdate

SetJitterMs sets the "jitter_ms" field.

func (*Sample5minUpdate) SetNillableBucketStartUnixMs

func (_u *Sample5minUpdate) SetNillableBucketStartUnixMs(v *int64) *Sample5minUpdate

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableCount

func (_u *Sample5minUpdate) SetNillableCount(v *int) *Sample5minUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableFailCount

func (_u *Sample5minUpdate) SetNillableFailCount(v *int) *Sample5minUpdate

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableJitterMs

func (_u *Sample5minUpdate) SetNillableJitterMs(v *float64) *Sample5minUpdate

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableRttMaxMs

func (_u *Sample5minUpdate) SetNillableRttMaxMs(v *float64) *Sample5minUpdate

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableRttMeanMs

func (_u *Sample5minUpdate) SetNillableRttMeanMs(v *float64) *Sample5minUpdate

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableRttP50Ms

func (_u *Sample5minUpdate) SetNillableRttP50Ms(v *float64) *Sample5minUpdate

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableRttP95Ms

func (_u *Sample5minUpdate) SetNillableRttP95Ms(v *float64) *Sample5minUpdate

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableRttP99Ms

func (_u *Sample5minUpdate) SetNillableRttP99Ms(v *float64) *Sample5minUpdate

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableSuccessCount

func (_u *Sample5minUpdate) SetNillableSuccessCount(v *int) *Sample5minUpdate

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample5minUpdate) SetNillableTargetLabel

func (_u *Sample5minUpdate) SetNillableTargetLabel(v *string) *Sample5minUpdate

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample5minUpdate) SetRttMaxMs

func (_u *Sample5minUpdate) SetRttMaxMs(v float64) *Sample5minUpdate

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample5minUpdate) SetRttMeanMs

func (_u *Sample5minUpdate) SetRttMeanMs(v float64) *Sample5minUpdate

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample5minUpdate) SetRttP50Ms

func (_u *Sample5minUpdate) SetRttP50Ms(v float64) *Sample5minUpdate

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample5minUpdate) SetRttP95Ms

func (_u *Sample5minUpdate) SetRttP95Ms(v float64) *Sample5minUpdate

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample5minUpdate) SetRttP99Ms

func (_u *Sample5minUpdate) SetRttP99Ms(v float64) *Sample5minUpdate

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample5minUpdate) SetSuccessCount

func (_u *Sample5minUpdate) SetSuccessCount(v int) *Sample5minUpdate

SetSuccessCount sets the "success_count" field.

func (*Sample5minUpdate) SetTargetLabel

func (_u *Sample5minUpdate) SetTargetLabel(v string) *Sample5minUpdate

SetTargetLabel sets the "target_label" field.

func (*Sample5minUpdate) Where

Where appends a list predicates to the Sample5minUpdate builder.

type Sample5minUpdateOne

type Sample5minUpdateOne struct {
	// contains filtered or unexported fields
}

Sample5minUpdateOne is the builder for updating a single Sample5min entity.

func (*Sample5minUpdateOne) AddBucketStartUnixMs

func (_u *Sample5minUpdateOne) AddBucketStartUnixMs(v int64) *Sample5minUpdateOne

AddBucketStartUnixMs adds value to the "bucket_start_unix_ms" field.

func (*Sample5minUpdateOne) AddCount

func (_u *Sample5minUpdateOne) AddCount(v int) *Sample5minUpdateOne

AddCount adds value to the "count" field.

func (*Sample5minUpdateOne) AddFailCount

func (_u *Sample5minUpdateOne) AddFailCount(v int) *Sample5minUpdateOne

AddFailCount adds value to the "fail_count" field.

func (*Sample5minUpdateOne) AddJitterMs

func (_u *Sample5minUpdateOne) AddJitterMs(v float64) *Sample5minUpdateOne

AddJitterMs adds value to the "jitter_ms" field.

func (*Sample5minUpdateOne) AddRttMaxMs

func (_u *Sample5minUpdateOne) AddRttMaxMs(v float64) *Sample5minUpdateOne

AddRttMaxMs adds value to the "rtt_max_ms" field.

func (*Sample5minUpdateOne) AddRttMeanMs

func (_u *Sample5minUpdateOne) AddRttMeanMs(v float64) *Sample5minUpdateOne

AddRttMeanMs adds value to the "rtt_mean_ms" field.

func (*Sample5minUpdateOne) AddRttP50Ms

func (_u *Sample5minUpdateOne) AddRttP50Ms(v float64) *Sample5minUpdateOne

AddRttP50Ms adds value to the "rtt_p50_ms" field.

func (*Sample5minUpdateOne) AddRttP95Ms

func (_u *Sample5minUpdateOne) AddRttP95Ms(v float64) *Sample5minUpdateOne

AddRttP95Ms adds value to the "rtt_p95_ms" field.

func (*Sample5minUpdateOne) AddRttP99Ms

func (_u *Sample5minUpdateOne) AddRttP99Ms(v float64) *Sample5minUpdateOne

AddRttP99Ms adds value to the "rtt_p99_ms" field.

func (*Sample5minUpdateOne) AddSuccessCount

func (_u *Sample5minUpdateOne) AddSuccessCount(v int) *Sample5minUpdateOne

AddSuccessCount adds value to the "success_count" field.

func (*Sample5minUpdateOne) ClearErrors

func (_u *Sample5minUpdateOne) ClearErrors() *Sample5minUpdateOne

ClearErrors clears the value of the "errors" field.

func (*Sample5minUpdateOne) ClearJitterMs

func (_u *Sample5minUpdateOne) ClearJitterMs() *Sample5minUpdateOne

ClearJitterMs clears the value of the "jitter_ms" field.

func (*Sample5minUpdateOne) ClearRttMaxMs

func (_u *Sample5minUpdateOne) ClearRttMaxMs() *Sample5minUpdateOne

ClearRttMaxMs clears the value of the "rtt_max_ms" field.

func (*Sample5minUpdateOne) ClearRttMeanMs

func (_u *Sample5minUpdateOne) ClearRttMeanMs() *Sample5minUpdateOne

ClearRttMeanMs clears the value of the "rtt_mean_ms" field.

func (*Sample5minUpdateOne) ClearRttP50Ms

func (_u *Sample5minUpdateOne) ClearRttP50Ms() *Sample5minUpdateOne

ClearRttP50Ms clears the value of the "rtt_p50_ms" field.

func (*Sample5minUpdateOne) ClearRttP95Ms

func (_u *Sample5minUpdateOne) ClearRttP95Ms() *Sample5minUpdateOne

ClearRttP95Ms clears the value of the "rtt_p95_ms" field.

func (*Sample5minUpdateOne) ClearRttP99Ms

func (_u *Sample5minUpdateOne) ClearRttP99Ms() *Sample5minUpdateOne

ClearRttP99Ms clears the value of the "rtt_p99_ms" field.

func (*Sample5minUpdateOne) Exec

func (_u *Sample5minUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*Sample5minUpdateOne) ExecX

func (_u *Sample5minUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*Sample5minUpdateOne) Mutation

func (_u *Sample5minUpdateOne) Mutation() *Sample5minMutation

Mutation returns the Sample5minMutation object of the builder.

func (*Sample5minUpdateOne) Save

Save executes the query and returns the updated Sample5min entity.

func (*Sample5minUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*Sample5minUpdateOne) Select

func (_u *Sample5minUpdateOne) Select(field string, fields ...string) *Sample5minUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*Sample5minUpdateOne) SetBucketStartUnixMs

func (_u *Sample5minUpdateOne) SetBucketStartUnixMs(v int64) *Sample5minUpdateOne

SetBucketStartUnixMs sets the "bucket_start_unix_ms" field.

func (*Sample5minUpdateOne) SetCount

func (_u *Sample5minUpdateOne) SetCount(v int) *Sample5minUpdateOne

SetCount sets the "count" field.

func (*Sample5minUpdateOne) SetErrors

func (_u *Sample5minUpdateOne) SetErrors(v map[string]int) *Sample5minUpdateOne

SetErrors sets the "errors" field.

func (*Sample5minUpdateOne) SetFailCount

func (_u *Sample5minUpdateOne) SetFailCount(v int) *Sample5minUpdateOne

SetFailCount sets the "fail_count" field.

func (*Sample5minUpdateOne) SetJitterMs

func (_u *Sample5minUpdateOne) SetJitterMs(v float64) *Sample5minUpdateOne

SetJitterMs sets the "jitter_ms" field.

func (*Sample5minUpdateOne) SetNillableBucketStartUnixMs

func (_u *Sample5minUpdateOne) SetNillableBucketStartUnixMs(v *int64) *Sample5minUpdateOne

SetNillableBucketStartUnixMs sets the "bucket_start_unix_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableCount

func (_u *Sample5minUpdateOne) SetNillableCount(v *int) *Sample5minUpdateOne

SetNillableCount sets the "count" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableFailCount

func (_u *Sample5minUpdateOne) SetNillableFailCount(v *int) *Sample5minUpdateOne

SetNillableFailCount sets the "fail_count" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableJitterMs

func (_u *Sample5minUpdateOne) SetNillableJitterMs(v *float64) *Sample5minUpdateOne

SetNillableJitterMs sets the "jitter_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableRttMaxMs

func (_u *Sample5minUpdateOne) SetNillableRttMaxMs(v *float64) *Sample5minUpdateOne

SetNillableRttMaxMs sets the "rtt_max_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableRttMeanMs

func (_u *Sample5minUpdateOne) SetNillableRttMeanMs(v *float64) *Sample5minUpdateOne

SetNillableRttMeanMs sets the "rtt_mean_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableRttP50Ms

func (_u *Sample5minUpdateOne) SetNillableRttP50Ms(v *float64) *Sample5minUpdateOne

SetNillableRttP50Ms sets the "rtt_p50_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableRttP95Ms

func (_u *Sample5minUpdateOne) SetNillableRttP95Ms(v *float64) *Sample5minUpdateOne

SetNillableRttP95Ms sets the "rtt_p95_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableRttP99Ms

func (_u *Sample5minUpdateOne) SetNillableRttP99Ms(v *float64) *Sample5minUpdateOne

SetNillableRttP99Ms sets the "rtt_p99_ms" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableSuccessCount

func (_u *Sample5minUpdateOne) SetNillableSuccessCount(v *int) *Sample5minUpdateOne

SetNillableSuccessCount sets the "success_count" field if the given value is not nil.

func (*Sample5minUpdateOne) SetNillableTargetLabel

func (_u *Sample5minUpdateOne) SetNillableTargetLabel(v *string) *Sample5minUpdateOne

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*Sample5minUpdateOne) SetRttMaxMs

func (_u *Sample5minUpdateOne) SetRttMaxMs(v float64) *Sample5minUpdateOne

SetRttMaxMs sets the "rtt_max_ms" field.

func (*Sample5minUpdateOne) SetRttMeanMs

func (_u *Sample5minUpdateOne) SetRttMeanMs(v float64) *Sample5minUpdateOne

SetRttMeanMs sets the "rtt_mean_ms" field.

func (*Sample5minUpdateOne) SetRttP50Ms

func (_u *Sample5minUpdateOne) SetRttP50Ms(v float64) *Sample5minUpdateOne

SetRttP50Ms sets the "rtt_p50_ms" field.

func (*Sample5minUpdateOne) SetRttP95Ms

func (_u *Sample5minUpdateOne) SetRttP95Ms(v float64) *Sample5minUpdateOne

SetRttP95Ms sets the "rtt_p95_ms" field.

func (*Sample5minUpdateOne) SetRttP99Ms

func (_u *Sample5minUpdateOne) SetRttP99Ms(v float64) *Sample5minUpdateOne

SetRttP99Ms sets the "rtt_p99_ms" field.

func (*Sample5minUpdateOne) SetSuccessCount

func (_u *Sample5minUpdateOne) SetSuccessCount(v int) *Sample5minUpdateOne

SetSuccessCount sets the "success_count" field.

func (*Sample5minUpdateOne) SetTargetLabel

func (_u *Sample5minUpdateOne) SetTargetLabel(v string) *Sample5minUpdateOne

SetTargetLabel sets the "target_label" field.

func (*Sample5minUpdateOne) Where

Where appends a list predicates to the Sample5minUpdate builder.

type Sample5mins

type Sample5mins []*Sample5min

Sample5mins is a parsable slice of Sample5min.

type SampleClient

type SampleClient struct {
	// contains filtered or unexported fields
}

SampleClient is a client for the Sample schema.

func NewSampleClient

func NewSampleClient(c config) *SampleClient

NewSampleClient returns a client for the Sample from the given config.

func (*SampleClient) Create

func (c *SampleClient) Create() *SampleCreate

Create returns a builder for creating a Sample entity.

func (*SampleClient) CreateBulk

func (c *SampleClient) CreateBulk(builders ...*SampleCreate) *SampleCreateBulk

CreateBulk returns a builder for creating a bulk of Sample entities.

func (*SampleClient) Delete

func (c *SampleClient) Delete() *SampleDelete

Delete returns a delete builder for Sample.

func (*SampleClient) DeleteOne

func (c *SampleClient) DeleteOne(_m *Sample) *SampleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SampleClient) DeleteOneID

func (c *SampleClient) DeleteOneID(id int) *SampleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SampleClient) Get

func (c *SampleClient) Get(ctx context.Context, id int) (*Sample, error)

Get returns a Sample entity by its id.

func (*SampleClient) GetX

func (c *SampleClient) GetX(ctx context.Context, id int) *Sample

GetX is like Get, but panics if an error occurs.

func (*SampleClient) Hooks

func (c *SampleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SampleClient) Intercept

func (c *SampleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sample.Intercept(f(g(h())))`.

func (*SampleClient) Interceptors

func (c *SampleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SampleClient) MapCreateBulk

func (c *SampleClient) MapCreateBulk(slice any, setFunc func(*SampleCreate, int)) *SampleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SampleClient) Query

func (c *SampleClient) Query() *SampleQuery

Query returns a query builder for Sample.

func (*SampleClient) Update

func (c *SampleClient) Update() *SampleUpdate

Update returns an update builder for Sample.

func (*SampleClient) UpdateOne

func (c *SampleClient) UpdateOne(_m *Sample) *SampleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SampleClient) UpdateOneID

func (c *SampleClient) UpdateOneID(id int) *SampleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SampleClient) Use

func (c *SampleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sample.Hooks(f(g(h())))`.

type SampleCreate

type SampleCreate struct {
	// contains filtered or unexported fields
}

SampleCreate is the builder for creating a Sample entity.

func (*SampleCreate) Exec

func (_c *SampleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SampleCreate) ExecX

func (_c *SampleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SampleCreate) Mutation

func (_c *SampleCreate) Mutation() *SampleMutation

Mutation returns the SampleMutation object of the builder.

func (*SampleCreate) Save

func (_c *SampleCreate) Save(ctx context.Context) (*Sample, error)

Save creates the Sample in the database.

func (*SampleCreate) SaveX

func (_c *SampleCreate) SaveX(ctx context.Context) *Sample

SaveX calls Save and panics if Save returns an error.

func (*SampleCreate) SetError

func (_c *SampleCreate) SetError(v string) *SampleCreate

SetError sets the "error" field.

func (*SampleCreate) SetNillableError

func (_c *SampleCreate) SetNillableError(v *string) *SampleCreate

SetNillableError sets the "error" field if the given value is not nil.

func (*SampleCreate) SetNillableRttMs

func (_c *SampleCreate) SetNillableRttMs(v *float64) *SampleCreate

SetNillableRttMs sets the "rtt_ms" field if the given value is not nil.

func (*SampleCreate) SetNillableTargetPort

func (_c *SampleCreate) SetNillableTargetPort(v *int) *SampleCreate

SetNillableTargetPort sets the "target_port" field if the given value is not nil.

func (*SampleCreate) SetRttMs

func (_c *SampleCreate) SetRttMs(v float64) *SampleCreate

SetRttMs sets the "rtt_ms" field.

func (*SampleCreate) SetSuccess

func (_c *SampleCreate) SetSuccess(v bool) *SampleCreate

SetSuccess sets the "success" field.

func (*SampleCreate) SetTargetHost

func (_c *SampleCreate) SetTargetHost(v string) *SampleCreate

SetTargetHost sets the "target_host" field.

func (*SampleCreate) SetTargetKind

func (_c *SampleCreate) SetTargetKind(v string) *SampleCreate

SetTargetKind sets the "target_kind" field.

func (*SampleCreate) SetTargetLabel

func (_c *SampleCreate) SetTargetLabel(v string) *SampleCreate

SetTargetLabel sets the "target_label" field.

func (*SampleCreate) SetTargetPort

func (_c *SampleCreate) SetTargetPort(v int) *SampleCreate

SetTargetPort sets the "target_port" field.

func (*SampleCreate) SetTsUnixMs

func (_c *SampleCreate) SetTsUnixMs(v int64) *SampleCreate

SetTsUnixMs sets the "ts_unix_ms" field.

type SampleCreateBulk

type SampleCreateBulk struct {
	// contains filtered or unexported fields
}

SampleCreateBulk is the builder for creating many Sample entities in bulk.

func (*SampleCreateBulk) Exec

func (_c *SampleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SampleCreateBulk) ExecX

func (_c *SampleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SampleCreateBulk) Save

func (_c *SampleCreateBulk) Save(ctx context.Context) ([]*Sample, error)

Save creates the Sample entities in the database.

func (*SampleCreateBulk) SaveX

func (_c *SampleCreateBulk) SaveX(ctx context.Context) []*Sample

SaveX is like Save, but panics if an error occurs.

type SampleDelete

type SampleDelete struct {
	// contains filtered or unexported fields
}

SampleDelete is the builder for deleting a Sample entity.

func (*SampleDelete) Exec

func (_d *SampleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SampleDelete) ExecX

func (_d *SampleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SampleDelete) Where

func (_d *SampleDelete) Where(ps ...predicate.Sample) *SampleDelete

Where appends a list predicates to the SampleDelete builder.

type SampleDeleteOne

type SampleDeleteOne struct {
	// contains filtered or unexported fields
}

SampleDeleteOne is the builder for deleting a single Sample entity.

func (*SampleDeleteOne) Exec

func (_d *SampleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SampleDeleteOne) ExecX

func (_d *SampleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SampleDeleteOne) Where

func (_d *SampleDeleteOne) Where(ps ...predicate.Sample) *SampleDeleteOne

Where appends a list predicates to the SampleDelete builder.

type SampleGroupBy

type SampleGroupBy struct {
	// contains filtered or unexported fields
}

SampleGroupBy is the group-by builder for Sample entities.

func (*SampleGroupBy) Aggregate

func (_g *SampleGroupBy) Aggregate(fns ...AggregateFunc) *SampleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SampleGroupBy) Bool

func (s *SampleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) BoolX

func (s *SampleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SampleGroupBy) Bools

func (s *SampleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) BoolsX

func (s *SampleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SampleGroupBy) Float64

func (s *SampleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) Float64X

func (s *SampleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SampleGroupBy) Float64s

func (s *SampleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) Float64sX

func (s *SampleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SampleGroupBy) Int

func (s *SampleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) IntX

func (s *SampleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SampleGroupBy) Ints

func (s *SampleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) IntsX

func (s *SampleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SampleGroupBy) Scan

func (_g *SampleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SampleGroupBy) ScanX

func (s *SampleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SampleGroupBy) String

func (s *SampleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) StringX

func (s *SampleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SampleGroupBy) Strings

func (s *SampleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SampleGroupBy) StringsX

func (s *SampleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SampleMutation

type SampleMutation struct {
	// contains filtered or unexported fields
}

SampleMutation represents an operation that mutates the Sample nodes in the graph.

func (*SampleMutation) AddField

func (m *SampleMutation) 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 (*SampleMutation) AddRttMs

func (m *SampleMutation) AddRttMs(f float64)

AddRttMs adds f to the "rtt_ms" field.

func (*SampleMutation) AddTargetPort

func (m *SampleMutation) AddTargetPort(i int)

AddTargetPort adds i to the "target_port" field.

func (*SampleMutation) AddTsUnixMs

func (m *SampleMutation) AddTsUnixMs(i int64)

AddTsUnixMs adds i to the "ts_unix_ms" field.

func (*SampleMutation) AddedEdges

func (m *SampleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SampleMutation) AddedField

func (m *SampleMutation) 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 (*SampleMutation) AddedFields

func (m *SampleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SampleMutation) AddedIDs

func (m *SampleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SampleMutation) AddedRttMs

func (m *SampleMutation) AddedRttMs() (r float64, exists bool)

AddedRttMs returns the value that was added to the "rtt_ms" field in this mutation.

func (*SampleMutation) AddedTargetPort

func (m *SampleMutation) AddedTargetPort() (r int, exists bool)

AddedTargetPort returns the value that was added to the "target_port" field in this mutation.

func (*SampleMutation) AddedTsUnixMs

func (m *SampleMutation) AddedTsUnixMs() (r int64, exists bool)

AddedTsUnixMs returns the value that was added to the "ts_unix_ms" field in this mutation.

func (*SampleMutation) ClearEdge

func (m *SampleMutation) 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 (*SampleMutation) ClearError

func (m *SampleMutation) ClearError()

ClearError clears the value of the "error" field.

func (*SampleMutation) ClearField

func (m *SampleMutation) 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 (*SampleMutation) ClearRttMs

func (m *SampleMutation) ClearRttMs()

ClearRttMs clears the value of the "rtt_ms" field.

func (*SampleMutation) ClearTargetPort

func (m *SampleMutation) ClearTargetPort()

ClearTargetPort clears the value of the "target_port" field.

func (*SampleMutation) ClearedEdges

func (m *SampleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SampleMutation) ClearedFields

func (m *SampleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SampleMutation) Client

func (m SampleMutation) 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 (*SampleMutation) EdgeCleared

func (m *SampleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SampleMutation) Error

func (m *SampleMutation) Error() (r string, exists bool)

Error returns the value of the "error" field in the mutation.

func (*SampleMutation) ErrorCleared

func (m *SampleMutation) ErrorCleared() bool

ErrorCleared returns if the "error" field was cleared in this mutation.

func (*SampleMutation) Field

func (m *SampleMutation) 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 (*SampleMutation) FieldCleared

func (m *SampleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SampleMutation) Fields

func (m *SampleMutation) 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 (*SampleMutation) ID

func (m *SampleMutation) 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 (*SampleMutation) IDs

func (m *SampleMutation) 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 (*SampleMutation) OldError

func (m *SampleMutation) OldError(ctx context.Context) (v *string, err error)

OldError returns the old "error" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldField

func (m *SampleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*SampleMutation) OldRttMs

func (m *SampleMutation) OldRttMs(ctx context.Context) (v *float64, err error)

OldRttMs returns the old "rtt_ms" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldSuccess

func (m *SampleMutation) OldSuccess(ctx context.Context) (v bool, err error)

OldSuccess returns the old "success" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldTargetHost

func (m *SampleMutation) OldTargetHost(ctx context.Context) (v string, err error)

OldTargetHost returns the old "target_host" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldTargetKind

func (m *SampleMutation) OldTargetKind(ctx context.Context) (v string, err error)

OldTargetKind returns the old "target_kind" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldTargetLabel

func (m *SampleMutation) OldTargetLabel(ctx context.Context) (v string, err error)

OldTargetLabel returns the old "target_label" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldTargetPort

func (m *SampleMutation) OldTargetPort(ctx context.Context) (v *int, err error)

OldTargetPort returns the old "target_port" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldTsUnixMs

func (m *SampleMutation) OldTsUnixMs(ctx context.Context) (v int64, err error)

OldTsUnixMs returns the old "ts_unix_ms" field's value of the Sample entity. If the Sample 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 (*SampleMutation) Op

func (m *SampleMutation) Op() Op

Op returns the operation name.

func (*SampleMutation) RemovedEdges

func (m *SampleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SampleMutation) RemovedIDs

func (m *SampleMutation) 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 (*SampleMutation) ResetEdge

func (m *SampleMutation) 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 (*SampleMutation) ResetError

func (m *SampleMutation) ResetError()

ResetError resets all changes to the "error" field.

func (*SampleMutation) ResetField

func (m *SampleMutation) 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 (*SampleMutation) ResetRttMs

func (m *SampleMutation) ResetRttMs()

ResetRttMs resets all changes to the "rtt_ms" field.

func (*SampleMutation) ResetSuccess

func (m *SampleMutation) ResetSuccess()

ResetSuccess resets all changes to the "success" field.

func (*SampleMutation) ResetTargetHost

func (m *SampleMutation) ResetTargetHost()

ResetTargetHost resets all changes to the "target_host" field.

func (*SampleMutation) ResetTargetKind

func (m *SampleMutation) ResetTargetKind()

ResetTargetKind resets all changes to the "target_kind" field.

func (*SampleMutation) ResetTargetLabel

func (m *SampleMutation) ResetTargetLabel()

ResetTargetLabel resets all changes to the "target_label" field.

func (*SampleMutation) ResetTargetPort

func (m *SampleMutation) ResetTargetPort()

ResetTargetPort resets all changes to the "target_port" field.

func (*SampleMutation) ResetTsUnixMs

func (m *SampleMutation) ResetTsUnixMs()

ResetTsUnixMs resets all changes to the "ts_unix_ms" field.

func (*SampleMutation) RttMs

func (m *SampleMutation) RttMs() (r float64, exists bool)

RttMs returns the value of the "rtt_ms" field in the mutation.

func (*SampleMutation) RttMsCleared

func (m *SampleMutation) RttMsCleared() bool

RttMsCleared returns if the "rtt_ms" field was cleared in this mutation.

func (*SampleMutation) SetError

func (m *SampleMutation) SetError(s string)

SetError sets the "error" field.

func (*SampleMutation) SetField

func (m *SampleMutation) 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 (*SampleMutation) SetOp

func (m *SampleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SampleMutation) SetRttMs

func (m *SampleMutation) SetRttMs(f float64)

SetRttMs sets the "rtt_ms" field.

func (*SampleMutation) SetSuccess

func (m *SampleMutation) SetSuccess(b bool)

SetSuccess sets the "success" field.

func (*SampleMutation) SetTargetHost

func (m *SampleMutation) SetTargetHost(s string)

SetTargetHost sets the "target_host" field.

func (*SampleMutation) SetTargetKind

func (m *SampleMutation) SetTargetKind(s string)

SetTargetKind sets the "target_kind" field.

func (*SampleMutation) SetTargetLabel

func (m *SampleMutation) SetTargetLabel(s string)

SetTargetLabel sets the "target_label" field.

func (*SampleMutation) SetTargetPort

func (m *SampleMutation) SetTargetPort(i int)

SetTargetPort sets the "target_port" field.

func (*SampleMutation) SetTsUnixMs

func (m *SampleMutation) SetTsUnixMs(i int64)

SetTsUnixMs sets the "ts_unix_ms" field.

func (*SampleMutation) Success

func (m *SampleMutation) Success() (r bool, exists bool)

Success returns the value of the "success" field in the mutation.

func (*SampleMutation) TargetHost

func (m *SampleMutation) TargetHost() (r string, exists bool)

TargetHost returns the value of the "target_host" field in the mutation.

func (*SampleMutation) TargetKind

func (m *SampleMutation) TargetKind() (r string, exists bool)

TargetKind returns the value of the "target_kind" field in the mutation.

func (*SampleMutation) TargetLabel

func (m *SampleMutation) TargetLabel() (r string, exists bool)

TargetLabel returns the value of the "target_label" field in the mutation.

func (*SampleMutation) TargetPort

func (m *SampleMutation) TargetPort() (r int, exists bool)

TargetPort returns the value of the "target_port" field in the mutation.

func (*SampleMutation) TargetPortCleared

func (m *SampleMutation) TargetPortCleared() bool

TargetPortCleared returns if the "target_port" field was cleared in this mutation.

func (*SampleMutation) TsUnixMs

func (m *SampleMutation) TsUnixMs() (r int64, exists bool)

TsUnixMs returns the value of the "ts_unix_ms" field in the mutation.

func (SampleMutation) Tx

func (m SampleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SampleMutation) Type

func (m *SampleMutation) Type() string

Type returns the node type of this mutation (Sample).

func (*SampleMutation) Where

func (m *SampleMutation) Where(ps ...predicate.Sample)

Where appends a list predicates to the SampleMutation builder.

func (*SampleMutation) WhereP

func (m *SampleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SampleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SampleQuery

type SampleQuery struct {
	// contains filtered or unexported fields
}

SampleQuery is the builder for querying Sample entities.

func (*SampleQuery) Aggregate

func (_q *SampleQuery) Aggregate(fns ...AggregateFunc) *SampleSelect

Aggregate returns a SampleSelect configured with the given aggregations.

func (*SampleQuery) All

func (_q *SampleQuery) All(ctx context.Context) ([]*Sample, error)

All executes the query and returns a list of Samples.

func (*SampleQuery) AllX

func (_q *SampleQuery) AllX(ctx context.Context) []*Sample

AllX is like All, but panics if an error occurs.

func (*SampleQuery) Clone

func (_q *SampleQuery) Clone() *SampleQuery

Clone returns a duplicate of the SampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SampleQuery) Count

func (_q *SampleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SampleQuery) CountX

func (_q *SampleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SampleQuery) Exist

func (_q *SampleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SampleQuery) ExistX

func (_q *SampleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SampleQuery) First

func (_q *SampleQuery) First(ctx context.Context) (*Sample, error)

First returns the first Sample entity from the query. Returns a *NotFoundError when no Sample was found.

func (*SampleQuery) FirstID

func (_q *SampleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Sample ID from the query. Returns a *NotFoundError when no Sample ID was found.

func (*SampleQuery) FirstIDX

func (_q *SampleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SampleQuery) FirstX

func (_q *SampleQuery) FirstX(ctx context.Context) *Sample

FirstX is like First, but panics if an error occurs.

func (*SampleQuery) GroupBy

func (_q *SampleQuery) GroupBy(field string, fields ...string) *SampleGroupBy

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 {
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Sample.Query().
	GroupBy(sample.FieldTsUnixMs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SampleQuery) IDs

func (_q *SampleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Sample IDs.

func (*SampleQuery) IDsX

func (_q *SampleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SampleQuery) Limit

func (_q *SampleQuery) Limit(limit int) *SampleQuery

Limit the number of records to be returned by this query.

func (*SampleQuery) Offset

func (_q *SampleQuery) Offset(offset int) *SampleQuery

Offset to start from.

func (*SampleQuery) Only

func (_q *SampleQuery) Only(ctx context.Context) (*Sample, error)

Only returns a single Sample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sample entity is found. Returns a *NotFoundError when no Sample entities are found.

func (*SampleQuery) OnlyID

func (_q *SampleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Sample ID in the query. Returns a *NotSingularError when more than one Sample ID is found. Returns a *NotFoundError when no entities are found.

func (*SampleQuery) OnlyIDX

func (_q *SampleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SampleQuery) OnlyX

func (_q *SampleQuery) OnlyX(ctx context.Context) *Sample

OnlyX is like Only, but panics if an error occurs.

func (*SampleQuery) Order

func (_q *SampleQuery) Order(o ...sample.OrderOption) *SampleQuery

Order specifies how the records should be ordered.

func (*SampleQuery) Select

func (_q *SampleQuery) Select(fields ...string) *SampleSelect

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 {
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
}

client.Sample.Query().
	Select(sample.FieldTsUnixMs).
	Scan(ctx, &v)

func (*SampleQuery) Unique

func (_q *SampleQuery) Unique(unique bool) *SampleQuery

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 (*SampleQuery) Where

func (_q *SampleQuery) Where(ps ...predicate.Sample) *SampleQuery

Where adds a new predicate for the SampleQuery builder.

type SampleSelect

type SampleSelect struct {
	*SampleQuery
	// contains filtered or unexported fields
}

SampleSelect is the builder for selecting fields of Sample entities.

func (*SampleSelect) Aggregate

func (_s *SampleSelect) Aggregate(fns ...AggregateFunc) *SampleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SampleSelect) Bool

func (s *SampleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SampleSelect) BoolX

func (s *SampleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SampleSelect) Bools

func (s *SampleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SampleSelect) BoolsX

func (s *SampleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SampleSelect) Float64

func (s *SampleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SampleSelect) Float64X

func (s *SampleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SampleSelect) Float64s

func (s *SampleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SampleSelect) Float64sX

func (s *SampleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SampleSelect) Int

func (s *SampleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SampleSelect) IntX

func (s *SampleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SampleSelect) Ints

func (s *SampleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SampleSelect) IntsX

func (s *SampleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SampleSelect) Scan

func (_s *SampleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SampleSelect) ScanX

func (s *SampleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SampleSelect) String

func (s *SampleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SampleSelect) StringX

func (s *SampleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SampleSelect) Strings

func (s *SampleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SampleSelect) StringsX

func (s *SampleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SampleUpdate

type SampleUpdate struct {
	// contains filtered or unexported fields
}

SampleUpdate is the builder for updating Sample entities.

func (*SampleUpdate) AddRttMs

func (_u *SampleUpdate) AddRttMs(v float64) *SampleUpdate

AddRttMs adds value to the "rtt_ms" field.

func (*SampleUpdate) AddTargetPort

func (_u *SampleUpdate) AddTargetPort(v int) *SampleUpdate

AddTargetPort adds value to the "target_port" field.

func (*SampleUpdate) AddTsUnixMs

func (_u *SampleUpdate) AddTsUnixMs(v int64) *SampleUpdate

AddTsUnixMs adds value to the "ts_unix_ms" field.

func (*SampleUpdate) ClearError

func (_u *SampleUpdate) ClearError() *SampleUpdate

ClearError clears the value of the "error" field.

func (*SampleUpdate) ClearRttMs

func (_u *SampleUpdate) ClearRttMs() *SampleUpdate

ClearRttMs clears the value of the "rtt_ms" field.

func (*SampleUpdate) ClearTargetPort

func (_u *SampleUpdate) ClearTargetPort() *SampleUpdate

ClearTargetPort clears the value of the "target_port" field.

func (*SampleUpdate) Exec

func (_u *SampleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SampleUpdate) ExecX

func (_u *SampleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SampleUpdate) Mutation

func (_u *SampleUpdate) Mutation() *SampleMutation

Mutation returns the SampleMutation object of the builder.

func (*SampleUpdate) Save

func (_u *SampleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SampleUpdate) SaveX

func (_u *SampleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SampleUpdate) SetError

func (_u *SampleUpdate) SetError(v string) *SampleUpdate

SetError sets the "error" field.

func (*SampleUpdate) SetNillableError

func (_u *SampleUpdate) SetNillableError(v *string) *SampleUpdate

SetNillableError sets the "error" field if the given value is not nil.

func (*SampleUpdate) SetNillableRttMs

func (_u *SampleUpdate) SetNillableRttMs(v *float64) *SampleUpdate

SetNillableRttMs sets the "rtt_ms" field if the given value is not nil.

func (*SampleUpdate) SetNillableSuccess

func (_u *SampleUpdate) SetNillableSuccess(v *bool) *SampleUpdate

SetNillableSuccess sets the "success" field if the given value is not nil.

func (*SampleUpdate) SetNillableTargetHost

func (_u *SampleUpdate) SetNillableTargetHost(v *string) *SampleUpdate

SetNillableTargetHost sets the "target_host" field if the given value is not nil.

func (*SampleUpdate) SetNillableTargetKind

func (_u *SampleUpdate) SetNillableTargetKind(v *string) *SampleUpdate

SetNillableTargetKind sets the "target_kind" field if the given value is not nil.

func (*SampleUpdate) SetNillableTargetLabel

func (_u *SampleUpdate) SetNillableTargetLabel(v *string) *SampleUpdate

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*SampleUpdate) SetNillableTargetPort

func (_u *SampleUpdate) SetNillableTargetPort(v *int) *SampleUpdate

SetNillableTargetPort sets the "target_port" field if the given value is not nil.

func (*SampleUpdate) SetNillableTsUnixMs

func (_u *SampleUpdate) SetNillableTsUnixMs(v *int64) *SampleUpdate

SetNillableTsUnixMs sets the "ts_unix_ms" field if the given value is not nil.

func (*SampleUpdate) SetRttMs

func (_u *SampleUpdate) SetRttMs(v float64) *SampleUpdate

SetRttMs sets the "rtt_ms" field.

func (*SampleUpdate) SetSuccess

func (_u *SampleUpdate) SetSuccess(v bool) *SampleUpdate

SetSuccess sets the "success" field.

func (*SampleUpdate) SetTargetHost

func (_u *SampleUpdate) SetTargetHost(v string) *SampleUpdate

SetTargetHost sets the "target_host" field.

func (*SampleUpdate) SetTargetKind

func (_u *SampleUpdate) SetTargetKind(v string) *SampleUpdate

SetTargetKind sets the "target_kind" field.

func (*SampleUpdate) SetTargetLabel

func (_u *SampleUpdate) SetTargetLabel(v string) *SampleUpdate

SetTargetLabel sets the "target_label" field.

func (*SampleUpdate) SetTargetPort

func (_u *SampleUpdate) SetTargetPort(v int) *SampleUpdate

SetTargetPort sets the "target_port" field.

func (*SampleUpdate) SetTsUnixMs

func (_u *SampleUpdate) SetTsUnixMs(v int64) *SampleUpdate

SetTsUnixMs sets the "ts_unix_ms" field.

func (*SampleUpdate) Where

func (_u *SampleUpdate) Where(ps ...predicate.Sample) *SampleUpdate

Where appends a list predicates to the SampleUpdate builder.

type SampleUpdateOne

type SampleUpdateOne struct {
	// contains filtered or unexported fields
}

SampleUpdateOne is the builder for updating a single Sample entity.

func (*SampleUpdateOne) AddRttMs

func (_u *SampleUpdateOne) AddRttMs(v float64) *SampleUpdateOne

AddRttMs adds value to the "rtt_ms" field.

func (*SampleUpdateOne) AddTargetPort

func (_u *SampleUpdateOne) AddTargetPort(v int) *SampleUpdateOne

AddTargetPort adds value to the "target_port" field.

func (*SampleUpdateOne) AddTsUnixMs

func (_u *SampleUpdateOne) AddTsUnixMs(v int64) *SampleUpdateOne

AddTsUnixMs adds value to the "ts_unix_ms" field.

func (*SampleUpdateOne) ClearError

func (_u *SampleUpdateOne) ClearError() *SampleUpdateOne

ClearError clears the value of the "error" field.

func (*SampleUpdateOne) ClearRttMs

func (_u *SampleUpdateOne) ClearRttMs() *SampleUpdateOne

ClearRttMs clears the value of the "rtt_ms" field.

func (*SampleUpdateOne) ClearTargetPort

func (_u *SampleUpdateOne) ClearTargetPort() *SampleUpdateOne

ClearTargetPort clears the value of the "target_port" field.

func (*SampleUpdateOne) Exec

func (_u *SampleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SampleUpdateOne) ExecX

func (_u *SampleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SampleUpdateOne) Mutation

func (_u *SampleUpdateOne) Mutation() *SampleMutation

Mutation returns the SampleMutation object of the builder.

func (*SampleUpdateOne) Save

func (_u *SampleUpdateOne) Save(ctx context.Context) (*Sample, error)

Save executes the query and returns the updated Sample entity.

func (*SampleUpdateOne) SaveX

func (_u *SampleUpdateOne) SaveX(ctx context.Context) *Sample

SaveX is like Save, but panics if an error occurs.

func (*SampleUpdateOne) Select

func (_u *SampleUpdateOne) Select(field string, fields ...string) *SampleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SampleUpdateOne) SetError

func (_u *SampleUpdateOne) SetError(v string) *SampleUpdateOne

SetError sets the "error" field.

func (*SampleUpdateOne) SetNillableError

func (_u *SampleUpdateOne) SetNillableError(v *string) *SampleUpdateOne

SetNillableError sets the "error" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableRttMs

func (_u *SampleUpdateOne) SetNillableRttMs(v *float64) *SampleUpdateOne

SetNillableRttMs sets the "rtt_ms" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableSuccess

func (_u *SampleUpdateOne) SetNillableSuccess(v *bool) *SampleUpdateOne

SetNillableSuccess sets the "success" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableTargetHost

func (_u *SampleUpdateOne) SetNillableTargetHost(v *string) *SampleUpdateOne

SetNillableTargetHost sets the "target_host" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableTargetKind

func (_u *SampleUpdateOne) SetNillableTargetKind(v *string) *SampleUpdateOne

SetNillableTargetKind sets the "target_kind" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableTargetLabel

func (_u *SampleUpdateOne) SetNillableTargetLabel(v *string) *SampleUpdateOne

SetNillableTargetLabel sets the "target_label" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableTargetPort

func (_u *SampleUpdateOne) SetNillableTargetPort(v *int) *SampleUpdateOne

SetNillableTargetPort sets the "target_port" field if the given value is not nil.

func (*SampleUpdateOne) SetNillableTsUnixMs

func (_u *SampleUpdateOne) SetNillableTsUnixMs(v *int64) *SampleUpdateOne

SetNillableTsUnixMs sets the "ts_unix_ms" field if the given value is not nil.

func (*SampleUpdateOne) SetRttMs

func (_u *SampleUpdateOne) SetRttMs(v float64) *SampleUpdateOne

SetRttMs sets the "rtt_ms" field.

func (*SampleUpdateOne) SetSuccess

func (_u *SampleUpdateOne) SetSuccess(v bool) *SampleUpdateOne

SetSuccess sets the "success" field.

func (*SampleUpdateOne) SetTargetHost

func (_u *SampleUpdateOne) SetTargetHost(v string) *SampleUpdateOne

SetTargetHost sets the "target_host" field.

func (*SampleUpdateOne) SetTargetKind

func (_u *SampleUpdateOne) SetTargetKind(v string) *SampleUpdateOne

SetTargetKind sets the "target_kind" field.

func (*SampleUpdateOne) SetTargetLabel

func (_u *SampleUpdateOne) SetTargetLabel(v string) *SampleUpdateOne

SetTargetLabel sets the "target_label" field.

func (*SampleUpdateOne) SetTargetPort

func (_u *SampleUpdateOne) SetTargetPort(v int) *SampleUpdateOne

SetTargetPort sets the "target_port" field.

func (*SampleUpdateOne) SetTsUnixMs

func (_u *SampleUpdateOne) SetTsUnixMs(v int64) *SampleUpdateOne

SetTsUnixMs sets the "ts_unix_ms" field.

func (*SampleUpdateOne) Where

func (_u *SampleUpdateOne) Where(ps ...predicate.Sample) *SampleUpdateOne

Where appends a list predicates to the SampleUpdate builder.

type Samples

type Samples []*Sample

Samples is a parsable slice of Sample.

type Target

type Target struct {

	// ID of the ent.
	// UUID set by application code at creation
	ID string `json:"id,omitempty"`
	// Human-readable identifier, e.g. 'router_icmp', 'teams_tcp443'
	Label string `json:"label,omitempty"`
	// Selects the Probe implementation
	Kind target.Kind `json:"kind,omitempty"`
	// Hostname or IP address
	Host string `json:"host,omitempty"`
	// Required for tcp/udp_dns/udp_stun; ignored for icmp
	Port *int `json:"port,omitempty"`
	// Enabled holds the value of the "enabled" field.
	Enabled bool `json:"enabled,omitempty"`
	// True for the 13 seeded targets shipped with Vigil
	IsBuiltin bool `json:"is_builtin,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Target is the model entity for the Target schema.

func (*Target) String

func (_m *Target) String() string

String implements the fmt.Stringer.

func (*Target) Unwrap

func (_m *Target) Unwrap() *Target

Unwrap unwraps the Target 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 (*Target) Update

func (_m *Target) Update() *TargetUpdateOne

Update returns a builder for updating this Target. Note that you need to call Target.Unwrap() before calling this method if this Target was returned from a transaction, and the transaction was committed or rolled back.

func (*Target) Value

func (_m *Target) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Target. This includes values selected through modifiers, order, etc.

type TargetClient

type TargetClient struct {
	// contains filtered or unexported fields
}

TargetClient is a client for the Target schema.

func NewTargetClient

func NewTargetClient(c config) *TargetClient

NewTargetClient returns a client for the Target from the given config.

func (*TargetClient) Create

func (c *TargetClient) Create() *TargetCreate

Create returns a builder for creating a Target entity.

func (*TargetClient) CreateBulk

func (c *TargetClient) CreateBulk(builders ...*TargetCreate) *TargetCreateBulk

CreateBulk returns a builder for creating a bulk of Target entities.

func (*TargetClient) Delete

func (c *TargetClient) Delete() *TargetDelete

Delete returns a delete builder for Target.

func (*TargetClient) DeleteOne

func (c *TargetClient) DeleteOne(_m *Target) *TargetDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TargetClient) DeleteOneID

func (c *TargetClient) DeleteOneID(id string) *TargetDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TargetClient) Get

func (c *TargetClient) Get(ctx context.Context, id string) (*Target, error)

Get returns a Target entity by its id.

func (*TargetClient) GetX

func (c *TargetClient) GetX(ctx context.Context, id string) *Target

GetX is like Get, but panics if an error occurs.

func (*TargetClient) Hooks

func (c *TargetClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TargetClient) Intercept

func (c *TargetClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `target.Intercept(f(g(h())))`.

func (*TargetClient) Interceptors

func (c *TargetClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TargetClient) MapCreateBulk

func (c *TargetClient) MapCreateBulk(slice any, setFunc func(*TargetCreate, int)) *TargetCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*TargetClient) Query

func (c *TargetClient) Query() *TargetQuery

Query returns a query builder for Target.

func (*TargetClient) Update

func (c *TargetClient) Update() *TargetUpdate

Update returns an update builder for Target.

func (*TargetClient) UpdateOne

func (c *TargetClient) UpdateOne(_m *Target) *TargetUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TargetClient) UpdateOneID

func (c *TargetClient) UpdateOneID(id string) *TargetUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TargetClient) Use

func (c *TargetClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `target.Hooks(f(g(h())))`.

type TargetCreate

type TargetCreate struct {
	// contains filtered or unexported fields
}

TargetCreate is the builder for creating a Target entity.

func (*TargetCreate) Exec

func (_c *TargetCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TargetCreate) ExecX

func (_c *TargetCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TargetCreate) Mutation

func (_c *TargetCreate) Mutation() *TargetMutation

Mutation returns the TargetMutation object of the builder.

func (*TargetCreate) Save

func (_c *TargetCreate) Save(ctx context.Context) (*Target, error)

Save creates the Target in the database.

func (*TargetCreate) SaveX

func (_c *TargetCreate) SaveX(ctx context.Context) *Target

SaveX calls Save and panics if Save returns an error.

func (*TargetCreate) SetCreatedAt

func (_c *TargetCreate) SetCreatedAt(v time.Time) *TargetCreate

SetCreatedAt sets the "created_at" field.

func (*TargetCreate) SetEnabled

func (_c *TargetCreate) SetEnabled(v bool) *TargetCreate

SetEnabled sets the "enabled" field.

func (*TargetCreate) SetHost

func (_c *TargetCreate) SetHost(v string) *TargetCreate

SetHost sets the "host" field.

func (*TargetCreate) SetID

func (_c *TargetCreate) SetID(v string) *TargetCreate

SetID sets the "id" field.

func (*TargetCreate) SetIsBuiltin

func (_c *TargetCreate) SetIsBuiltin(v bool) *TargetCreate

SetIsBuiltin sets the "is_builtin" field.

func (*TargetCreate) SetKind

func (_c *TargetCreate) SetKind(v target.Kind) *TargetCreate

SetKind sets the "kind" field.

func (*TargetCreate) SetLabel

func (_c *TargetCreate) SetLabel(v string) *TargetCreate

SetLabel sets the "label" field.

func (*TargetCreate) SetNillableCreatedAt

func (_c *TargetCreate) SetNillableCreatedAt(v *time.Time) *TargetCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TargetCreate) SetNillableEnabled

func (_c *TargetCreate) SetNillableEnabled(v *bool) *TargetCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*TargetCreate) SetNillableIsBuiltin

func (_c *TargetCreate) SetNillableIsBuiltin(v *bool) *TargetCreate

SetNillableIsBuiltin sets the "is_builtin" field if the given value is not nil.

func (*TargetCreate) SetNillablePort

func (_c *TargetCreate) SetNillablePort(v *int) *TargetCreate

SetNillablePort sets the "port" field if the given value is not nil.

func (*TargetCreate) SetNillableUpdatedAt

func (_c *TargetCreate) SetNillableUpdatedAt(v *time.Time) *TargetCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TargetCreate) SetPort

func (_c *TargetCreate) SetPort(v int) *TargetCreate

SetPort sets the "port" field.

func (*TargetCreate) SetUpdatedAt

func (_c *TargetCreate) SetUpdatedAt(v time.Time) *TargetCreate

SetUpdatedAt sets the "updated_at" field.

type TargetCreateBulk

type TargetCreateBulk struct {
	// contains filtered or unexported fields
}

TargetCreateBulk is the builder for creating many Target entities in bulk.

func (*TargetCreateBulk) Exec

func (_c *TargetCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TargetCreateBulk) ExecX

func (_c *TargetCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TargetCreateBulk) Save

func (_c *TargetCreateBulk) Save(ctx context.Context) ([]*Target, error)

Save creates the Target entities in the database.

func (*TargetCreateBulk) SaveX

func (_c *TargetCreateBulk) SaveX(ctx context.Context) []*Target

SaveX is like Save, but panics if an error occurs.

type TargetDelete

type TargetDelete struct {
	// contains filtered or unexported fields
}

TargetDelete is the builder for deleting a Target entity.

func (*TargetDelete) Exec

func (_d *TargetDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TargetDelete) ExecX

func (_d *TargetDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TargetDelete) Where

func (_d *TargetDelete) Where(ps ...predicate.Target) *TargetDelete

Where appends a list predicates to the TargetDelete builder.

type TargetDeleteOne

type TargetDeleteOne struct {
	// contains filtered or unexported fields
}

TargetDeleteOne is the builder for deleting a single Target entity.

func (*TargetDeleteOne) Exec

func (_d *TargetDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TargetDeleteOne) ExecX

func (_d *TargetDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TargetDeleteOne) Where

func (_d *TargetDeleteOne) Where(ps ...predicate.Target) *TargetDeleteOne

Where appends a list predicates to the TargetDelete builder.

type TargetGroupBy

type TargetGroupBy struct {
	// contains filtered or unexported fields
}

TargetGroupBy is the group-by builder for Target entities.

func (*TargetGroupBy) Aggregate

func (_g *TargetGroupBy) Aggregate(fns ...AggregateFunc) *TargetGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TargetGroupBy) Bool

func (s *TargetGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) BoolX

func (s *TargetGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TargetGroupBy) Bools

func (s *TargetGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) BoolsX

func (s *TargetGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TargetGroupBy) Float64

func (s *TargetGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) Float64X

func (s *TargetGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TargetGroupBy) Float64s

func (s *TargetGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) Float64sX

func (s *TargetGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TargetGroupBy) Int

func (s *TargetGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) IntX

func (s *TargetGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TargetGroupBy) Ints

func (s *TargetGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) IntsX

func (s *TargetGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TargetGroupBy) Scan

func (_g *TargetGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TargetGroupBy) ScanX

func (s *TargetGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TargetGroupBy) String

func (s *TargetGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) StringX

func (s *TargetGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TargetGroupBy) Strings

func (s *TargetGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TargetGroupBy) StringsX

func (s *TargetGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TargetMutation

type TargetMutation struct {
	// contains filtered or unexported fields
}

TargetMutation represents an operation that mutates the Target nodes in the graph.

func (*TargetMutation) AddField

func (m *TargetMutation) 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 (*TargetMutation) AddPort

func (m *TargetMutation) AddPort(i int)

AddPort adds i to the "port" field.

func (*TargetMutation) AddedEdges

func (m *TargetMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TargetMutation) AddedField

func (m *TargetMutation) 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 (*TargetMutation) AddedFields

func (m *TargetMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TargetMutation) AddedIDs

func (m *TargetMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TargetMutation) AddedPort

func (m *TargetMutation) AddedPort() (r int, exists bool)

AddedPort returns the value that was added to the "port" field in this mutation.

func (*TargetMutation) ClearEdge

func (m *TargetMutation) 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 (*TargetMutation) ClearField

func (m *TargetMutation) 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 (*TargetMutation) ClearPort

func (m *TargetMutation) ClearPort()

ClearPort clears the value of the "port" field.

func (*TargetMutation) ClearedEdges

func (m *TargetMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TargetMutation) ClearedFields

func (m *TargetMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TargetMutation) Client

func (m TargetMutation) 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 (*TargetMutation) CreatedAt

func (m *TargetMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TargetMutation) EdgeCleared

func (m *TargetMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TargetMutation) Enabled

func (m *TargetMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*TargetMutation) Field

func (m *TargetMutation) 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 (*TargetMutation) FieldCleared

func (m *TargetMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TargetMutation) Fields

func (m *TargetMutation) 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 (*TargetMutation) Host

func (m *TargetMutation) Host() (r string, exists bool)

Host returns the value of the "host" field in the mutation.

func (*TargetMutation) ID

func (m *TargetMutation) ID() (id string, 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 (*TargetMutation) IDs

func (m *TargetMutation) IDs(ctx context.Context) ([]string, 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 (*TargetMutation) IsBuiltin

func (m *TargetMutation) IsBuiltin() (r bool, exists bool)

IsBuiltin returns the value of the "is_builtin" field in the mutation.

func (*TargetMutation) Kind

func (m *TargetMutation) Kind() (r target.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*TargetMutation) Label

func (m *TargetMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*TargetMutation) OldCreatedAt

func (m *TargetMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Target entity. If the Target 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 (*TargetMutation) OldEnabled

func (m *TargetMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the Target entity. If the Target 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 (*TargetMutation) OldField

func (m *TargetMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*TargetMutation) OldHost

func (m *TargetMutation) OldHost(ctx context.Context) (v string, err error)

OldHost returns the old "host" field's value of the Target entity. If the Target 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 (*TargetMutation) OldIsBuiltin

func (m *TargetMutation) OldIsBuiltin(ctx context.Context) (v bool, err error)

OldIsBuiltin returns the old "is_builtin" field's value of the Target entity. If the Target 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 (*TargetMutation) OldKind

func (m *TargetMutation) OldKind(ctx context.Context) (v target.Kind, err error)

OldKind returns the old "kind" field's value of the Target entity. If the Target 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 (*TargetMutation) OldLabel

func (m *TargetMutation) OldLabel(ctx context.Context) (v string, err error)

OldLabel returns the old "label" field's value of the Target entity. If the Target 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 (*TargetMutation) OldPort

func (m *TargetMutation) OldPort(ctx context.Context) (v *int, err error)

OldPort returns the old "port" field's value of the Target entity. If the Target 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 (*TargetMutation) OldUpdatedAt

func (m *TargetMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Target entity. If the Target 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 (*TargetMutation) Op

func (m *TargetMutation) Op() Op

Op returns the operation name.

func (*TargetMutation) Port

func (m *TargetMutation) Port() (r int, exists bool)

Port returns the value of the "port" field in the mutation.

func (*TargetMutation) PortCleared

func (m *TargetMutation) PortCleared() bool

PortCleared returns if the "port" field was cleared in this mutation.

func (*TargetMutation) RemovedEdges

func (m *TargetMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TargetMutation) RemovedIDs

func (m *TargetMutation) 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 (*TargetMutation) ResetCreatedAt

func (m *TargetMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TargetMutation) ResetEdge

func (m *TargetMutation) 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 (*TargetMutation) ResetEnabled

func (m *TargetMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*TargetMutation) ResetField

func (m *TargetMutation) 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 (*TargetMutation) ResetHost

func (m *TargetMutation) ResetHost()

ResetHost resets all changes to the "host" field.

func (*TargetMutation) ResetIsBuiltin

func (m *TargetMutation) ResetIsBuiltin()

ResetIsBuiltin resets all changes to the "is_builtin" field.

func (*TargetMutation) ResetKind

func (m *TargetMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*TargetMutation) ResetLabel

func (m *TargetMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*TargetMutation) ResetPort

func (m *TargetMutation) ResetPort()

ResetPort resets all changes to the "port" field.

func (*TargetMutation) ResetUpdatedAt

func (m *TargetMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TargetMutation) SetCreatedAt

func (m *TargetMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TargetMutation) SetEnabled

func (m *TargetMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*TargetMutation) SetField

func (m *TargetMutation) 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 (*TargetMutation) SetHost

func (m *TargetMutation) SetHost(s string)

SetHost sets the "host" field.

func (*TargetMutation) SetID

func (m *TargetMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Target entities.

func (*TargetMutation) SetIsBuiltin

func (m *TargetMutation) SetIsBuiltin(b bool)

SetIsBuiltin sets the "is_builtin" field.

func (*TargetMutation) SetKind

func (m *TargetMutation) SetKind(t target.Kind)

SetKind sets the "kind" field.

func (*TargetMutation) SetLabel

func (m *TargetMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*TargetMutation) SetOp

func (m *TargetMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TargetMutation) SetPort

func (m *TargetMutation) SetPort(i int)

SetPort sets the "port" field.

func (*TargetMutation) SetUpdatedAt

func (m *TargetMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (TargetMutation) Tx

func (m TargetMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TargetMutation) Type

func (m *TargetMutation) Type() string

Type returns the node type of this mutation (Target).

func (*TargetMutation) UpdatedAt

func (m *TargetMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TargetMutation) Where

func (m *TargetMutation) Where(ps ...predicate.Target)

Where appends a list predicates to the TargetMutation builder.

func (*TargetMutation) WhereP

func (m *TargetMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TargetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TargetQuery

type TargetQuery struct {
	// contains filtered or unexported fields
}

TargetQuery is the builder for querying Target entities.

func (*TargetQuery) Aggregate

func (_q *TargetQuery) Aggregate(fns ...AggregateFunc) *TargetSelect

Aggregate returns a TargetSelect configured with the given aggregations.

func (*TargetQuery) All

func (_q *TargetQuery) All(ctx context.Context) ([]*Target, error)

All executes the query and returns a list of Targets.

func (*TargetQuery) AllX

func (_q *TargetQuery) AllX(ctx context.Context) []*Target

AllX is like All, but panics if an error occurs.

func (*TargetQuery) Clone

func (_q *TargetQuery) Clone() *TargetQuery

Clone returns a duplicate of the TargetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TargetQuery) Count

func (_q *TargetQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TargetQuery) CountX

func (_q *TargetQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TargetQuery) Exist

func (_q *TargetQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TargetQuery) ExistX

func (_q *TargetQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TargetQuery) First

func (_q *TargetQuery) First(ctx context.Context) (*Target, error)

First returns the first Target entity from the query. Returns a *NotFoundError when no Target was found.

func (*TargetQuery) FirstID

func (_q *TargetQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Target ID from the query. Returns a *NotFoundError when no Target ID was found.

func (*TargetQuery) FirstIDX

func (_q *TargetQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*TargetQuery) FirstX

func (_q *TargetQuery) FirstX(ctx context.Context) *Target

FirstX is like First, but panics if an error occurs.

func (*TargetQuery) GroupBy

func (_q *TargetQuery) GroupBy(field string, fields ...string) *TargetGroupBy

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 {
	Label string `json:"label,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Target.Query().
	GroupBy(target.FieldLabel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TargetQuery) IDs

func (_q *TargetQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Target IDs.

func (*TargetQuery) IDsX

func (_q *TargetQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*TargetQuery) Limit

func (_q *TargetQuery) Limit(limit int) *TargetQuery

Limit the number of records to be returned by this query.

func (*TargetQuery) Offset

func (_q *TargetQuery) Offset(offset int) *TargetQuery

Offset to start from.

func (*TargetQuery) Only

func (_q *TargetQuery) Only(ctx context.Context) (*Target, error)

Only returns a single Target entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Target entity is found. Returns a *NotFoundError when no Target entities are found.

func (*TargetQuery) OnlyID

func (_q *TargetQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Target ID in the query. Returns a *NotSingularError when more than one Target ID is found. Returns a *NotFoundError when no entities are found.

func (*TargetQuery) OnlyIDX

func (_q *TargetQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TargetQuery) OnlyX

func (_q *TargetQuery) OnlyX(ctx context.Context) *Target

OnlyX is like Only, but panics if an error occurs.

func (*TargetQuery) Order

func (_q *TargetQuery) Order(o ...target.OrderOption) *TargetQuery

Order specifies how the records should be ordered.

func (*TargetQuery) Select

func (_q *TargetQuery) Select(fields ...string) *TargetSelect

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 {
	Label string `json:"label,omitempty"`
}

client.Target.Query().
	Select(target.FieldLabel).
	Scan(ctx, &v)

func (*TargetQuery) Unique

func (_q *TargetQuery) Unique(unique bool) *TargetQuery

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 (*TargetQuery) Where

func (_q *TargetQuery) Where(ps ...predicate.Target) *TargetQuery

Where adds a new predicate for the TargetQuery builder.

type TargetSelect

type TargetSelect struct {
	*TargetQuery
	// contains filtered or unexported fields
}

TargetSelect is the builder for selecting fields of Target entities.

func (*TargetSelect) Aggregate

func (_s *TargetSelect) Aggregate(fns ...AggregateFunc) *TargetSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TargetSelect) Bool

func (s *TargetSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TargetSelect) BoolX

func (s *TargetSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TargetSelect) Bools

func (s *TargetSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TargetSelect) BoolsX

func (s *TargetSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TargetSelect) Float64

func (s *TargetSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TargetSelect) Float64X

func (s *TargetSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TargetSelect) Float64s

func (s *TargetSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TargetSelect) Float64sX

func (s *TargetSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TargetSelect) Int

func (s *TargetSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TargetSelect) IntX

func (s *TargetSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TargetSelect) Ints

func (s *TargetSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TargetSelect) IntsX

func (s *TargetSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TargetSelect) Scan

func (_s *TargetSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TargetSelect) ScanX

func (s *TargetSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TargetSelect) String

func (s *TargetSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TargetSelect) StringX

func (s *TargetSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TargetSelect) Strings

func (s *TargetSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TargetSelect) StringsX

func (s *TargetSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TargetUpdate

type TargetUpdate struct {
	// contains filtered or unexported fields
}

TargetUpdate is the builder for updating Target entities.

func (*TargetUpdate) AddPort

func (_u *TargetUpdate) AddPort(v int) *TargetUpdate

AddPort adds value to the "port" field.

func (*TargetUpdate) ClearPort

func (_u *TargetUpdate) ClearPort() *TargetUpdate

ClearPort clears the value of the "port" field.

func (*TargetUpdate) Exec

func (_u *TargetUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TargetUpdate) ExecX

func (_u *TargetUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TargetUpdate) Mutation

func (_u *TargetUpdate) Mutation() *TargetMutation

Mutation returns the TargetMutation object of the builder.

func (*TargetUpdate) Save

func (_u *TargetUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TargetUpdate) SaveX

func (_u *TargetUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TargetUpdate) SetEnabled

func (_u *TargetUpdate) SetEnabled(v bool) *TargetUpdate

SetEnabled sets the "enabled" field.

func (*TargetUpdate) SetHost

func (_u *TargetUpdate) SetHost(v string) *TargetUpdate

SetHost sets the "host" field.

func (*TargetUpdate) SetKind

func (_u *TargetUpdate) SetKind(v target.Kind) *TargetUpdate

SetKind sets the "kind" field.

func (*TargetUpdate) SetLabel

func (_u *TargetUpdate) SetLabel(v string) *TargetUpdate

SetLabel sets the "label" field.

func (*TargetUpdate) SetNillableEnabled

func (_u *TargetUpdate) SetNillableEnabled(v *bool) *TargetUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*TargetUpdate) SetNillableHost

func (_u *TargetUpdate) SetNillableHost(v *string) *TargetUpdate

SetNillableHost sets the "host" field if the given value is not nil.

func (*TargetUpdate) SetNillableKind

func (_u *TargetUpdate) SetNillableKind(v *target.Kind) *TargetUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TargetUpdate) SetNillableLabel

func (_u *TargetUpdate) SetNillableLabel(v *string) *TargetUpdate

SetNillableLabel sets the "label" field if the given value is not nil.

func (*TargetUpdate) SetNillablePort

func (_u *TargetUpdate) SetNillablePort(v *int) *TargetUpdate

SetNillablePort sets the "port" field if the given value is not nil.

func (*TargetUpdate) SetPort

func (_u *TargetUpdate) SetPort(v int) *TargetUpdate

SetPort sets the "port" field.

func (*TargetUpdate) SetUpdatedAt

func (_u *TargetUpdate) SetUpdatedAt(v time.Time) *TargetUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TargetUpdate) Where

func (_u *TargetUpdate) Where(ps ...predicate.Target) *TargetUpdate

Where appends a list predicates to the TargetUpdate builder.

type TargetUpdateOne

type TargetUpdateOne struct {
	// contains filtered or unexported fields
}

TargetUpdateOne is the builder for updating a single Target entity.

func (*TargetUpdateOne) AddPort

func (_u *TargetUpdateOne) AddPort(v int) *TargetUpdateOne

AddPort adds value to the "port" field.

func (*TargetUpdateOne) ClearPort

func (_u *TargetUpdateOne) ClearPort() *TargetUpdateOne

ClearPort clears the value of the "port" field.

func (*TargetUpdateOne) Exec

func (_u *TargetUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TargetUpdateOne) ExecX

func (_u *TargetUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TargetUpdateOne) Mutation

func (_u *TargetUpdateOne) Mutation() *TargetMutation

Mutation returns the TargetMutation object of the builder.

func (*TargetUpdateOne) Save

func (_u *TargetUpdateOne) Save(ctx context.Context) (*Target, error)

Save executes the query and returns the updated Target entity.

func (*TargetUpdateOne) SaveX

func (_u *TargetUpdateOne) SaveX(ctx context.Context) *Target

SaveX is like Save, but panics if an error occurs.

func (*TargetUpdateOne) Select

func (_u *TargetUpdateOne) Select(field string, fields ...string) *TargetUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TargetUpdateOne) SetEnabled

func (_u *TargetUpdateOne) SetEnabled(v bool) *TargetUpdateOne

SetEnabled sets the "enabled" field.

func (*TargetUpdateOne) SetHost

func (_u *TargetUpdateOne) SetHost(v string) *TargetUpdateOne

SetHost sets the "host" field.

func (*TargetUpdateOne) SetKind

func (_u *TargetUpdateOne) SetKind(v target.Kind) *TargetUpdateOne

SetKind sets the "kind" field.

func (*TargetUpdateOne) SetLabel

func (_u *TargetUpdateOne) SetLabel(v string) *TargetUpdateOne

SetLabel sets the "label" field.

func (*TargetUpdateOne) SetNillableEnabled

func (_u *TargetUpdateOne) SetNillableEnabled(v *bool) *TargetUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*TargetUpdateOne) SetNillableHost

func (_u *TargetUpdateOne) SetNillableHost(v *string) *TargetUpdateOne

SetNillableHost sets the "host" field if the given value is not nil.

func (*TargetUpdateOne) SetNillableKind

func (_u *TargetUpdateOne) SetNillableKind(v *target.Kind) *TargetUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TargetUpdateOne) SetNillableLabel

func (_u *TargetUpdateOne) SetNillableLabel(v *string) *TargetUpdateOne

SetNillableLabel sets the "label" field if the given value is not nil.

func (*TargetUpdateOne) SetNillablePort

func (_u *TargetUpdateOne) SetNillablePort(v *int) *TargetUpdateOne

SetNillablePort sets the "port" field if the given value is not nil.

func (*TargetUpdateOne) SetPort

func (_u *TargetUpdateOne) SetPort(v int) *TargetUpdateOne

SetPort sets the "port" field.

func (*TargetUpdateOne) SetUpdatedAt

func (_u *TargetUpdateOne) SetUpdatedAt(v time.Time) *TargetUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*TargetUpdateOne) Where

func (_u *TargetUpdateOne) Where(ps ...predicate.Target) *TargetUpdateOne

Where appends a list predicates to the TargetUpdate builder.

type Targets

type Targets []*Target

Targets is a parsable slice of Target.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// AppConfig is the client for interacting with the AppConfig builders.
	AppConfig *AppConfigClient
	// Outage is the client for interacting with the Outage builders.
	Outage *OutageClient
	// Sample is the client for interacting with the Sample builders.
	Sample *SampleClient
	// Sample1h is the client for interacting with the Sample1h builders.
	Sample1h *Sample1hClient
	// Sample1min is the client for interacting with the Sample1min builders.
	Sample1min *Sample1minClient
	// Sample5min is the client for interacting with the Sample5min builders.
	Sample5min *Sample5minClient
	// Target is the client for interacting with the Target builders.
	Target *TargetClient
	// WifiSample is the client for interacting with the WifiSample builders.
	WifiSample *WifiSampleClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

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 Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type WifiSample

type WifiSample struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TsUnixMs holds the value of the "ts_unix_ms" field.
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
	// Ssid holds the value of the "ssid" field.
	Ssid *string `json:"ssid,omitempty"`
	// Bssid holds the value of the "bssid" field.
	Bssid *string `json:"bssid,omitempty"`
	// Windows-only — derived elsewhere
	SignalPercent *int `json:"signal_percent,omitempty"`
	// RssiDbm holds the value of the "rssi_dbm" field.
	RssiDbm *int `json:"rssi_dbm,omitempty"`
	// Windows-only
	RxRateMbps *float64 `json:"rx_rate_mbps,omitempty"`
	// Windows-only
	TxRateMbps *float64 `json:"tx_rate_mbps,omitempty"`
	// Channel holds the value of the "channel" field.
	Channel *string `json:"channel,omitempty"`
	// contains filtered or unexported fields
}

WifiSample is the model entity for the WifiSample schema.

func (*WifiSample) String

func (_m *WifiSample) String() string

String implements the fmt.Stringer.

func (*WifiSample) Unwrap

func (_m *WifiSample) Unwrap() *WifiSample

Unwrap unwraps the WifiSample 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 (*WifiSample) Update

func (_m *WifiSample) Update() *WifiSampleUpdateOne

Update returns a builder for updating this WifiSample. Note that you need to call WifiSample.Unwrap() before calling this method if this WifiSample was returned from a transaction, and the transaction was committed or rolled back.

func (*WifiSample) Value

func (_m *WifiSample) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WifiSample. This includes values selected through modifiers, order, etc.

type WifiSampleClient

type WifiSampleClient struct {
	// contains filtered or unexported fields
}

WifiSampleClient is a client for the WifiSample schema.

func NewWifiSampleClient

func NewWifiSampleClient(c config) *WifiSampleClient

NewWifiSampleClient returns a client for the WifiSample from the given config.

func (*WifiSampleClient) Create

func (c *WifiSampleClient) Create() *WifiSampleCreate

Create returns a builder for creating a WifiSample entity.

func (*WifiSampleClient) CreateBulk

func (c *WifiSampleClient) CreateBulk(builders ...*WifiSampleCreate) *WifiSampleCreateBulk

CreateBulk returns a builder for creating a bulk of WifiSample entities.

func (*WifiSampleClient) Delete

func (c *WifiSampleClient) Delete() *WifiSampleDelete

Delete returns a delete builder for WifiSample.

func (*WifiSampleClient) DeleteOne

func (c *WifiSampleClient) DeleteOne(_m *WifiSample) *WifiSampleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WifiSampleClient) DeleteOneID

func (c *WifiSampleClient) DeleteOneID(id int) *WifiSampleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WifiSampleClient) Get

func (c *WifiSampleClient) Get(ctx context.Context, id int) (*WifiSample, error)

Get returns a WifiSample entity by its id.

func (*WifiSampleClient) GetX

func (c *WifiSampleClient) GetX(ctx context.Context, id int) *WifiSample

GetX is like Get, but panics if an error occurs.

func (*WifiSampleClient) Hooks

func (c *WifiSampleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WifiSampleClient) Intercept

func (c *WifiSampleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `wifisample.Intercept(f(g(h())))`.

func (*WifiSampleClient) Interceptors

func (c *WifiSampleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WifiSampleClient) MapCreateBulk

func (c *WifiSampleClient) MapCreateBulk(slice any, setFunc func(*WifiSampleCreate, int)) *WifiSampleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WifiSampleClient) Query

func (c *WifiSampleClient) Query() *WifiSampleQuery

Query returns a query builder for WifiSample.

func (*WifiSampleClient) Update

func (c *WifiSampleClient) Update() *WifiSampleUpdate

Update returns an update builder for WifiSample.

func (*WifiSampleClient) UpdateOne

func (c *WifiSampleClient) UpdateOne(_m *WifiSample) *WifiSampleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WifiSampleClient) UpdateOneID

func (c *WifiSampleClient) UpdateOneID(id int) *WifiSampleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WifiSampleClient) Use

func (c *WifiSampleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `wifisample.Hooks(f(g(h())))`.

type WifiSampleCreate

type WifiSampleCreate struct {
	// contains filtered or unexported fields
}

WifiSampleCreate is the builder for creating a WifiSample entity.

func (*WifiSampleCreate) Exec

func (_c *WifiSampleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WifiSampleCreate) ExecX

func (_c *WifiSampleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleCreate) Mutation

func (_c *WifiSampleCreate) Mutation() *WifiSampleMutation

Mutation returns the WifiSampleMutation object of the builder.

func (*WifiSampleCreate) Save

func (_c *WifiSampleCreate) Save(ctx context.Context) (*WifiSample, error)

Save creates the WifiSample in the database.

func (*WifiSampleCreate) SaveX

func (_c *WifiSampleCreate) SaveX(ctx context.Context) *WifiSample

SaveX calls Save and panics if Save returns an error.

func (*WifiSampleCreate) SetBssid

func (_c *WifiSampleCreate) SetBssid(v string) *WifiSampleCreate

SetBssid sets the "bssid" field.

func (*WifiSampleCreate) SetChannel

func (_c *WifiSampleCreate) SetChannel(v string) *WifiSampleCreate

SetChannel sets the "channel" field.

func (*WifiSampleCreate) SetNillableBssid

func (_c *WifiSampleCreate) SetNillableBssid(v *string) *WifiSampleCreate

SetNillableBssid sets the "bssid" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableChannel

func (_c *WifiSampleCreate) SetNillableChannel(v *string) *WifiSampleCreate

SetNillableChannel sets the "channel" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableRssiDbm

func (_c *WifiSampleCreate) SetNillableRssiDbm(v *int) *WifiSampleCreate

SetNillableRssiDbm sets the "rssi_dbm" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableRxRateMbps

func (_c *WifiSampleCreate) SetNillableRxRateMbps(v *float64) *WifiSampleCreate

SetNillableRxRateMbps sets the "rx_rate_mbps" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableSignalPercent

func (_c *WifiSampleCreate) SetNillableSignalPercent(v *int) *WifiSampleCreate

SetNillableSignalPercent sets the "signal_percent" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableSsid

func (_c *WifiSampleCreate) SetNillableSsid(v *string) *WifiSampleCreate

SetNillableSsid sets the "ssid" field if the given value is not nil.

func (*WifiSampleCreate) SetNillableTxRateMbps

func (_c *WifiSampleCreate) SetNillableTxRateMbps(v *float64) *WifiSampleCreate

SetNillableTxRateMbps sets the "tx_rate_mbps" field if the given value is not nil.

func (*WifiSampleCreate) SetRssiDbm

func (_c *WifiSampleCreate) SetRssiDbm(v int) *WifiSampleCreate

SetRssiDbm sets the "rssi_dbm" field.

func (*WifiSampleCreate) SetRxRateMbps

func (_c *WifiSampleCreate) SetRxRateMbps(v float64) *WifiSampleCreate

SetRxRateMbps sets the "rx_rate_mbps" field.

func (*WifiSampleCreate) SetSignalPercent

func (_c *WifiSampleCreate) SetSignalPercent(v int) *WifiSampleCreate

SetSignalPercent sets the "signal_percent" field.

func (*WifiSampleCreate) SetSsid

func (_c *WifiSampleCreate) SetSsid(v string) *WifiSampleCreate

SetSsid sets the "ssid" field.

func (*WifiSampleCreate) SetTsUnixMs

func (_c *WifiSampleCreate) SetTsUnixMs(v int64) *WifiSampleCreate

SetTsUnixMs sets the "ts_unix_ms" field.

func (*WifiSampleCreate) SetTxRateMbps

func (_c *WifiSampleCreate) SetTxRateMbps(v float64) *WifiSampleCreate

SetTxRateMbps sets the "tx_rate_mbps" field.

type WifiSampleCreateBulk

type WifiSampleCreateBulk struct {
	// contains filtered or unexported fields
}

WifiSampleCreateBulk is the builder for creating many WifiSample entities in bulk.

func (*WifiSampleCreateBulk) Exec

func (_c *WifiSampleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WifiSampleCreateBulk) ExecX

func (_c *WifiSampleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleCreateBulk) Save

func (_c *WifiSampleCreateBulk) Save(ctx context.Context) ([]*WifiSample, error)

Save creates the WifiSample entities in the database.

func (*WifiSampleCreateBulk) SaveX

func (_c *WifiSampleCreateBulk) SaveX(ctx context.Context) []*WifiSample

SaveX is like Save, but panics if an error occurs.

type WifiSampleDelete

type WifiSampleDelete struct {
	// contains filtered or unexported fields
}

WifiSampleDelete is the builder for deleting a WifiSample entity.

func (*WifiSampleDelete) Exec

func (_d *WifiSampleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WifiSampleDelete) ExecX

func (_d *WifiSampleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleDelete) Where

Where appends a list predicates to the WifiSampleDelete builder.

type WifiSampleDeleteOne

type WifiSampleDeleteOne struct {
	// contains filtered or unexported fields
}

WifiSampleDeleteOne is the builder for deleting a single WifiSample entity.

func (*WifiSampleDeleteOne) Exec

func (_d *WifiSampleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WifiSampleDeleteOne) ExecX

func (_d *WifiSampleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleDeleteOne) Where

Where appends a list predicates to the WifiSampleDelete builder.

type WifiSampleGroupBy

type WifiSampleGroupBy struct {
	// contains filtered or unexported fields
}

WifiSampleGroupBy is the group-by builder for WifiSample entities.

func (*WifiSampleGroupBy) Aggregate

func (_g *WifiSampleGroupBy) Aggregate(fns ...AggregateFunc) *WifiSampleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WifiSampleGroupBy) Bool

func (s *WifiSampleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) BoolX

func (s *WifiSampleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WifiSampleGroupBy) Bools

func (s *WifiSampleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) BoolsX

func (s *WifiSampleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WifiSampleGroupBy) Float64

func (s *WifiSampleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) Float64X

func (s *WifiSampleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WifiSampleGroupBy) Float64s

func (s *WifiSampleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) Float64sX

func (s *WifiSampleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WifiSampleGroupBy) Int

func (s *WifiSampleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) IntX

func (s *WifiSampleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WifiSampleGroupBy) Ints

func (s *WifiSampleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) IntsX

func (s *WifiSampleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WifiSampleGroupBy) Scan

func (_g *WifiSampleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WifiSampleGroupBy) ScanX

func (s *WifiSampleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WifiSampleGroupBy) String

func (s *WifiSampleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) StringX

func (s *WifiSampleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WifiSampleGroupBy) Strings

func (s *WifiSampleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WifiSampleGroupBy) StringsX

func (s *WifiSampleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WifiSampleMutation

type WifiSampleMutation struct {
	// contains filtered or unexported fields
}

WifiSampleMutation represents an operation that mutates the WifiSample nodes in the graph.

func (*WifiSampleMutation) AddField

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) AddRssiDbm

func (m *WifiSampleMutation) AddRssiDbm(i int)

AddRssiDbm adds i to the "rssi_dbm" field.

func (*WifiSampleMutation) AddRxRateMbps

func (m *WifiSampleMutation) AddRxRateMbps(f float64)

AddRxRateMbps adds f to the "rx_rate_mbps" field.

func (*WifiSampleMutation) AddSignalPercent

func (m *WifiSampleMutation) AddSignalPercent(i int)

AddSignalPercent adds i to the "signal_percent" field.

func (*WifiSampleMutation) AddTsUnixMs

func (m *WifiSampleMutation) AddTsUnixMs(i int64)

AddTsUnixMs adds i to the "ts_unix_ms" field.

func (*WifiSampleMutation) AddTxRateMbps

func (m *WifiSampleMutation) AddTxRateMbps(f float64)

AddTxRateMbps adds f to the "tx_rate_mbps" field.

func (*WifiSampleMutation) AddedEdges

func (m *WifiSampleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WifiSampleMutation) AddedField

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) AddedFields

func (m *WifiSampleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WifiSampleMutation) AddedIDs

func (m *WifiSampleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WifiSampleMutation) AddedRssiDbm

func (m *WifiSampleMutation) AddedRssiDbm() (r int, exists bool)

AddedRssiDbm returns the value that was added to the "rssi_dbm" field in this mutation.

func (*WifiSampleMutation) AddedRxRateMbps

func (m *WifiSampleMutation) AddedRxRateMbps() (r float64, exists bool)

AddedRxRateMbps returns the value that was added to the "rx_rate_mbps" field in this mutation.

func (*WifiSampleMutation) AddedSignalPercent

func (m *WifiSampleMutation) AddedSignalPercent() (r int, exists bool)

AddedSignalPercent returns the value that was added to the "signal_percent" field in this mutation.

func (*WifiSampleMutation) AddedTsUnixMs

func (m *WifiSampleMutation) AddedTsUnixMs() (r int64, exists bool)

AddedTsUnixMs returns the value that was added to the "ts_unix_ms" field in this mutation.

func (*WifiSampleMutation) AddedTxRateMbps

func (m *WifiSampleMutation) AddedTxRateMbps() (r float64, exists bool)

AddedTxRateMbps returns the value that was added to the "tx_rate_mbps" field in this mutation.

func (*WifiSampleMutation) Bssid

func (m *WifiSampleMutation) Bssid() (r string, exists bool)

Bssid returns the value of the "bssid" field in the mutation.

func (*WifiSampleMutation) BssidCleared

func (m *WifiSampleMutation) BssidCleared() bool

BssidCleared returns if the "bssid" field was cleared in this mutation.

func (*WifiSampleMutation) Channel

func (m *WifiSampleMutation) Channel() (r string, exists bool)

Channel returns the value of the "channel" field in the mutation.

func (*WifiSampleMutation) ChannelCleared

func (m *WifiSampleMutation) ChannelCleared() bool

ChannelCleared returns if the "channel" field was cleared in this mutation.

func (*WifiSampleMutation) ClearBssid

func (m *WifiSampleMutation) ClearBssid()

ClearBssid clears the value of the "bssid" field.

func (*WifiSampleMutation) ClearChannel

func (m *WifiSampleMutation) ClearChannel()

ClearChannel clears the value of the "channel" field.

func (*WifiSampleMutation) ClearEdge

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ClearField

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ClearRssiDbm

func (m *WifiSampleMutation) ClearRssiDbm()

ClearRssiDbm clears the value of the "rssi_dbm" field.

func (*WifiSampleMutation) ClearRxRateMbps

func (m *WifiSampleMutation) ClearRxRateMbps()

ClearRxRateMbps clears the value of the "rx_rate_mbps" field.

func (*WifiSampleMutation) ClearSignalPercent

func (m *WifiSampleMutation) ClearSignalPercent()

ClearSignalPercent clears the value of the "signal_percent" field.

func (*WifiSampleMutation) ClearSsid

func (m *WifiSampleMutation) ClearSsid()

ClearSsid clears the value of the "ssid" field.

func (*WifiSampleMutation) ClearTxRateMbps

func (m *WifiSampleMutation) ClearTxRateMbps()

ClearTxRateMbps clears the value of the "tx_rate_mbps" field.

func (*WifiSampleMutation) ClearedEdges

func (m *WifiSampleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WifiSampleMutation) ClearedFields

func (m *WifiSampleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WifiSampleMutation) Client

func (m WifiSampleMutation) 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 (*WifiSampleMutation) EdgeCleared

func (m *WifiSampleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WifiSampleMutation) Field

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) FieldCleared

func (m *WifiSampleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WifiSampleMutation) Fields

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ID

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) IDs

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) OldBssid

func (m *WifiSampleMutation) OldBssid(ctx context.Context) (v *string, err error)

OldBssid returns the old "bssid" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldChannel

func (m *WifiSampleMutation) OldChannel(ctx context.Context) (v *string, err error)

OldChannel returns the old "channel" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldField

func (m *WifiSampleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*WifiSampleMutation) OldRssiDbm

func (m *WifiSampleMutation) OldRssiDbm(ctx context.Context) (v *int, err error)

OldRssiDbm returns the old "rssi_dbm" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldRxRateMbps

func (m *WifiSampleMutation) OldRxRateMbps(ctx context.Context) (v *float64, err error)

OldRxRateMbps returns the old "rx_rate_mbps" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldSignalPercent

func (m *WifiSampleMutation) OldSignalPercent(ctx context.Context) (v *int, err error)

OldSignalPercent returns the old "signal_percent" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldSsid

func (m *WifiSampleMutation) OldSsid(ctx context.Context) (v *string, err error)

OldSsid returns the old "ssid" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldTsUnixMs

func (m *WifiSampleMutation) OldTsUnixMs(ctx context.Context) (v int64, err error)

OldTsUnixMs returns the old "ts_unix_ms" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) OldTxRateMbps

func (m *WifiSampleMutation) OldTxRateMbps(ctx context.Context) (v *float64, err error)

OldTxRateMbps returns the old "tx_rate_mbps" field's value of the WifiSample entity. If the WifiSample 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 (*WifiSampleMutation) Op

func (m *WifiSampleMutation) Op() Op

Op returns the operation name.

func (*WifiSampleMutation) RemovedEdges

func (m *WifiSampleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WifiSampleMutation) RemovedIDs

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ResetBssid

func (m *WifiSampleMutation) ResetBssid()

ResetBssid resets all changes to the "bssid" field.

func (*WifiSampleMutation) ResetChannel

func (m *WifiSampleMutation) ResetChannel()

ResetChannel resets all changes to the "channel" field.

func (*WifiSampleMutation) ResetEdge

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ResetField

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) ResetRssiDbm

func (m *WifiSampleMutation) ResetRssiDbm()

ResetRssiDbm resets all changes to the "rssi_dbm" field.

func (*WifiSampleMutation) ResetRxRateMbps

func (m *WifiSampleMutation) ResetRxRateMbps()

ResetRxRateMbps resets all changes to the "rx_rate_mbps" field.

func (*WifiSampleMutation) ResetSignalPercent

func (m *WifiSampleMutation) ResetSignalPercent()

ResetSignalPercent resets all changes to the "signal_percent" field.

func (*WifiSampleMutation) ResetSsid

func (m *WifiSampleMutation) ResetSsid()

ResetSsid resets all changes to the "ssid" field.

func (*WifiSampleMutation) ResetTsUnixMs

func (m *WifiSampleMutation) ResetTsUnixMs()

ResetTsUnixMs resets all changes to the "ts_unix_ms" field.

func (*WifiSampleMutation) ResetTxRateMbps

func (m *WifiSampleMutation) ResetTxRateMbps()

ResetTxRateMbps resets all changes to the "tx_rate_mbps" field.

func (*WifiSampleMutation) RssiDbm

func (m *WifiSampleMutation) RssiDbm() (r int, exists bool)

RssiDbm returns the value of the "rssi_dbm" field in the mutation.

func (*WifiSampleMutation) RssiDbmCleared

func (m *WifiSampleMutation) RssiDbmCleared() bool

RssiDbmCleared returns if the "rssi_dbm" field was cleared in this mutation.

func (*WifiSampleMutation) RxRateMbps

func (m *WifiSampleMutation) RxRateMbps() (r float64, exists bool)

RxRateMbps returns the value of the "rx_rate_mbps" field in the mutation.

func (*WifiSampleMutation) RxRateMbpsCleared

func (m *WifiSampleMutation) RxRateMbpsCleared() bool

RxRateMbpsCleared returns if the "rx_rate_mbps" field was cleared in this mutation.

func (*WifiSampleMutation) SetBssid

func (m *WifiSampleMutation) SetBssid(s string)

SetBssid sets the "bssid" field.

func (*WifiSampleMutation) SetChannel

func (m *WifiSampleMutation) SetChannel(s string)

SetChannel sets the "channel" field.

func (*WifiSampleMutation) SetField

func (m *WifiSampleMutation) 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 (*WifiSampleMutation) SetOp

func (m *WifiSampleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WifiSampleMutation) SetRssiDbm

func (m *WifiSampleMutation) SetRssiDbm(i int)

SetRssiDbm sets the "rssi_dbm" field.

func (*WifiSampleMutation) SetRxRateMbps

func (m *WifiSampleMutation) SetRxRateMbps(f float64)

SetRxRateMbps sets the "rx_rate_mbps" field.

func (*WifiSampleMutation) SetSignalPercent

func (m *WifiSampleMutation) SetSignalPercent(i int)

SetSignalPercent sets the "signal_percent" field.

func (*WifiSampleMutation) SetSsid

func (m *WifiSampleMutation) SetSsid(s string)

SetSsid sets the "ssid" field.

func (*WifiSampleMutation) SetTsUnixMs

func (m *WifiSampleMutation) SetTsUnixMs(i int64)

SetTsUnixMs sets the "ts_unix_ms" field.

func (*WifiSampleMutation) SetTxRateMbps

func (m *WifiSampleMutation) SetTxRateMbps(f float64)

SetTxRateMbps sets the "tx_rate_mbps" field.

func (*WifiSampleMutation) SignalPercent

func (m *WifiSampleMutation) SignalPercent() (r int, exists bool)

SignalPercent returns the value of the "signal_percent" field in the mutation.

func (*WifiSampleMutation) SignalPercentCleared

func (m *WifiSampleMutation) SignalPercentCleared() bool

SignalPercentCleared returns if the "signal_percent" field was cleared in this mutation.

func (*WifiSampleMutation) Ssid

func (m *WifiSampleMutation) Ssid() (r string, exists bool)

Ssid returns the value of the "ssid" field in the mutation.

func (*WifiSampleMutation) SsidCleared

func (m *WifiSampleMutation) SsidCleared() bool

SsidCleared returns if the "ssid" field was cleared in this mutation.

func (*WifiSampleMutation) TsUnixMs

func (m *WifiSampleMutation) TsUnixMs() (r int64, exists bool)

TsUnixMs returns the value of the "ts_unix_ms" field in the mutation.

func (WifiSampleMutation) Tx

func (m WifiSampleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WifiSampleMutation) TxRateMbps

func (m *WifiSampleMutation) TxRateMbps() (r float64, exists bool)

TxRateMbps returns the value of the "tx_rate_mbps" field in the mutation.

func (*WifiSampleMutation) TxRateMbpsCleared

func (m *WifiSampleMutation) TxRateMbpsCleared() bool

TxRateMbpsCleared returns if the "tx_rate_mbps" field was cleared in this mutation.

func (*WifiSampleMutation) Type

func (m *WifiSampleMutation) Type() string

Type returns the node type of this mutation (WifiSample).

func (*WifiSampleMutation) Where

func (m *WifiSampleMutation) Where(ps ...predicate.WifiSample)

Where appends a list predicates to the WifiSampleMutation builder.

func (*WifiSampleMutation) WhereP

func (m *WifiSampleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WifiSampleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WifiSampleQuery

type WifiSampleQuery struct {
	// contains filtered or unexported fields
}

WifiSampleQuery is the builder for querying WifiSample entities.

func (*WifiSampleQuery) Aggregate

func (_q *WifiSampleQuery) Aggregate(fns ...AggregateFunc) *WifiSampleSelect

Aggregate returns a WifiSampleSelect configured with the given aggregations.

func (*WifiSampleQuery) All

func (_q *WifiSampleQuery) All(ctx context.Context) ([]*WifiSample, error)

All executes the query and returns a list of WifiSamples.

func (*WifiSampleQuery) AllX

func (_q *WifiSampleQuery) AllX(ctx context.Context) []*WifiSample

AllX is like All, but panics if an error occurs.

func (*WifiSampleQuery) Clone

func (_q *WifiSampleQuery) Clone() *WifiSampleQuery

Clone returns a duplicate of the WifiSampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WifiSampleQuery) Count

func (_q *WifiSampleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WifiSampleQuery) CountX

func (_q *WifiSampleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WifiSampleQuery) Exist

func (_q *WifiSampleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WifiSampleQuery) ExistX

func (_q *WifiSampleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WifiSampleQuery) First

func (_q *WifiSampleQuery) First(ctx context.Context) (*WifiSample, error)

First returns the first WifiSample entity from the query. Returns a *NotFoundError when no WifiSample was found.

func (*WifiSampleQuery) FirstID

func (_q *WifiSampleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first WifiSample ID from the query. Returns a *NotFoundError when no WifiSample ID was found.

func (*WifiSampleQuery) FirstIDX

func (_q *WifiSampleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WifiSampleQuery) FirstX

func (_q *WifiSampleQuery) FirstX(ctx context.Context) *WifiSample

FirstX is like First, but panics if an error occurs.

func (*WifiSampleQuery) GroupBy

func (_q *WifiSampleQuery) GroupBy(field string, fields ...string) *WifiSampleGroupBy

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 {
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WifiSample.Query().
	GroupBy(wifisample.FieldTsUnixMs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WifiSampleQuery) IDs

func (_q *WifiSampleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of WifiSample IDs.

func (*WifiSampleQuery) IDsX

func (_q *WifiSampleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WifiSampleQuery) Limit

func (_q *WifiSampleQuery) Limit(limit int) *WifiSampleQuery

Limit the number of records to be returned by this query.

func (*WifiSampleQuery) Offset

func (_q *WifiSampleQuery) Offset(offset int) *WifiSampleQuery

Offset to start from.

func (*WifiSampleQuery) Only

func (_q *WifiSampleQuery) Only(ctx context.Context) (*WifiSample, error)

Only returns a single WifiSample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WifiSample entity is found. Returns a *NotFoundError when no WifiSample entities are found.

func (*WifiSampleQuery) OnlyID

func (_q *WifiSampleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only WifiSample ID in the query. Returns a *NotSingularError when more than one WifiSample ID is found. Returns a *NotFoundError when no entities are found.

func (*WifiSampleQuery) OnlyIDX

func (_q *WifiSampleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WifiSampleQuery) OnlyX

func (_q *WifiSampleQuery) OnlyX(ctx context.Context) *WifiSample

OnlyX is like Only, but panics if an error occurs.

func (*WifiSampleQuery) Order

Order specifies how the records should be ordered.

func (*WifiSampleQuery) Select

func (_q *WifiSampleQuery) Select(fields ...string) *WifiSampleSelect

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 {
	TsUnixMs int64 `json:"ts_unix_ms,omitempty"`
}

client.WifiSample.Query().
	Select(wifisample.FieldTsUnixMs).
	Scan(ctx, &v)

func (*WifiSampleQuery) Unique

func (_q *WifiSampleQuery) Unique(unique bool) *WifiSampleQuery

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 (*WifiSampleQuery) Where

Where adds a new predicate for the WifiSampleQuery builder.

type WifiSampleSelect

type WifiSampleSelect struct {
	*WifiSampleQuery
	// contains filtered or unexported fields
}

WifiSampleSelect is the builder for selecting fields of WifiSample entities.

func (*WifiSampleSelect) Aggregate

func (_s *WifiSampleSelect) Aggregate(fns ...AggregateFunc) *WifiSampleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WifiSampleSelect) Bool

func (s *WifiSampleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) BoolX

func (s *WifiSampleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WifiSampleSelect) Bools

func (s *WifiSampleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) BoolsX

func (s *WifiSampleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WifiSampleSelect) Float64

func (s *WifiSampleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) Float64X

func (s *WifiSampleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WifiSampleSelect) Float64s

func (s *WifiSampleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) Float64sX

func (s *WifiSampleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WifiSampleSelect) Int

func (s *WifiSampleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) IntX

func (s *WifiSampleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WifiSampleSelect) Ints

func (s *WifiSampleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) IntsX

func (s *WifiSampleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WifiSampleSelect) Scan

func (_s *WifiSampleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WifiSampleSelect) ScanX

func (s *WifiSampleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WifiSampleSelect) String

func (s *WifiSampleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) StringX

func (s *WifiSampleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WifiSampleSelect) Strings

func (s *WifiSampleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WifiSampleSelect) StringsX

func (s *WifiSampleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WifiSampleUpdate

type WifiSampleUpdate struct {
	// contains filtered or unexported fields
}

WifiSampleUpdate is the builder for updating WifiSample entities.

func (*WifiSampleUpdate) AddRssiDbm

func (_u *WifiSampleUpdate) AddRssiDbm(v int) *WifiSampleUpdate

AddRssiDbm adds value to the "rssi_dbm" field.

func (*WifiSampleUpdate) AddRxRateMbps

func (_u *WifiSampleUpdate) AddRxRateMbps(v float64) *WifiSampleUpdate

AddRxRateMbps adds value to the "rx_rate_mbps" field.

func (*WifiSampleUpdate) AddSignalPercent

func (_u *WifiSampleUpdate) AddSignalPercent(v int) *WifiSampleUpdate

AddSignalPercent adds value to the "signal_percent" field.

func (*WifiSampleUpdate) AddTsUnixMs

func (_u *WifiSampleUpdate) AddTsUnixMs(v int64) *WifiSampleUpdate

AddTsUnixMs adds value to the "ts_unix_ms" field.

func (*WifiSampleUpdate) AddTxRateMbps

func (_u *WifiSampleUpdate) AddTxRateMbps(v float64) *WifiSampleUpdate

AddTxRateMbps adds value to the "tx_rate_mbps" field.

func (*WifiSampleUpdate) ClearBssid

func (_u *WifiSampleUpdate) ClearBssid() *WifiSampleUpdate

ClearBssid clears the value of the "bssid" field.

func (*WifiSampleUpdate) ClearChannel

func (_u *WifiSampleUpdate) ClearChannel() *WifiSampleUpdate

ClearChannel clears the value of the "channel" field.

func (*WifiSampleUpdate) ClearRssiDbm

func (_u *WifiSampleUpdate) ClearRssiDbm() *WifiSampleUpdate

ClearRssiDbm clears the value of the "rssi_dbm" field.

func (*WifiSampleUpdate) ClearRxRateMbps

func (_u *WifiSampleUpdate) ClearRxRateMbps() *WifiSampleUpdate

ClearRxRateMbps clears the value of the "rx_rate_mbps" field.

func (*WifiSampleUpdate) ClearSignalPercent

func (_u *WifiSampleUpdate) ClearSignalPercent() *WifiSampleUpdate

ClearSignalPercent clears the value of the "signal_percent" field.

func (*WifiSampleUpdate) ClearSsid

func (_u *WifiSampleUpdate) ClearSsid() *WifiSampleUpdate

ClearSsid clears the value of the "ssid" field.

func (*WifiSampleUpdate) ClearTxRateMbps

func (_u *WifiSampleUpdate) ClearTxRateMbps() *WifiSampleUpdate

ClearTxRateMbps clears the value of the "tx_rate_mbps" field.

func (*WifiSampleUpdate) Exec

func (_u *WifiSampleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WifiSampleUpdate) ExecX

func (_u *WifiSampleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleUpdate) Mutation

func (_u *WifiSampleUpdate) Mutation() *WifiSampleMutation

Mutation returns the WifiSampleMutation object of the builder.

func (*WifiSampleUpdate) Save

func (_u *WifiSampleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WifiSampleUpdate) SaveX

func (_u *WifiSampleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WifiSampleUpdate) SetBssid

func (_u *WifiSampleUpdate) SetBssid(v string) *WifiSampleUpdate

SetBssid sets the "bssid" field.

func (*WifiSampleUpdate) SetChannel

func (_u *WifiSampleUpdate) SetChannel(v string) *WifiSampleUpdate

SetChannel sets the "channel" field.

func (*WifiSampleUpdate) SetNillableBssid

func (_u *WifiSampleUpdate) SetNillableBssid(v *string) *WifiSampleUpdate

SetNillableBssid sets the "bssid" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableChannel

func (_u *WifiSampleUpdate) SetNillableChannel(v *string) *WifiSampleUpdate

SetNillableChannel sets the "channel" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableRssiDbm

func (_u *WifiSampleUpdate) SetNillableRssiDbm(v *int) *WifiSampleUpdate

SetNillableRssiDbm sets the "rssi_dbm" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableRxRateMbps

func (_u *WifiSampleUpdate) SetNillableRxRateMbps(v *float64) *WifiSampleUpdate

SetNillableRxRateMbps sets the "rx_rate_mbps" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableSignalPercent

func (_u *WifiSampleUpdate) SetNillableSignalPercent(v *int) *WifiSampleUpdate

SetNillableSignalPercent sets the "signal_percent" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableSsid

func (_u *WifiSampleUpdate) SetNillableSsid(v *string) *WifiSampleUpdate

SetNillableSsid sets the "ssid" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableTsUnixMs

func (_u *WifiSampleUpdate) SetNillableTsUnixMs(v *int64) *WifiSampleUpdate

SetNillableTsUnixMs sets the "ts_unix_ms" field if the given value is not nil.

func (*WifiSampleUpdate) SetNillableTxRateMbps

func (_u *WifiSampleUpdate) SetNillableTxRateMbps(v *float64) *WifiSampleUpdate

SetNillableTxRateMbps sets the "tx_rate_mbps" field if the given value is not nil.

func (*WifiSampleUpdate) SetRssiDbm

func (_u *WifiSampleUpdate) SetRssiDbm(v int) *WifiSampleUpdate

SetRssiDbm sets the "rssi_dbm" field.

func (*WifiSampleUpdate) SetRxRateMbps

func (_u *WifiSampleUpdate) SetRxRateMbps(v float64) *WifiSampleUpdate

SetRxRateMbps sets the "rx_rate_mbps" field.

func (*WifiSampleUpdate) SetSignalPercent

func (_u *WifiSampleUpdate) SetSignalPercent(v int) *WifiSampleUpdate

SetSignalPercent sets the "signal_percent" field.

func (*WifiSampleUpdate) SetSsid

func (_u *WifiSampleUpdate) SetSsid(v string) *WifiSampleUpdate

SetSsid sets the "ssid" field.

func (*WifiSampleUpdate) SetTsUnixMs

func (_u *WifiSampleUpdate) SetTsUnixMs(v int64) *WifiSampleUpdate

SetTsUnixMs sets the "ts_unix_ms" field.

func (*WifiSampleUpdate) SetTxRateMbps

func (_u *WifiSampleUpdate) SetTxRateMbps(v float64) *WifiSampleUpdate

SetTxRateMbps sets the "tx_rate_mbps" field.

func (*WifiSampleUpdate) Where

Where appends a list predicates to the WifiSampleUpdate builder.

type WifiSampleUpdateOne

type WifiSampleUpdateOne struct {
	// contains filtered or unexported fields
}

WifiSampleUpdateOne is the builder for updating a single WifiSample entity.

func (*WifiSampleUpdateOne) AddRssiDbm

func (_u *WifiSampleUpdateOne) AddRssiDbm(v int) *WifiSampleUpdateOne

AddRssiDbm adds value to the "rssi_dbm" field.

func (*WifiSampleUpdateOne) AddRxRateMbps

func (_u *WifiSampleUpdateOne) AddRxRateMbps(v float64) *WifiSampleUpdateOne

AddRxRateMbps adds value to the "rx_rate_mbps" field.

func (*WifiSampleUpdateOne) AddSignalPercent

func (_u *WifiSampleUpdateOne) AddSignalPercent(v int) *WifiSampleUpdateOne

AddSignalPercent adds value to the "signal_percent" field.

func (*WifiSampleUpdateOne) AddTsUnixMs

func (_u *WifiSampleUpdateOne) AddTsUnixMs(v int64) *WifiSampleUpdateOne

AddTsUnixMs adds value to the "ts_unix_ms" field.

func (*WifiSampleUpdateOne) AddTxRateMbps

func (_u *WifiSampleUpdateOne) AddTxRateMbps(v float64) *WifiSampleUpdateOne

AddTxRateMbps adds value to the "tx_rate_mbps" field.

func (*WifiSampleUpdateOne) ClearBssid

func (_u *WifiSampleUpdateOne) ClearBssid() *WifiSampleUpdateOne

ClearBssid clears the value of the "bssid" field.

func (*WifiSampleUpdateOne) ClearChannel

func (_u *WifiSampleUpdateOne) ClearChannel() *WifiSampleUpdateOne

ClearChannel clears the value of the "channel" field.

func (*WifiSampleUpdateOne) ClearRssiDbm

func (_u *WifiSampleUpdateOne) ClearRssiDbm() *WifiSampleUpdateOne

ClearRssiDbm clears the value of the "rssi_dbm" field.

func (*WifiSampleUpdateOne) ClearRxRateMbps

func (_u *WifiSampleUpdateOne) ClearRxRateMbps() *WifiSampleUpdateOne

ClearRxRateMbps clears the value of the "rx_rate_mbps" field.

func (*WifiSampleUpdateOne) ClearSignalPercent

func (_u *WifiSampleUpdateOne) ClearSignalPercent() *WifiSampleUpdateOne

ClearSignalPercent clears the value of the "signal_percent" field.

func (*WifiSampleUpdateOne) ClearSsid

func (_u *WifiSampleUpdateOne) ClearSsid() *WifiSampleUpdateOne

ClearSsid clears the value of the "ssid" field.

func (*WifiSampleUpdateOne) ClearTxRateMbps

func (_u *WifiSampleUpdateOne) ClearTxRateMbps() *WifiSampleUpdateOne

ClearTxRateMbps clears the value of the "tx_rate_mbps" field.

func (*WifiSampleUpdateOne) Exec

func (_u *WifiSampleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WifiSampleUpdateOne) ExecX

func (_u *WifiSampleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WifiSampleUpdateOne) Mutation

func (_u *WifiSampleUpdateOne) Mutation() *WifiSampleMutation

Mutation returns the WifiSampleMutation object of the builder.

func (*WifiSampleUpdateOne) Save

Save executes the query and returns the updated WifiSample entity.

func (*WifiSampleUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WifiSampleUpdateOne) Select

func (_u *WifiSampleUpdateOne) Select(field string, fields ...string) *WifiSampleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WifiSampleUpdateOne) SetBssid

SetBssid sets the "bssid" field.

func (*WifiSampleUpdateOne) SetChannel

func (_u *WifiSampleUpdateOne) SetChannel(v string) *WifiSampleUpdateOne

SetChannel sets the "channel" field.

func (*WifiSampleUpdateOne) SetNillableBssid

func (_u *WifiSampleUpdateOne) SetNillableBssid(v *string) *WifiSampleUpdateOne

SetNillableBssid sets the "bssid" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableChannel

func (_u *WifiSampleUpdateOne) SetNillableChannel(v *string) *WifiSampleUpdateOne

SetNillableChannel sets the "channel" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableRssiDbm

func (_u *WifiSampleUpdateOne) SetNillableRssiDbm(v *int) *WifiSampleUpdateOne

SetNillableRssiDbm sets the "rssi_dbm" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableRxRateMbps

func (_u *WifiSampleUpdateOne) SetNillableRxRateMbps(v *float64) *WifiSampleUpdateOne

SetNillableRxRateMbps sets the "rx_rate_mbps" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableSignalPercent

func (_u *WifiSampleUpdateOne) SetNillableSignalPercent(v *int) *WifiSampleUpdateOne

SetNillableSignalPercent sets the "signal_percent" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableSsid

func (_u *WifiSampleUpdateOne) SetNillableSsid(v *string) *WifiSampleUpdateOne

SetNillableSsid sets the "ssid" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableTsUnixMs

func (_u *WifiSampleUpdateOne) SetNillableTsUnixMs(v *int64) *WifiSampleUpdateOne

SetNillableTsUnixMs sets the "ts_unix_ms" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetNillableTxRateMbps

func (_u *WifiSampleUpdateOne) SetNillableTxRateMbps(v *float64) *WifiSampleUpdateOne

SetNillableTxRateMbps sets the "tx_rate_mbps" field if the given value is not nil.

func (*WifiSampleUpdateOne) SetRssiDbm

func (_u *WifiSampleUpdateOne) SetRssiDbm(v int) *WifiSampleUpdateOne

SetRssiDbm sets the "rssi_dbm" field.

func (*WifiSampleUpdateOne) SetRxRateMbps

func (_u *WifiSampleUpdateOne) SetRxRateMbps(v float64) *WifiSampleUpdateOne

SetRxRateMbps sets the "rx_rate_mbps" field.

func (*WifiSampleUpdateOne) SetSignalPercent

func (_u *WifiSampleUpdateOne) SetSignalPercent(v int) *WifiSampleUpdateOne

SetSignalPercent sets the "signal_percent" field.

func (*WifiSampleUpdateOne) SetSsid

SetSsid sets the "ssid" field.

func (*WifiSampleUpdateOne) SetTsUnixMs

func (_u *WifiSampleUpdateOne) SetTsUnixMs(v int64) *WifiSampleUpdateOne

SetTsUnixMs sets the "ts_unix_ms" field.

func (*WifiSampleUpdateOne) SetTxRateMbps

func (_u *WifiSampleUpdateOne) SetTxRateMbps(v float64) *WifiSampleUpdateOne

SetTxRateMbps sets the "tx_rate_mbps" field.

func (*WifiSampleUpdateOne) Where

Where appends a list predicates to the WifiSampleUpdate builder.

type WifiSamples

type WifiSamples []*WifiSample

WifiSamples is a parsable slice of WifiSample.

Directories

Path Synopsis
Package schema contains the ent schema definitions.
Package schema contains the ent schema definitions.

Jump to

Keyboard shortcuts

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