Skip to content

Instantly share code, notes, and snippets.

@btakita
Created May 18, 2011 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btakita/979394 to your computer and use it in GitHub Desktop.
Save btakita/979394 to your computer and use it in GitHub Desktop.
user service architecture meeting
namespace rb TcUser.Thrift
namespace py userservice
exception UserGetError {
1: string reason
}
exception UserCreateError {
1: map<string,list<string>> errors
}
exception UserLoginError {
1: string reason
}
exception LeadSetActiveGetError {
1: string reason
}
struct User {
1: string id = "",
2: string email,
3: string display_name,
4: bool opt_in
}
struct PasswordSetData {
1: User user,
2: string password,
3: string password_confirmation
}
struct Lead {
1: string user_id,
2: Vehicle vehicle,
3: Prospect prospect,
4: Dealer dealer
}
struct Prospect {
1: string id = "",
2: string email,
3: string first_name,
4: string last_name,
5: string address,
6: string city,
7: string state,
8: string zip,
9: string phone_number,
10: string comments
}
struct DealershipVehicle {
1: string dealership_id,
2: string incentives,
3: i32 last_viewed_price,
4: i32 lock_price
}
struct LeadSet {
1: User user,
2: string trim_id,
3: string unsubscribe_token,
4: string options,
5: string interior_color_id,
6: string exterior_color_id,
7: list<DealershipVehicle> dealership_vehicles
}
struct ActiveLeadSets {
1: list<LeadSet> lead_sets
}
service UserService {
User user_get(1:string session_id, 2:string user_id) throws (1:UserGetError error),
User user_create(1:string session_id, 2:PasswordSetData user_credential) throws (1:UserCreateError error),
Lead lead_create(1:string session_id, 2:Lead lead),
bool user_password_set(1:string session_id, 2:PasswordSetData user_credential),
User user_login(1:string session_id, 2:string email, 3:string password) throws (1:UserLoginError error),
User user_login_with_token(1:string session_id, 2:string token) throws (1:UserLoginError error),
ActiveLeadSets lead_set_active_get(1:string begin_date, 2:string end_date) throws (1:LeadSetActiveGetError error),
bool deals_last_notified_price_set(1:string user_id, 2:string dealership_id, 3:string vehicle_id, 4:i32 last_viewed_price)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment