Documentation
¶
Index ¶
- func ConvertJSONSchemaPropsWithPostProcess(in *apiext.JSONSchemaProps, out *spec.Schema, postProcess PostProcessFunc) error
- func StripUnsupportedFormatsPostProcess(s *spec.Schema) error
- type ConfigureContextFunc
- type CreateContextFunc
- type GRPCProviderServer
- func (r *GRPCProviderServer) Capabilities(ctx context.Context, req *kfplugin1.Capabilities_Request) (*kfplugin1.Capabilities_Response, error)
- func (r *GRPCProviderServer) Configure(ctx context.Context, req *kfplugin1.Configure_Request) (*kfplugin1.Configure_Response, error)
- func (r *GRPCProviderServer) CreateResource(ctx context.Context, req *kfplugin1.CreateResource_Request) (*kfplugin1.CreateResource_Response, error)
- func (r *GRPCProviderServer) ListDataSource(ctx context.Context, req *kfplugin1.ListDataSource_Request) (*kfplugin1.ListDataSource_Response, error)
- func (r *GRPCProviderServer) ReadDataSource(ctx context.Context, req *kfplugin1.ReadDataSource_Request) (*kfplugin1.ReadDataSource_Response, error)
- func (r *GRPCProviderServer) ReadResource(ctx context.Context, req *kfplugin1.ReadResource_Request) (*kfplugin1.ReadResource_Response, error)
- func (r *GRPCProviderServer) StopProvider(ctx context.Context, req *kfplugin1.StopProvider_Request) (*kfplugin1.StopProvider_Response, error)
- type ListContextFunc
- type PostProcessFunc
- type Provider
- type ReadContextFunc
- type Resource
- type ResourceData
- type ResourceTimeout
- type SchemaCreateValidator
- type SchemaValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJSONSchemaPropsWithPostProcess ¶
func ConvertJSONSchemaPropsWithPostProcess(in *apiext.JSONSchemaProps, out *spec.Schema, postProcess PostProcessFunc) error
ConvertJSONSchemaPropsWithPostProcess converts the schema from apiextensions.JSONSchemaPropos to go-openapi/spec.Schema and run a post process step on each JSONSchemaProps node. postProcess is never called for nil schemas.
func StripUnsupportedFormatsPostProcess ¶
StripUnsupportedFormatsPostProcess sets unsupported formats to empty string.
Types ¶
type ConfigureContextFunc ¶
type CreateContextFunc ¶
type CreateContextFunc func(context.Context, *ResourceData, interface{}) ([]byte, diag.Diagnostics)
type GRPCProviderServer ¶
type GRPCProviderServer struct {
// contains filtered or unexported fields
}
GRPCProviderServer handles the server, or plugin side of the rpc connection.
func NewGRPCProviderServer ¶
func NewGRPCProviderServer(p *Provider) *GRPCProviderServer
func (*GRPCProviderServer) Capabilities ¶
func (r *GRPCProviderServer) Capabilities(ctx context.Context, req *kfplugin1.Capabilities_Request) (*kfplugin1.Capabilities_Response, error)
func (*GRPCProviderServer) Configure ¶
func (r *GRPCProviderServer) Configure(ctx context.Context, req *kfplugin1.Configure_Request) (*kfplugin1.Configure_Response, error)
func (*GRPCProviderServer) CreateResource ¶
func (r *GRPCProviderServer) CreateResource(ctx context.Context, req *kfplugin1.CreateResource_Request) (*kfplugin1.CreateResource_Response, error)
func (*GRPCProviderServer) ListDataSource ¶
func (r *GRPCProviderServer) ListDataSource(ctx context.Context, req *kfplugin1.ListDataSource_Request) (*kfplugin1.ListDataSource_Response, error)
func (*GRPCProviderServer) ReadDataSource ¶
func (r *GRPCProviderServer) ReadDataSource(ctx context.Context, req *kfplugin1.ReadDataSource_Request) (*kfplugin1.ReadDataSource_Response, error)
func (*GRPCProviderServer) ReadResource ¶
func (r *GRPCProviderServer) ReadResource(ctx context.Context, req *kfplugin1.ReadResource_Request) (*kfplugin1.ReadResource_Response, error)
func (*GRPCProviderServer) StopProvider ¶
func (r *GRPCProviderServer) StopProvider(ctx context.Context, req *kfplugin1.StopProvider_Request) (*kfplugin1.StopProvider_Response, error)
type ListContextFunc ¶
type ListContextFunc func(context.Context, *ResourceData, interface{}) ([]byte, diag.Diagnostics)
type PostProcessFunc ¶
PostProcessFunc post-processes one node of a spec.Schema.
type Provider ¶
type ReadContextFunc ¶
type ReadContextFunc func(context.Context, *ResourceData, interface{}) ([]byte, diag.Diagnostics)
type Resource ¶
type Resource struct { CreateContext CreateContextFunc //DeleteContext DeleteContextFunc ReadContext ReadContextFunc ListContext ListContextFunc Timeouts *ResourceTimeout }
type ResourceData ¶
type ResourceData struct {
// contains filtered or unexported fields
}
func (*ResourceData) GetData ¶
func (r *ResourceData) GetData() []byte
func (*ResourceData) GetScope ¶
func (r *ResourceData) GetScope() kfplugin1.Scope
type ResourceTimeout ¶
type SchemaCreateValidator ¶
type SchemaValidator ¶
type SchemaValidator interface { SchemaCreateValidator ValidateUpdate(new, old interface{}) *validate.Result }
func NewSchemaValidator ¶
func NewSchemaValidator(customResourceValidation *apiext.JSONSchemaProps) (SchemaValidator, *spec.Schema, error)
NewSchemaValidator creates an openapi schema validator for the given CRD validation.
If feature `CRDValidationRatcheting` is disabled, this returns validator which validates all `Update`s and `Create`s as a `Create` - without considering old value.
If feature `CRDValidationRatcheting` is enabled - the validator returned will support ratcheting unchanged correlatable fields across an update.