forked from Silverfish/proton-bridge
Other: Add more extensive logging
This commit is contained in:
@ -17,28 +17,49 @@
|
||||
|
||||
package events
|
||||
|
||||
import "github.com/ProtonMail/proton-bridge/v2/internal/vault"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/vault"
|
||||
)
|
||||
|
||||
type AllUsersLoaded struct {
|
||||
eventBase
|
||||
}
|
||||
|
||||
func (event AllUsersLoaded) String() string {
|
||||
return "AllUsersLoaded"
|
||||
}
|
||||
|
||||
type UserLoading struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserLoading) String() string {
|
||||
return fmt.Sprintf("UserLoading: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserLoadSuccess struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserLoadSuccess) String() string {
|
||||
return fmt.Sprintf("UserLoadSuccess: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserLoadFail struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
Error error
|
||||
}
|
||||
|
||||
func (event UserLoadFail) String() string {
|
||||
return fmt.Sprintf("UserLoadFail: UserID: %s, Error: %s", event.UserID, event.Error)
|
||||
}
|
||||
|
||||
type UserLoggedIn struct {
|
||||
@ -47,33 +68,58 @@ type UserLoggedIn struct {
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserLoggedIn) String() string {
|
||||
return fmt.Sprintf("UserLoggedIn: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserLoggedOut struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserLoggedOut) String() string {
|
||||
return fmt.Sprintf("UserLoggedOut: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserDeauth struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserDeauth) String() string {
|
||||
return fmt.Sprintf("UserDeauth: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserDeleted struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserDeleted) String() string {
|
||||
return fmt.Sprintf("UserDeleted: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type UserChanged struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
}
|
||||
|
||||
func (event UserChanged) String() string {
|
||||
return fmt.Sprintf("UserChanged: UserID: %s", event.UserID)
|
||||
}
|
||||
|
||||
type AddressModeChanged struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
UserID string
|
||||
|
||||
AddressMode vault.AddressMode
|
||||
}
|
||||
|
||||
func (event AddressModeChanged) String() string {
|
||||
return fmt.Sprintf("AddressModeChanged: UserID: %s, AddressMode: %s", event.UserID, event.AddressMode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user