Skip to content

Commit

Permalink
add lists
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Feb 20, 2022
1 parent ea95c49 commit 3104133
Show file tree
Hide file tree
Showing 9 changed files with 1,850 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lists/Makefile
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
6 changes: 6 additions & 0 deletions lists/README.md
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.

111 changes: 111 additions & 0 deletions lists/examples.json
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"
}
}
}]
}
Loading

0 comments on commit 3104133

Please sign in to comment.