2015-02-04 22:37:26 +08:00
|
|
|
package events
|
|
|
|
|
|
2015-02-04 23:57:20 +08:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
2015-06-10 20:44:42 +08:00
|
|
|
// Events can be passed to external systems via for example AMQP
|
2015-02-04 22:37:26 +08:00
|
|
|
// Treat these events as basically DTOs so changes has to be backward compatible
|
|
|
|
|
|
2015-02-24 03:07:49 +08:00
|
|
|
type OrgCreated struct {
|
2015-02-04 23:57:20 +08:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-24 03:07:49 +08:00
|
|
|
type OrgUpdated struct {
|
2015-02-04 23:57:20 +08:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
2015-02-04 22:37:26 +08:00
|
|
|
}
|
2015-02-05 00:15:05 +08:00
|
|
|
|
|
|
|
|
type UserCreated struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Login string `json:"login"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-28 15:24:30 +08:00
|
|
|
type SignUpStarted struct {
|
2015-06-08 23:56:56 +08:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Email string `json:"email"`
|
2015-08-28 15:24:30 +08:00
|
|
|
Code string `json:"code"`
|
2015-06-08 23:56:56 +08:00
|
|
|
}
|
|
|
|
|
|
2015-08-27 19:59:58 +08:00
|
|
|
type SignUpCompleted struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-05 00:15:05 +08:00
|
|
|
type UserUpdated struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Login string `json:"login"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
}
|
2021-08-21 04:51:31 +08:00
|
|
|
|
|
|
|
|
type DataSourceDeleted struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
UID string `json:"uid"`
|
|
|
|
|
OrgID int64 `json:"org_id"`
|
|
|
|
|
}
|
2021-08-26 21:50:05 +08:00
|
|
|
|
2022-07-13 04:27:37 +08:00
|
|
|
type DataSourceSecretDeleted struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
UID string `json:"uid"`
|
|
|
|
|
OrgID int64 `json:"org_id"`
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-26 21:50:05 +08:00
|
|
|
type DataSourceCreated struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
UID string `json:"uid"`
|
|
|
|
|
OrgID int64 `json:"org_id"`
|
|
|
|
|
}
|
2022-06-18 01:10:49 +08:00
|
|
|
|
2024-08-13 18:26:26 +08:00
|
|
|
// FolderFullPathUpdated is emitted when the full path of the folder(s) is updated.
|
|
|
|
|
// For example, when the folder is renamed or moved to another folder.
|
|
|
|
|
// It does not contain the full path of the folders because calculating
|
|
|
|
|
// it requires more resources and not needed in the event at the moment.
|
|
|
|
|
type FolderFullPathUpdated struct {
|
2022-06-18 01:10:49 +08:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
ID int64 `json:"id"`
|
2024-08-13 18:26:26 +08:00
|
|
|
UIDs []string `json:"uids"`
|
2022-06-18 01:10:49 +08:00
|
|
|
OrgID int64 `json:"org_id"`
|
|
|
|
|
}
|