Skip to content

Commit 8f8a0e2

Browse files
author
Andrea Scuderi
committed
Improve documentation
1 parent 6ac083a commit 8f8a0e2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Sources/BreezeDynamoDBService/BreezeDynamoDBService.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public protocol BreezeDynamoDBServing: Actor {
2525
func gracefulShutdown() throws
2626
}
2727

28+
/// BreezeDynamoDBService is an actor that conforms to the BreezeDynamoDBServing protocol.
29+
/// It provides methods to access the DynamoDB database manager and to gracefully shutdown the service.
2830
public actor BreezeDynamoDBService: BreezeDynamoDBServing {
2931

3032
private let dbManager: BreezeDynamoDBManaging

Sources/BreezeLambdaAPI/BreezeAPIConfiguration.swift

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public protocol APIConfiguring {
1717
}
1818

1919
/// BreezeAPIConfiguration is a struct that conforms to APIConfiguring.
20-
/// It provides the necessary configuration for the Breeze Lambda API, including the DynamoDB table name, key name, and AWS region.
20+
/// Unsing the environment, It provides the necessary configuration for the Breeze Lambda API, including the DynamoDB table name, key name, and AWS region.
2121
/// It also defines the operation handler for Breeze operations.
2222
public struct BreezeAPIConfiguration: APIConfiguring {
2323

@@ -45,10 +45,15 @@ public struct BreezeAPIConfiguration: APIConfiguring {
4545

4646
/// Returns the configuration for the Breeze DynamoDB service.
4747
/// - Throws:
48-
/// - `BreezeLambdaAPIError.tableNameNotFound` if the DynamoDB table name is not found in the environment variables.
49-
/// - `BreezeLambdaAPIError.keyNameNotFound` if the DynamoDB key name is not found in the environment variables.
50-
///
51-
/// This method retrieves the AWS region, DynamoDB table name, key name, and optional endpoint from the environment variables.
48+
/// - `BreezeLambdaAPIError.tableNameNotFound` if the DynamoDB table name is not found in the environment variables.
49+
/// - `BreezeLambdaAPIError.keyNameNotFound` if the DynamoDB key name is not found in the environment variables.
50+
/// - Returns: A `BreezeDynamoDBConfig` instance containing the configuration for the Breeze DynamoDB service.
51+
/// This method is used to retrieve the necessary configuration for the Breeze Lambda API to interact with DynamoDB.
52+
/// It includes the AWS region, DynamoDB table name, key name, and an optional endpoint for LocalStack.
53+
/// - Important: The configuration is essential for the Breeze Lambda API to function correctly with DynamoDB. This method retrieves the configuration from environment variables:
54+
/// - `AWS_REGION`: The AWS region where the DynamoDB table is located.
55+
/// - `DYNAMO_DB_TABLE_NAME`: The name of the DynamoDB table.
56+
/// - `DYNAMO_DB_KEY`: The name of the primary key in the DynamoDB table.
5257
public func getConfig() throws -> BreezeDynamoDBConfig {
5358
BreezeDynamoDBConfig(
5459
region: currentRegion(),

0 commit comments

Comments
 (0)