...
1 package errors
2
3 type EsodMetadata struct {
4 Reason string `json:"reason"`
5 Title string `json:"title"`
6 Subtitle string `json:"subtitle"`
7 Message string `json:"message"`
8 Info string `json:"info"`
9 }
10
11 func NewEsodMetadata() *EsodMetadata {
12 return &EsodMetadata{
13 Reason: "",
14 Title: "Error",
15 Subtitle: "Something went wrong",
16 Message: "We're sorry, but we couldn't process your request at this time. Please close this window and login again to continue.",
17 Info: "",
18 }
19 }
20
21 func (es *EsodMetadata) WithReason(r string) *EsodMetadata {
22 es.Reason = r
23 return es
24 }
25
26 func (es *EsodMetadata) WithTitle(t string) *EsodMetadata {
27 es.Title = t
28 return es
29 }
30
31 func (es *EsodMetadata) WithSubtitle(s string) *EsodMetadata {
32 es.Subtitle = s
33 return es
34 }
35
36 func (es *EsodMetadata) WithMessage(msg string) *EsodMetadata {
37 es.Message = msg
38 return es
39 }
40
41 func (es *EsodMetadata) WithInfo(i string) *EsodMetadata {
42 es.Info = i
43 return es
44 }
45
View as plain text