Structuresoto-core 7.7.3SotoTestUtils
ErrorType
Error type
struct ErrorTypeError type
struct ErrorTypeimport SotoTestUtilsfinal class AWSTestServerTest server for AWSClient. Input and Output shapes are defined by process function
init(serviceProtocol: AWSTestServer.ServiceProtocol) var address: String { get }var addressURL: URL { get }var host: String { get }var serverPort: Int { get }let serviceProtocol: AWSTestServer.ServiceProtocolfunc ec2MetadataServer(version: AWSTestServer.IMDSVersion, metaData: AWSTestServer.EC2InstanceMetaData? = nil) throws fake ec2 metadata server
func ecsMetadataServer(path: String, metaData: AWSTestServer.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 -> AWSTestServer.Result<some Encodable & Sendable>) 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: (AWSTestServer.Request) throws -> AWSTestServer.Result<AWSTestServer.Response>) throws run server reading requests, processing them and returning responses
func stop() throws struct EC2InstanceMetaDatastruct ECSMetaDataenum Errorstruct HTTPBinResponseenum IMDSVersionstruct Requeststruct Responseenum Result<Output> where Output : Sendableresult from process
enum ServiceProtocolprotocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
static var accessDenied: AWSTestServer.ErrorType { get }static var badRequest: AWSTestServer.ErrorType { get }static var `internal`: AWSTestServer.ErrorType { get }static var notFound: AWSTestServer.ErrorType { get }static var notImplemented: AWSTestServer.ErrorType { get }static var serviceUnavailable: AWSTestServer.ErrorType { get }static var tooManyRequests: AWSTestServer.ErrorType { get }let errorCode: Stringvar json: String { get }let message: Stringlet status: Intvar xml: String { get }