types

package
v1.0.205 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 31

Documentation

Index

Constants

View Source
const (
	SQLServerType = "sqlserver"
	PostgresType  = "postgres"
	SqliteType    = "sqlite"
	MysqlType     = "mysql"
	Text          = "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

This section is empty.

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 ComponentCheck added in v1.0.83

type ComponentCheck struct {
	Selector ResourceSelector `json:"selector,omitempty"`
	Inline   *JSON            `json:"inline,omitempty"`
}

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

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) 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 {
	ID         []string          `json:"id,omitempty"`
	Type       string            `json:"type,omitempty"`
	Class      string            `json:"class,omitempty"`
	ExternalID string            `json:"external_id,omitempty"`
	Name       string            `json:"name,omitempty"`
	Namespace  string            `json:"namespace,omitempty"`
	Tags       map[string]string `json:"tags,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

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"`
	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 EnvVarSource added in v1.0.45

type EnvVarSource struct {
	ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" yaml:"configMapKeyRef,omitempty" protobuf:"bytes,1,opt,name=configMapKeyRef"`
	SecretKeyRef    *SecretKeySelector    `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty" protobuf:"bytes,2,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) String added in v1.0.45

func (e EnvVarSource) String() 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) Value added in v1.0.164

func (l Latency) Value() (driver.Value, error)

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 ResourceSelector added in v1.0.83

type ResourceSelector struct {
	Name          string `yaml:"name,omitempty" json:"name,omitempty"`
	LabelSelector string `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"`
	FieldSelector string `json:"fieldSelector,omitempty" yaml:"fieldSelector,omitempty"`
}

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) 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) 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"`
	// contains filtered or unexported fields
}

+kubebuilder:object:generate=true

func (Summary) Add added in v1.0.83

func (s Summary) Add(b Summary, n string) Summary

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

Jump to

Keyboard shortcuts

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