github.com/tada-team/tdproto@v1.51.57/tdapi/resp.go (about) 1 package tdapi 2 3 import "github.com/tada-team/tdproto" 4 5 // Server response 6 type Resp struct { 7 // Server side work time 8 DebugTime string `json:"_time,omitempty"` 9 10 // Request status 11 Ok bool `json:"ok"` 12 13 // Result only if ok is true) 14 Result interface{} `json:"result,omitempty"` 15 16 // Error (only if ok is false) 17 Error Err `json:"error,omitempty"` 18 19 // Error (only if ok is false and Error is 'InvalidData') 20 Details map[string]string `json:"details,omitempty"` 21 22 // Reason (only if ok is false and Error is `AccessDenied`) 23 Reason string `json:"reason,omitempty"` 24 25 // Reason markup (only if ok is false and Error is `AccessDenied`) 26 Markup []tdproto.MarkupEntity `json:"markup,omitempty"` 27 }