-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from depromeet/dev
- Loading branch information
Showing
173 changed files
with
5,636 additions
and
13 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,52 @@ | ||
name: Knock Knock Build | ||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java-version: [ 11 ] | ||
outputs: | ||
version: ${{ steps.get_version.outputs.BRANCH_NAME }} | ||
|
||
steps: | ||
- name: Check Out The Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'zulu' | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
|
||
- name: Gradle Build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: | | ||
build -x test | ||
--no-daemon | ||
- name: Login to ECR | ||
id: ecr | ||
uses: elgohr/ecr-login-action@master | ||
with: | ||
access_key: ${{ secrets.AWS_ACCESS_KEY }} | ||
secret_access_key: ${{ secrets.AWS_SECRET_KEY }} | ||
region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: knock-knock | ||
username: ${{ steps.ecr.outputs.username }} | ||
password: ${{ steps.ecr.outputs.password }} | ||
registry: ${{ steps.ecr.outputs.registry }} | ||
tags: ${{ steps.get_version.outputs.VERSION }} |
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 |
---|---|---|
|
@@ -35,3 +35,5 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
.env |
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,7 @@ | ||
FROM openjdk:11.0.6-jre | ||
|
||
EXPOSE 8080 | ||
|
||
COPY ./build/libs/*.jar app.jar | ||
|
||
ENTRYPOINT ["java","-jar","/app.jar"] |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '3.7' | ||
services: | ||
redis: | ||
image: 'redis:alpine' | ||
ports: | ||
- '6379:6379' |
76 changes: 76 additions & 0 deletions
76
src/main/generated/io/github/depromeet/knockknockbackend/domain/group/domain/QGroup.java
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,76 @@ | ||
package io.github.depromeet.knockknockbackend.domain.group.domain; | ||
|
||
import static com.querydsl.core.types.PathMetadataFactory.*; | ||
|
||
import com.querydsl.core.types.dsl.*; | ||
|
||
import com.querydsl.core.types.PathMetadata; | ||
import javax.annotation.processing.Generated; | ||
import com.querydsl.core.types.Path; | ||
import com.querydsl.core.types.dsl.PathInits; | ||
|
||
|
||
/** | ||
* QGroup is a Querydsl query type for Group | ||
*/ | ||
@Generated("com.querydsl.codegen.DefaultEntitySerializer") | ||
public class QGroup extends EntityPathBase<Group> { | ||
|
||
private static final long serialVersionUID = -686918346L; | ||
|
||
private static final PathInits INITS = PathInits.DIRECT2; | ||
|
||
public static final QGroup group = new QGroup("group1"); | ||
|
||
public final io.github.depromeet.knockknockbackend.global.database.QBaseTimeEntity _super = new io.github.depromeet.knockknockbackend.global.database.QBaseTimeEntity(this); | ||
|
||
public final StringPath backgroundImagePath = createString("backgroundImagePath"); | ||
|
||
public final QCategory category; | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate; | ||
|
||
public final StringPath description = createString("description"); | ||
|
||
public final EnumPath<GroupType> groupType = createEnum("groupType", GroupType.class); | ||
|
||
public final QGroupUsers groupUsers; | ||
|
||
public final NumberPath<Long> id = createNumber("id", Long.class); | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate; | ||
|
||
public final ListPath<io.github.depromeet.knockknockbackend.domain.notification.domain.Notification, io.github.depromeet.knockknockbackend.domain.notification.domain.QNotification> notifications = this.<io.github.depromeet.knockknockbackend.domain.notification.domain.Notification, io.github.depromeet.knockknockbackend.domain.notification.domain.QNotification>createList("notifications", io.github.depromeet.knockknockbackend.domain.notification.domain.Notification.class, io.github.depromeet.knockknockbackend.domain.notification.domain.QNotification.class, PathInits.DIRECT2); | ||
|
||
public final BooleanPath publicAccess = createBoolean("publicAccess"); | ||
|
||
public final StringPath thumbnailPath = createString("thumbnailPath"); | ||
|
||
public final StringPath title = createString("title"); | ||
|
||
public QGroup(String variable) { | ||
this(Group.class, forVariable(variable), INITS); | ||
} | ||
|
||
public QGroup(Path<? extends Group> path) { | ||
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); | ||
} | ||
|
||
public QGroup(PathMetadata metadata) { | ||
this(metadata, PathInits.getFor(metadata, INITS)); | ||
} | ||
|
||
public QGroup(PathMetadata metadata, PathInits inits) { | ||
this(Group.class, metadata, inits); | ||
} | ||
|
||
public QGroup(Class<? extends Group> type, PathMetadata metadata, PathInits inits) { | ||
super(type, metadata, inits); | ||
this.category = inits.isInitialized("category") ? new QCategory(forProperty("category")) : null; | ||
this.groupUsers = inits.isInitialized("groupUsers") ? new QGroupUsers(forProperty("groupUsers")) : null; | ||
} | ||
|
||
} | ||
|
64 changes: 64 additions & 0 deletions
64
src/main/generated/io/github/depromeet/knockknockbackend/domain/group/domain/QGroupUser.java
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,64 @@ | ||
package io.github.depromeet.knockknockbackend.domain.group.domain; | ||
|
||
import static com.querydsl.core.types.PathMetadataFactory.*; | ||
|
||
import com.querydsl.core.types.dsl.*; | ||
|
||
import com.querydsl.core.types.PathMetadata; | ||
import javax.annotation.processing.Generated; | ||
import com.querydsl.core.types.Path; | ||
import com.querydsl.core.types.dsl.PathInits; | ||
|
||
|
||
/** | ||
* QGroupUser is a Querydsl query type for GroupUser | ||
*/ | ||
@Generated("com.querydsl.codegen.DefaultEntitySerializer") | ||
public class QGroupUser extends EntityPathBase<GroupUser> { | ||
|
||
private static final long serialVersionUID = 334318113L; | ||
|
||
private static final PathInits INITS = PathInits.DIRECT2; | ||
|
||
public static final QGroupUser groupUser = new QGroupUser("groupUser"); | ||
|
||
public final io.github.depromeet.knockknockbackend.global.database.QBaseTimeEntity _super = new io.github.depromeet.knockknockbackend.global.database.QBaseTimeEntity(this); | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate; | ||
|
||
public final QGroup group; | ||
|
||
public final NumberPath<Long> id = createNumber("id", Long.class); | ||
|
||
public final BooleanPath isHost = createBoolean("isHost"); | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate; | ||
|
||
public final io.github.depromeet.knockknockbackend.domain.user.domain.QUser user; | ||
|
||
public QGroupUser(String variable) { | ||
this(GroupUser.class, forVariable(variable), INITS); | ||
} | ||
|
||
public QGroupUser(Path<? extends GroupUser> path) { | ||
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); | ||
} | ||
|
||
public QGroupUser(PathMetadata metadata) { | ||
this(metadata, PathInits.getFor(metadata, INITS)); | ||
} | ||
|
||
public QGroupUser(PathMetadata metadata, PathInits inits) { | ||
this(GroupUser.class, metadata, inits); | ||
} | ||
|
||
public QGroupUser(Class<? extends GroupUser> type, PathMetadata metadata, PathInits inits) { | ||
super(type, metadata, inits); | ||
this.group = inits.isInitialized("group") ? new QGroup(forProperty("group"), inits.get("group")) : null; | ||
this.user = inits.isInitialized("user") ? new io.github.depromeet.knockknockbackend.domain.user.domain.QUser(forProperty("user")) : 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
34 changes: 34 additions & 0 deletions
34
.../github/depromeet/knockknockbackend/domain/credential/domain/RefreshTokenRedisEntity.java
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,34 @@ | ||
package io.github.depromeet.knockknockbackend.domain.credential.domain; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.redis.core.RedisHash; | ||
import org.springframework.data.redis.core.TimeToLive; | ||
import org.springframework.data.redis.core.index.Indexed; | ||
|
||
@RedisHash(value = "refreshToken") | ||
@Getter | ||
public class RefreshTokenRedisEntity { | ||
|
||
@Id | ||
private String id; | ||
|
||
@Indexed | ||
private String refreshToken; | ||
|
||
@TimeToLive // TTL | ||
private Long ttl; | ||
|
||
@Builder | ||
public RefreshTokenRedisEntity(String id, String refreshToken, Long ttl) { | ||
this.id = id; | ||
this.refreshToken = refreshToken; | ||
this.ttl = ttl; | ||
} | ||
|
||
public void updateTTL(Long ttl) { | ||
this.ttl += ttl; | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...ckknockbackend/domain/credential/domain/repository/RefreshTokenRedisEntityRepository.java
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,9 @@ | ||
package io.github.depromeet.knockknockbackend.domain.credential.domain.repository; | ||
|
||
import io.github.depromeet.knockknockbackend.domain.credential.domain.RefreshTokenRedisEntity; | ||
import java.util.Optional; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface RefreshTokenRedisEntityRepository extends CrudRepository<RefreshTokenRedisEntity, String> { | ||
Optional<RefreshTokenRedisEntity> findByRefreshToken(String refreshToken); | ||
} |
14 changes: 14 additions & 0 deletions
14
...b/depromeet/knockknockbackend/domain/credential/exception/AlreadySignUpUserException.java
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,14 @@ | ||
package io.github.depromeet.knockknockbackend.domain.credential.exception; | ||
|
||
import io.github.depromeet.knockknockbackend.global.error.exception.ErrorCode; | ||
import io.github.depromeet.knockknockbackend.global.error.exception.KnockException; | ||
|
||
public class AlreadySignUpUserException extends KnockException { | ||
|
||
public static final KnockException EXCEPTION = new AlreadySignUpUserException(); | ||
|
||
private AlreadySignUpUserException() { | ||
super(ErrorCode.ALREADY_SIGNUP_USER); | ||
|
||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...b/depromeet/knockknockbackend/domain/credential/exception/OauthTokenInvalidException.java
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,14 @@ | ||
package io.github.depromeet.knockknockbackend.domain.credential.exception; | ||
|
||
|
||
import io.github.depromeet.knockknockbackend.global.error.exception.ErrorCode; | ||
import io.github.depromeet.knockknockbackend.global.error.exception.KnockException; | ||
|
||
// 잘못되거나 appid가 일치하지 않은 인증 토큰일경우 에러 | ||
public class OauthTokenInvalidException extends KnockException { | ||
public static final KnockException EXCEPTION = new OauthTokenInvalidException(); | ||
private OauthTokenInvalidException() { | ||
super(ErrorCode.EXPIRED_TOKEN); | ||
} | ||
|
||
} |
Oops, something went wrong.