-
Notifications
You must be signed in to change notification settings - Fork 137
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
Showing
9 changed files
with
1,850 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,29 @@ | ||
|
||
GOPATH:=$(shell go env GOPATH) | ||
|
||
.PHONY: api | ||
api: | ||
protoc --openapi_out=. --proto_path=. proto/lists.proto | ||
|
||
.PHONY: init | ||
init: | ||
go get -u github.com/golang/protobuf/proto | ||
go get -u github.com/golang/protobuf/protoc-gen-go | ||
go get github.com/micro/micro/v3/cmd/protoc-gen-micro | ||
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi | ||
|
||
.PHONY: proto | ||
proto: | ||
protoc --proto_path=. --micro_out=. --go_out=:. proto/lists.proto | ||
|
||
.PHONY: build | ||
build: | ||
go build -o lists *.go | ||
|
||
.PHONY: test | ||
test: | ||
go test -v ./... -cover | ||
|
||
.PHONY: docker | ||
docker: | ||
docker build . -t lists:latest |
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 @@ | ||
Makes a list | ||
|
||
# Lists Service | ||
|
||
Make lists for anything. Shopping, todos, mail, waitlists, absolutely anything. | ||
|
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,111 @@ | ||
|
||
{ | ||
"create": [{ | ||
"title": "Create a list", | ||
"description": "Create a simple text based list", | ||
"run_check": false, | ||
"request": { | ||
"title": "New List", | ||
"text": "This is my list" | ||
}, | ||
"response": { | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:33:03+01:00", | ||
"title": "New List", | ||
"text": "This is my list" | ||
} | ||
} | ||
}], | ||
"read": [{ | ||
"title": "Read a list", | ||
"description": "Read a list by its ID", | ||
"run_check": false, | ||
"request": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a" | ||
}, | ||
"response": { | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:33:03+01:00", | ||
"title": "New List", | ||
"text": "This is my list" | ||
} | ||
} | ||
}], | ||
"list": [{ | ||
"title": "List all lists", | ||
"description": "List all your available lists", | ||
"run_check": false, | ||
"request": {}, | ||
"response": { | ||
"lists": [ | ||
{ | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:33:03+01:00", | ||
"title": "New List", | ||
"text": "This is my list" | ||
} | ||
] | ||
} | ||
}], | ||
"update": [{ | ||
"title": "Update a List", | ||
"description": "Update the list title and text", | ||
"run_check": false, | ||
"request": { | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"title": "Update List", | ||
"text": "Updated list text" | ||
} | ||
}, | ||
"response": { | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:50:20+01:00", | ||
"title": "Update List", | ||
"text": "Updated list text" | ||
} | ||
} | ||
}], | ||
"delete": [{ | ||
"title": "Delete a List", | ||
"description": "Delete a list by id", | ||
"run_check": false, | ||
"request": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a" | ||
}, | ||
"response": { | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:50:20+01:00", | ||
"title": "Update List", | ||
"text": "Updated list text" | ||
} | ||
} | ||
}], | ||
"events": [{ | ||
"title": "Subscribe to events", | ||
"description": "Subscribe to list change events", | ||
"run_check": false, | ||
"request": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a" | ||
}, | ||
"response": { | ||
"event": "deleted", | ||
"list": { | ||
"id": "63c0cdf8-2121-11ec-a881-0242e36f037a", | ||
"created": "2021-09-29T13:33:03+01:00", | ||
"updated": "2021-09-29T13:50:20+01:00", | ||
"title": "Update List", | ||
"text": "Updated list text" | ||
} | ||
} | ||
}] | ||
} |
Oops, something went wrong.