AppFlowy/frontend/rust-lib/flowy-user/src/event.rs

28 lines
670 B
Rust
Raw Normal View History

use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
2021-08-30 14:44:17 +00:00
use strum_macros::Display;
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
2021-12-14 10:04:51 +00:00
#[event_err = "FlowyError"]
pub enum UserEvent {
#[event()]
2021-12-14 07:31:44 +00:00
InitUser = 0,
2021-08-30 14:44:17 +00:00
2021-09-04 08:53:58 +00:00
#[event(input = "SignInRequest", output = "UserProfile")]
2021-12-14 07:31:44 +00:00
SignIn = 1,
2021-08-30 14:44:17 +00:00
2021-09-04 08:53:58 +00:00
#[event(input = "SignUpRequest", output = "UserProfile")]
2021-12-14 07:31:44 +00:00
SignUp = 2,
2021-08-30 14:44:17 +00:00
#[event(passthrough)]
2021-12-14 07:31:44 +00:00
SignOut = 3,
2021-08-30 14:44:17 +00:00
2021-08-31 15:01:46 +00:00
#[event(input = "UpdateUserRequest")]
2021-12-14 07:31:44 +00:00
UpdateUser = 4,
2021-09-17 11:03:46 +00:00
#[event(output = "UserProfile")]
2021-12-14 07:31:44 +00:00
GetUserProfile = 5,
#[event(output = "UserProfile")]
2021-12-14 07:31:44 +00:00
CheckUser = 6,
}