-
Notifications
You must be signed in to change notification settings - Fork 1
Core dumps repository #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| package entities | ||
|
|
||
| import "time" | ||
| import ( | ||
| "time" | ||
|
|
||
| "go.mongodb.org/mongo-driver/bson/primitive" | ||
| ) | ||
|
|
||
| type CoreDumpStatus int | ||
|
|
||
|
|
@@ -12,53 +16,60 @@ const ( | |
| ) | ||
|
|
||
| type CoreDump struct { | ||
| osInfo *OSInfo | ||
| appInfo *AppInfo | ||
| status CoreDumpStatus | ||
| data string | ||
| timestamp time.Time | ||
| ID primitive.ObjectID | ||
|
||
| OsInfo *OSInfo | ||
| AppInfo *AppInfo | ||
| Status CoreDumpStatus | ||
| Data string | ||
| Timestamp time.Time | ||
| Extensions []Extensions | ||
|
||
| } | ||
|
|
||
| type Extensions struct { | ||
|
||
| Key string | ||
| Value string | ||
| } | ||
|
|
||
| func NewCoreDump() *CoreDump { | ||
| return &CoreDump{} | ||
| } | ||
|
|
||
| func (c *CoreDump) OSInfo() *OSInfo { | ||
| return c.osInfo | ||
| func (c *CoreDump) GetOSInfo() *OSInfo { | ||
| return c.OsInfo | ||
| } | ||
|
|
||
| func (c *CoreDump) AppInfo() *AppInfo { | ||
| return c.appInfo | ||
| func (c *CoreDump) GetAppInfo() *AppInfo { | ||
| return c.AppInfo | ||
| } | ||
|
|
||
| func (c *CoreDump) Status() CoreDumpStatus { | ||
| return c.status | ||
| func (c *CoreDump) GetStatus() CoreDumpStatus { | ||
| return c.Status | ||
| } | ||
|
|
||
| func (c *CoreDump) Data() string { | ||
| return c.data | ||
| func (c *CoreDump) GetData() string { | ||
| return c.Data | ||
| } | ||
|
|
||
| func (c *CoreDump) Timestamp() time.Time { | ||
| return c.timestamp | ||
| func (c *CoreDump) GetTimestamp() time.Time { | ||
| return c.Timestamp | ||
| } | ||
|
|
||
| func (c *CoreDump) SetOSInfo(info *OSInfo) { | ||
| c.osInfo = info | ||
| c.OsInfo = info | ||
| } | ||
|
|
||
| func (c *CoreDump) SetAppInfo(info *AppInfo) { | ||
| c.appInfo = info | ||
| c.AppInfo = info | ||
| } | ||
|
|
||
| func (c *CoreDump) SetStatus(status CoreDumpStatus) { | ||
| c.status = status | ||
| c.Status = status | ||
| } | ||
|
|
||
| func (c *CoreDump) SetData(data string) { | ||
| c.data = data | ||
| c.Data = data | ||
| } | ||
|
|
||
| func (c *CoreDump) SetTimestamp(timestamp time.Time) { | ||
| c.timestamp = timestamp | ||
| c.Timestamp = timestamp | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,35 @@ | ||
| package entities | ||
|
|
||
| type OSInfo struct { | ||
| name string | ||
| version string | ||
| architecture string | ||
| Name string | ||
| Version string | ||
| Architecture string | ||
| } | ||
|
|
||
| func NewOSInfo() *OSInfo { | ||
| return &OSInfo{} | ||
| } | ||
|
|
||
| func (os *OSInfo) Name() string { | ||
| return os.name | ||
| func (os *OSInfo) GetName() string { | ||
| return os.Name | ||
| } | ||
|
|
||
| func (os *OSInfo) Version() string { | ||
| return os.version | ||
| func (os *OSInfo) GetVersion() string { | ||
| return os.Version | ||
| } | ||
|
|
||
| func (os *OSInfo) Architecture() string { | ||
| return os.architecture | ||
| func (os *OSInfo) GetArchitecture() string { | ||
| return os.Architecture | ||
| } | ||
|
|
||
| func (os *OSInfo) SetName(name string) { | ||
| os.name = name | ||
| os.Name = name | ||
| } | ||
|
|
||
| func (os *OSInfo) SetVersion(version string) { | ||
| os.version = version | ||
| os.Version = version | ||
| } | ||
|
|
||
| func (os *OSInfo) SetArchitecture(architecture string) { | ||
| os.architecture = architecture | ||
| os.Architecture = architecture | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git - что-то лишнее)
И давай название переменной сделаем DatabaseTimeout
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right)
CRASHER_DATABASE_TIMEOUT or DATABASE_TIMEOUT?