Documentation
¶
Index ¶
- type AtlasSdkVersionPlugin
- type Base
- type CRDPlugin
- type CRDPluginMock
- type CRDPluginMock_Expecter
- type CRDPluginMock_Name_Call
- type CRDPluginMock_Process_Call
- func (_c *CRDPluginMock_Process_Call) Return(err error) *CRDPluginMock_Process_Call
- func (_c *CRDPluginMock_Process_Call) Run(run func(request *CRDProcessorRequest)) *CRDPluginMock_Process_Call
- func (_c *CRDPluginMock_Process_Call) RunAndReturn(run func(request *CRDProcessorRequest) error) *CRDPluginMock_Process_Call
- type CRDProcessorRequest
- type Catalog
- type ConnectionSecret
- type Entry
- type ExtensionPlugin
- type ExtensionPluginMock
- type ExtensionPluginMock_Expecter
- type ExtensionPluginMock_Name_Call
- type ExtensionPluginMock_Process_Call
- func (_c *ExtensionPluginMock_Process_Call) Return(err error) *ExtensionPluginMock_Process_Call
- func (_c *ExtensionPluginMock_Process_Call) Run(run func(request *ExtensionProcessorRequest)) *ExtensionPluginMock_Process_Call
- func (_c *ExtensionPluginMock_Process_Call) RunAndReturn(run func(request *ExtensionProcessorRequest) error) *ExtensionPluginMock_Process_Call
- type ExtensionProcessorRequest
- type MajorVersion
- type MappingPlugin
- type MappingPluginMock
- type MappingPluginMock_Expecter
- type MappingPluginMock_Name_Call
- type MappingPluginMock_Process_Call
- func (_c *MappingPluginMock_Process_Call) Return(err error) *MappingPluginMock_Process_Call
- func (_c *MappingPluginMock_Process_Call) Run(run func(request *MappingProcessorRequest)) *MappingPluginMock_Process_Call
- func (_c *MappingPluginMock_Process_Call) RunAndReturn(run func(request *MappingProcessorRequest) error) *MappingPluginMock_Process_Call
- type MappingProcessorRequest
- type MutualExclusiveGroup
- type MutualExclusiveMajorVersions
- type Parameters
- type Plugin
- type PluginMock
- type PluginMock_Expecter
- type PluginMock_Name_Call
- type PluginMock_Process_Call
- type PropertyPlugin
- type PropertyPluginMock
- type PropertyPluginMock_Expecter
- type PropertyPluginMock_Name_Call
- type PropertyPluginMock_Process_Call
- func (_c *PropertyPluginMock_Process_Call) Return(err error) *PropertyPluginMock_Process_Call
- func (_c *PropertyPluginMock_Process_Call) Run(run func(request *PropertyProcessorRequest)) *PropertyPluginMock_Process_Call
- func (_c *PropertyPluginMock_Process_Call) RunAndReturn(run func(request *PropertyProcessorRequest) error) *PropertyPluginMock_Process_Call
- type PropertyProcessorRequest
- type ReadOnlyProperties
- type ReadWriteProperties
- type References
- type ReferencesMetadata
- type SensitiveProperties
- type Set
- type SkippedProperties
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtlasSdkVersionPlugin ¶
type AtlasSdkVersionPlugin struct{}
AtlasSdkVersionPlugin is a plugin that adds the Atlas SDK version information as an OpenAPI extension in the CRD. It requires the entry plugin to be run first.
func (*AtlasSdkVersionPlugin) Name ¶
func (p *AtlasSdkVersionPlugin) Name() string
func (*AtlasSdkVersionPlugin) Process ¶
func (p *AtlasSdkVersionPlugin) Process(req *ExtensionProcessorRequest) error
type Base ¶
type Base struct{}
Base is a plugin that add minimum required configuration to a CRD
func (*Base) Process ¶
func (p *Base) Process(req *CRDProcessorRequest) error
type CRDPlugin ¶
type CRDPlugin = Plugin[*CRDProcessorRequest]
type CRDPluginMock ¶
CRDPluginMock is an autogenerated mock type for the CRDPlugin type
func NewCRDPluginMock ¶
func NewCRDPluginMock(t interface {
mock.TestingT
Cleanup(func())
}) *CRDPluginMock
NewCRDPluginMock creates a new instance of CRDPluginMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*CRDPluginMock) EXPECT ¶
func (_m *CRDPluginMock) EXPECT() *CRDPluginMock_Expecter
func (*CRDPluginMock) Name ¶
func (_mock *CRDPluginMock) Name() string
Name provides a mock function for the type CRDPluginMock
func (*CRDPluginMock) Process ¶
func (_mock *CRDPluginMock) Process(request *CRDProcessorRequest) error
Process provides a mock function for the type CRDPluginMock
type CRDPluginMock_Expecter ¶
type CRDPluginMock_Expecter struct {
// contains filtered or unexported fields
}
func (*CRDPluginMock_Expecter) Name ¶
func (_e *CRDPluginMock_Expecter) Name() *CRDPluginMock_Name_Call
Name is a helper method to define mock.On call
func (*CRDPluginMock_Expecter) Process ¶
func (_e *CRDPluginMock_Expecter) Process(request interface{}) *CRDPluginMock_Process_Call
Process is a helper method to define mock.On call
- request *CRDProcessorRequest
type CRDPluginMock_Name_Call ¶
CRDPluginMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*CRDPluginMock_Name_Call) Return ¶
func (_c *CRDPluginMock_Name_Call) Return(s string) *CRDPluginMock_Name_Call
func (*CRDPluginMock_Name_Call) Run ¶
func (_c *CRDPluginMock_Name_Call) Run(run func()) *CRDPluginMock_Name_Call
func (*CRDPluginMock_Name_Call) RunAndReturn ¶
func (_c *CRDPluginMock_Name_Call) RunAndReturn(run func() string) *CRDPluginMock_Name_Call
type CRDPluginMock_Process_Call ¶
CRDPluginMock_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
func (*CRDPluginMock_Process_Call) Return ¶
func (_c *CRDPluginMock_Process_Call) Return(err error) *CRDPluginMock_Process_Call
func (*CRDPluginMock_Process_Call) Run ¶
func (_c *CRDPluginMock_Process_Call) Run(run func(request *CRDProcessorRequest)) *CRDPluginMock_Process_Call
func (*CRDPluginMock_Process_Call) RunAndReturn ¶
func (_c *CRDPluginMock_Process_Call) RunAndReturn(run func(request *CRDProcessorRequest) error) *CRDPluginMock_Process_Call
type CRDProcessorRequest ¶
type CRDProcessorRequest struct {
CRD *apiextensions.CustomResourceDefinition
CRDConfig *configv1alpha1.CRDConfig
}
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶
func NewCatalog() *Catalog
func (*Catalog) BuildSets ¶
func (c *Catalog) BuildSets(setsDefinition []configv1alpha1.PluginSet) ([]Set, error)
func (*Catalog) IsMappingExtension ¶
func (*Catalog) IsProperty ¶
type ConnectionSecret ¶
type ConnectionSecret struct{}
ConnectionSecret is a plugin that adds the Atlas Credentials secret to . It requires the parameters and references plugins to be run first.
func (*ConnectionSecret) Name ¶
func (p *ConnectionSecret) Name() string
func (*ConnectionSecret) Process ¶
func (p *ConnectionSecret) Process(req *MappingProcessorRequest) error
type Entry ¶
type Entry struct{}
Entry is a plugin that processes the entry mapping configuration and adds the entry schema to the CRD's spec validation schema. It requires the base and major_version plugin to be run first.
func (*Entry) Process ¶
func (p *Entry) Process(req *MappingProcessorRequest) error
type ExtensionPlugin ¶
type ExtensionPlugin = Plugin[*ExtensionProcessorRequest]
type ExtensionPluginMock ¶
ExtensionPluginMock is an autogenerated mock type for the ExtensionPlugin type
func NewExtensionPluginMock ¶
func NewExtensionPluginMock(t interface {
mock.TestingT
Cleanup(func())
}) *ExtensionPluginMock
NewExtensionPluginMock creates a new instance of ExtensionPluginMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ExtensionPluginMock) EXPECT ¶
func (_m *ExtensionPluginMock) EXPECT() *ExtensionPluginMock_Expecter
func (*ExtensionPluginMock) Name ¶
func (_mock *ExtensionPluginMock) Name() string
Name provides a mock function for the type ExtensionPluginMock
func (*ExtensionPluginMock) Process ¶
func (_mock *ExtensionPluginMock) Process(request *ExtensionProcessorRequest) error
Process provides a mock function for the type ExtensionPluginMock
type ExtensionPluginMock_Expecter ¶
type ExtensionPluginMock_Expecter struct {
// contains filtered or unexported fields
}
func (*ExtensionPluginMock_Expecter) Name ¶
func (_e *ExtensionPluginMock_Expecter) Name() *ExtensionPluginMock_Name_Call
Name is a helper method to define mock.On call
func (*ExtensionPluginMock_Expecter) Process ¶
func (_e *ExtensionPluginMock_Expecter) Process(request interface{}) *ExtensionPluginMock_Process_Call
Process is a helper method to define mock.On call
- request *ExtensionProcessorRequest
type ExtensionPluginMock_Name_Call ¶
ExtensionPluginMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*ExtensionPluginMock_Name_Call) Return ¶
func (_c *ExtensionPluginMock_Name_Call) Return(s string) *ExtensionPluginMock_Name_Call
func (*ExtensionPluginMock_Name_Call) Run ¶
func (_c *ExtensionPluginMock_Name_Call) Run(run func()) *ExtensionPluginMock_Name_Call
func (*ExtensionPluginMock_Name_Call) RunAndReturn ¶
func (_c *ExtensionPluginMock_Name_Call) RunAndReturn(run func() string) *ExtensionPluginMock_Name_Call
type ExtensionPluginMock_Process_Call ¶
ExtensionPluginMock_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
func (*ExtensionPluginMock_Process_Call) Return ¶
func (_c *ExtensionPluginMock_Process_Call) Return(err error) *ExtensionPluginMock_Process_Call
func (*ExtensionPluginMock_Process_Call) Run ¶
func (_c *ExtensionPluginMock_Process_Call) Run(run func(request *ExtensionProcessorRequest)) *ExtensionPluginMock_Process_Call
func (*ExtensionPluginMock_Process_Call) RunAndReturn ¶
func (_c *ExtensionPluginMock_Process_Call) RunAndReturn(run func(request *ExtensionProcessorRequest) error) *ExtensionPluginMock_Process_Call
type ExtensionProcessorRequest ¶
type ExtensionProcessorRequest struct {
ExtensionsSchema *openapi3.Schema
ApiDefinitions map[string]configv1alpha1.OpenAPIDefinition
MappingConfig *configv1alpha1.CRDMapping
}
type MajorVersion ¶
type MajorVersion struct{}
MajorVersion is a plugin that adds the major version schema to the CRD. It requires the base plugin to be run first.
func (*MajorVersion) Name ¶
func (s *MajorVersion) Name() string
func (*MajorVersion) Process ¶
func (s *MajorVersion) Process(req *MappingProcessorRequest) error
type MappingPlugin ¶
type MappingPlugin = Plugin[*MappingProcessorRequest]
type MappingPluginMock ¶
MappingPluginMock is an autogenerated mock type for the MappingPlugin type
func NewMappingPluginMock ¶
func NewMappingPluginMock(t interface {
mock.TestingT
Cleanup(func())
}) *MappingPluginMock
NewMappingPluginMock creates a new instance of MappingPluginMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MappingPluginMock) EXPECT ¶
func (_m *MappingPluginMock) EXPECT() *MappingPluginMock_Expecter
func (*MappingPluginMock) Name ¶
func (_mock *MappingPluginMock) Name() string
Name provides a mock function for the type MappingPluginMock
func (*MappingPluginMock) Process ¶
func (_mock *MappingPluginMock) Process(request *MappingProcessorRequest) error
Process provides a mock function for the type MappingPluginMock
type MappingPluginMock_Expecter ¶
type MappingPluginMock_Expecter struct {
// contains filtered or unexported fields
}
func (*MappingPluginMock_Expecter) Name ¶
func (_e *MappingPluginMock_Expecter) Name() *MappingPluginMock_Name_Call
Name is a helper method to define mock.On call
func (*MappingPluginMock_Expecter) Process ¶
func (_e *MappingPluginMock_Expecter) Process(request interface{}) *MappingPluginMock_Process_Call
Process is a helper method to define mock.On call
- request *MappingProcessorRequest
type MappingPluginMock_Name_Call ¶
MappingPluginMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*MappingPluginMock_Name_Call) Return ¶
func (_c *MappingPluginMock_Name_Call) Return(s string) *MappingPluginMock_Name_Call
func (*MappingPluginMock_Name_Call) Run ¶
func (_c *MappingPluginMock_Name_Call) Run(run func()) *MappingPluginMock_Name_Call
func (*MappingPluginMock_Name_Call) RunAndReturn ¶
func (_c *MappingPluginMock_Name_Call) RunAndReturn(run func() string) *MappingPluginMock_Name_Call
type MappingPluginMock_Process_Call ¶
MappingPluginMock_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
func (*MappingPluginMock_Process_Call) Return ¶
func (_c *MappingPluginMock_Process_Call) Return(err error) *MappingPluginMock_Process_Call
func (*MappingPluginMock_Process_Call) Run ¶
func (_c *MappingPluginMock_Process_Call) Run(run func(request *MappingProcessorRequest)) *MappingPluginMock_Process_Call
func (*MappingPluginMock_Process_Call) RunAndReturn ¶
func (_c *MappingPluginMock_Process_Call) RunAndReturn(run func(request *MappingProcessorRequest) error) *MappingPluginMock_Process_Call
type MappingProcessorRequest ¶
type MappingProcessorRequest struct {
CRD *apiextensions.CustomResourceDefinition
MappingConfig *configv1alpha1.CRDMapping
OpenAPISpec *openapi3.T
ExtensionsSchema *openapi3.Schema
Converter converter.Converter
}
type MutualExclusiveGroup ¶
type MutualExclusiveGroup struct{}
func (*MutualExclusiveGroup) Name ¶
func (p *MutualExclusiveGroup) Name() string
func (*MutualExclusiveGroup) Process ¶
func (p *MutualExclusiveGroup) Process(req *MappingProcessorRequest) error
type MutualExclusiveMajorVersions ¶
type MutualExclusiveMajorVersions struct{}
MutualExclusiveMajorVersions is a plugin that adds a CEL validation to the CRD to ensure that only one of the major versions is set in the spec. It requires base plugin to be run first.
func (*MutualExclusiveMajorVersions) Name ¶
func (p *MutualExclusiveMajorVersions) Name() string
func (*MutualExclusiveMajorVersions) Process ¶
func (p *MutualExclusiveMajorVersions) Process(req *CRDProcessorRequest) error
type Parameters ¶
type Parameters struct{}
Parameters adds parameters from the OpenAPI spec to the CRD schema. It requires base and major version plugins to be run before.
func (*Parameters) Name ¶
func (p *Parameters) Name() string
func (*Parameters) Process ¶
func (p *Parameters) Process(req *MappingProcessorRequest) error
type PluginMock ¶
PluginMock is an autogenerated mock type for the Plugin type
func NewPluginMock ¶
func NewPluginMock[R any](t interface { mock.TestingT Cleanup(func()) }) *PluginMock[R]
NewPluginMock creates a new instance of PluginMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*PluginMock[R]) EXPECT ¶
func (_m *PluginMock[R]) EXPECT() *PluginMock_Expecter[R]
func (*PluginMock[R]) Name ¶
func (_mock *PluginMock[R]) Name() string
Name provides a mock function for the type PluginMock
func (*PluginMock[R]) Process ¶
func (_mock *PluginMock[R]) Process(request R) error
Process provides a mock function for the type PluginMock
type PluginMock_Expecter ¶
type PluginMock_Expecter[R any] struct { // contains filtered or unexported fields }
func (*PluginMock_Expecter[R]) Name ¶
func (_e *PluginMock_Expecter[R]) Name() *PluginMock_Name_Call[R]
Name is a helper method to define mock.On call
func (*PluginMock_Expecter[R]) Process ¶
func (_e *PluginMock_Expecter[R]) Process(request interface{}) *PluginMock_Process_Call[R]
Process is a helper method to define mock.On call
- request R
type PluginMock_Name_Call ¶
PluginMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*PluginMock_Name_Call[R]) Return ¶
func (_c *PluginMock_Name_Call[R]) Return(s string) *PluginMock_Name_Call[R]
func (*PluginMock_Name_Call[R]) Run ¶
func (_c *PluginMock_Name_Call[R]) Run(run func()) *PluginMock_Name_Call[R]
func (*PluginMock_Name_Call[R]) RunAndReturn ¶
func (_c *PluginMock_Name_Call[R]) RunAndReturn(run func() string) *PluginMock_Name_Call[R]
type PluginMock_Process_Call ¶
PluginMock_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
func (*PluginMock_Process_Call[R]) Return ¶
func (_c *PluginMock_Process_Call[R]) Return(err error) *PluginMock_Process_Call[R]
func (*PluginMock_Process_Call[R]) Run ¶
func (_c *PluginMock_Process_Call[R]) Run(run func(request R)) *PluginMock_Process_Call[R]
func (*PluginMock_Process_Call[R]) RunAndReturn ¶
func (_c *PluginMock_Process_Call[R]) RunAndReturn(run func(request R) error) *PluginMock_Process_Call[R]
type PropertyPlugin ¶
type PropertyPlugin = Plugin[*PropertyProcessorRequest]
type PropertyPluginMock ¶
PropertyPluginMock is an autogenerated mock type for the PropertyPlugin type
func NewPropertyPluginMock ¶
func NewPropertyPluginMock(t interface {
mock.TestingT
Cleanup(func())
}) *PropertyPluginMock
NewPropertyPluginMock creates a new instance of PropertyPluginMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*PropertyPluginMock) EXPECT ¶
func (_m *PropertyPluginMock) EXPECT() *PropertyPluginMock_Expecter
func (*PropertyPluginMock) Name ¶
func (_mock *PropertyPluginMock) Name() string
Name provides a mock function for the type PropertyPluginMock
func (*PropertyPluginMock) Process ¶
func (_mock *PropertyPluginMock) Process(request *PropertyProcessorRequest) error
Process provides a mock function for the type PropertyPluginMock
type PropertyPluginMock_Expecter ¶
type PropertyPluginMock_Expecter struct {
// contains filtered or unexported fields
}
func (*PropertyPluginMock_Expecter) Name ¶
func (_e *PropertyPluginMock_Expecter) Name() *PropertyPluginMock_Name_Call
Name is a helper method to define mock.On call
func (*PropertyPluginMock_Expecter) Process ¶
func (_e *PropertyPluginMock_Expecter) Process(request interface{}) *PropertyPluginMock_Process_Call
Process is a helper method to define mock.On call
- request *PropertyProcessorRequest
type PropertyPluginMock_Name_Call ¶
PropertyPluginMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*PropertyPluginMock_Name_Call) Return ¶
func (_c *PropertyPluginMock_Name_Call) Return(s string) *PropertyPluginMock_Name_Call
func (*PropertyPluginMock_Name_Call) Run ¶
func (_c *PropertyPluginMock_Name_Call) Run(run func()) *PropertyPluginMock_Name_Call
func (*PropertyPluginMock_Name_Call) RunAndReturn ¶
func (_c *PropertyPluginMock_Name_Call) RunAndReturn(run func() string) *PropertyPluginMock_Name_Call
type PropertyPluginMock_Process_Call ¶
PropertyPluginMock_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
func (*PropertyPluginMock_Process_Call) Return ¶
func (_c *PropertyPluginMock_Process_Call) Return(err error) *PropertyPluginMock_Process_Call
func (*PropertyPluginMock_Process_Call) Run ¶
func (_c *PropertyPluginMock_Process_Call) Run(run func(request *PropertyProcessorRequest)) *PropertyPluginMock_Process_Call
func (*PropertyPluginMock_Process_Call) RunAndReturn ¶
func (_c *PropertyPluginMock_Process_Call) RunAndReturn(run func(request *PropertyProcessorRequest) error) *PropertyPluginMock_Process_Call
type PropertyProcessorRequest ¶
type PropertyProcessorRequest struct {
Property *apiextensions.JSONSchemaProps
PropertyConfig *configv1alpha1.PropertyMapping
OpenAPISchema *openapi3.Schema
ExtensionsSchema *openapi3.SchemaRef
Path []string
}
type ReadOnlyProperties ¶
type ReadOnlyProperties struct{}
func (*ReadOnlyProperties) Name ¶
func (p *ReadOnlyProperties) Name() string
func (*ReadOnlyProperties) Process ¶
func (p *ReadOnlyProperties) Process(req *PropertyProcessorRequest) error
type ReadWriteProperties ¶
type ReadWriteProperties struct{}
func (*ReadWriteProperties) Name ¶
func (p *ReadWriteProperties) Name() string
func (*ReadWriteProperties) Process ¶
func (p *ReadWriteProperties) Process(req *PropertyProcessorRequest) error
type References ¶
type References struct{}
References adds reference properties to the CRD OpenAPI schema based on the mapping configuration. It requires base and major version schemas to be already processed.
func (*References) Name ¶
func (r *References) Name() string
func (*References) Process ¶
func (r *References) Process(req *MappingProcessorRequest) error
type ReferencesMetadata ¶
type ReferencesMetadata struct{}
func (*ReferencesMetadata) Name ¶
func (r *ReferencesMetadata) Name() string
func (*ReferencesMetadata) Process ¶
func (r *ReferencesMetadata) Process(req *ExtensionProcessorRequest) error
type SensitiveProperties ¶
type SensitiveProperties struct{}
func (*SensitiveProperties) Name ¶
func (p *SensitiveProperties) Name() string
func (*SensitiveProperties) Process ¶
func (p *SensitiveProperties) Process(req *PropertyProcessorRequest) error
type Set ¶
type Set struct {
Name string
Default bool
CRD []CRDPlugin
Mapping []MappingPlugin
Property []PropertyPlugin
Extension []ExtensionPlugin
}
type SkippedProperties ¶
type SkippedProperties struct{}
func (*SkippedProperties) Name ¶
func (p *SkippedProperties) Name() string
func (*SkippedProperties) Process ¶
func (p *SkippedProperties) Process(req *PropertyProcessorRequest) error
Source Files
¶
- atlas_sdk_version.go
- base.go
- catalog.go
- connection_secret.go
- entry.go
- major_version.go
- mutual_exclusive_group.go
- mutual_exclusive_major_versions.go
- parameters.go
- plugin.go
- plugin_mock.go
- read_only_properties.go
- read_write_properties.go
- references.go
- references_metadata.go
- sesitive_properties.go
- skipped_properties.go
- status.go