Structuresoto-core 7.4.0SotoTestUtils
ErrorType
Error type
struct ErrorType
Error type
struct ErrorType
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 HTTPBinResponse
enum IMDSVersion
struct Request
struct Response
enum Result<Output> where Output : Sendable
result from process
enum ServiceProtocol
protocol Sendable
static var accessDenied: ErrorType { get }
static var badRequest: ErrorType { get }
static var `internal`: ErrorType { get }
static var notFound: ErrorType { get }
static var notImplemented: ErrorType { get }
static var serviceUnavailable: ErrorType { get }
static var tooManyRequests: ErrorType { get }
let errorCode: String
var json: String { get }
let message: String
let status: Int
var xml: String { get }