Create Rust Project

This commit is contained in:
GuilhermeWerner
2021-02-24 09:12:23 -03:00
parent b456f20a4f
commit 36df99c7e0
13 changed files with 230 additions and 0 deletions

35
Source/Account/Auth.rs Normal file
View File

@ -0,0 +1,35 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn Login(name: *const c_char, password: *const c_char) {}
pub fn Logout() {}
pub fn Refresh() {}
pub fn Register(name: *const c_char, email: *const c_char, password: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn Login(name: *const c_char, password: *const c_char) {
super::Login(name, password);
}
#[no_mangle]
pub extern "C" fn Logout() {
super::Logout();
}
#[no_mangle]
pub extern "C" fn Refresh() {
super::Refresh();
}
#[no_mangle]
pub extern "C" fn Register(name: *const c_char, email: *const c_char, password: *const c_char) {
super::Register(name, email, password);
}
}

21
Source/Account/Device.rs Normal file
View File

@ -0,0 +1,21 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn GetDevice(id: *const c_char) {}
pub fn GetUserDevices(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn GetDevice(id: *const c_char) {
super::GetDevice(id);
}
#[no_mangle]
pub extern "C" fn GetUserDevices(id: *const c_char) {
super::GetUserDevices(id);
}
}

21
Source/Account/Email.rs Normal file
View File

@ -0,0 +1,21 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn GetEmail(address: *const c_char) {}
pub fn GetUserEmails(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn GetEmail(address: *const c_char) {
super::GetEmail(address);
}
#[no_mangle]
pub extern "C" fn GetUserEmails(id: *const c_char) {
super::GetUserEmails(id);
}
}

21
Source/Account/Role.rs Normal file
View File

@ -0,0 +1,21 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn GetRole(id: *const c_char) {}
pub fn GetUserRoles(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn GetRole(id: *const c_char) {
super::GetRole(id);
}
#[no_mangle]
pub extern "C" fn GetUserRoles(id: *const c_char) {
super::GetUserRoles(id);
}
}

14
Source/Account/User.rs Normal file
View File

@ -0,0 +1,14 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn GetUser(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn GetUser(id: *const c_char) {
super::GetUser(id);
}
}

6
Source/Account/mod.rs Normal file
View File

@ -0,0 +1,6 @@
// Copyright (c) TribuFu. All Rights Reserved
pub mod Auth;
pub mod Device;
pub mod Role;
pub mod User;