github.com/blend/go-sdk@v1.20220411.3/status/types.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package status 9 10 import "time" 11 12 // 13 // API types 14 // 15 16 // FreeformResult is a json result from the freeform check. 17 type FreeformResult map[string]bool 18 19 // TrackedActionsResult are tracked actions details. 20 type TrackedActionsResult struct { 21 Status Signal `json:"status"` 22 SubSystems map[string]Info `json:"subsystems"` 23 } 24 25 // Info wraps tracked details. 26 type Info struct { 27 Name string `json:"name"` 28 Status Signal `json:"status"` 29 Details Details `json:"details"` 30 } 31 32 // Details holds the details about the status results. 33 type Details struct { 34 ErrorCount int `json:"errorCount"` 35 RequestCount int `json:"requestCount"` 36 ErrorBreakdown map[string]int `json:"errorBreakdown"` 37 } 38 39 // 40 // Internal Types 41 // 42 43 // RequestInfo is a type. 44 type RequestInfo struct { 45 RequestTime time.Time 46 } 47 48 // ErrorInfo is a type. 49 type ErrorInfo struct { 50 RequestInfo 51 Args interface{} 52 } 53 54 // freeformCheckResult is a result from a freeform check status. 55 type freeformCheckResult struct { 56 ServiceName string 57 Ok bool 58 Err error 59 }