diff --git a/.spi.yml b/.spi.yml new file mode 100644 index 0000000..65d2471 --- /dev/null +++ b/.spi.yml @@ -0,0 +1,5 @@ +version: 1 +builder: + configs: + - documentation_targets: [GRPCHealthService, GRPCInterceptors] + swift_version: 6.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe46758..ec4fbf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,4 @@ -# How to contribute +# Contributing -We definitely welcome patches and contributions to grpc-swift! Please read the gRPC -organization's [governance rules](https://github.com/grpc/grpc-community/blob/main/governance.md) -and [contribution guidelines](https://github.com/grpc/grpc-community/blob/main/CONTRIBUTING.md) before proceeding. - -Here are some guidelines and information about how to participate. - -## Getting started - -### Legal requirements - -In order to protect both you and ourselves, you will need to sign the -[Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf). - -### Technical requirements - -Please see the [main gRPC repository](https://github.com/grpc/grpc) for -more information about gRPC. +Please refer to the contributing guide in the +[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository. diff --git a/NOTICES.txt b/NOTICES.txt deleted file mode 100644 index 3a8509e..0000000 --- a/NOTICES.txt +++ /dev/null @@ -1,71 +0,0 @@ - The gRPC Swift Project - ====================== - -Copyright 2021 The gRPC Swift Project - -The gRPC Swift project licenses this file to you 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: - - https://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. - -------------------------------------------------------------------------------- - -This product uses scripts derived from SwiftNIO's integration testing -framework: 'test_01_allocation_counts.sh', 'run-nio-alloc-counter-tests.sh' and -'test_functions.sh'. - -It also uses derivations of SwiftNIO's lock 'NIOLock.swift' and locked value box -'NIOLockedValueBox.swift'. - - * LICENSE (Apache License 2.0): - * https://github.com/apple/swift-nio/blob/main/LICENSE.txt - * HOMEPAGE: - * https://github.com/apple/swift-nio - ---- - -This product uses derivations of SwiftNIOHTTP2's implementation of case -insensitive comparison of strings, found in 'HPACKHeader.swift'. - - * LICENSE (Apache License 2.0): - * https://github.com/apple/swift-nio-http2/blob/main/LICENSE.txt - * HOMEPAGE: - * https://github.com/apple/swift-nio-http2 - ---- - -This product contains a derivation of the backpressure aware async stream from -the Swift project. - - * LICENSE (Apache License 2.0): - * https://github.com/apple/swift/blob/main/LICENSE.txt - * HOMEPAGE: - * https://github.com/apple/swift - ---- - -This product uses derivations of swift-extras/swift-extras-base64 'Base64.swift'. - - * LICENSE (Apache License 2.0): - * https://github.com/swift-extras/swift-extras-base64/blob/main/LICENSE - * HOMEPAGE: - * https://github.com/swift-extras/swift-extras-base64 - ---- - -This product uses derivations of apple/swift-openapi-generator 'StructuredSwiftRepresentation.swift', -'TypeName.swift', 'TypeUsage.swift', 'Builtins.swift', 'RendererProtocol.swift', 'TextBasedProtocol', -'Test_TextBasedRenderer', and 'SnippetBasedReferenceTests.swift'. - - * LICENSE (Apache License 2.0): - * https://github.com/apple/swift-openapi-generator/blob/main/LICENSE.txt - * HOMEPAGE: - * https://github.com/apple/swift-openapi-generator - diff --git a/README.md b/README.md new file mode 100644 index 0000000..582ad3a --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# gRPC Swift Extras + +This repository contains optional extras for [gRPC Swift][gh-grpc-swift]. + +- 📚 **Documentation** is available on the [Swift Package Index][spi-grpc-swift-extras] +- 🎓 **Tutorials** are available in the documentation for `grpc/grpc-swift` on + the [Swift Package Index][spi-grpc-swift]. +- 💻 **Examples** are available in the `Examples` directory of the + [`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository +- 🚀 **Contributions** are welcome, please see [CONTRIBUTING.md](CONTRIBUTING.md) +- 🪪 **License** is Apache 2.0, repeated in [LICENSE](License) +- 🔒 **Security** issues should be reported via the process in [SECURITY.md](SECURITY.md) + +[gh-grpc-swift]: https://github.com/grpc/grpc-swift +[spi-grpc-swift-extras]: https://swiftpackageindex.com/grpc/grpc-swift-extras/documentation diff --git a/SECURITY.md b/SECURITY.md index 4546778..74173da 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,46 +1,4 @@ # Security -This document specifies the security process for gRPC Swift. - -## Disclosures - -### Private Disclosure Process - -The gRPC Swift team asks that known and suspected vulnerabilities be -privately and responsibly disclosed by emailing -[grpc-swift-security@group.apple.com](mailto:grpc-swift-security@group.apple.com) -with the [details usually included with bug reports][issue-template]. -**Do not file a public issue.** - -#### When to report a vulnerability - -* You think you have discovered a potential security vulnerability in gRPC - Swift. -* You are unsure how a vulnerability affects gRPC Swift. - -#### What happens next? - -* A member of the team will acknowledge receipt of the report within 3 - working days (United Kingdom). This may include a request for additional - information about reproducing the vulnerability. -* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the - vulnerability within 10 days of the report as per their [security - guidelines][sswg-security]. -* Once we have identified a fix we may ask you to validate it. We aim to do this - within 30 days. In some cases this may not be possible, for example when the - vulnerability exists at the protocol level and the industry must coordinate on - the disclosure process. -* If a CVE number is required, one will be requested from [MITRE][mitre] - providing you with full credit for the discovery. -* We will decide on a planned release date and let you know when it is. -* Prior to release, we will inform major dependents that a security-related - patch is impending. -* Once the fix has been released we will publish a security advisory on GitHub - and the [SSWG][sswg] will announce the vulnerability on the [Swift - forums][swift-forums-sec]. - -[issue-template]: https://github.com/grpc/grpc-swift/blob/main/.github/ISSUE_TEMPLATE/BUG_REPORT.md -[sswg]: https://github.com/swift-server/sswg -[sswg-security]: https://github.com/swift-server/sswg/blob/main/process/incubation.md#security-best-practices -[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/ -[mitre]: https://cveform.mitre.org/ +Please refer to [SECURITY.md] in the +[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository. diff --git a/Sources/GRPCHealthService/Documentation.docc/Documentation.md b/Sources/GRPCHealthService/Documentation.docc/Documentation.md new file mode 100644 index 0000000..c40192e --- /dev/null +++ b/Sources/GRPCHealthService/Documentation.docc/Documentation.md @@ -0,0 +1,11 @@ +# ``GRPCHealthService`` + +This module contains an implementation of the gRPC Health service +("grpc.health.v1.Health"). + +## Overview + +The gRPC Health service is a regular gRPC service which allows clients to +request the status of another service. This can be done by polling the server +(the "Check" RPC) or by subscribing for changes to the status of a service (the +"Watch" RPC).