Skip to content

Commit

Permalink
Update metadata (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn authored Apr 2, 2024
1 parent dd955e0 commit 64b30c2
Show file tree
Hide file tree
Showing 9 changed files with 1,542 additions and 74 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ tzf-server -type 1
### All supported timezone names

- [`http://localhost:8080/web/tzs/all`](http://localhost:8080/web/tzs/all)
- Live demo: <https://tzf-server.onrender.com/web/tzs/all>
- Live demo: <https://tzf-server.ringsaturn.me/web/tzs/all>

### [Experiment] Clickable debugger

- [`http://localhost:8080/web/click`](http://localhost:8080/web/click)
- Live demo: <https://tzf-server.onrender.com/web/click>
- Live demo: <https://tzf-server.ringsaturn.me/web/click>

I have little knowledge about frontend development so it's just a experiment,
most codes are written by ChatGPT 3.5. You can access the prompts from
Expand All @@ -117,7 +117,7 @@ most codes are written by ChatGPT 3.5. You can access the prompts from
A swagger UI can be found at
[`http://localhost:8080/swagger/index.html`](http://localhost:8080/swagger/index.html).

Or live demo: <https://tzf-server.onrender.com/swagger/index.html>
Or live demo: <https://tzf-server.ringsaturn.me/swagger/index.html>

### Lookup Location's timezone

Expand All @@ -128,7 +128,7 @@ curl "http://localhost:8080/api/v1/tz?longitude=116.3883&latitude=39.9289"
or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tz?longitude=116.3883&latitude=39.9289"
curl "https://tzf-server.ringsaturn.me/api/v1/tz?longitude=116.3883&latitude=39.9289"
```

Output:
Expand All @@ -150,7 +150,7 @@ curl "http://localhost:8080/api/v1/tzs?longitude=87.6168&latitude=43.8254"
or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tzs?longitude=87.6168&latitude=43.8254"
curl "https://tzf-server.ringsaturn.me/api/v1/tzs?longitude=87.6168&latitude=43.8254"
```

Output:
Expand Down Expand Up @@ -181,7 +181,7 @@ curl "http://localhost:8080/api/v1/tzs/all"
or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tzs/all"
curl "https://tzf-server.ringsaturn.me/api/v1/tzs/all"
```

Output:
Expand Down
1 change: 0 additions & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ version: v1
plugins:
- plugin: buf.build/community/google-gnostic-openapi:v0.7.0
out: tzf/v1
# remote plugins
- plugin: buf.build/protocolbuffers/go:v1.30.0
out: .
opt:
Expand Down
9 changes: 7 additions & 2 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: gnostic
repository: gnostic
commit: 087bc8072ce44e339f213209e4d57bf0
digest: shake256:4689c26f0460fea84c4c277c1b9c7e7d657388c5b4116d1065f907a92100ffbea87de05bbd138a0166411361e1f6ce063b4c0c6002358d39710f3c4a8de788d5
- remote: buf.build
owner: googleapis
repository: googleapis
commit: ee48893a270147348e3edc6c1a03de0e
digest: shake256:a35b0576a2b55dad72747e786af05c03539c2b96be236c9de39fe10d551931ac252eb68445c0cef6bbd27fa20e8c26eee5b8a9fe9c2fde6f63a03e18f8cf980d
commit: 7a6bc1e3207144b38e9066861e1de0ff
digest: shake256:d646836485c34192401253703c4e7ce899c826fceec060bf4b2a62c4749bd9976dc960833e134a1f814725e1ffd60b1bb3cf0335a7e99ef0e8cec34b070ffb66
1 change: 1 addition & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ lint:
- DEFAULT
deps:
- buf.build/googleapis/googleapis
- buf.build/gnostic/gnostic
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.22.0
require (
github.com/cloudwego/hertz v0.8.1
github.com/favadi/protoc-go-inject-tag v1.4.0
github.com/google/gnostic v0.7.0
github.com/google/go-cmp v0.6.0
github.com/google/wire v0.6.0
github.com/hertz-contrib/logger/zap v1.1.0
Expand Down Expand Up @@ -48,6 +49,7 @@ require (
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gochore/uniq v1.1.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/subcommands v1.2.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
Expand Down
1,421 changes: 1,421 additions & 0 deletions go.sum

Large diffs are not rendered by default.

138 changes: 77 additions & 61 deletions tzf/v1/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions tzf/v1/api.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
syntax = "proto3";

option go_package = "github.com/ringsaturn/tzf-server/tzf/v1;v1";

package tzf.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "gnostic/openapi/v3/annotations.proto";

option go_package = "github.com/ringsaturn/tzf-server/tzf/v1;v1";

option (gnostic.openapi.v3.document) = {
info: {
title: "TZF Server";
version: "0.13.2";
contact: {
name: "ringsaturn";
url: "https://github.com/ringsaturn/tzf-server?tab=readme-ov-file";
email: "[email protected]";
}
license: {
name: "Unlicense";
url: "https://github.com/ringsaturn/tzf-server/blob/main/LICENSE";
}
}
};

// Simple server convert longitude&latitude to timezone name(s).
// The server also provides timezone name list.
Expand Down
11 changes: 9 additions & 2 deletions tzf/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

openapi: 3.0.3
info:
title: TZFService API
title: TZF Server
description: |-
Simple server convert longitude&latitude to timezone name(s).
The server also provides timezone name list.
Expand All @@ -12,7 +12,14 @@ info:
should not be used in production.
Use https://github.com/ringsaturn/tzf as internal library.
version: 0.0.1
contact:
name: ringsaturn
url: https://github.com/ringsaturn/tzf-server?tab=readme-ov-file
email: [email protected]
license:
name: Unlicense
url: https://github.com/ringsaturn/tzf-server/blob/main/LICENSE
version: 0.13.2
paths:
/api/v1/ping:
get:
Expand Down

0 comments on commit 64b30c2

Please sign in to comment.