Validated HAR 1.2 parser and performance analysis toolkit for MoonBit
pub struct HarBatchItem {
label_value : String
document_value : HarDocument?
error_value : HarError?
} derive(Eq, Debug)pub struct HarBatchResult {
items_value : Array[HarBatchItem]
accepted_value : Int
rejected_value : Int
total_entries_value : Int
total_input_bytes_value : Int
} derive(Eq, Debug)pub struct HarCache {
before_request_value : HarCacheEntry?
after_request_value : HarCacheEntry?
comment_value : String?
} derive(Eq, Debug)fn HarCache::new(before_request? : HarCacheEntry, after_request? : HarCacheEntry, comment? : String) -> HarCachefn HarCacheEntry::new(last_access : String, etag : String, hit_count : Double, expires? : String, comment? : String) -> Result[HarCacheEntry, HarError]pub struct HarComparison {
metrics_value : Array[HarMetricDelta]
hosts_value : Array[HarBucketDelta]
} derive(Eq, Debug)fn HarContent::new(size : Double, mime_type : String, compression? : Double, text? : String, encoding? : String, comment? : String) -> Result[HarContent, HarError]pub struct HarDocument {
version_value : String
creator_value : HarSoftware
browser_value : HarSoftware?
pages_value : Array[HarPage]
entries_value : Array[HarEntry]
comment_value : String?
} derive(Eq, Debug)pub struct HarEntry {
page_ref_value : String?
started_datetime_value : String
time_value : Double
request_value : HarRequest
response_value : HarResponse
cache_value : HarCache
timings_value : HarTimings
server_ip_value : String?
connection_value : String?
comment_value : String?
} derive(Eq, Debug)pub(all) enum HarErrorCode {
InvalidJson
ExpectedObject
ExpectedArray
ExpectedString
ExpectedNumber
ExpectedBoolean
MissingField
InvalidField
InvalidVersion
InvalidUrl
InvalidMethod
InvalidStatus
InvalidTiming
InvalidSize
InvalidDateTime
InvalidEncoding
LimitExceeded
DuplicateIdentifier
MissingPageReference
ValidationFailure
} derive(Eq, Debug)pub struct HarFilter {
host_value : String?
minimum_status_value : Double?
maximum_status_value : Double?
minimum_duration_value : Double?
maximum_duration_value : Double?
page_ref_value : String?
secure_only_value : Bool
methods_value : Array[String]
content_types_value : Array[String]
} derive(Eq, Debug)pub struct HarPage {
started_datetime_value : String
id_value : String
title_value : String
page_timings_value : HarPageTimings
comment_value : String?
} derive(Eq, Debug)fn HarPageTimings::new(on_content_load? : Double, on_load? : Double, comment? : String) -> Result[HarPageTimings, HarError]pub struct HarPostData {
mime_type_value : String
params_value : Array[HarPostParam]
text_value : String?
comment_value : String?
} derive(Eq, Debug)fn HarPostData::new(mime_type : String, params? : Array[HarPostParam], text? : String, comment? : String) -> HarPostDatafn HarPostParam::new(name : String, value? : String, file_name? : String, content_type? : String, comment? : String) -> HarPostParamfn HarRedactionPolicy::with_replacement(self : HarRedactionPolicy, replacement : String) -> HarRedactionPolicypub struct HarRequest {
method_value : String
url_value : String
http_version_value : String
cookies_value : Array[HarCookie]
headers_value : Array[HarNameValue]
query_value : Array[HarNameValue]
post_data_value : HarPostData?
headers_size_value : Double
body_size_value : Double
comment_value : String?
} derive(Eq, Debug)pub struct HarResponse {
status_value : Double
status_text_value : String
http_version_value : String
cookies_value : Array[HarCookie]
headers_value : Array[HarNameValue]
content_value : HarContent
redirect_url_value : String
headers_size_value : Double
body_size_value : Double
comment_value : String?
} derive(Eq, Debug)fn HarSoftware::new(name : String, version : String, comment? : String) -> Result[HarSoftware, HarError]pub struct HarStatistics {
entry_count_value : Int
page_count_value : Int
successful_count_value : Int
redirect_count_value : Int
error_count_value : Int
secure_count_value : Int
cached_count_value : Int
unknown_body_size_count_value : Int
request_bytes_value : Double
response_bytes_value : Double
decoded_bytes_value : Double
duration_value : Double
hosts_value : Array[HarBucket]
status_classes_value : Array[HarBucket]
content_types_value : Array[HarBucket]
} derive(Eq, Debug)fn HarTimings::new(blocked? : Double, dns? : Double, connect? : Double, send : Double, wait : Double, receive : Double, ssl? : Double, comment? : String) -> Result[HarTimings, HarError]fn HarValidationPolicy::new(timing_tolerance : Double, require_absolute_urls : Bool, require_page_references : Bool) -> Result[HarValidationPolicy, HarError]fn parse_har_batch(inputs : Array[HarBatchInput], max_items : Int, max_total_input_bytes : Int, limits? : HarLimits) -> Result[HarBatchResult, HarError]Validated HAR 1.2 parser and performance analysis toolkit for MoonBit