Documentation ¶
Index ¶
Constants ¶
View Source
const ( // template key KeyMajor = "Major" KeyMinor = "Minor" KeyPatch = "Patch" )
Variables ¶
View Source
var ( // DefaultTemplate is the default template used to download certificates DefaultTemplate = fmt.Sprintf("https://cloud.ibm.com/media/docs/downloads/hyper-protect-container-runtime/ibm-hyper-protect-container-runtime-{{.%s}}-{{.%s}}-s390x-{{.%s}}-encrypt.crt", KeyMajor, KeyMinor, KeyPatch) // ParseConstraint parses a constraint string into a constraint object ParseConstraint = E.Eitherize1(semver.NewConstraint) // ParseVersion parses a version string into a version object ParseVersion = E.Eitherize1(semver.NewVersion) // ParseResolver parses a template string into a resolver function ParseResolver = F.Flow2( ParseTemplate("DownloadUrl"), E.Fold(F.Flow2( E.Left[string, error], F.Constant1[C.Version, E.Either[error, string]], ), ResolveUrl), ) )
Functions ¶
func CertificateFromSpec ¶
func CertificateFromSpec(spec *semver.Constraints) func(certs map[string]string) E.Either[error, C.VersionCert]
CertificateFromSpec selects the best matching certificate from a map out of string and certificate
Types ¶
Click to show internal directories.
Click to hide internal directories.