feat: gotsrpc docs iteration

This commit is contained in:
Jan Halfar 2023-05-10 23:15:53 +02:00
parent 1337c69ab7
commit e1baecd6a5
5 changed files with 33 additions and 3 deletions

View File

@ -4,6 +4,8 @@ Spin the Wheel of Fortune to win a price.
[http://localhost:8080/wheel-of-fortune](http://localhost:8080/wheel-of-fortune)
This example shows the union feature as described here: [../service-interfaces/value-objects#union-types](../service-interfaces/value-objects#union-types)
## Go service
Service interface defintion

View File

@ -1,5 +1,6 @@
# Todos
There was a time, when building a todo app was the default demo, so here is one for you.:
## Go Service
Service interface defintion

View File

@ -4,19 +4,19 @@
Service interface defintion
```go reference title="server/services/wof/service.go" lines
```go reference title="server/services/ouch/service.go" lines
https://github.com/foomo/gotsrpc-playground/blob/main/server/services/ouch/service.go
```
Service implementation
```go reference title="server/services/helloworld/service.go"
```go reference title="server/services/ouch/service.go"
https://github.com/foomo/gotsrpc-playground/blob/main/server/server/ouch.go
```
## Next.js TypeScript client
```typescript reference title="client/pages/wheel-of-fortune.tsx"
```typescript reference title="client/pages/ouch.tsx"
https://github.com/foomo/gotsrpc-playground/blob/main/client/pages/ouch.tsx
```

View File

@ -0,0 +1,24 @@
# Playground
The playground is not for documentation - it is there to play with the service interface, the server implementation and the generated gotsrpc code.
## Go Service
Service interface defintion
```go reference title="server/services/playground/service.go" lines
https://github.com/foomo/gotsrpc-playground/blob/main/server/services/playground/service.go
```
Service implementation
```go reference title="server/services/playground/service.go"
https://github.com/foomo/gotsrpc-playground/blob/main/server/server/playground.go
```
## Next.js TypeScript client
```typescript reference title="client/pages/playground.tsx"
https://github.com/foomo/gotsrpc-playground/blob/main/client/pages/playground.tsx
```

View File

@ -273,3 +273,6 @@ type Basic interface {
}
```
### Union Types
When static types seem to be in the way