From 3df7ce6256f9aa3be3c2b3b7550d9fbb7288da50 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sun, 2 Jan 2022 15:19:36 -0800 Subject: [PATCH] DocC extensions (#315) * Add extensions. * Cleanup --- Sources/Packages/Sources/Brief/SemVer.swift | 4 ++-- .../Sources/SecretAgentKit/SigningWitness.swift | 12 ++++++------ .../Documentation.docc/SecureEnclave.md | 14 ++++++++++++++ .../Documentation.docc/SmartCard.md | 14 ++++++++++++++ 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 Sources/Packages/Sources/SecureEnclaveSecretKit/Documentation.docc/SecureEnclave.md create mode 100644 Sources/Packages/Sources/SmartCardSecretKit/Documentation.docc/SmartCard.md diff --git a/Sources/Packages/Sources/Brief/SemVer.swift b/Sources/Packages/Sources/Brief/SemVer.swift index 4627d69..8308521 100644 --- a/Sources/Packages/Sources/Brief/SemVer.swift +++ b/Sources/Packages/Sources/Brief/SemVer.swift @@ -18,8 +18,8 @@ public struct SemVer { versionNumbers = split } - /// Initializes a SemVer from an ``OperatingSystemVersion`` representation. - /// - Parameter version: An ``OperatingSystemVersion`` representation of the SemVer. + /// Initializes a SemVer from an `OperatingSystemVersion` representation. + /// - Parameter version: An `OperatingSystemVersion` representation of the SemVer. public init(_ version: OperatingSystemVersion) { versionNumbers = [version.majorVersion, version.minorVersion, version.patchVersion] } diff --git a/Sources/Packages/Sources/SecretAgentKit/SigningWitness.swift b/Sources/Packages/Sources/SecretAgentKit/SigningWitness.swift index 8dbcc83..ff1ae33 100644 --- a/Sources/Packages/Sources/SecretAgentKit/SigningWitness.swift +++ b/Sources/Packages/Sources/SecretAgentKit/SigningWitness.swift @@ -6,17 +6,17 @@ public protocol SigningWitness { /// A ridiculously named method that notifies the callee that a signing operation is about to be performed using a secret. The callee may `throw` an `Error` to prevent access from occurring. /// - Parameters: - /// - secret: The ``SecretKit.Secret`` that will be used to sign the request. - /// - store: The ``SecretKit.Store`` being asked to sign the request.. - /// - provenance: A ``SecretKit.SigningRequestProvenance`` object describing the origin of the request. + /// - secret: The `Secret` that will be used to sign the request. + /// - store: The `Store` being asked to sign the request.. + /// - provenance: A `SigningRequestProvenance` object describing the origin of the request. /// - Note: This method being called does not imply that the requst has been authorized. If a secret requires authentication, authentication will still need to be performed by the user before the request will be performed. If the user declines or fails to authenticate, the request will fail. func speakNowOrForeverHoldYourPeace(forAccessTo secret: AnySecret, from store: AnySecretStore, by provenance: SigningRequestProvenance) throws /// Notifies the callee that a signing operation has been performed for a given secret. /// - Parameters: - /// - secret: The ``SecretKit.Secret`` that will was used to sign the request. - /// - store: The ``SecretKit.Store`` that signed the request.. - /// - provenance: A ``SecretKit.SigningRequestProvenance`` object describing the origin of the request. + /// - secret: The `Secret` that will was used to sign the request. + /// - store: The `Store` that signed the request.. + /// - provenance: A `SigningRequestProvenance` object describing the origin of the request. /// - requiredAuthentication: A boolean describing whether or not authentication was required for the request. func witness(accessTo secret: AnySecret, from store: AnySecretStore, by provenance: SigningRequestProvenance, requiredAuthentication: Bool) throws diff --git a/Sources/Packages/Sources/SecureEnclaveSecretKit/Documentation.docc/SecureEnclave.md b/Sources/Packages/Sources/SecureEnclaveSecretKit/Documentation.docc/SecureEnclave.md new file mode 100644 index 0000000..29ac443 --- /dev/null +++ b/Sources/Packages/Sources/SecureEnclaveSecretKit/Documentation.docc/SecureEnclave.md @@ -0,0 +1,14 @@ +# ``SecureEnclaveSecretKit/SecureEnclave`` + +## Topics + +### Implementations + +- ``Secret`` +- ``Store`` + +### Errors + +- ``KeychainError`` +- ``SigningError`` +- ``SecurityError`` diff --git a/Sources/Packages/Sources/SmartCardSecretKit/Documentation.docc/SmartCard.md b/Sources/Packages/Sources/SmartCardSecretKit/Documentation.docc/SmartCard.md new file mode 100644 index 0000000..79fd58e --- /dev/null +++ b/Sources/Packages/Sources/SmartCardSecretKit/Documentation.docc/SmartCard.md @@ -0,0 +1,14 @@ +# ``SmartCardSecretKit/SmartCard`` + +## Topics + +### Implementations + +- ``Secret`` +- ``Store`` + +### Errors + +- ``KeychainError`` +- ``SigningError`` +- ``SecurityError``