Struct got_ya_id::apps::user::models::OauthGgUser[][src]

pub struct OauthGgUser {
    pub id: i32,
    pub email: String,
    pub name: String,
    pub first_name: Option<String>,
    pub family_name: Option<String>,
    pub is_verified: bool,
    pub is_active: bool,
    pub created_at: NaiveDateTime,
    // some fields omitted
}

Service Oauth User Object Holds user social-authenticated user data

Fields

id: i32email: Stringname: Stringfirst_name: Option<String>family_name: Option<String>is_verified: boolis_active: boolcreated_at: NaiveDateTime

Implementations

impl OauthGgUser[src]

pub fn register_as_third_party(
    usr_data: &GoogleUser
) -> Result<Option<(OauthGgUser, User)>, Box<dyn stdError>>
[src]

Registers a user account using Oauth from a third party account

Arguments

usr_data: GoogleUser data holding the user account profile info

Retuns

  • None if account id exists
  • OauthGgUser: Newly registered account data

Trait Implementations

impl<'update> AsChangeset for &'update OauthGgUser[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<email, &'update String>, Eq<name, &'update String>, Option<Eq<first_name, &'update String>>, Option<Eq<family_name, &'update String>>, Eq<is_verified, &'update bool>, Option<Eq<picture, &'update String>>, Option<Eq<locale, &'update String>>, Eq<acc_id, &'update String>, Eq<is_active, &'update bool>, Eq<provider, &'update String>, Eq<provider_verified, &'update bool>, Eq<created_at, &'update NaiveDateTime>, Eq<updated_at, &'update NaiveDateTime>) as AsChangeset>::Changeset

The update statement this type represents

impl<'update> AsChangeset for OauthGgUser[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<email, String>, Eq<name, String>, Option<Eq<first_name, String>>, Option<Eq<family_name, String>>, Eq<is_verified, bool>, Option<Eq<picture, String>>, Option<Eq<locale, String>>, Eq<acc_id, String>, Eq<is_active, bool>, Eq<provider, String>, Eq<provider_verified, bool>, Eq<created_at, NaiveDateTime>, Eq<updated_at, NaiveDateTime>) as AsChangeset>::Changeset

The update statement this type represents

impl<'de> Deserialize<'de> for OauthGgUser[src]

impl HasTable for OauthGgUser[src]

type Table = table

The table this type is associated with.

impl<'ident> Identifiable for &'ident OauthGgUser[src]

type Id = &'ident i32

The type of this struct’s identifier. Read more

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for OauthGgUser where
    (i32, String, String, Option<String>, Option<String>, bool, Option<String>, Option<String>, String, bool, String, bool, NaiveDateTime, NaiveDateTime): Queryable<__ST, __DB>, 
[src]

type Row = <(i32, String, String, Option<String>, Option<String>, bool, Option<String>, Option<String>, String, bool, String, bool, NaiveDateTime, NaiveDateTime) as Queryable<__ST, __DB>>::Row

The Rust type you’d like to map from. Read more

impl Serialize for OauthGgUser[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromPy<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoPy<U> for T where
    U: FromPy<T>, 
[src]

impl<T> IntoSql for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,