Documentation
¶
Index ¶
- Constants
- func GenericStructScan[T any](t *T, val any) error
- func GenericStructValue[T any](t T, defaultNull bool) (driver.Value, error)
- func GormValue(t any) clause.Expr
- func IsMatchItem(q string) bool
- func JSONGormDBDataType(dialect string) string
- func MatchSelectables[T ResourceSelectable](selectables []T, selectors ...ResourceSelector) []T
- func ParseFilteringQuery(query string, decodeURL bool) (in []interface{}, notIN []interface{}, prefix, suffix []string, err error)
- type Authentication
- type CelExpression
- type ComponentConfigTraversalArgs
- type ConfigMapKeySelector
- type DescriptionProvider
- type Duration
- type DutyContext
- type EnvVar
- func (in *EnvVar) DeepCopy() *EnvVar
- func (in *EnvVar) DeepCopyInto(out *EnvVar)
- func (EnvVar) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (EnvVar) GormDataType() string
- func (e EnvVar) IsEmpty() bool
- func (e *EnvVar) Scan(value any) error
- func (e EnvVar) String() string
- func (e EnvVar) Value() (driver.Value, error)
- type EnvVarResourceSelector
- type EnvVarSource
- type Functions
- type GenericFieldMatcher
- type GenericLabelsMatcher
- type GenericLabelsMatcherAny
- type GetEnvVarFromCache
- type GoTemplate
- type HTTP
- type HTTPBasicAuth
- type HelmRefKeySelector
- type Items
- type JSON
- func (JSON) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (JSON) GormDataType() string
- func (js JSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j JSON) MarshalJSON() ([]byte, error)
- func (j *JSON) Scan(value any) error
- func (j JSON) String() string
- func (j *JSON) UnmarshalJSON(b []byte) error
- func (j JSON) Value() (driver.Value, error)
- type JSONMap
- func (JSONMap) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (m JSONMap) GormDataType() string
- func (jm JSONMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m JSONMap) MarshalJSON() ([]byte, error)
- func (m *JSONMap) Scan(val any) error
- func (m *JSONMap) UnmarshalJSON(b []byte) error
- func (m JSONMap) Value() (driver.Value, error)
- type JSONQueryExpression
- type JSONStringMap
- func (JSONStringMap) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (m JSONStringMap) GormDataType() string
- func (jm JSONStringMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m JSONStringMap) MarshalJSON() ([]byte, error)
- func (m *JSONStringMap) Scan(val any) error
- func (jm JSONStringMap) ToMapStringAny() map[string]any
- func (m *JSONStringMap) UnmarshalJSON(b []byte) error
- func (m JSONStringMap) Value() (driver.Value, error)
- type Latency
- type Link
- type LocalObjectReference
- type LogSelector
- type LogSelectors
- type MatchExpression
- type MatchExpressions
- type NoOpResourceSelectable
- type NullString
- type OAuth
- type Properties
- func (p Properties) AsJSON() []byte
- func (p Properties) AsMap() map[string]interface{}
- func (p Properties) Find(name string) *Property
- func (Properties) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Properties) GormDataType() string
- func (p Properties) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m Properties) MarshalJSON() ([]byte, error)
- func (p *Properties) Scan(val interface{}) error
- func (m *Properties) UnmarshalJSON(b []byte) error
- func (p Properties) Value() (driver.Value, error)
- type Property
- type ResourceSelectable
- type ResourceSelectableMap
- func (t ResourceSelectableMap) GetFieldsMatcher() fields.Fields
- func (t ResourceSelectableMap) GetHealth() (string, error)
- func (t ResourceSelectableMap) GetHealthDescription() string
- func (t ResourceSelectableMap) GetID() string
- func (r ResourceSelectableMap) GetLabelsMatcher() labels.Labels
- func (t ResourceSelectableMap) GetName() string
- func (t ResourceSelectableMap) GetNamespace() string
- func (t ResourceSelectableMap) GetStatus() (string, error)
- func (r ResourceSelectableMap) GetTagsMatcher() labels.Labels
- func (t ResourceSelectableMap) GetType() string
- type ResourceSelector
- func (in *ResourceSelector) DeepCopy() *ResourceSelector
- func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector)
- func (c ResourceSelector) Hash() string
- func (c ResourceSelector) Immutable() bool
- func (c ResourceSelector) IsEmpty() bool
- func (rs ResourceSelector) IsMetadataOnly() bool
- func (rs ResourceSelector) Matches(s ResourceSelectable) bool
- func (rs ResourceSelector) MetadataOnly() ResourceSelector
- func (rs ResourceSelector) String() string
- func (c ResourceSelector) ToGetOptions() (string, bool)
- func (c ResourceSelector) ToListOptions() (metav1.ListOptions, bool)
- func (rs ResourceSelector) ToPeg(convertSelectors bool) string
- func (rs ResourceSelector) Type(t string) ResourceSelector
- func (c ResourceSelector) Wildcard() bool
- type ResourceSelectors
- func (ResourceSelectors) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (rs ResourceSelectors) GormDataType() string
- func (rs ResourceSelectors) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (rs ResourceSelectors) Hash() string
- func (rs ResourceSelectors) Matches(s ResourceSelectable) bool
- func (rs *ResourceSelectors) Scan(val any) error
- func (rs ResourceSelectors) Value() (driver.Value, error)
- type SecretKeySelector
- type TagsMatchable
- type Text
- type UnstructuredResource
- func (u *UnstructuredResource) GetFieldsMatcher() fields.Fields
- func (u UnstructuredResource) GetHealth() (string, error)
- func (u *UnstructuredResource) GetID() string
- func (u *UnstructuredResource) GetLabelsMatcher() labels.Labels
- func (u *UnstructuredResource) GetName() string
- func (u *UnstructuredResource) GetNamespace() string
- func (u *UnstructuredResource) GetStatus() (string, error)
- func (u *UnstructuredResource) GetType() string
- type Uptime
- type ValueExpression
- type WithCertificate
- type WithProperties
- type WithURL
- type WithUsernamePassword
Constants ¶
const ( SQLServerType = "sqlserver" PostgresType = "postgres" SqliteType = "sqlite" MysqlType = "mysql" TextType = "TEXT" JSONType = "JSON" JSONBType = "JSONB" NVarcharType = "NVARCHAR(MAX)" )
const EnvVarType = "env_var"
const PostgresTimestampFormat = "2006-01-02T15:04:05.999999"
Variables ¶
This section is empty.
Functions ¶
func GenericStructScan ¶
GenericStructScan can be set as the Scan(val) func for any json struct
func GenericStructValue ¶
GenericStructValue can be set as the Value() func for any json struct
func IsMatchItem ¶
func JSONGormDBDataType ¶
func MatchSelectables ¶
func MatchSelectables[T ResourceSelectable](selectables []T, selectors ...ResourceSelector) []T
MatchSelectables returns only those selectables that have at matches with at least one of the given selectors.
Types ¶
type Authentication ¶
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 ¶
func (in *Authentication) DeepCopy() *Authentication
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication.
func (*Authentication) DeepCopyInto ¶
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 ¶
func (auth Authentication) GetDomain() string
func (Authentication) GetPassword ¶
func (auth Authentication) GetPassword() string
func (Authentication) GetUsername ¶
func (auth Authentication) GetUsername() string
func (Authentication) IsEmpty ¶
func (auth Authentication) IsEmpty() bool
type CelExpression ¶
type CelExpression string
type ConfigMapKeySelector ¶
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 ¶
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.
func (*ConfigMapKeySelector) DeepCopyInto ¶
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 ¶
func (c ConfigMapKeySelector) IsEmpty() bool
func (ConfigMapKeySelector) String ¶
func (c ConfigMapKeySelector) String() string
type DescriptionProvider ¶
type DescriptionProvider interface {
GetHealthDescription() string
}
type DutyContext ¶
type DutyContext interface {
Oops(tags ...string) oops.OopsErrorBuilder
String() string
WithTimeout(timeout time.Duration) (context.Context, context.CancelFunc)
WithDeadline(deadline time.Time) (context.Context, context.CancelFunc)
WithValue(key, val any) DutyContext
WithAnyValue(key, val any) DutyContext
WithAppendObject(object any) DutyContext
WithObject(object ...any) DutyContext
Verbose() logger.Logger
Objects() []any
WithTopology(topology any) DutyContext
WithoutName() DutyContext
WithName(name string) DutyContext
WithTrace() DutyContext
WithDebug() DutyContext
WithNamespace(namespace string) DutyContext
WithDB(db *gorm.DB, pool *pgxpool.Pool) DutyContext
WithDBLogger(name string, baseLevel any) DutyContext
WithDBLogLevel(level any) DutyContext
FastDB(name ...string) *gorm.DB
Fast(name ...string) DutyContext
IsTracing() bool
WithoutTracing() DutyContext
Transaction(fn func(ctx DutyContext, span trace.Span) error, opts ...any) error
DB() *gorm.DB
Pool() *pgxpool.Pool
Kubernetes() kubernetes.Interface
KubernetesRestConfig() *rest.Config
StartSpan(name string) (DutyContext, trace.Span)
GetLoggingDutyContext() map[string]any
WithLoggingValues(args ...interface{}) DutyContext
GetNamespace() string
GetName() string
GetLabels() map[string]string
GetAnnotations() map[string]string
GetEnvStringFromCache(env string, namespace string) (string, error)
GetSecretFromCache(namespace, name, key string) (string, error)
GetConfigMapFromCache(namespace, name, key string) (string, error)
Wrap(ctx context.Context) DutyContext
}
type EnvVar ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.
func (*EnvVar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EnvVar) GormDBDataType ¶
GormDBDataType gorm db data type
type EnvVarResourceSelector ¶
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"`
Healths []ValueExpression `yaml:"healths,omitempty" json:"healths,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 ¶
func (in *EnvVarResourceSelector) DeepCopy() *EnvVarResourceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarResourceSelector.
func (*EnvVarResourceSelector) DeepCopyInto ¶
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 ¶
func (t EnvVarResourceSelector) Empty() bool
func (EnvVarResourceSelector) Hydrate ¶
func (t EnvVarResourceSelector) Hydrate(env map[string]any) (*ResourceSelector, error)
type EnvVarSource ¶
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 ¶
func (in *EnvVarSource) DeepCopy() *EnvVarSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource.
func (*EnvVarSource) DeepCopyInto ¶
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 ¶
func (e EnvVarSource) IsEmpty() bool
func (EnvVarSource) String ¶
func (e EnvVarSource) String() string
type Functions ¶
type Functions struct {
// It uses the config_id linked to the componentID to lookup up all the config relations and returns
// a list of componentIDs that are linked to the found configIDs
ComponentConfigTraversal *ComponentConfigTraversalArgs `yaml:"component_config_traversal,omitempty" json:"component_config_traversal,omitempty"`
}
+kubebuilder:object:generate=true
func (*Functions) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Functions.
func (*Functions) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GenericFieldMatcher ¶
func (GenericFieldMatcher) Get ¶
func (c GenericFieldMatcher) Get(key string) string
func (GenericFieldMatcher) Has ¶
func (c GenericFieldMatcher) Has(key string) bool
type GenericLabelsMatcher ¶
func (GenericLabelsMatcher) Get ¶
func (c GenericLabelsMatcher) Get(key string) string
func (GenericLabelsMatcher) Has ¶
func (c GenericLabelsMatcher) Has(key string) bool
type GenericLabelsMatcherAny ¶
func (GenericLabelsMatcherAny) Get ¶
func (c GenericLabelsMatcherAny) Get(key string) string
func (GenericLabelsMatcherAny) Has ¶
func (c GenericLabelsMatcherAny) Has(key string) bool
type GetEnvVarFromCache ¶
type GoTemplate ¶
type GoTemplate string
type HTTP ¶ added in v0.1.1
type HTTP struct {
// URL is the base URL for the HTTP endpoint
URL EnvVar `json:"url,omitempty" yaml:"url,omitempty"`
// Bearer is the bearer token for authentication (API key)
Bearer EnvVar `json:"bearer,omitempty" yaml:"bearer,omitempty"`
}
HTTP represents an HTTP connection with bearer token authentication. Used for HTTP-based connections like LLM providers (OpenAI, Anthropic, Gemini).
type HTTPBasicAuth ¶
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 ¶
func (in *HTTPBasicAuth) DeepCopy() *HTTPBasicAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPBasicAuth.
func (*HTTPBasicAuth) DeepCopyInto ¶
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 ¶
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 ¶
func (in *HelmRefKeySelector) DeepCopy() *HelmRefKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRefKeySelector.
func (*HelmRefKeySelector) DeepCopyInto ¶
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 ¶
func (e HelmRefKeySelector) IsEmpty() bool
func (HelmRefKeySelector) String ¶
func (c HelmRefKeySelector) String() string
type Items ¶
type Items pq.StringArray
func (Items) Contains ¶
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) WithNegation ¶
func (Items) WithoutNegation ¶
type JSON ¶
type JSON json.RawMessage
JSON defined JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (JSON) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSON) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type JSONMap ¶
JSONMap defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (JSONMap) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSONMap) GormDataType ¶
GormDataType gorm common data type
func (JSONMap) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JSONMap) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type JSONQueryExpression ¶
type JSONQueryExpression struct {
// contains filtered or unexported fields
}
JSONQueryExpression json query expression, implements clause.Expression interface to use as querier
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 ¶
JSONStringMap defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (JSONStringMap) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSONStringMap) GormDataType ¶
func (m JSONStringMap) GormDataType() string
GormDataType gorm common data type
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 ¶
func (jm JSONStringMap) ToMapStringAny() map[string]any
func (*JSONStringMap) UnmarshalJSON ¶
func (m *JSONStringMap) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
type Latency ¶
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 ¶
type Link ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.
func (*Link) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct {
Name string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
}
+kubebuilder:object:generate=true
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶
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 ¶
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 ¶
func (in *LogSelector) DeepCopy() *LogSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogSelector.
func (*LogSelector) DeepCopyInto ¶
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 ¶
type LogSelectors []LogSelector
func (LogSelectors) GormDBDataType ¶
func (LogSelectors) GormDataType ¶
func (t LogSelectors) GormDataType() string
func (*LogSelectors) Scan ¶
func (t *LogSelectors) Scan(val any) error
type MatchExpression ¶
type MatchExpression string
MatchExpression uses MatchItems
func (*MatchExpression) Add ¶
func (t *MatchExpression) Add(item string)
func (MatchExpression) Match ¶
func (t MatchExpression) Match(item string) bool
type MatchExpressions ¶
type MatchExpressions []MatchExpression
func (MatchExpressions) Match ¶
func (t MatchExpressions) Match(item string) bool
func (MatchExpressions) SQLClause ¶
func (t MatchExpressions) SQLClause(columnName string) (string, []any, error)
SQLClause converts MatchExpressions to SQL WHERE conditions with (?) placeholders
Example: expr="!Get*,!List*" -> "WHERE (column_name NOT LIKE ? AND column_name NOT LIKE ?)" (GET%, LIST%)
type NoOpResourceSelectable ¶
type NoOpResourceSelectable struct{}
NoOpResourceSelectable provides default implementations for ResourceSelectable methods that don't apply to access control entities
func (NoOpResourceSelectable) GetHealth ¶
func (NoOpResourceSelectable) GetHealth() (string, error)
func (NoOpResourceSelectable) GetLabelsMatcher ¶
func (NoOpResourceSelectable) GetLabelsMatcher() labels.Labels
func (NoOpResourceSelectable) GetNamespace ¶
func (NoOpResourceSelectable) GetNamespace() string
func (NoOpResourceSelectable) GetStatus ¶
func (NoOpResourceSelectable) GetStatus() (string, error)
type NullString ¶
type NullString sql.NullString
NullString sets null in database on save for empty strings
func (NullString) MarshalJSON ¶
func (s NullString) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (*NullString) Scan ¶
func (s *NullString) Scan(value any) error
Scan implements the Scanner interface.
func (*NullString) UnmarshalJSON ¶
func (s *NullString) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
type OAuth ¶
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 ¶
func (o OAuth) AsProperties() JSONStringMap
func (*OAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth.
func (*OAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Properties ¶
type Properties []*Property
func (Properties) AsJSON ¶
func (p Properties) AsJSON() []byte
func (Properties) AsMap ¶
func (p Properties) AsMap() map[string]interface{}
func (Properties) Find ¶
func (p Properties) Find(name string) *Property
func (Properties) GormDBDataType ¶
func (Properties) GormDataType ¶
func (Properties) GormDataType() string
GormDataType gorm common data type
func (Properties) MarshalJSON ¶
func (m Properties) MarshalJSON() ([]byte, error)
func (*Properties) Scan ¶
func (p *Properties) Scan(val interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
func (*Properties) UnmarshalJSON ¶
func (m *Properties) UnmarshalJSON(b []byte) error
type Property ¶
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"`
Hidden bool `json:"hidden,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) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Property.
func (*Property) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSelectable ¶
type ResourceSelectableMap ¶
func (ResourceSelectableMap) GetFieldsMatcher ¶
func (t ResourceSelectableMap) GetFieldsMatcher() fields.Fields
func (ResourceSelectableMap) GetHealth ¶
func (t ResourceSelectableMap) GetHealth() (string, error)
func (ResourceSelectableMap) GetHealthDescription ¶
func (t ResourceSelectableMap) GetHealthDescription() string
func (ResourceSelectableMap) GetID ¶
func (t ResourceSelectableMap) GetID() string
func (ResourceSelectableMap) GetLabelsMatcher ¶
func (r ResourceSelectableMap) GetLabelsMatcher() labels.Labels
func (ResourceSelectableMap) GetName ¶
func (t ResourceSelectableMap) GetName() string
func (ResourceSelectableMap) GetNamespace ¶
func (t ResourceSelectableMap) GetNamespace() string
func (ResourceSelectableMap) GetStatus ¶
func (t ResourceSelectableMap) GetStatus() (string, error)
func (ResourceSelectableMap) GetTagsMatcher ¶
func (r ResourceSelectableMap) GetTagsMatcher() labels.Labels
func (ResourceSelectableMap) GetType ¶
func (t ResourceSelectableMap) GetType() string
type ResourceSelector ¶
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 reference for parent of the resource to select.
// For config items, the scope is the scraper id
// For checks, it's canaries and
// For components, it's topology.
// It can either be a uuid or namespace/name
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" template:"true"`
// Use custom functions for specific selections
Functions Functions `yaml:"-" json:"-"`
Limit int `yaml:"limit,omitempty" json:"limit,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"`
TagSelector string `yaml:"tagSelector,omitempty" json:"tagSelector,omitempty"`
LabelSelector string `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"`
FieldSelector string `json:"fieldSelector,omitempty" yaml:"fieldSelector,omitempty"`
// Health filters resources by the health.
// Multiple healths can be provided separated by comma.
Health MatchExpression `json:"health,omitempty"`
// Types filter resources by the type
Types Items `yaml:"types,omitempty" json:"types,omitempty"`
// Statuses filter resources by the status
Statuses Items `yaml:"statuses,omitempty" json:"statuses,omitempty"`
}
+kubebuilder:object:generate=true
func (*ResourceSelector) DeepCopy ¶
func (in *ResourceSelector) DeepCopy() *ResourceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSelector.
func (*ResourceSelector) DeepCopyInto ¶
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 ¶
func (c ResourceSelector) Hash() string
func (ResourceSelector) Immutable ¶
func (c ResourceSelector) Immutable() bool
Immutable returns true if the selector can be cached indefinitely
func (ResourceSelector) IsEmpty ¶
func (c ResourceSelector) IsEmpty() bool
func (ResourceSelector) IsMetadataOnly ¶
func (rs ResourceSelector) IsMetadataOnly() bool
func (ResourceSelector) Matches ¶
func (rs ResourceSelector) Matches(s ResourceSelectable) bool
func (ResourceSelector) MetadataOnly ¶
func (rs ResourceSelector) MetadataOnly() ResourceSelector
func (ResourceSelector) String ¶
func (rs ResourceSelector) String() string
func (ResourceSelector) ToGetOptions ¶
func (c ResourceSelector) ToGetOptions() (string, bool)
func (ResourceSelector) ToListOptions ¶
func (c ResourceSelector) ToListOptions() (metav1.ListOptions, bool)
ToListOptions converts the resource selector to a ListOptions, using the supported optiions by Kubernetes List, it returns true if the query can be executed entirely by Kubernetes
func (ResourceSelector) ToPeg ¶
func (rs ResourceSelector) ToPeg(convertSelectors bool) string
func (ResourceSelector) Type ¶
func (rs ResourceSelector) Type(t string) ResourceSelector
func (ResourceSelector) Wildcard ¶
func (c ResourceSelector) Wildcard() bool
A wildcard resource selector is one where it just has the name field set to '*'
type ResourceSelectors ¶
type ResourceSelectors []ResourceSelector
func (ResourceSelectors) GormDBDataType ¶
GormDBDataType gorm db data type
func (ResourceSelectors) GormDataType ¶
func (rs ResourceSelectors) GormDataType() string
GormDataType gorm common data type
func (ResourceSelectors) Hash ¶
func (rs ResourceSelectors) Hash() string
func (ResourceSelectors) Matches ¶
func (rs ResourceSelectors) Matches(s ResourceSelectable) bool
func (*ResourceSelectors) Scan ¶
func (rs *ResourceSelectors) Scan(val any) error
type SecretKeySelector ¶
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 ¶
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶
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 ¶
func (s SecretKeySelector) IsEmpty() bool
func (SecretKeySelector) String ¶
func (s SecretKeySelector) String() string
type TagsMatchable ¶
type Text ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Text.
func (*Text) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnstructuredResource ¶
type UnstructuredResource struct {
*unstructured.Unstructured
}
func (*UnstructuredResource) GetFieldsMatcher ¶
func (u *UnstructuredResource) GetFieldsMatcher() fields.Fields
func (UnstructuredResource) GetHealth ¶
func (u UnstructuredResource) GetHealth() (string, error)
func (*UnstructuredResource) GetID ¶
func (u *UnstructuredResource) GetID() string
func (*UnstructuredResource) GetLabelsMatcher ¶
func (u *UnstructuredResource) GetLabelsMatcher() labels.Labels
func (*UnstructuredResource) GetName ¶
func (u *UnstructuredResource) GetName() string
func (*UnstructuredResource) GetNamespace ¶
func (u *UnstructuredResource) GetNamespace() string
func (*UnstructuredResource) GetStatus ¶
func (u *UnstructuredResource) GetStatus() (string, error)
func (*UnstructuredResource) GetType ¶
func (u *UnstructuredResource) GetType() string
type Uptime ¶
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 ¶
type ValueExpression ¶
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 ¶
func (in *ValueExpression) DeepCopy() *ValueExpression
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueExpression.
func (*ValueExpression) DeepCopyInto ¶
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 ¶
func (t ValueExpression) Empty() bool
type WithCertificate ¶
type WithCertificate interface {
GetCertificate() EnvVar
}