-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
fbbe52c
commit 73b3662
Showing
32 changed files
with
900 additions
and
226 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
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
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ func main() { | |
if err != nil { | ||
panic(err) | ||
} | ||
media.NewHttpServer(infra) | ||
media.NewServer(infra).Start() | ||
} |
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
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
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 |
---|---|---|
@@ -1,20 +1,15 @@ | ||
package media | ||
|
||
type Usage int | ||
import monify "monify/protobuf/gen/go" | ||
|
||
const ( | ||
Undefined Usage = iota | ||
UserAvatar | ||
GroupAvatar | ||
) | ||
|
||
func Parse(str string) Usage { | ||
func Parse(str string) monify.Usage { | ||
println(str) | ||
switch str { | ||
case "userAvatar": | ||
return UserAvatar | ||
return monify.Usage_UserAvatar | ||
case "groupAvatar": | ||
return GroupAvatar | ||
return monify.Usage_GroupAvatar | ||
default: | ||
return Undefined | ||
return monify.Usage_Undefined | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
DROP TABLE TmpImage; | ||
DROP TABLE ConfirmedImage; | ||
DROP TABLE tmp_file; | ||
DROP TABLE confirmed_file; |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
CREATE TABLE TmpImage( | ||
imgId uuid PRIMARY KEY, | ||
path varchar(100) NOT NULL , | ||
expected_usage int8 NOT NULL , | ||
uploader uuid references user_identity(user_id) NOT NULL, | ||
uploaded_at timestamp NOT NULL | ||
CREATE TABLE tmp_file( | ||
fileId uuid PRIMARY KEY, | ||
path varchar(100) NOT NULL , | ||
expected_usage int8 NOT NULL , | ||
uploader uuid references user_identity(user_id) NOT NULL, | ||
uploaded_at timestamp NOT NULL | ||
); | ||
|
||
CREATE TABLE ConfirmedImage( | ||
imgId uuid PRIMARY KEY, | ||
path varchar(100) NOT NULL , | ||
usage int8 NOT NULL , | ||
uploader uuid references user_identity(user_id) NOT NULL, | ||
uploaded_at timestamp NOT NULL, | ||
confirmed_at timestamp NOT NULL | ||
CREATE TABLE confirmed_file( | ||
fileId uuid PRIMARY KEY, | ||
path varchar(100) NOT NULL , | ||
usage int8 NOT NULL , | ||
uploader uuid references user_identity(user_id) NOT NULL, | ||
uploaded_at timestamp NOT NULL, | ||
confirmed_at timestamp NOT NULL | ||
) | ||
|
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 @@ | ||
ALTER TABLE user_identity DROP COLUMN avatar_url; |
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 @@ | ||
ALTER TABLE user_identity ADD COLUMN avatar_url VARCHAR(255) DEFAULT '/default_avatar.png' NOT NULL; |
Oops, something went wrong.