Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit fcce598

Browse files
authored
Merge pull request #34 from gedorinku/user_icon
ユーザーのアイコンのアップロード
2 parents 28e3799 + 31233db commit fcce598

17 files changed

+551
-115
lines changed

.env.ci

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@ OAUTH2_LOGIN_URL=http://localhost:8080/oauth/login
99
# for ridgepole
1010
DATABASE_URL_RIDGEPOLE=postgresql://postgres:@localhost/accounts?sslmode=disable
1111

12+
# for minio
13+
MINIO_ACCESS_KEY=youReallyNeedToChangeThis
14+
MINIO_SECRET_KEY=youReallyNeedToChangeThis
15+
MINIO_BROWSER=off
16+
1217
# for app
1318
DATABASE_URL=postgresql://postgres:@localhost/accounts?sslmode=disable
1419

20+
MINIO_PUBLIC_URL=http://localhost:9100
21+
MINIO_ENDPOINT=minio:9000
22+
MINIO_BUCKET_NAME=public
23+
1524
REDIS_ADDR=localhost:6379
1625

1726
DEBUG_LOG=true

.env.sample

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ OAUTH2_LOGIN_URL=http://localhost:8080/oauth/login
99
# for ridgepole
1010
DATABASE_URL_RIDGEPOLE=postgresql://postgres:@localhost/accounts?sslmode=disable
1111

12+
# for minio
13+
MINIO_ACCESS_KEY=youReallyNeedToChangeThis
14+
MINIO_SECRET_KEY=youReallyNeedToChangeThis
15+
MINIO_BROWSER=off
16+
1217
# for app
1318
DATABASE_URL=postgresql://postgres:@pg/accounts?sslmode=disable
1419
POSTGRES_PASSWORD=
1520

21+
MINIO_PUBLIC_URL=http://localhost:9100
22+
MINIO_ENDPOINT=minio:9000
23+
MINIO_BUCKET_NAME=public
24+
1625
REDIS_ADDR=redis:6379
1726

1827
DEBUG_LOG=true

Gopkg.lock

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/protos/users.proto

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ service UserService {
3939
body: "*"
4040
};
4141
}
42+
rpc UpdateUserIcon (UpdateUserIconRequest) returns (User) {
43+
option (google.api.http) = {
44+
post: "/user/icon"
45+
body: "*"
46+
};
47+
}
4248
rpc UpdatePassword (UpdatePasswordRequest) returns (google.protobuf.Empty) {
4349
option (google.api.http) = {
4450
put: "/user/password"
@@ -51,7 +57,7 @@ message User {
5157
string name = 2;
5258
string email = 3;
5359
string full_name = 4;
54-
string avatar_url = 5;
60+
string icon_url = 5;
5561
string description = 6;
5662
int32 grade = 7;
5763
bool left = 8;
@@ -100,6 +106,10 @@ message UpdateUserProfileRequest {
100106
ProfileScope profile_scope = 9 [(validator.field) = {is_in_enum : true}];
101107
}
102108

109+
message UpdateUserIconRequest {
110+
bytes image = 1;
111+
}
112+
103113
message UpdatePasswordRequest {
104114
string password = 1;
105115
string new_password = 2;

api/sessions.validator.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)