Documentation
¶
Index ¶
- func NewClientSpecValidator(opts ...Option) grpc.UnaryClientInterceptor
- func NewServerSpecValidator(opts ...Option) grpc.UnaryServerInterceptor
- type Option
- func WithRequestValidation() Option
- func WithRequiresControllerPublishVolumeCredentials() Option
- func WithRequiresControllerUnpublishVolumeCredentials() Option
- func WithRequiresCreateVolumeCredentials() Option
- func WithRequiresDeleteVolumeCredentials() Option
- func WithRequiresNodeID() Option
- func WithRequiresNodePublishVolumeCredentials() Option
- func WithRequiresNodeUnpublishVolumeCredentials() Option
- func WithRequiresPublishVolumeInfo() Option
- func WithRequiresVolumeAttributes() Option
- func WithResponseValidation() Option
- func WithSupportedVersions(versions ...csi.Version) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientSpecValidator ¶
func NewClientSpecValidator( opts ...Option) grpc.UnaryClientInterceptor
NewClientSpecValidator provides a UnaryClientInterceptor that validates client request and response data against the CSI specification.
func NewServerSpecValidator ¶
func NewServerSpecValidator( opts ...Option) grpc.UnaryServerInterceptor
NewServerSpecValidator returns a new UnaryServerInterceptor that validates server request and response data against the CSI specification.
Types ¶
type Option ¶
type Option func(*opts)
Option configures the spec validator interceptor.
func WithRequestValidation ¶
func WithRequestValidation() Option
WithRequestValidation is a Option that enables request validation.
func WithRequiresControllerPublishVolumeCredentials ¶
func WithRequiresControllerPublishVolumeCredentials() Option
WithRequiresControllerPublishVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresControllerUnpublishVolumeCredentials ¶
func WithRequiresControllerUnpublishVolumeCredentials() Option
WithRequiresControllerUnpublishVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresCreateVolumeCredentials ¶
func WithRequiresCreateVolumeCredentials() Option
WithRequiresCreateVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresDeleteVolumeCredentials ¶
func WithRequiresDeleteVolumeCredentials() Option
WithRequiresDeleteVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresNodeID ¶
func WithRequiresNodeID() Option
WithRequiresNodeID is a Option that indicates ControllerPublishVolume requests and GetNodeID responses must contain non-empty node ID data.
func WithRequiresNodePublishVolumeCredentials ¶
func WithRequiresNodePublishVolumeCredentials() Option
WithRequiresNodePublishVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresNodeUnpublishVolumeCredentials ¶
func WithRequiresNodeUnpublishVolumeCredentials() Option
WithRequiresNodeUnpublishVolumeCredentials is a Option that indicates the eponymous requests must contain non-empty credentials data.
func WithRequiresPublishVolumeInfo ¶
func WithRequiresPublishVolumeInfo() Option
WithRequiresPublishVolumeInfo is a Option that indicates ControllerPublishVolume responses and NodePublishVolume requests must contain non-empty publish volume info data.
func WithRequiresVolumeAttributes ¶
func WithRequiresVolumeAttributes() Option
WithRequiresVolumeAttributes is a Option that indicates ControllerPublishVolume, ValidateVolumeCapabilities, and NodePublishVolume requests must contain non-empty volume attribute data.
func WithResponseValidation ¶
func WithResponseValidation() Option
WithResponseValidation is a Option that enables response validation.
func WithSupportedVersions ¶
WithSupportedVersions is a Option that indicates the list of versions supported by any CSI RPC that participates in version validation.