Documentation
¶
Index ¶
- Constants
- Variables
- func Initialize(cfg Cfg, dirPath string) error
- func InlineFileNames(r types.Runtime) (SourceFileName, DepsFileName, bool)
- func ReflectSchema() ([]byte, error)
- func Synchronise(ctx context.Context, config Cfg, outputPath string, build client.Build) error
- type APIRule
- type AccessStrategie
- type AccessStrategieConfig
- type Cancel
- type Cfg
- type ConfigMapKeySelector
- type DepsFileName
- type EnvVar
- type EnvVarSource
- type EventFilter
- type EventSource
- type EventType
- type File
- type FileName
- type Filter
- type ResourceList
- type ResourceName
- type Resources
- type Rule
- type SchemaVersion
- type SecretKeySelector
- type Service
- type Source
- type SourceFileName
- type SourceGit
- type SourceInline
- type SourceType
- type Subscription
- type SubscriptionV0
- type SubscriptionV1
- type TemplatedFile
- type WriterProvider
Constants ¶
View Source
const ( APIRuleGateway = "kyma-gateway.kyma-system.svc.cluster.local" APIRulePath = "/.*" APIRuleHandler = "allow" APIRulePort = int64(80) )
View Source
const CfgFilename = "config.yaml"
Variables ¶
View Source
var ( AllowedSchemaVersions = []SchemaVersion{ SchemaVersionV0, SchemaVersionV1, } )
Functions ¶
func Initialize ¶
func InlineFileNames ¶
func InlineFileNames(r types.Runtime) (SourceFileName, DepsFileName, bool)
func ReflectSchema ¶
Types ¶
type AccessStrategie ¶
type AccessStrategie struct {
Config AccessStrategieConfig `yaml:"config,omitempty"`
Handler string `yaml:"handler" jsonschema:"enum=oauth2_introspection,enum=jwt,enum=noop,enum=allow,default=allow"`
}
type AccessStrategieConfig ¶
type Cfg ¶
type Cfg struct {
Name string `yaml:"name"`
Namespace string `yaml:"namespace"`
Labels map[string]string `yaml:"labels,omitempty"`
Runtime types.Runtime `yaml:"runtime" jsonschema:"enum=nodejs18,enum=nodejs20,enum=python39,enum=python312"`
RuntimeImageOverride string `yaml:"runtimeImageOverride,omitempty"`
Source Source `yaml:"source"`
Resources Resources `yaml:"resource,omitempty"`
Subscriptions []Subscription `yaml:"subscriptions,omitempty"`
RuntimeLabels map[string]string `yaml:"runtimeLabels,omitempty"`
RuntimeAnnotations map[string]string `yaml:"runtimeAnnotations,omitempty"`
Env []EnvVar `yaml:"env,omitempty"`
APIRules []APIRule `yaml:"apiRules,omitempty"`
SchemaVersion SchemaVersion `yaml:"schemaVersion"`
}
type ConfigMapKeySelector ¶
type DepsFileName ¶
type DepsFileName = string
type EnvVar ¶
type EnvVar struct {
Name string `yaml:"name"`
Value string `yaml:"value,omitempty"`
ValueFrom *EnvVarSource `yaml:"valueFrom,omitempty"`
}
type EnvVarSource ¶
type EnvVarSource struct {
ConfigMapKeyRef *ConfigMapKeySelector `yaml:"configMapKeyRef,omitempty"`
SecretKeyRef *SecretKeySelector `yaml:"secretKeyRef,omitempty"`
}
type EventFilter ¶
type EventFilter struct {
EventSource EventSource `yaml:"eventSource"`
EventType EventType `yaml:"eventType"`
}
type EventSource ¶
type File ¶
func NewTemplatedFile ¶
type Filter ¶
type Filter struct {
Dialect string `yaml:"dialect,omitempty"`
Filters []EventFilter `yaml:"filters"`
}
type ResourceList ¶
type ResourceList = map[ResourceName]interface{}
type ResourceName ¶
type ResourceName = string
const ( ResourceNameCPU ResourceName = "cpu" ResourceNameMemory ResourceName = "memory" )
type Resources ¶
type Resources struct {
Limits ResourceList `yaml:"limits,omitempty"`
Requests ResourceList `yaml:"requests,omitempty"`
}
type Rule ¶
type Rule struct {
Path string `yaml:"path,omitempty"`
Methods []string `yaml:"methods"`
AccessStrategies []AccessStrategie `yaml:"accessStrategies"`
}
type SchemaVersion ¶
type SchemaVersion string
const ( SchemaVersionV0 SchemaVersion = "v0" SchemaVersionV1 SchemaVersion = "v1" SchemaVersionDefault SchemaVersion = SchemaVersionV0 SchemaVersionLatest SchemaVersion = SchemaVersionV1 )
type SecretKeySelector ¶
type Source ¶
type Source struct {
Type SourceType `yaml:"sourceType" jsonschema:"enum=inline,enum=git"`
SourceInline `yaml:",inline"`
SourceGit `yaml:",inline"`
}
type SourceFileName ¶
type SourceFileName = string
type SourceGit ¶
type SourceGit struct {
URL string `yaml:"url,omitempty"`
Reference string `yaml:"reference,omitempty"`
BaseDir string `yaml:"baseDir,omitempty"`
CredentialsSecretName string `yaml:"credentialsSecretName,omitempty"`
CredentialsType string `yaml:"credentialsType,omitempty"`
}
func (SourceGit) Type ¶
func (s SourceGit) Type() SourceType
type SourceInline ¶
type SourceInline struct {
SourcePath string `yaml:"sourcePath,omitempty"`
SourceHandlerName string `yaml:"sourceHandlerName,omitempty"`
DepsHandlerName string `yaml:"depsHandlerName,omitempty"`
}
func (SourceInline) Type ¶
func (s SourceInline) Type() SourceType
type SourceType ¶
type SourceType string
const ( SourceTypeInline SourceType = "inline" SourceTypeGit SourceType = "git" )
type Subscription ¶
type Subscription struct {
Name string `yaml:"name,omitempty"`
V0 *SubscriptionV0 `yaml:",inline,omitempty"`
V1 *SubscriptionV1 `yaml:",inline,omitempty"`
}
type SubscriptionV0 ¶
type SubscriptionV1 ¶
type TemplatedFile ¶
type TemplatedFile struct {
// contains filtered or unexported fields
}
func (TemplatedFile) FileName ¶
func (t TemplatedFile) FileName() string
Click to show internal directories.
Click to hide internal directories.