Documentation ¶
Index ¶
- Constants
- Variables
- func Validate(ctx types.Context, s, d []byte) error
- func ValidateObj(ctx types.Context, s []byte, i interface{}) error
- func ValidateSnapshot(v *types.Snapshot) ([]byte, error)
- func ValidateVolume(v *types.Volume) ([]byte, error)
- func ValidateVolumeCreateRequest(v *types.VolumeCreateRequest) ([]byte, error)
- func ValidateVolumeSnapshotRequest(v *types.VolumeSnapshotRequest) ([]byte, error)
Constants ¶
const ( // JSONSchema is the libStorage API JSON schema JSONSchema = `` /* 18203-byte string literal not displayed */ )
Variables ¶
var ( // VolumeSchema is the JSON schema for the Volume resource. VolumeSchema = buildSchemaVar("volume") // VolumeAttachmentSchema is the JSON schema for the VolumeAttachment // resource. VolumeAttachmentSchema = buildSchemaVar("volumeAttachment") // ServiceVolumeMapSchema is the JSON schema for the ServiceVolumeMap // resource. ServiceVolumeMapSchema = buildSchemaVar("serviceVolumeMap") // ServiceSnapshotMapSchema is the JSON schema for the ServiceSnapshotMap // resource. ServiceSnapshotMapSchema = buildSchemaVar("serviceSnapshotMap") // VolumeMapSchema is the JSON schema for the VolumeMap resource. VolumeMapSchema = buildSchemaVar("volumeMap") // SnapshotMapSchema is the JSON schema for the SnapshotMap resource. SnapshotMapSchema = buildSchemaVar("snapshotMap") // SnapshotSchema is the JSON schema for the Snapshot resource. SnapshotSchema = buildSchemaVar("snapshot") // ServiceInfoSchema is the JSON schema for the ServiceInfo resource. ServiceInfoSchema = buildSchemaVar("serviceInfo") // ServiceInfoMapSchema is the JSON schemea for a map[string]*ServiceInfo. ServiceInfoMapSchema = buildSchemaVar("serviceInfoMap") // DriverInfoSchema is the JSON schema for the DriverInfo resource. DriverInfoSchema = buildSchemaVar("driverInfo") // ExecutorInfoSchema is the JSON schema for the ExecutorInfo resource. ExecutorInfoSchema = buildSchemaVar("executorInfo") // VolumeCreateRequestSchema is the JSON schema for a Volume creation // request. VolumeCreateRequestSchema = buildSchemaVar("volumeCreateRequest") // VolumeCopyRequestSchema is the JSON schema for a Volume copy // request. VolumeCopyRequestSchema = buildSchemaVar("volumeCopyRequest") // VolumeSnapshotRequestSchema is the JSON schema for a Volume snapshot // request. VolumeSnapshotRequestSchema = buildSchemaVar("volumeSnapshotRequest") // VolumeAttachRequestSchema is the JSON schema for a Volume attach // request. VolumeAttachRequestSchema = buildSchemaVar("volumeAttachRequest") // VolumeAttachResponseSchema is the JSON schema for a Volume attach // response. VolumeAttachResponseSchema = buildSchemaVar("volumeAttachResponse") // VolumeDetachRequestSchema is the JSON schema for a Volume detach // request. VolumeDetachRequestSchema = buildSchemaVar("volumeDetachRequest") // SnapshotCopyRequestSchema is the JSON schema for a Snapshot copy // request. SnapshotCopyRequestSchema = buildSchemaVar("snapshotCopyRequest") // VolumeCreateFromSnapshotRequestSchema is the JSON schema for a // Volume create from Snapshot request. VolumeCreateFromSnapshotRequestSchema = buildSchemaVar( "volumeCreateFromSnapshotRequest") )
Functions ¶
func ValidateObj ¶
ValidateObj validates an object using a schema.
func ValidateSnapshot ¶
ValidateSnapshot validates a Snapshot object using the JSON schema. If the object is valid no error is returned. The first return value, the object marshaled to JSON, is returned whether or not the validation is successful.
func ValidateVolume ¶
ValidateVolume validates a Volume object using the JSON schema. If the object is valid no error is returned. The first return value, the object marshaled to JSON, is returned whether or not the validation is successful.
func ValidateVolumeCreateRequest ¶
func ValidateVolumeCreateRequest( v *types.VolumeCreateRequest) ([]byte, error)
ValidateVolumeCreateRequest validates a VolumeCreateRequest object using the JSON schema. If the object is valid no error is returned. The first return value, the object marshaled to JSON, is returned whether or not the validation is successful.
func ValidateVolumeSnapshotRequest ¶
func ValidateVolumeSnapshotRequest( v *types.VolumeSnapshotRequest) ([]byte, error)
ValidateVolumeSnapshotRequest validates a VolumeSnapshotRequest object using the JSON schema. If the object is valid no error is returned. The first return value, the object marshaled to JSON, is returned whether or not the validation is successful.
Types ¶
This section is empty.