types

package
v1.0.650 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 24 Imported by: 31

Documentation

Index

Constants

View Source
const (
	SQLServerType = "sqlserver"
	PostgresType  = "postgres"
	SqliteType    = "sqlite"
	MysqlType     = "mysql"
	TextType      = "TEXT"
	JSONType      = "JSON"
	JSONBType     = "JSONB"
	NVarcharType  = "NVARCHAR(MAX)"
)
View Source
const EnvVarType = "env_var"
View Source
const PostgresTimestampFormat = "2006-01-02T15:04:05.999999"

Variables

Functions

func GenericStructScan added in v1.0.20

func GenericStructScan[T any](t *T, val any) error

GenericStructScan can be set as the Scan(val) func for any json struct

func GenericStructValue added in v1.0.20

func GenericStructValue[T any](t T, defaultNull bool) (driver.Value, error)

GenericStructValue can be set as the Value() func for any json struct

func GormValue added in v1.0.83

func GormValue(t any) clause.Expr

func JSONGormDBDataType added in v1.0.83

func JSONGormDBDataType(dialect string) string

Types

type Authentication added in v1.0.495

type Authentication struct {
	Username EnvVar `yaml:"username,omitempty" json:"username,omitempty"`
	Password EnvVar `yaml:"password,omitempty" json:"password,omitempty"`
}

+kubebuilder:object:generate=true

func (*Authentication) DeepCopy added in v1.0.495

func (in *Authentication) DeepCopy() *Authentication

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication.

func (*Authentication) DeepCopyInto added in v1.0.495

func (in *Authentication) DeepCopyInto(out *Authentication)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Authentication) GetDomain added in v1.0.495

func (auth Authentication) GetDomain() string

func (Authentication) GetPassword added in v1.0.495

func (auth Authentication) GetPassword() string

func (Authentication) GetUsername added in v1.0.495

func (auth Authentication) GetUsername() string

func (Authentication) IsEmpty added in v1.0.495

func (auth Authentication) IsEmpty() bool

type CelExpression added in v1.0.552

type CelExpression string

func (CelExpression) Eval added in v1.0.552

func (t CelExpression) Eval(env map[string]any) (string, error)

type ComponentCheck added in v1.0.83

type ComponentCheck struct {
	Selector ResourceSelector `json:"selector,omitempty"`
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Type=object
	Inline json.RawMessage `json:"inline" gorm:"type:JSON"`
}

+kubebuilder:object:generate=true

func (*ComponentCheck) DeepCopy added in v1.0.254

func (in *ComponentCheck) DeepCopy() *ComponentCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentCheck.

func (*ComponentCheck) DeepCopyInto added in v1.0.254

func (in *ComponentCheck) DeepCopyInto(out *ComponentCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ComponentCheck) Hash added in v1.0.253

func (cs ComponentCheck) Hash() string

type ComponentChecks added in v1.0.83

type ComponentChecks []ComponentCheck

func (ComponentChecks) GormDBDataType added in v1.0.83

func (ComponentChecks) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (ComponentChecks) GormDataType added in v1.0.83

func (cs ComponentChecks) GormDataType() string

GormDataType gorm common data type

func (ComponentChecks) GormValue added in v1.0.83

func (cs ComponentChecks) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*ComponentChecks) Scan added in v1.0.83

func (cs *ComponentChecks) Scan(val interface{}) error

func (ComponentChecks) Value added in v1.0.83

func (cs ComponentChecks) Value() (driver.Value, error)

type ComponentStatus added in v1.0.83

type ComponentStatus string
const (
	ComponentStatusHealthy   ComponentStatus = "healthy"
	ComponentStatusUnhealthy ComponentStatus = "unhealthy"
	ComponentStatusWarning   ComponentStatus = "warning"
	ComponentStatusError     ComponentStatus = "error"
	ComponentStatusInfo      ComponentStatus = "info"
)

func (ComponentStatus) Compare added in v1.0.253

func (status ComponentStatus) Compare(other ComponentStatus) int

type ConfigMapKeySelector added in v1.0.45

type ConfigMapKeySelector struct {
	LocalObjectReference `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
	Key                  string `json:"key" yaml:"key" protobuf:"bytes,2,opt,name=key"`
}

+kubebuilder:object:generate=true

func (*ConfigMapKeySelector) DeepCopy added in v1.0.47

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.

func (*ConfigMapKeySelector) DeepCopyInto added in v1.0.47

func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigMapKeySelector) IsEmpty added in v1.0.474

func (c ConfigMapKeySelector) IsEmpty() bool

func (ConfigMapKeySelector) String added in v1.0.45

func (c ConfigMapKeySelector) String() string

type ConfigQueries added in v1.0.83

type ConfigQueries []*ConfigQuery

func (ConfigQueries) GormDBDataType added in v1.0.83

func (t ConfigQueries) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (ConfigQueries) GormDataType added in v1.0.87

func (t ConfigQueries) GormDataType() string

func (ConfigQueries) GormValue added in v1.0.83

func (t ConfigQueries) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*ConfigQueries) Scan added in v1.0.83

func (t *ConfigQueries) Scan(val any) error

func (ConfigQueries) Value added in v1.0.83

func (t ConfigQueries) Value() (driver.Value, error)

type ConfigQuery added in v1.0.83

type ConfigQuery struct {
	ResourceSelector `json:",inline"`

	// Deprecated. Use `fieldSelector (config_class=)`
	Class string `json:"class,omitempty"`
	// Deprecated. Use `fieldSelector (external_id=)`
	ExternalID string `json:"external_id,omitempty"`
	// Deprecated. Use `labelSelector`
	Tags map[string]string `json:"tags,omitempty"`
	// Deprecated. Use `types`
	Type string `json:"type,omitempty"`
}

+kubebuilder:object:generate=true ConfigQuery is used to look up and associate config items with a component.

func (*ConfigQuery) DeepCopy added in v1.0.83

func (in *ConfigQuery) DeepCopy() *ConfigQuery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigQuery.

func (*ConfigQuery) DeepCopyInto added in v1.0.83

func (in *ConfigQuery) DeepCopyInto(out *ConfigQuery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigQuery) String added in v1.0.83

func (c ConfigQuery) String() string

func (ConfigQuery) ToJSONMap added in v1.0.253

func (c ConfigQuery) ToJSONMap() map[string]interface{}

ToJSONMap converts the struct to map[string]interface{}

func (ConfigQuery) ToResourceSelector added in v1.0.324

func (c ConfigQuery) ToResourceSelector() ResourceSelector

type Duration added in v1.0.254

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON added in v1.0.254

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON added in v1.0.254

func (d *Duration) UnmarshalJSON(b []byte) error

type EnvVar added in v1.0.45

type EnvVar struct {
	Name        string        `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
	ValueStatic string        `json:"value,omitempty" yaml:"value,omitempty" protobuf:"bytes,2,opt,name=value" template="true"`
	ValueFrom   *EnvVarSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
}

+kubebuilder:object:generate=true

func (*EnvVar) DeepCopy added in v1.0.47

func (in *EnvVar) DeepCopy() *EnvVar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.

func (*EnvVar) DeepCopyInto added in v1.0.47

func (in *EnvVar) DeepCopyInto(out *EnvVar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (EnvVar) GormDBDataType added in v1.0.45

func (EnvVar) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (EnvVar) GormDataType added in v1.0.45

func (EnvVar) GormDataType() string

GormDataType gorm common data type

func (EnvVar) IsEmpty added in v1.0.45

func (e EnvVar) IsEmpty() bool

func (*EnvVar) Scan added in v1.0.45

func (e *EnvVar) Scan(value any) error

Scan scan value into string, implements sql.Scanner interface

func (EnvVar) String added in v1.0.48

func (e EnvVar) String() string

func (EnvVar) Value added in v1.0.45

func (e EnvVar) Value() (driver.Value, error)

Value return string value, implement driver.Valuer interface

type EnvVarResourceSelector added in v1.0.552

type EnvVarResourceSelector struct {
	Agent         ValueExpression   `yaml:"agent,omitempty" json:"agent,omitempty"`
	Scope         string            `yaml:"scope,omitempty" json:"scope,omitempty"`
	Cache         string            `yaml:"cache,omitempty" json:"cache,omitempty"`
	ID            ValueExpression   `yaml:"id,omitempty" json:"id,omitempty"`
	Name          ValueExpression   `yaml:"name,omitempty" json:"name,omitempty"`
	Namespace     ValueExpression   `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Types         []ValueExpression `yaml:"types,omitempty" json:"types,omitempty"`
	Statuses      []ValueExpression `yaml:"statuses,omitempty" json:"statuses,omitempty"`
	TagSelector   ValueExpression   `yaml:"tagSelector,omitempty" json:"tagSelector,omitempty"`
	LabelSelector ValueExpression   `yaml:"labelSelector,omitempty" json:"labelSelector,omitempty"`
	FieldSelector ValueExpression   `json:"fieldSelector,omitempty" yaml:"fieldSelector,omitempty"`
}

EnvVarResourceSelector is used to select a resource. At least one of the fields must be specified. +kubebuilder:object:generate=true

func (*EnvVarResourceSelector) DeepCopy added in v1.0.552

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarResourceSelector.

func (*EnvVarResourceSelector) DeepCopyInto added in v1.0.552

func (in *EnvVarResourceSelector) DeepCopyInto(out *EnvVarResourceSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (EnvVarResourceSelector) Empty added in v1.0.552

func (t EnvVarResourceSelector) Empty() bool

func (EnvVarResourceSelector) Hydrate added in v1.0.552

func (t EnvVarResourceSelector) Hydrate(env map[string]any) (*ResourceSelector, error)

type EnvVarSource added in v1.0.45

type EnvVarSource struct {
	// ServiceAccount specifies the service account whose token should be fetched
	ServiceAccount  *string               `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty" protobuf:"bytes,1,opt,name=serviceAccount"`
	HelmRef         *HelmRefKeySelector   `json:"helmRef,omitempty" yaml:"helmRef,omitempty" protobuf:"bytes,2,opt,name=helmRef"`
	ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" yaml:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
	SecretKeyRef    *SecretKeySelector    `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
}

+kubebuilder:object:generate=true

func (*EnvVarSource) DeepCopy added in v1.0.47

func (in *EnvVarSource) DeepCopy() *EnvVarSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource.

func (*EnvVarSource) DeepCopyInto added in v1.0.47

func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (EnvVarSource) IsEmpty added in v1.0.474

func (e EnvVarSource) IsEmpty() bool

func (EnvVarSource) String added in v1.0.45

func (e EnvVarSource) String() string

type GetEnvVarFromCache added in v1.0.213

type GetEnvVarFromCache interface {
	GetEnvValueFromCache(e EnvVar, namespace string) (string, error)
}

type GoTemplate added in v1.0.552

type GoTemplate string

func (GoTemplate) Run added in v1.0.552

func (t GoTemplate) Run(env map[string]any) (string, error)

type HTTPBasicAuth added in v1.0.557

type HTTPBasicAuth struct {
	Authentication `yaml:",inline" json:",inline"`
	NTLM           bool `yaml:"ntlm,omitempty" json:"ntlm,omitempty"`
	NTLMV2         bool `yaml:"ntlmv2,omitempty" json:"ntlmv2,omitempty"`
	Digest         bool `yaml:"digest,omitempty" json:"digest,omitempty"`
}

+kubebuilder:object:generate=true

func (*HTTPBasicAuth) DeepCopy added in v1.0.557

func (in *HTTPBasicAuth) DeepCopy() *HTTPBasicAuth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPBasicAuth.

func (*HTTPBasicAuth) DeepCopyInto added in v1.0.557

func (in *HTTPBasicAuth) DeepCopyInto(out *HTTPBasicAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HelmRefKeySelector added in v1.0.239

type HelmRefKeySelector struct {
	LocalObjectReference `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
	// Key is a JSONPath expression used to fetch the key from the merged JSON.
	Key string `json:"key" yaml:"key" protobuf:"bytes,2,opt,name=key"`
}

+kubebuilder:object:generate=true

func (*HelmRefKeySelector) DeepCopy added in v1.0.239

func (in *HelmRefKeySelector) DeepCopy() *HelmRefKeySelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRefKeySelector.

func (*HelmRefKeySelector) DeepCopyInto added in v1.0.239

func (in *HelmRefKeySelector) DeepCopyInto(out *HelmRefKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HelmRefKeySelector) IsEmpty added in v1.0.474

func (e HelmRefKeySelector) IsEmpty() bool

func (HelmRefKeySelector) String added in v1.0.239

func (c HelmRefKeySelector) String() string

type Incident added in v1.0.254

type Incident struct {
	ID          uuid.UUID `json:"id"`
	Type        string    `json:"type"`
	Title       string    `json:"title"`
	Severity    int       `json:"severity"`
	Description string    `json:"description"`
}

type Items added in v1.0.320

type Items []string

func (Items) Contains added in v1.0.320

func (items Items) Contains(item string) bool

contains returns true if any of the items in the list match the item negative matches are supported by prefixing the item with a ! * matches everything

func (Items) Sort added in v1.0.320

func (items Items) Sort() Items

Sort returns a sorted copy

func (Items) String added in v1.0.320

func (items Items) String() string

func (Items) Where added in v1.0.320

func (items Items) Where(query *gorm.DB, col string) *gorm.DB

func (Items) WithNegation added in v1.0.320

func (items Items) WithNegation() []string

func (Items) WithoutNegation added in v1.0.320

func (items Items) WithoutNegation() []string

type JSON

type JSON json.RawMessage

JSON defined JSON data type, need to implements driver.Valuer, sql.Scanner interface

func (JSON) GormDBDataType

func (JSON) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (JSON) GormDataType

func (JSON) GormDataType() string

GormDataType gorm common data type

func (JSON) GormValue

func (js JSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (JSON) MarshalJSON

func (j JSON) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*JSON) Scan

func (j *JSON) Scan(value any) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (JSON) String

func (j JSON) String() string

func (*JSON) UnmarshalJSON

func (j *JSON) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type JSONMap

type JSONMap map[string]any

JSONMap defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface

func (JSONMap) GormDBDataType

func (JSONMap) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (JSONMap) GormDataType

func (m JSONMap) GormDataType() string

GormDataType gorm common data type

func (JSONMap) GormValue

func (jm JSONMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (JSONMap) MarshalJSON

func (m JSONMap) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*JSONMap) Scan

func (m *JSONMap) Scan(val any) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*JSONMap) UnmarshalJSON

func (m *JSONMap) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (JSONMap) Value

func (m JSONMap) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type JSONQueryExpression

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

JSONQueryExpression json query expression, implements clause.Expression interface to use as querier

func JSONQuery

func JSONQuery(column string) *JSONQueryExpression

JSONQuery query column as json

func (*JSONQueryExpression) Build

func (jsonQuery *JSONQueryExpression) Build(builder clause.Builder)

Build implements clause.Expression

func (*JSONQueryExpression) Equals

func (jsonQuery *JSONQueryExpression) Equals(value any, keys ...string) *JSONQueryExpression

Keys returns clause.Expression

func (*JSONQueryExpression) HasKey

func (jsonQuery *JSONQueryExpression) HasKey(keys ...string) *JSONQueryExpression

HasKey returns clause.Expression

type JSONStringMap

type JSONStringMap map[string]string

JSONStringMap defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface

func (JSONStringMap) GormDBDataType

func (JSONStringMap) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (JSONStringMap) GormDataType

func (m JSONStringMap) GormDataType() string

GormDataType gorm common data type

func (JSONStringMap) GormValue

func (jm JSONStringMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (JSONStringMap) MarshalJSON

func (m JSONStringMap) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*JSONStringMap) Scan

func (m *JSONStringMap) Scan(val any) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (JSONStringMap) ToMapStringAny added in v1.0.83

func (jm JSONStringMap) ToMapStringAny() map[string]any

func (*JSONStringMap) UnmarshalJSON

func (m *JSONStringMap) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (JSONStringMap) Value

func (m JSONStringMap) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type Latency added in v1.0.164

type Latency struct {
	Percentile99 float64 `json:"p99,omitempty" db:"p99"`
	Percentile97 float64 `json:"p97,omitempty" db:"p97"`
	Percentile95 float64 `json:"p95,omitempty" db:"p95"`
	Rolling1H    float64 `json:"rolling1h"`
}

func (Latency) GormDBDataType added in v1.0.164

func (l Latency) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (Latency) GormValue added in v1.0.164

func (l Latency) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*Latency) Scan added in v1.0.164

func (l *Latency) Scan(val any) error

func (Latency) String added in v1.0.260

func (l Latency) String() string

func (Latency) Value added in v1.0.164

func (l Latency) Value() (driver.Value, error)
type Link struct {
	// e.g. documentation, support, playbook
	Type string `json:"type,omitempty"`
	URL  string `json:"url,omitempty"`
	Text `json:",inline"`
}

+kubebuilder:object:generate=true

func (*Link) DeepCopy added in v1.0.254

func (in *Link) DeepCopy() *Link

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.

func (*Link) DeepCopyInto added in v1.0.254

func (in *Link) DeepCopyInto(out *Link)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalObjectReference added in v1.0.45

type LocalObjectReference struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
}

+kubebuilder:object:generate=true

func (*LocalObjectReference) DeepCopy added in v1.0.47

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.

func (*LocalObjectReference) DeepCopyInto added in v1.0.47

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogSelector added in v1.0.54

type LogSelector struct {
	Name   string            `json:"name,omitempty" yaml:"name,omitempty"`
	Type   string            `json:"type,omitempty" yaml:"type,omitempty" template:"true"`
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" template:"true"`
}

+kubebuilder:object:generate=true

func (*LogSelector) DeepCopy added in v1.0.54

func (in *LogSelector) DeepCopy() *LogSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogSelector.

func (*LogSelector) DeepCopyInto added in v1.0.54

func (in *LogSelector) DeepCopyInto(out *LogSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogSelectors added in v1.0.54

type LogSelectors []LogSelector

func (LogSelectors) GormDBDataType added in v1.0.54

func (t LogSelectors) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (LogSelectors) GormDataType added in v1.0.87

func (t LogSelectors) GormDataType() string

func (LogSelectors) GormValue added in v1.0.54

func (t LogSelectors) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*LogSelectors) Scan added in v1.0.54

func (t *LogSelectors) Scan(val any) error

func (LogSelectors) Value added in v1.0.54

func (t LogSelectors) Value() (driver.Value, error)

type MatchExpression added in v1.0.552

type MatchExpression string

MatchExpression uses MatchItems

func (MatchExpression) Match added in v1.0.552

func (t MatchExpression) Match(item string) bool

type MatchExpressions added in v1.0.552

type MatchExpressions []MatchExpression

func (MatchExpressions) Match added in v1.0.552

func (t MatchExpressions) Match(item string) bool

type NullString added in v1.0.223

type NullString sql.NullString

NullString sets null in database on save for empty strings

func (NullString) MarshalJSON added in v1.0.223

func (s NullString) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*NullString) Scan added in v1.0.223

func (s *NullString) Scan(value any) error

Scan implements the Scanner interface.

func (*NullString) UnmarshalJSON added in v1.0.223

func (s *NullString) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (NullString) Value added in v1.0.223

func (s NullString) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type OAuth added in v1.0.495

type OAuth struct {
	ClientID     EnvVar            `json:"clientID,omitempty"`
	ClientSecret EnvVar            `json:"clientSecret,omitempty"`
	Scopes       []string          `json:"scope,omitempty" yaml:"scope,omitempty"`
	TokenURL     string            `json:"tokenURL,omitempty" yaml:"tokenURL,omitempty"`
	Params       map[string]string `json:"params,omitempty" yaml:"params,omitempty"`
}

+kubebuilder:object:generate=true

func (OAuth) AsProperties added in v1.0.495

func (o OAuth) AsProperties() JSONStringMap

func (*OAuth) DeepCopy added in v1.0.495

func (in *OAuth) DeepCopy() *OAuth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth.

func (*OAuth) DeepCopyInto added in v1.0.495

func (in *OAuth) DeepCopyInto(out *OAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (OAuth) IsEmpty added in v1.0.495

func (o OAuth) IsEmpty() bool

type Properties added in v1.0.254

type Properties []*Property

func (Properties) AsJSON added in v1.0.254

func (p Properties) AsJSON() []byte

func (Properties) AsMap added in v1.0.254

func (p Properties) AsMap() map[string]interface{}

func (Properties) Find added in v1.0.254

func (p Properties) Find(name string) *Property

func (Properties) GormDBDataType added in v1.0.254

func (Properties) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (Properties) GormDataType added in v1.0.254

func (Properties) GormDataType() string

GormDataType gorm common data type

func (Properties) GormValue added in v1.0.254

func (p Properties) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (Properties) MarshalJSON added in v1.0.282

func (m Properties) MarshalJSON() ([]byte, error)

func (*Properties) Scan added in v1.0.254

func (p *Properties) Scan(val interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*Properties) UnmarshalJSON added in v1.0.282

func (m *Properties) UnmarshalJSON(b []byte) error

func (Properties) Value added in v1.0.254

func (p Properties) Value() (driver.Value, error)

Scan scan value into Jsonb, implements sql.Scanner interface

type Property added in v1.0.254

type Property struct {
	Label    string `json:"label,omitempty"`
	Name     string `json:"name,omitempty"`
	Tooltip  string `json:"tooltip,omitempty"`
	Icon     string `json:"icon,omitempty"`
	Type     string `json:"type,omitempty"`
	Color    string `json:"color,omitempty"`
	Order    int    `json:"order,omitempty"`
	Headline bool   `json:"headline,omitempty"`

	// Either text or value is required, but not both.
	Text  string `json:"text,omitempty"`
	Value *int64 `json:"value,omitempty"`

	// e.g. milliseconds, bytes, millicores, epoch etc.
	Unit string `json:"unit,omitempty"`
	Max  *int64 `json:"max,omitempty"`
	Min  *int64 `json:"min,omitempty"`

	Status         string `json:"status,omitempty"`
	LastTransition string `json:"lastTransition,omitempty"`
	Links          []Link `json:"links,omitempty"`
}

+kubebuilder:object:generate=true Property is a realized v1.Property without the lookup definition

func (Property) AsMap added in v1.0.282

func (p Property) AsMap(removeFields ...string) map[string]any

func (*Property) DeepCopy added in v1.0.282

func (in *Property) DeepCopy() *Property

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Property.

func (*Property) DeepCopyInto added in v1.0.282

func (in *Property) DeepCopyInto(out *Property)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Property) GetValue added in v1.0.254

func (p Property) GetValue() any

func (*Property) Merge added in v1.0.254

func (p *Property) Merge(other *Property)

func (*Property) String added in v1.0.254

func (p *Property) String() string

type ResourceSelectable added in v1.0.374

type ResourceSelectable interface {
	GetFieldsMatcher() fields.Fields
	GetLabelsMatcher() labels.Labels

	GetID() string
	GetName() string
	GetNamespace() string
	GetType() string
	GetStatus() (string, error)
}

type ResourceSelector added in v1.0.83

type ResourceSelector struct {
	// Agent can be the agent id or the name of the agent.
	//  Additionally, the special "self" value can be used to select resources without an agent.
	Agent string `yaml:"agent,omitempty" json:"agent,omitempty"`

	// Scope is the id parent of the resource to select.
	// Example: For config items, the scope is the scraper id
	// - for checks, it's canaries and
	// - for components, it's topology.
	Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`

	// Cache directives
	//  'no-cache' (should not fetch from cache but can be cached)
	//  'no-store' (should not cache)
	//  'max-age=X' (cache for X duration)
	Cache string `yaml:"cache,omitempty" json:"cache,omitempty"`

	// Search query that applies to the resource name, tag & labels.
	Search string `yaml:"search,omitempty" json:"search,omitempty"`

	IncludeDeleted bool `yaml:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	ID            string `yaml:"id,omitempty" json:"id,omitempty"`
	Name          string `yaml:"name,omitempty" json:"name,omitempty"`
	Namespace     string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Types         Items  `yaml:"types,omitempty" json:"types,omitempty"`
	Statuses      Items  `yaml:"statuses,omitempty" json:"statuses,omitempty"`
	TagSelector   string `yaml:"tagSelector,omitempty" json:"tagSelector,omitempty"`
	LabelSelector string `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"`
	FieldSelector string `json:"fieldSelector,omitempty" yaml:"fieldSelector,omitempty"`
}

+kubebuilder:object:generate=true

func (*ResourceSelector) DeepCopy added in v1.0.254

func (in *ResourceSelector) DeepCopy() *ResourceSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSelector.

func (*ResourceSelector) DeepCopyInto added in v1.0.254

func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ResourceSelector) Hash added in v1.0.320

func (c ResourceSelector) Hash() string

func (ResourceSelector) Immutable added in v1.0.320

func (c ResourceSelector) Immutable() bool

Immutable returns true if the selector can be cached indefinitely

func (ResourceSelector) IsEmpty added in v1.0.324

func (c ResourceSelector) IsEmpty() bool

func (ResourceSelector) Matches added in v1.0.374

type ResourceSelectors added in v1.0.83

type ResourceSelectors []ResourceSelector

func (ResourceSelectors) GormDBDataType added in v1.0.83

func (ResourceSelectors) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (ResourceSelectors) GormDataType added in v1.0.83

func (rs ResourceSelectors) GormDataType() string

GormDataType gorm common data type

func (ResourceSelectors) GormValue added in v1.0.83

func (rs ResourceSelectors) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (ResourceSelectors) Hash added in v1.0.253

func (rs ResourceSelectors) Hash() string

func (*ResourceSelectors) Scan added in v1.0.83

func (rs *ResourceSelectors) Scan(val any) error

func (ResourceSelectors) Value added in v1.0.83

func (rs ResourceSelectors) Value() (driver.Value, error)

type SecretKeySelector added in v1.0.45

type SecretKeySelector struct {
	LocalObjectReference `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
	Key                  string `json:"key" yaml:"key" protobuf:"bytes,2,opt,name=key"`
}

+kubebuilder:object:generate=true

func (*SecretKeySelector) DeepCopy added in v1.0.47

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.

func (*SecretKeySelector) DeepCopyInto added in v1.0.47

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SecretKeySelector) IsEmpty added in v1.0.474

func (s SecretKeySelector) IsEmpty() bool

func (SecretKeySelector) String added in v1.0.45

func (s SecretKeySelector) String() string

type Summary added in v1.0.83

type Summary struct {
	Healthy   int                       `json:"healthy,omitempty"`
	Unhealthy int                       `json:"unhealthy,omitempty"`
	Warning   int                       `json:"warning,omitempty"`
	Info      int                       `json:"info,omitempty"`
	Incidents map[string]map[string]int `json:"incidents,omitempty"`
	Insights  map[string]map[string]int `json:"insights,omitempty"`
	Checks    map[string]int            `json:"checks,omitempty"`
	// contains filtered or unexported fields
}

+kubebuilder:object:generate=true

func (Summary) Add added in v1.0.83

func (s Summary) Add(b Summary) Summary

func (*Summary) AsEnv added in v1.0.522

func (t *Summary) AsEnv() map[string]any

func (*Summary) DeepCopy added in v1.0.83

func (in *Summary) DeepCopy() *Summary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Summary.

func (*Summary) DeepCopyInto added in v1.0.83

func (in *Summary) DeepCopyInto(out *Summary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Summary) GetStatus added in v1.0.83

func (s Summary) GetStatus() ComponentStatus

func (Summary) GormDBDataType added in v1.0.83

func (Summary) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (Summary) GormDataType added in v1.0.83

func (Summary) GormDataType() string

GormDataType gorm common data type

func (Summary) GormValue added in v1.0.83

func (s Summary) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (Summary) IsProcessed added in v1.0.83

func (s Summary) IsProcessed() bool

func (*Summary) Scan added in v1.0.83

func (s *Summary) Scan(val any) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*Summary) SetProcessed added in v1.0.83

func (s *Summary) SetProcessed(val bool)

func (Summary) String added in v1.0.83

func (s Summary) String() string

func (Summary) Value added in v1.0.83

func (s Summary) Value() (driver.Value, error)

Scan scan value into Jsonb, implements sql.Scanner interface

type TagsMatchable added in v1.0.412

type TagsMatchable interface {
	GetTagssMatcher() labels.Labels
}

type Text added in v1.0.15

type Text struct {
	Tooltip string `json:"tooltip,omitempty"`
	Icon    string `json:"icon,omitempty"`
	Text    string `json:"text,omitempty"`
	Label   string `json:"label,omitempty"`
}

+kubebuilder:object:generate=true

func (*Text) DeepCopy added in v1.0.254

func (in *Text) DeepCopy() *Text

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Text.

func (*Text) DeepCopyInto added in v1.0.254

func (in *Text) DeepCopyInto(out *Text)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Uptime added in v1.0.164

type Uptime struct {
	Passed   int        `json:"passed"`
	Failed   int        `json:"failed"`
	P100     *float64   `json:"p100,omitempty"`
	LastPass *time.Time `json:"last_pass,omitempty"`
	LastFail *time.Time `json:"last_fail,omitempty"`
}

func (Uptime) GormDBDataType added in v1.0.164

func (u Uptime) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (Uptime) GormValue added in v1.0.164

func (u Uptime) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*Uptime) Scan added in v1.0.164

func (u *Uptime) Scan(val any) error

func (Uptime) String added in v1.0.164

func (u Uptime) String() string

func (Uptime) Value added in v1.0.164

func (u Uptime) Value() (driver.Value, error)

type ValueExpression added in v1.0.552

type ValueExpression struct {
	Expr CelExpression `yaml:"expr,omitempty" json:"expr,omitempty"`

	// Value is a static value
	Value string `yaml:"value,omitempty" json:"value,omitempty"`
}

+kubebuilder:object:generate=true

func (*ValueExpression) DeepCopy added in v1.0.552

func (in *ValueExpression) DeepCopy() *ValueExpression

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueExpression.

func (*ValueExpression) DeepCopyInto added in v1.0.552

func (in *ValueExpression) DeepCopyInto(out *ValueExpression)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ValueExpression) Empty added in v1.0.552

func (t ValueExpression) Empty() bool

func (ValueExpression) Eval added in v1.0.552

func (t ValueExpression) Eval(env map[string]any) (string, error)

type WithCertificate added in v1.0.213

type WithCertificate interface {
	GetCertificate() EnvVar
}

type WithProperties added in v1.0.213

type WithProperties interface {
	GetProperties() map[string]string
}

type WithURL added in v1.0.213

type WithURL interface {
	GetURL() EnvVar
}

type WithUsernamePassword added in v1.0.213

type WithUsernamePassword interface {
	GetUsername() EnvVar
	GetPassword() EnvVar
}

Jump to

Keyboard shortcuts

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