mirror of
https://github.com/foomo/foomo-docs.git
synced 2025-10-16 12:35:40 +00:00
feat: gotsrpc docs iteration
This commit is contained in:
parent
1337c69ab7
commit
e1baecd6a5
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
```
|
||||
|
||||
24
foomo/docs/projects/gotsrpc/playground/05_playground.md
Normal file
24
foomo/docs/projects/gotsrpc/playground/05_playground.md
Normal 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
|
||||
```
|
||||
@ -273,3 +273,6 @@ type Basic interface {
|
||||
}
|
||||
```
|
||||
|
||||
### Union Types
|
||||
|
||||
When static types seem to be in the way
|
||||
|
||||
Loading…
Reference in New Issue
Block a user