![]() |
![]()
| ![]() |
![]()
NAMEOpenXPKI::Server::API2::Types - Collection of Moose types used for API command parameters TYPESAlphaPunctText with space and punctuation characters. Allowed: alphanumeric, underscore ("_"), other connector punctuation chars, Unicode marks, dash ("-"), colon (":"), space ArrayOrAlphaPunctArray of AlphaPunct strings. PosIntA postive integer value (excluding zero) HexA string containing a number in hexadecimal notation IntOrHexEither an "Int" or a "Hex" number IdentA string used as identifier, allows word + underscore EmptyThe empty string Base64A string containing only characters allowed in Base64 and Base64 filename/URL safe encoding. PEMA PEM encoded data (i.e. Base64 encoded string separated by newlines). PEMCertA PEM encoded certificate PEMCertChainA PEM encoded certificate chain PEMPKCS7A PEM encoded PKCS7 container PEMPKeyA PEM encoded private key container PEMPubKeyA PEM encoded private key container An email address (or at least 99% of them). Allowed characters are word and dash, for the local part also the plus sign and a colon. A percent character is NOT allowed to avoid some nasty SQL issues. ArrayRefOrPEMCertChainAn ArrayRef of "PEMCertChain" that will also accept a scalar of type "PEMCertChain" (which is automatically wrapped into an ArrayRef). Please also see "COERCION". ArrayRefOrStrAn ArrayRef of Str that will also accept a scalar Str (which is automatically wrapped into an ArrayRef). # this is the same: CTX('api2')->show(animal => "all"); CTX('api2')->show(animal => [ "all" ]); Please also see "COERCION". ArrayRefOrCommaListAn ArrayRef of Str that will also accept a scalar Str with a comma separated list of string (which is converted into an ArrayRef). # this is the same: CTX('api2')->show(animal => "dog,cat, other"); CTX('api2')->show(animal => [ "dog", "cat", "other"]); Please also see "COERCION". TenantTokenTypeEnumeration: certsign, crlsign, datasafe, cmcra or scep. CertStatusEnumeration of certificate stati: ISSUED, REVOKED, CRL_ISSUANCE_PENDING or VALID, EXPIRED. Please note that in queries specifying a validity date the returned status can also be VALID. COERCIONFor some of the types you must also specify "coerce => 1" for the automatic type conversions to work, e.g.: command "doit" => { types => { isa => 'ArrayRefOrCommaList', coerce => 1, }, } => sub { my ($self, $params) = @_; print join(", ", @{ $params->types }), "\n"; }; no Moose::Util::TypeConstraints;
|