-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
namespace go api | ||
|
||
struct BaseResp { | ||
1: i64 code, | ||
2: string msg, | ||
} | ||
|
||
struct User{ | ||
1:i64 id, | ||
2:string account, | ||
3:string name, | ||
} | ||
|
||
struct Picture{ | ||
1:i64 id, | ||
2:string url, | ||
3:string href, | ||
4:string text, | ||
5:i64 pic_type, | ||
6:i64 show_times, | ||
7:i64 point_times, | ||
8:i64 duration, | ||
9:i64 s_type, | ||
10:i64 frequency, | ||
} | ||
|
||
struct RegisterRequest { | ||
1: required string account, | ||
2: required string name, | ||
3: required string password, | ||
} | ||
|
||
struct RegisterResponse { | ||
1: BaseResp base, | ||
2: optional i64 user_id, | ||
} | ||
|
||
struct LoginRequest { | ||
1: string account, | ||
2: string password, | ||
} | ||
|
||
struct LoginResponse { | ||
1: BaseResp base, | ||
2: optional string data, | ||
} | ||
|
||
service UserService { | ||
LoginResponse Login(1: LoginRequest req)(api.post="/launch_screen/api/login"), | ||
|
||
//test for backend | ||
RegisterResponse Register(1: RegisterRequest req)(api.post="/launch_screen/api/register"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace go launch_screen | ||
include"model.thrift" | ||
|
||
struct CreateImageRequest { | ||
1: required i64 pic_type,//1为空,2为页面跳转,3为app跳转 | ||
2: optional i64 duration, | ||
3: optional string href,//连接 | ||
4: required binary image, | ||
5: required string start_at, | ||
6: required string end_at, | ||
7: required i64 s_type, | ||
8: required i64 frequency, | ||
9: required i64 start_time,//比如6表示6点 | ||
10:required i64 end_time, | ||
11:required string text,//描述图片 | ||
12:string regex,//正则匹配项 | ||
|
||
13:i64 user_id,//get by token | ||
} | ||
|
||
struct CreateImageResponse{ | ||
1:model.BaseResp base, | ||
2:optional model.Picture picture, | ||
} | ||
|
||
struct GetImageRequest{ | ||
1:required i64 picture_id, | ||
|
||
2:i64 user_id, | ||
} | ||
|
||
struct GetImageResponse{ | ||
1:required i64 picture_id, | ||
|
||
2:i64 user_id, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace go model | ||
|
||
struct BaseResp { | ||
1: i64 code, | ||
2: string msg, | ||
} | ||
|
||
struct User{ | ||
1:i64 id, | ||
2:string account, | ||
3:string name, | ||
} | ||
|
||
struct Picture{ | ||
1:i64 id, | ||
2:string url, | ||
3:string href, | ||
4:string text, | ||
5:i64 pic_type, | ||
6:i64 show_times, | ||
7:i64 point_times, | ||
8:i64 duration, | ||
9:i64 s_type, | ||
10:i64 frequency, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace go user | ||
|
||
include"model.thrift" | ||
|
||
struct RegisterRequest { | ||
1: required string account, | ||
2: required string name, | ||
3: required string password, | ||
} | ||
|
||
struct RegisterResponse { | ||
1: model.BaseResp base, | ||
2: optional i64 user_id, | ||
} | ||
|
||
struct LoginRequest { | ||
1: string account, | ||
2: string password, | ||
} | ||
|
||
struct LoginResponse { | ||
1: model.BaseResp base, | ||
2: optional string token, | ||
} | ||
|
||
service UserService { | ||
LoginResponse Login(1: LoginRequest req)(api.post="/launch_screen/api/login"), | ||
|
||
//test for backend | ||
RegisterResponse Register(1: RegisterRequest req)(api.post="/launch_screen/api/register"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters