Documentation ¶
Overview ¶
Copyright 2022 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func DiagCertificate(data any, _ cty.Path) diag.Diagnostics
- func DiagContract(data any, _ cty.Path) diag.Diagnostics
- func DiagFolder(data any, _ cty.Path) diag.Diagnostics
- func DiagPrivateKey(data any, _ cty.Path) diag.Diagnostics
- func GetContractSchema() E.Either[error, *jsonschema.Schema]
- func ValidateYAML[A any](validator func(A) []jsonschema.KeyError) func(data string) E.Either[error, A]
- type RawMap
Constants ¶
This section is empty.
Variables ¶
var ( Base64Re = regexp.MustCompile(`^((?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{3}=|[A-Za-z\d+/]{2}==)?)$`) TokenRe = regexp.MustCompile(`^hyper-protect-basic\.((?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{3}=|[A-Za-z\d+/]{2}==)?)\.((?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{3}=|[A-Za-z\d+/]{2}==)?)$`) )
Functions ¶
func DiagCertificate ¶
func DiagCertificate(data any, _ cty.Path) diag.Diagnostics
DiagCertificate validates that the given certificate is indeed a certificate
func DiagContract ¶
func DiagContract(data any, _ cty.Path) diag.Diagnostics
DiagContract validates that the given certificate is indeed a certificate
func DiagFolder ¶
func DiagFolder(data any, _ cty.Path) diag.Diagnostics
DiagFolder validates that the given path points to an existing folder
func DiagPrivateKey ¶ added in v0.1.6
func DiagPrivateKey(data any, _ cty.Path) diag.Diagnostics
DiagPrivateKey validates that the given private key is indeed a private key
func GetContractSchema ¶
func GetContractSchema() E.Either[error, *jsonschema.Schema]
GetContractSchema reads the json schema from a string representation into a schema representation
func ValidateYAML ¶
func ValidateYAML[A any](validator func(A) []jsonschema.KeyError) func(data string) E.Either[error, A]
ValidateYAML validates a YAML file against the validator function by deserializing it, then validate the result