2015-02-04 08:37:26 -06:00
|
|
|
package events
|
|
|
|
|
2015-02-04 09:57:20 -06:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2015-06-10 07:44:42 -05:00
|
|
|
// Events can be passed to external systems via for example AMQP
|
2015-02-04 08:37:26 -06:00
|
|
|
// Treat these events as basically DTOs so changes has to be backward compatible
|
|
|
|
|
2015-02-23 13:07:49 -06:00
|
|
|
type OrgCreated struct {
|
2015-02-04 09:57:20 -06:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2015-02-23 13:07:49 -06:00
|
|
|
type OrgUpdated struct {
|
2015-02-04 09:57:20 -06:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
2015-02-04 08:37:26 -06:00
|
|
|
}
|
2015-02-04 10:15:05 -06: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 02:24:30 -05:00
|
|
|
type SignUpStarted struct {
|
2015-06-08 10:56:56 -05:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
Email string `json:"email"`
|
2015-08-28 02:24:30 -05:00
|
|
|
Code string `json:"code"`
|
2015-06-08 10:56:56 -05:00
|
|
|
}
|
|
|
|
|
2015-08-27 06:59:58 -05:00
|
|
|
type SignUpCompleted struct {
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
}
|
|
|
|
|
2015-02-04 10:15:05 -06: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-20 15:51:31 -05: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 08:50:05 -05:00
|
|
|
|
2022-07-12 15:27:37 -05: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 08:50:05 -05: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-17 12:10:49 -05:00
|
|
|
|
2022-08-01 18:28:38 -05:00
|
|
|
type FolderTitleUpdated struct {
|
2022-06-17 12:10:49 -05:00
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
Title string `json:"name"`
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
UID string `json:"uid"`
|
|
|
|
OrgID int64 `json:"org_id"`
|
|
|
|
}
|