-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 8ae3b54
Showing
31 changed files
with
1,697 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,3 @@ | ||
# This file was autogenerated by Batect to track which Docker volumes are associated with this project. | ||
# Do not modify it, and do not commit it to source control. | ||
fwtvpg |
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 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_and_publish: | ||
uses: wattpad/github-workflows/.github/workflows/go-build-and-publish.yml@main | ||
secrets: inherit |
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 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
uses: wattpad/github-workflows/.github/workflows/go-test-and-build.yml@main | ||
secrets: inherit |
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,3 @@ | ||
TaskManager | ||
.idea/* | ||
*.pb.go |
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,57 @@ | ||
run: | ||
go: '1.19' | ||
|
||
# Which dirs to skip: issues from them won't be reported. | ||
# Can use regexp here: `generated.*`, regexp is applied on full path. | ||
skip-dirs: | ||
- api | ||
- mocks | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
# Deprecated | ||
- deadcode | ||
- exhaustivestruct | ||
- ifshort | ||
- interfacer | ||
- maligned | ||
- nosnakecase | ||
- golint | ||
- scopelint | ||
- structcheck | ||
- varcheck | ||
- ireturn | ||
|
||
# Unwanted | ||
- exhaustruct # prefer default initialization and brevity | ||
- gofmt # replaced by gofumpt | ||
- goimports # replaced by gci | ||
- paralleltest # requires special care | ||
|
||
linters-settings: | ||
exhaustive: | ||
default-signifies-exhaustive: true | ||
gci: | ||
sections: | ||
- standard # Captures all standard packages if they do not match another section. | ||
- default # Contains all imports that could not be matched to another section type. | ||
- prefix(github.com/Wattpad) # All Wattpad imports | ||
gofumpt: | ||
lang-version: "1.19" | ||
extra-rules: false | ||
lll: | ||
line-length: 132 | ||
tab-width: 4 | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
# Exclude some linters from running on tests files. | ||
- path: _test\.go | ||
linters: | ||
- bodyclose | ||
- containedctx # test suite may want to track context | ||
- forcetypeassert | ||
- gomnd | ||
- wrapcheck # we don't need to wrap errors in tests |
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,18 @@ | ||
PROJECT_NAME=protobuf | ||
DB_FILE=./deploy/db.yml | ||
LIQUIBASE_FILE=./deploy/liquibase.yml | ||
ALL=${DB_FILE} | ||
|
||
export COMPOSE_IGNORE_ORPHANS=True | ||
|
||
db: | ||
export COMPOSE_PROJECT_NAME=${PROJECT_NAME}; export COMPOSE_FILE=${DB_FILE}; docker-compose up db -d | ||
|
||
dbtool: | ||
export COMPOSE_PROJECT_NAME=${PROJECT_NAME}; export COMPOSE_FILE=${DB_FILE}; docker-compose up cloudbeaver -d | ||
|
||
stop: | ||
export COMPOSE_PROJECT_NAME=${PROJECT_NAME}; export COMPOSE_FILE=${ALL}; docker-compose down | ||
|
||
migrate: | ||
export COMPOSE_PROJECT_NAME=${PROJECT_NAME}; export COMPOSE_FILE=${LIQUIBASE_FILE}; docker-compose up --force-recreate liquibase |
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,22 @@ | ||
# TaskManager | ||
|
||
Description of a service generated by the `go-service-template`. | ||
|
||
| Property | Description | | ||
|----------|-------------| | ||
| Owner | | | ||
| Dashboard | [Dashboard](https://app.datadoghq.com/dashboard/lists?q=TaskManager) | | ||
| Logging | [Logging](https://app.datadoghq.com/logs?query=service%3ATaskManager) | | ||
| Monitors | [Monitors](https://app.datadoghq.com/monitors/manage?q=service%3ATaskManager) | | ||
|
||
## Business Overview | ||
|
||
Business overview of a service generated by the `go-service-template`. | ||
|
||
## Technical Overview | ||
|
||
Technical overview of a service generated by the `go-service-template`. | ||
|
||
## Operational Details | ||
|
||
Operational details of a service generated by the `go-service-template`. |
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,10 @@ | ||
|
||
# `/api` | ||
|
||
OpenAPI/Swagger specs, JSON schema files, protocol definition files. | ||
|
||
Examples: | ||
|
||
* https://github.com/kubernetes/kubernetes/tree/master/api | ||
* https://github.com/moby/moby/tree/master/api | ||
|
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,10 @@ | ||
version: v1 | ||
plugins: | ||
- remote: buf.build/library/plugins/go:v1.27.1-1 | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- remote: buf.build/library/plugins/go-grpc:v1.1.0-2 | ||
out: . | ||
opt: | ||
- paths=source_relative |
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 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: googleapis | ||
repository: googleapis | ||
commit: c0ec788bbbb747fca594a1e2347edd4e |
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,11 @@ | ||
version: v1 | ||
lint: | ||
use: | ||
- DEFAULT | ||
except: | ||
- PACKAGE_VERSION_SUFFIX | ||
ignore_only: | ||
PACKAGE_DIRECTORY_MATCH: | ||
- api/api.proto | ||
deps: | ||
- buf.build/googleapis/googleapis |
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,93 @@ | ||
syntax = "proto3"; | ||
package task_manager; | ||
option go_package = "github.com/Wattpad/TaskManager/api/task_manager"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
message Task { | ||
int64 id = 1; | ||
string title = 2; | ||
string description = 3; | ||
TaskStatus status = 4; | ||
TaskDetails details = 5; | ||
optional string assignee = 6; | ||
} | ||
|
||
message TaskDetails { | ||
oneof details { | ||
NotStartedDetails not_started_details = 1; | ||
InProgressDetails in_progress_details = 2; | ||
DoneTaskDetails done_details = 3; | ||
} | ||
} | ||
|
||
enum TaskStatus { | ||
TASK_STATUS_UNSPECIFIED = 0; | ||
TASK_STATUS_NOT_STARTED = 1; | ||
TASK_STATUS_IN_PROGRESS = 2; | ||
TASK_STATUS_DONE = 3; | ||
} | ||
|
||
message NotStartedDetails { | ||
google.protobuf.Timestamp created_date = 1; | ||
} | ||
message InProgressDetails { | ||
google.protobuf.Timestamp started_date = 1; | ||
} | ||
message DoneTaskDetails { | ||
google.protobuf.Timestamp completed_date = 1; | ||
} | ||
|
||
// CREATE | ||
message CreateTaskRequest { | ||
string title = 1; | ||
string description = 2; | ||
TaskStatus status = 3; | ||
TaskDetails details = 4; | ||
} | ||
|
||
message CreateTaskResponse { | ||
Task task = 1; | ||
} | ||
|
||
// GET | ||
message GetTaskRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message GetTaskResponse { | ||
Task task = 1; | ||
} | ||
|
||
// UPDATE | ||
message UpdateTaskRequest { | ||
Task task = 1; | ||
} | ||
|
||
message UpdateTaskResponse { | ||
Task task = 1; | ||
} | ||
|
||
// DELETE | ||
message DeleteTaskRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message DeleteTaskResponse { | ||
bool success = 1; | ||
} | ||
|
||
message GetAllTasksRequest {} | ||
|
||
message GetAllTasksResponse { | ||
Task task = 1; | ||
} | ||
|
||
service TaskService { | ||
rpc CreateTask(CreateTaskRequest) returns (CreateTaskResponse) {} | ||
rpc GetTask(GetTaskRequest) returns (GetTaskResponse) {} | ||
rpc UpdateTask(UpdateTaskRequest) returns (UpdateTaskResponse) {} | ||
rpc DeleteTask(DeleteTaskRequest) returns (DeleteTaskResponse) {} | ||
rpc GetAllTasks(GetAllTasksRequest) returns (stream GetAllTasksResponse) {} | ||
// rpc AssignTask(AssignTaskRequest) returns (AssignTaskResponse) {} | ||
} |
Oops, something went wrong.