You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-ios/SessionSnodeKit/Types/OnionRequestAPIDestination....

28 lines
734 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
//
// stringlint:disable
import Foundation
import SessionUtilitiesKit
public enum OnionRequestAPIDestination: CustomStringConvertible {
case snode(Snode)
case server(
method: String?,
scheme: String?,
host: String,
endpoint: any EndpointType,
port: UInt16?,
headers: [HTTPHeader: String]?,
queryParams: [HTTPQueryParam: String]?,
x25519PublicKey: String
)
public var description: String {
switch self {
case .snode(let snode): return "Service node \(snode.ip):\(snode.lmqPort)"
case .server(_, _, let host, _, _, _, _, _): return host
}
}
}