moonbitstack/moonzero/rest/handler does not have a README file
pub(open) trait Decrypter {
fn decrypt(Self, Bytes) -> Bytes raise
}pub(all) suberror Failure {
Failure(String)
}pub(all) suberror Refused {
MissingHeader
MalformedHeader
UnknownKey
BadSecret
StaleTimestamp
BadCiphertext
BadSignature
}type AsLayerpub(all) struct CorsConf {
origins : Array[String]
methods : String
headers : String
expose : String
max_age : Int
}pub(all) struct FileEntry {
body : Bytes
media_type : String
}pub(all) struct RequestLog {
http_method : String
path : String
status : Int
duration_ms : Int64
request_id : String
client_ip : String
user_agent : String
}impl FromJson for RequestLogimpl ToJson for RequestLogfn ServerMetrics::latency_total(self : ServerMetrics, path : String, verb : String, code : Int) -> Int64fn ServerMetrics::observe(self : ServerMetrics, path : String, verb : String, code : Int, duration_ms : Double) -> Unitfn ServerMetrics::request_count(self : ServerMetrics, path : String, verb : String, code : Int) -> Doublepub(all) struct SignatureInput {
verb : String
path : String
query : String
header : String?
body : Bytes
signed_uri : String?
}fn SignatureVerifier::new(keys~ : Array[SignatureKey], tolerance_ms? : Int64, strict? : Bool) -> SignatureVerifierpub(all) struct VerifiedContent {
key : Bytes
encrypted : Bool
body : Bytes
}fn constant_time_eq(a : BytesView, b : BytesView) -> Boollet exposition_content_type : Stringfn is_gzip_encoding(value : String) -> Boolfn jwt_authorized(token : String?, secret : String, now_secs : Int64) -> Boolfn media_type_of(path : String) -> Stringfn parse_i64(text : String) -> Int64?fn sign_content(timestamp : String, verb : String, path : String, query : String, body : Bytes) -> Bytesfn trace_id_of(traceparent : String) -> String?let verbose_body_preview : Intfn verify_signature(verifier : SignatureVerifier, input : SignatureInput, now_ms : Int64) -> VerifiedContent raise RefusedInstall
Download zipA service framework for MoonBit.