Structuresoto-core 7.4.0SotoTestUtils
HTTPBinResponse
TestServer.swift:145struct HTTPBinResponse
struct HTTPBinResponse
import SotoTestUtils
final class AWSTestServer
Test server for AWSClient. Input and Output shapes are defined by process function
init(serviceProtocol: ServiceProtocol)
var address: String { get }
var addressURL: URL { get }
var host: String { get }
var serverPort: Int { get }
let serviceProtocol: ServiceProtocol
func ec2MetadataServer(version: IMDSVersion, metaData: EC2InstanceMetaData? = nil) throws
fake ec2 metadata server
func ecsMetadataServer(path: String, metaData: ECSMetaData? = nil) throws
fake ecs metadata server
func httpBin() throws
read one request and return details back in body
func process<Input>(_ process: (Input) throws -> Result<some Encodable>) throws where Input : Decodable
run server reading request, convert from to an input shape processing them and converting the result back to a response.
func processRaw(_ process: (Request) throws -> Result<Response>) throws
run server reading requests, processing them and returning responses
func stop() throws
struct EC2InstanceMetaData
struct ECSMetaData
enum Error
struct ErrorType
Error type
enum IMDSVersion
struct Request
struct Response
enum Result<Output> where Output : Sendable
result from process
enum ServiceProtocol
protocol AWSDecodableShape : AWSShape, Decodable
AWSShape that can be decoded from API output
protocol AWSShape : Sendable
Protocol for the input and output objects for all AWS service commands.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Sendable
init(from decoder: any Decoder) throws
let data: String?
let headers: [String : String]
let method: String?
let url: String
static var _options: AWSShapeOptions { get }
static func idempotencyToken() -> String
Return an idempotencyToken