This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
event.form.pb.go
66 lines (61 loc) · 1.62 KB
/
event.form.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Code generated by protoc-gen-go-form. DO NOT EDIT.
// Source: event.proto
package pb
import (
url "net/url"
strconv "strconv"
urlenc "github.com/erda-project/erda-infra/pkg/urlenc"
pb "github.com/erda-project/erda-proto-go/oap/common/pb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the "github.com/erda-project/erda-infra/pkg/urlenc" package it is being compiled against.
var _ urlenc.URLValuesUnmarshaler = (*Event)(nil)
// Event implement urlenc.URLValuesUnmarshaler.
func (m *Event) UnmarshalURLValues(prefix string, values url.Values) error {
for key, vals := range values {
if len(vals) > 0 {
switch prefix + key {
case "eventID":
m.EventID = vals[0]
case "severity":
m.Severity = vals[0]
case "name":
m.Name = vals[0]
case "kind":
case "timeUnixNano":
val, err := strconv.ParseUint(vals[0], 10, 64)
if err != nil {
return err
}
m.TimeUnixNano = val
case "relations":
if m.Relations == nil {
m.Relations = &pb.Relation{}
}
case "relations.traceID":
if m.Relations == nil {
m.Relations = &pb.Relation{}
}
m.Relations.TraceID = vals[0]
case "relations.resID":
if m.Relations == nil {
m.Relations = &pb.Relation{}
}
m.Relations.ResID = vals[0]
case "relations.resType":
if m.Relations == nil {
m.Relations = &pb.Relation{}
}
m.Relations.ResType = vals[0]
case "relations.resourceKeys":
if m.Relations == nil {
m.Relations = &pb.Relation{}
}
m.Relations.ResourceKeys = vals
case "message":
m.Message = vals[0]
}
}
}
return nil
}