Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2579aa9

Browse files
authored
Add API Docs (#238)
* Wrap exports * Fix the imports * Update CI * Update API Docs workflow * Update SPI Info * Add DocC bundle
1 parent 7d68ff4 commit 2579aa9

File tree

14 files changed

+55
-20
lines changed

14 files changed

+55
-20
lines changed

‎.github/workflows/api-docs.yml‎

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
name: deploy-api-docs
22
on:
3-
push:
4-
branches:
5-
- main
3+
push:
4+
branches:
5+
- main
66

77
jobs:
8-
deploy:
9-
name: api.vapor.codes
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Deploy api-docs
13-
uses: appleboy/ssh-action@master
14-
with:
15-
host: vapor.codes
16-
username: vapor
17-
key: ${{ secrets.VAPOR_CODES_SSH_KEY }}
18-
script: ./github-actions/deploy-api-docs.sh
8+
build-and-deploy:
9+
uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main
10+
secrets: inherit
11+
with:
12+
package_name: postgres-kit
13+
modules: PostgresKit
14+
pathsToInvalidate: /postgreskit

‎.github/workflows/test.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,14 @@ jobs:
184184
uses: actions/checkout@v3
185185
- name: Run local tests
186186
run: swift test
187+
188+
test-exports:
189+
name: Test exports
190+
runs-on: ubuntu-latest
191+
steps:
192+
- name: Check out Vapor
193+
uses: actions/checkout@v3
194+
with:
195+
fetch-depth: 0
196+
- name: Build
197+
run: swift build -Xswiftc -DBUILDING_DOCC

‎.spi.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
version: 1
22
metadata:
3-
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
3+
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
4+
external_links:
5+
documentation: "https://api.vapor.codes/postgreskit/documentation/postgreskit/"

‎Sources/PostgresKit/ConnectionPool+Postgres.swift‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import NIOCore
2+
import PostgresNIO
3+
import AsyncKit
4+
15
extension EventLoopGroupConnectionPool where Source == PostgresConnectionSource {
26
public func database(logger: Logger) -> PostgresDatabase {
37
_EventLoopGroupConnectionPoolPostgresDatabase(pool: self, logger: logger)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ``PostgresKit``
2+
3+
PostgresKit is a library to provide a simple Swift interface to PostgresNIO using SQLKit.

‎Sources/PostgresKit/Exports.swift‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#if !BUILDING_DOCC
2+
13
@_exported import AsyncKit
24
@_exported import PostgresNIO
35
@_exported import SQLKit
6+
@_exported import struct Foundation.URL
7+
8+
#endif

‎Sources/PostgresKit/PostgresConfiguration.swift‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
@_exported import struct Foundation.URL
1+
import NIOSSL
2+
import Foundation
3+
import NIOCore
24

35
public struct PostgresConfiguration {
46
public var address: () throws -> SocketAddress

‎Sources/PostgresKit/PostgresConnectionSource.swift‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import NIOSSL
22
import Atomics
3+
import AsyncKit
4+
import Logging
5+
import PostgresNIO
6+
import NIOCore
37

48
public struct PostgresConnectionSource: ConnectionPoolSource {
59
public let configuration: PostgresConfiguration

‎Sources/PostgresKit/PostgresDataDecoder.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Foundation
2-
import protocol PostgresNIO.PostgresJSONDecoder
3-
import var PostgresNIO._defaultJSONDecoder
2+
import PostgresNIO
43

54
public final class PostgresDataDecoder {
65
public let json: PostgresNIO.PostgresJSONDecoder

‎Sources/PostgresKit/PostgresDataEncoder.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Foundation
2-
import protocol PostgresNIO.PostgresJSONEncoder
3-
import var PostgresNIO._defaultJSONEncoder
2+
import PostgresNIO
43

54
public final class PostgresDataEncoder {
65
public let json: PostgresJSONEncoder

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /