-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
430 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import Foundation | ||
|
||
extension Character { | ||
func asOsmType() -> PodcastLocation.OsmQuery.OsmType? { | ||
internal func asOsmType() -> PodcastLocation.OsmQuery.OsmType? { | ||
.init(rawValue: String(self)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import Foundation | ||
|
||
extension Collection { | ||
subscript(safe index: Index) -> Element? { | ||
internal subscript(safe index: Index) -> Element? { | ||
indices.contains(index) ? self[index] : nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Foundation | ||
|
||
protocol AnyDecoding { | ||
internal protocol AnyDecoding { | ||
static var label: String { get } | ||
func decodeFeed(data: Data) throws -> Feedable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
protocol CustomDecoderSetup { | ||
internal protocol CustomDecoderSetup { | ||
func setup(decoder: TypeDecoder) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import Foundation | ||
|
||
protocol DecodableFeed: Decodable, Feedable { | ||
internal protocol DecodableFeed: Decodable, Feedable { | ||
static var source: DecoderSetup { get } | ||
static var label: String { get } | ||
} | ||
|
||
extension DecodableFeed { | ||
static func decoding(using decoder: TypeDecoder) -> Decoding<Self> { | ||
internal static func decoding(using decoder: TypeDecoder) -> Decoding<Self> { | ||
Decoding(for: Self.self, using: decoder) | ||
} | ||
|
||
static func anyDecoding(using decoder: TypeDecoder) -> AnyDecoding { | ||
internal static func anyDecoding(using decoder: TypeDecoder) -> AnyDecoding { | ||
Self.decoding(using: decoder) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
protocol DecoderSetup { | ||
internal protocol DecoderSetup { | ||
var source: DecoderSource { get } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import Foundation | ||
|
||
enum DecoderSource: UInt8, DecoderSetup { | ||
internal enum DecoderSource: UInt8, DecoderSetup { | ||
case json = 0x007B | ||
case xml = 0x003C | ||
|
||
public var source: DecoderSource { | ||
internal var source: DecoderSource { | ||
self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import Foundation | ||
|
||
struct Decoding<DecodingType: DecodableFeed>: AnyDecoding { | ||
func decodeFeed(data: Data) throws -> Feedable { | ||
try decode(data: data) | ||
internal struct Decoding<DecodingType: DecodableFeed>: AnyDecoding { | ||
internal static var label: String { | ||
DecodingType.label | ||
} | ||
|
||
let decoder: TypeDecoder | ||
internal let decoder: TypeDecoder | ||
|
||
init(for _: DecodingType.Type, using decoder: TypeDecoder) { | ||
internal init(for _: DecodingType.Type, using decoder: TypeDecoder) { | ||
self.decoder = decoder | ||
} | ||
|
||
func decode(data: Data) throws -> DecodingType { | ||
try decoder.decode(DecodingType.self, from: data) | ||
internal func decodeFeed(data: Data) throws -> Feedable { | ||
try decode(data: data) | ||
} | ||
|
||
static var label: String { | ||
DecodingType.label | ||
internal func decode(data: Data) throws -> DecodingType { | ||
try decoder.decode(DecodingType.self, from: data) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.