sample

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: 2 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

Index

Constants

View Source
const (
	// Label holds the string label denoting the sample type in the database.
	Label = "sample"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTsUnixMs holds the string denoting the ts_unix_ms field in the database.
	FieldTsUnixMs = "ts_unix_ms"
	// FieldTargetLabel holds the string denoting the target_label field in the database.
	FieldTargetLabel = "target_label"
	// FieldTargetKind holds the string denoting the target_kind field in the database.
	FieldTargetKind = "target_kind"
	// FieldTargetHost holds the string denoting the target_host field in the database.
	FieldTargetHost = "target_host"
	// FieldTargetPort holds the string denoting the target_port field in the database.
	FieldTargetPort = "target_port"
	// FieldSuccess holds the string denoting the success field in the database.
	FieldSuccess = "success"
	// FieldRttMs holds the string denoting the rtt_ms field in the database.
	FieldRttMs = "rtt_ms"
	// FieldError holds the string denoting the error field in the database.
	FieldError = "error"
	// Table holds the table name of the sample in the database.
	Table = "samples"
)

Variables

Columns holds all SQL columns for sample fields.

View Source
var (
	// TargetLabelValidator is a validator for the "target_label" field. It is called by the builders before save.
	TargetLabelValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Sample) predicate.Sample

And groups predicates with the AND operator between them.

func Error

func Error(v string) predicate.Sample

Error applies equality check predicate on the "error" field. It's identical to ErrorEQ.

func ErrorContains

func ErrorContains(v string) predicate.Sample

ErrorContains applies the Contains predicate on the "error" field.

func ErrorContainsFold

func ErrorContainsFold(v string) predicate.Sample

ErrorContainsFold applies the ContainsFold predicate on the "error" field.

func ErrorEQ

func ErrorEQ(v string) predicate.Sample

ErrorEQ applies the EQ predicate on the "error" field.

func ErrorEqualFold

func ErrorEqualFold(v string) predicate.Sample

ErrorEqualFold applies the EqualFold predicate on the "error" field.

func ErrorGT

func ErrorGT(v string) predicate.Sample

ErrorGT applies the GT predicate on the "error" field.

func ErrorGTE

func ErrorGTE(v string) predicate.Sample

ErrorGTE applies the GTE predicate on the "error" field.

func ErrorHasPrefix

func ErrorHasPrefix(v string) predicate.Sample

ErrorHasPrefix applies the HasPrefix predicate on the "error" field.

func ErrorHasSuffix

func ErrorHasSuffix(v string) predicate.Sample

ErrorHasSuffix applies the HasSuffix predicate on the "error" field.

func ErrorIn

func ErrorIn(vs ...string) predicate.Sample

ErrorIn applies the In predicate on the "error" field.

func ErrorIsNil

func ErrorIsNil() predicate.Sample

ErrorIsNil applies the IsNil predicate on the "error" field.

func ErrorLT

func ErrorLT(v string) predicate.Sample

ErrorLT applies the LT predicate on the "error" field.

func ErrorLTE

func ErrorLTE(v string) predicate.Sample

ErrorLTE applies the LTE predicate on the "error" field.

func ErrorNEQ

func ErrorNEQ(v string) predicate.Sample

ErrorNEQ applies the NEQ predicate on the "error" field.

func ErrorNotIn

func ErrorNotIn(vs ...string) predicate.Sample

ErrorNotIn applies the NotIn predicate on the "error" field.

func ErrorNotNil

func ErrorNotNil() predicate.Sample

ErrorNotNil applies the NotNil predicate on the "error" field.

func ID

func ID(id int) predicate.Sample

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Sample

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Sample

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Sample

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Sample

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Sample

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Sample

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Sample

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Sample

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Sample) predicate.Sample

Or groups predicates with the OR operator between them.

func RttMs

func RttMs(v float64) predicate.Sample

RttMs applies equality check predicate on the "rtt_ms" field. It's identical to RttMsEQ.

func RttMsEQ

func RttMsEQ(v float64) predicate.Sample

RttMsEQ applies the EQ predicate on the "rtt_ms" field.

func RttMsGT

func RttMsGT(v float64) predicate.Sample

RttMsGT applies the GT predicate on the "rtt_ms" field.

func RttMsGTE

func RttMsGTE(v float64) predicate.Sample

RttMsGTE applies the GTE predicate on the "rtt_ms" field.

func RttMsIn

func RttMsIn(vs ...float64) predicate.Sample

RttMsIn applies the In predicate on the "rtt_ms" field.

func RttMsIsNil

func RttMsIsNil() predicate.Sample

RttMsIsNil applies the IsNil predicate on the "rtt_ms" field.

func RttMsLT

func RttMsLT(v float64) predicate.Sample

RttMsLT applies the LT predicate on the "rtt_ms" field.

func RttMsLTE

func RttMsLTE(v float64) predicate.Sample

RttMsLTE applies the LTE predicate on the "rtt_ms" field.

func RttMsNEQ

func RttMsNEQ(v float64) predicate.Sample

RttMsNEQ applies the NEQ predicate on the "rtt_ms" field.

func RttMsNotIn

func RttMsNotIn(vs ...float64) predicate.Sample

RttMsNotIn applies the NotIn predicate on the "rtt_ms" field.

func RttMsNotNil

func RttMsNotNil() predicate.Sample

RttMsNotNil applies the NotNil predicate on the "rtt_ms" field.

func Success

func Success(v bool) predicate.Sample

Success applies equality check predicate on the "success" field. It's identical to SuccessEQ.

func SuccessEQ

func SuccessEQ(v bool) predicate.Sample

SuccessEQ applies the EQ predicate on the "success" field.

func SuccessNEQ

func SuccessNEQ(v bool) predicate.Sample

SuccessNEQ applies the NEQ predicate on the "success" field.

func TargetHost

func TargetHost(v string) predicate.Sample

TargetHost applies equality check predicate on the "target_host" field. It's identical to TargetHostEQ.

func TargetHostContains

func TargetHostContains(v string) predicate.Sample

TargetHostContains applies the Contains predicate on the "target_host" field.

func TargetHostContainsFold

func TargetHostContainsFold(v string) predicate.Sample

TargetHostContainsFold applies the ContainsFold predicate on the "target_host" field.

func TargetHostEQ

func TargetHostEQ(v string) predicate.Sample

TargetHostEQ applies the EQ predicate on the "target_host" field.

func TargetHostEqualFold

func TargetHostEqualFold(v string) predicate.Sample

TargetHostEqualFold applies the EqualFold predicate on the "target_host" field.

func TargetHostGT

func TargetHostGT(v string) predicate.Sample

TargetHostGT applies the GT predicate on the "target_host" field.

func TargetHostGTE

func TargetHostGTE(v string) predicate.Sample

TargetHostGTE applies the GTE predicate on the "target_host" field.

func TargetHostHasPrefix

func TargetHostHasPrefix(v string) predicate.Sample

TargetHostHasPrefix applies the HasPrefix predicate on the "target_host" field.

func TargetHostHasSuffix

func TargetHostHasSuffix(v string) predicate.Sample

TargetHostHasSuffix applies the HasSuffix predicate on the "target_host" field.

func TargetHostIn

func TargetHostIn(vs ...string) predicate.Sample

TargetHostIn applies the In predicate on the "target_host" field.

func TargetHostLT

func TargetHostLT(v string) predicate.Sample

TargetHostLT applies the LT predicate on the "target_host" field.

func TargetHostLTE

func TargetHostLTE(v string) predicate.Sample

TargetHostLTE applies the LTE predicate on the "target_host" field.

func TargetHostNEQ

func TargetHostNEQ(v string) predicate.Sample

TargetHostNEQ applies the NEQ predicate on the "target_host" field.

func TargetHostNotIn

func TargetHostNotIn(vs ...string) predicate.Sample

TargetHostNotIn applies the NotIn predicate on the "target_host" field.

func TargetKind

func TargetKind(v string) predicate.Sample

TargetKind applies equality check predicate on the "target_kind" field. It's identical to TargetKindEQ.

func TargetKindContains

func TargetKindContains(v string) predicate.Sample

TargetKindContains applies the Contains predicate on the "target_kind" field.

func TargetKindContainsFold

func TargetKindContainsFold(v string) predicate.Sample

TargetKindContainsFold applies the ContainsFold predicate on the "target_kind" field.

func TargetKindEQ

func TargetKindEQ(v string) predicate.Sample

TargetKindEQ applies the EQ predicate on the "target_kind" field.

func TargetKindEqualFold

func TargetKindEqualFold(v string) predicate.Sample

TargetKindEqualFold applies the EqualFold predicate on the "target_kind" field.

func TargetKindGT

func TargetKindGT(v string) predicate.Sample

TargetKindGT applies the GT predicate on the "target_kind" field.

func TargetKindGTE

func TargetKindGTE(v string) predicate.Sample

TargetKindGTE applies the GTE predicate on the "target_kind" field.

func TargetKindHasPrefix

func TargetKindHasPrefix(v string) predicate.Sample

TargetKindHasPrefix applies the HasPrefix predicate on the "target_kind" field.

func TargetKindHasSuffix

func TargetKindHasSuffix(v string) predicate.Sample

TargetKindHasSuffix applies the HasSuffix predicate on the "target_kind" field.

func TargetKindIn

func TargetKindIn(vs ...string) predicate.Sample

TargetKindIn applies the In predicate on the "target_kind" field.

func TargetKindLT

func TargetKindLT(v string) predicate.Sample

TargetKindLT applies the LT predicate on the "target_kind" field.

func TargetKindLTE

func TargetKindLTE(v string) predicate.Sample

TargetKindLTE applies the LTE predicate on the "target_kind" field.

func TargetKindNEQ

func TargetKindNEQ(v string) predicate.Sample

TargetKindNEQ applies the NEQ predicate on the "target_kind" field.

func TargetKindNotIn

func TargetKindNotIn(vs ...string) predicate.Sample

TargetKindNotIn applies the NotIn predicate on the "target_kind" field.

func TargetLabel

func TargetLabel(v string) predicate.Sample

TargetLabel applies equality check predicate on the "target_label" field. It's identical to TargetLabelEQ.

func TargetLabelContains

func TargetLabelContains(v string) predicate.Sample

TargetLabelContains applies the Contains predicate on the "target_label" field.

func TargetLabelContainsFold

func TargetLabelContainsFold(v string) predicate.Sample

TargetLabelContainsFold applies the ContainsFold predicate on the "target_label" field.

func TargetLabelEQ

func TargetLabelEQ(v string) predicate.Sample

TargetLabelEQ applies the EQ predicate on the "target_label" field.

func TargetLabelEqualFold

func TargetLabelEqualFold(v string) predicate.Sample

TargetLabelEqualFold applies the EqualFold predicate on the "target_label" field.

func TargetLabelGT

func TargetLabelGT(v string) predicate.Sample

TargetLabelGT applies the GT predicate on the "target_label" field.

func TargetLabelGTE

func TargetLabelGTE(v string) predicate.Sample

TargetLabelGTE applies the GTE predicate on the "target_label" field.

func TargetLabelHasPrefix

func TargetLabelHasPrefix(v string) predicate.Sample

TargetLabelHasPrefix applies the HasPrefix predicate on the "target_label" field.

func TargetLabelHasSuffix

func TargetLabelHasSuffix(v string) predicate.Sample

TargetLabelHasSuffix applies the HasSuffix predicate on the "target_label" field.

func TargetLabelIn

func TargetLabelIn(vs ...string) predicate.Sample

TargetLabelIn applies the In predicate on the "target_label" field.

func TargetLabelLT

func TargetLabelLT(v string) predicate.Sample

TargetLabelLT applies the LT predicate on the "target_label" field.

func TargetLabelLTE

func TargetLabelLTE(v string) predicate.Sample

TargetLabelLTE applies the LTE predicate on the "target_label" field.

func TargetLabelNEQ

func TargetLabelNEQ(v string) predicate.Sample

TargetLabelNEQ applies the NEQ predicate on the "target_label" field.

func TargetLabelNotIn

func TargetLabelNotIn(vs ...string) predicate.Sample

TargetLabelNotIn applies the NotIn predicate on the "target_label" field.

func TargetPort

func TargetPort(v int) predicate.Sample

TargetPort applies equality check predicate on the "target_port" field. It's identical to TargetPortEQ.

func TargetPortEQ

func TargetPortEQ(v int) predicate.Sample

TargetPortEQ applies the EQ predicate on the "target_port" field.

func TargetPortGT

func TargetPortGT(v int) predicate.Sample

TargetPortGT applies the GT predicate on the "target_port" field.

func TargetPortGTE

func TargetPortGTE(v int) predicate.Sample

TargetPortGTE applies the GTE predicate on the "target_port" field.

func TargetPortIn

func TargetPortIn(vs ...int) predicate.Sample

TargetPortIn applies the In predicate on the "target_port" field.

func TargetPortIsNil

func TargetPortIsNil() predicate.Sample

TargetPortIsNil applies the IsNil predicate on the "target_port" field.

func TargetPortLT

func TargetPortLT(v int) predicate.Sample

TargetPortLT applies the LT predicate on the "target_port" field.

func TargetPortLTE

func TargetPortLTE(v int) predicate.Sample

TargetPortLTE applies the LTE predicate on the "target_port" field.

func TargetPortNEQ

func TargetPortNEQ(v int) predicate.Sample

TargetPortNEQ applies the NEQ predicate on the "target_port" field.

func TargetPortNotIn

func TargetPortNotIn(vs ...int) predicate.Sample

TargetPortNotIn applies the NotIn predicate on the "target_port" field.

func TargetPortNotNil

func TargetPortNotNil() predicate.Sample

TargetPortNotNil applies the NotNil predicate on the "target_port" field.

func TsUnixMs

func TsUnixMs(v int64) predicate.Sample

TsUnixMs applies equality check predicate on the "ts_unix_ms" field. It's identical to TsUnixMsEQ.

func TsUnixMsEQ

func TsUnixMsEQ(v int64) predicate.Sample

TsUnixMsEQ applies the EQ predicate on the "ts_unix_ms" field.

func TsUnixMsGT

func TsUnixMsGT(v int64) predicate.Sample

TsUnixMsGT applies the GT predicate on the "ts_unix_ms" field.

func TsUnixMsGTE

func TsUnixMsGTE(v int64) predicate.Sample

TsUnixMsGTE applies the GTE predicate on the "ts_unix_ms" field.

func TsUnixMsIn

func TsUnixMsIn(vs ...int64) predicate.Sample

TsUnixMsIn applies the In predicate on the "ts_unix_ms" field.

func TsUnixMsLT

func TsUnixMsLT(v int64) predicate.Sample

TsUnixMsLT applies the LT predicate on the "ts_unix_ms" field.

func TsUnixMsLTE

func TsUnixMsLTE(v int64) predicate.Sample

TsUnixMsLTE applies the LTE predicate on the "ts_unix_ms" field.

func TsUnixMsNEQ

func TsUnixMsNEQ(v int64) predicate.Sample

TsUnixMsNEQ applies the NEQ predicate on the "ts_unix_ms" field.

func TsUnixMsNotIn

func TsUnixMsNotIn(vs ...int64) predicate.Sample

TsUnixMsNotIn applies the NotIn predicate on the "ts_unix_ms" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Sample queries.

func ByError

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

ByError orders the results by the error field.

func ByID

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

ByID orders the results by the id field.

func ByRttMs

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

ByRttMs orders the results by the rtt_ms field.

func BySuccess

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

BySuccess orders the results by the success field.

func ByTargetHost

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

ByTargetHost orders the results by the target_host field.

func ByTargetKind

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

ByTargetKind orders the results by the target_kind field.

func ByTargetLabel

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

ByTargetLabel orders the results by the target_label field.

func ByTargetPort

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

ByTargetPort orders the results by the target_port field.

func ByTsUnixMs

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

ByTsUnixMs orders the results by the ts_unix_ms field.

Jump to

Keyboard shortcuts

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