-
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.
Merge pull request #19 from marcoshuck/feature/create_task
Create task
- Loading branch information
Showing
28 changed files
with
1,812 additions
and
8 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: Format | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
|
||
- name: fmt | ||
run: make fmt | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPRIVATE: ${{ inputs.go-private }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
cache: true | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --timeout=3m | ||
|
||
vet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
|
||
- name: vet | ||
run: make vet |
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,24 @@ | ||
name: Go Test | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
cache: true | ||
|
||
- name: Test | ||
run: make test |
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,10 +1,26 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
coverage.html | ||
*.tx | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# IDEs | ||
.idea/ |
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,30 @@ | ||
.PHONY: build | ||
|
||
tidy: | ||
go mod tidy | ||
|
||
generate: | ||
buf generate | ||
|
||
fmt: | ||
go fmt ./... | ||
|
||
vet: | ||
go vet -v ./... | ||
|
||
lint: | ||
buf lint | ||
golangci-lint -v run | ||
|
||
build: | ||
go build | ||
|
||
test: | ||
go test -race -covermode=atomic -coverprofile=coverage.tx -v ./... | ||
go tool cover -func=coverage.tx -o=coverage.out | ||
|
||
test-html: | ||
go test -race -covermode=atomic -coverprofile=coverage.out ./... | ||
go tool cover -html=coverage.out -o=coverage.html | ||
|
||
all: generate tidy fmt vet lint test |
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,77 @@ | ||
swagger: "2.0" | ||
info: | ||
title: api/tasks/v1/tasks.proto | ||
version: version not set | ||
tags: | ||
- name: TasksService | ||
consumes: | ||
- application/json | ||
produces: | ||
- application/json | ||
paths: | ||
/v1/tasks: | ||
post: | ||
summary: CreateTask creates a Task. | ||
operationId: TasksService_CreateTask | ||
responses: | ||
"200": | ||
description: A successful response. | ||
schema: | ||
$ref: '#/definitions/v1Task' | ||
default: | ||
description: An unexpected error response. | ||
schema: | ||
$ref: '#/definitions/rpcStatus' | ||
parameters: | ||
- name: task | ||
description: Task is the the task to create. | ||
in: body | ||
required: true | ||
schema: | ||
$ref: '#/definitions/v1Task' | ||
required: | ||
- task | ||
tags: | ||
- TasksService | ||
definitions: | ||
protobufAny: | ||
type: object | ||
properties: | ||
'@type': | ||
type: string | ||
additionalProperties: {} | ||
rpcStatus: | ||
type: object | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string | ||
details: | ||
type: array | ||
items: | ||
type: object | ||
$ref: '#/definitions/protobufAny' | ||
v1Task: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
format: int64 | ||
title: | ||
type: string | ||
description: | ||
type: string | ||
deadline: | ||
type: string | ||
format: date-time | ||
completedAt: | ||
type: string | ||
format: date-time | ||
createTime: | ||
type: string | ||
format: date-time | ||
updateTime: | ||
type: string | ||
format: date-time |
Oops, something went wrong.