Skip to content

Commit da06eb0

Browse files
authored
Updated access levels on storage classes. (#306)
1 parent 7c9c162 commit da06eb0

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

Sources/Segment/Utilities/HTTPClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import FoundationNetworking
1111
#endif
1212

13-
enum HTTPClientErrors: Error {
13+
public enum HTTPClientErrors: Error {
1414
case badSession
1515
case failedToOpenBatch
1616
case statusCode(code: Int)

Sources/Segment/Utilities/Storage/TransientDB.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
import Foundation
88

9-
internal class TransientDB {
9+
public class TransientDB {
1010
// our data store
1111
internal let store: any DataStore
1212
// keeps items added in the order given.

Sources/Segment/Utilities/Storage/Types/DirectoryStore.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@
77

88
import Foundation
99

10-
internal class DirectoryStore: DataStore {
11-
typealias StoreConfiguration = Configuration
10+
public class DirectoryStore: DataStore {
11+
public typealias StoreConfiguration = Configuration
1212

1313
public struct Configuration {
1414
let writeKey: String
1515
let storageLocation: URL
1616
let baseFilename: String
1717
let maxFileSize: Int
1818
let indexKey: String
19+
20+
public init(writeKey: String, storageLocation: URL, baseFilename: String, maxFileSize: Int, indexKey: String) {
21+
self.writeKey = writeKey
22+
self.storageLocation = storageLocation
23+
self.baseFilename = baseFilename
24+
self.maxFileSize = maxFileSize
25+
self.indexKey = indexKey
26+
}
1927
}
2028

2129
public var hasData: Bool {

Sources/Segment/Utilities/Storage/Types/MemoryStore.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ public class MemoryStore: DataStore {
1414
let writeKey: String
1515
let maxItems: Int
1616
let maxFetchSize: Int
17+
18+
public init(writeKey: String, maxItems: Int, maxFetchSize: Int) {
19+
self.writeKey = writeKey
20+
self.maxItems = maxItems
21+
self.maxFetchSize = maxFetchSize
22+
}
1723
}
1824

1925
internal struct ItemData {

0 commit comments

Comments
 (0)