From 1d86f67a34d16185030e33fda0980e0ef21fed01 Mon Sep 17 00:00:00 2001 From: Sergey Armodin Date: Thu, 14 Mar 2019 00:06:26 +0300 Subject: [PATCH] public class and methods --- Sources/CouchDBClient/CouchDBClient.swift | 6 +++--- Sources/CouchDBClient/CouchUpdateResponse.swift | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/CouchDBClient/CouchDBClient.swift b/Sources/CouchDBClient/CouchDBClient.swift index 15ce332..1cca9ca 100644 --- a/Sources/CouchDBClient/CouchDBClient.swift +++ b/Sources/CouchDBClient/CouchDBClient.swift @@ -9,7 +9,7 @@ import Foundation import HTTP -class CouchDBClient: NSObject { +public class CouchDBClient: NSObject { // MARK: - Private properties @@ -35,7 +35,7 @@ class CouchDBClient: NSObject { // MARK: - Public methods - func get(dbName: String, uri: String, query: [String: Any]? = nil, worker: Worker) -> Future? { + public func get(dbName: String, uri: String, query: [String: Any]? = nil, worker: Worker) -> Future? { let client = HTTPClient.connect( scheme: .http, hostname: couchHost, @@ -58,7 +58,7 @@ class CouchDBClient: NSObject { } } - func update(dbName: String, uri: String, body: HTTPBody, worker: Worker ) -> Future? { + public func update(dbName: String, uri: String, body: HTTPBody, worker: Worker ) -> Future? { let client = HTTPClient.connect( scheme: .http, hostname: couchHost, diff --git a/Sources/CouchDBClient/CouchUpdateResponse.swift b/Sources/CouchDBClient/CouchUpdateResponse.swift index aed0e61..81539df 100644 --- a/Sources/CouchDBClient/CouchUpdateResponse.swift +++ b/Sources/CouchDBClient/CouchUpdateResponse.swift @@ -8,7 +8,7 @@ import Foundation -struct CouchUpdateResponse: Codable { +public struct CouchUpdateResponse: Codable { var ok: Bool var id: String var rev: String @@ -21,7 +21,7 @@ struct CouchUpdateResponse: Codable { } -extension CouchUpdateResponse { +public extension CouchUpdateResponse { init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self)