Debian Codegraph @

interfaces.go

raw
1 package raven
2
3 // https://docs.getsentry.com/hosted/clientdev/interfaces/#message-interface
4 type Message struct {
5 // Required
6 Message string `json:"message"`
7
8 // Optional
9 Params []interface{} `json:"params,omitempty"`
10 }
11
12 func (m *Message) Class() string { return "logentry" }
13
14 // https://docs.getsentry.com/hosted/clientdev/interfaces/#template-interface
15 type Template struct {
16 // Required
17 Filename string `json:"filename"`
18 Lineno int `json:"lineno"`
19 ContextLine string `json:"context_line"`
20
21 // Optional
22 PreContext []string `json:"pre_context,omitempty"`
23 PostContext []string `json:"post_context,omitempty"`
24 AbsolutePath string `json:"abs_path,omitempty"`
25 }
26
27 func (t *Template) Class() string { return "template" }
28
29 // https://docs.getsentry.com/hosted/clientdev/interfaces/#context-interfaces
30 type User struct {
31 // All fields are optional
32 ID string `json:"id,omitempty"`
33 Username string `json:"username,omitempty"`
34 Email string `json:"email,omitempty"`
35 IP string `json:"ip_address,omitempty"`
36 }
37
38 func (h *User) Class() string { return "user" }
39
40 // https://docs.getsentry.com/hosted/clientdev/interfaces/#context-interfaces
41 type Query struct {
42 // Required
43 Query string `json:"query"`
44
45 // Optional
46 Engine string `json:"engine,omitempty"`
47 }
48
49 func (q *Query) Class() string { return "query" }