Skip to content

Commit

Permalink
chore: Change the GoDoc link to v3 (#146)
Browse files Browse the repository at this point in the history
* update: Change the GoDoc link to v3

* update: Update links

* update: Rename from https://godoc.org to https://go.pkg.dev
  • Loading branch information
ikawaha authored Nov 26, 2023
1 parent 40278ea commit 4ed9c6c
Show file tree
Hide file tree
Showing 30 changed files with 300 additions and 300 deletions.
4 changes: 2 additions & 2 deletions content/blog/002-endpoints.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ the `Metadata` DSL as shown above.
JWT tokens are usually created by the service and returned to clients so they may use them to
perform authentication. Here we are going to use a service account JSON key file so we can create
JWT tokens client side. The [golang.org/x/oauth2](https://github.com/golang/oauth2) package contains
the [jws](https://godoc.org/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://godoc.org/golang.org/x/oauth2/google)
the [jws](https://pkg.go.dev/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://pkg.go.dev/golang.org/x/oauth2/google)
sub-package which contains functions for creating tokens from Google Developers service
account JSON key file.

Expand Down
4 changes: 2 additions & 2 deletions content/blog/002-endpoints.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ the `Metadata` DSL as shown above.
JWT tokens are usually created by the service and returned to clients so they may use them to
perform authentication. Here we are going to use a service account JSON key file so we can create
JWT tokens client side. The [golang.org/x/oauth2](https://github.com/golang/oauth2) package contains
the [jws](https://godoc.org/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://godoc.org/golang.org/x/oauth2/google)
the [jws](https://pkg.go.dev/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://pkg.go.dev/golang.org/x/oauth2/google)
sub-package which contains functions for creating tokens from Google Developers service
account JSON key file.

Expand Down
4 changes: 2 additions & 2 deletions content/blog/002-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ the `Metadata` DSL as shown above.
JWT tokens are usually created by the service and returned to clients so they may use them to
perform authentication. Here we are going to use a service account JSON key file so we can create
JWT tokens client side. The [golang.org/x/oauth2](https://github.com/golang/oauth2) package contains
the [jws](https://godoc.org/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://godoc.org/golang.org/x/oauth2/google)
the [jws](https://pkg.go.dev/golang.org/x/oauth2/jws) sub-package which provides helper functions for
encoding valid JWT tokens. It also contains a [google](https://pkg.go.dev/golang.org/x/oauth2/google)
sub-package which contains functions for creating tokens from Google Developers service
account JSON key file.

Expand Down
6 changes: 3 additions & 3 deletions content/design/handling_errors.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ il codice generato per ritornare errori dai service moethods.
## Design

Il DSL di Goa rende possibile definire errori all'interno dei metodi o globalmente
ai servizi attraverso l'espressione [Error](https://godoc.org/goa.design/goa/dsl#Error):
ai servizi attraverso l'espressione [Error](https://pkg.go.dev/goa.design/goa/v3/dsl#Error):

```go
var _ = Service("divider", func() {
Expand All @@ -46,7 +46,7 @@ var _ = Service("divider", func() {
```

In questo esempio sia `DivByZero` che `HasRemainder` usano il tipo di default per gli errori,
chiamato [ErrorResult](https://godoc.org/goa.design/goa/expr#pkg-variables).
chiamato [ErrorResult](https://pkg.go.dev/goa.design/goa/v3/expr#pkg-variables).
Questo tipo ha i seguenti campi:

* `Name` è il nome dell'errore. Il codice generato si prende carico di inizializzare il campo con
Expand Down Expand Up @@ -87,7 +87,7 @@ error response.

## Progettare le error response

La funzione [Response](https://godoc.org/goa.design/goa/dsl#Response) rende possibile
La funzione [Response](https://pkg.go.dev/goa.design/goa/v3/dsl#Response) rende possibile
la definizione di logiche delle risposte HTTP/gRPC associate a un determinato errore.

```go
Expand Down
6 changes: 3 additions & 3 deletions content/design/handling_errors.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Goa はこの記述からコードとドキュメントの両方を生成する

## デザイン

Goa DSL では、[Error](https://godoc.org/goa.design/goa/dsl#Error) 式を使用して、メソッドおよびサービス全体でエラー結果を定義できます:
Goa DSL では、[Error](https://pkg.go.dev/goa.design/goa/v3/dsl#Error) 式を使用して、メソッドおよびサービス全体でエラー結果を定義できます:

```go
var _ = Service("divider", func() {
Expand All @@ -40,7 +40,7 @@ var _ = Service("divider", func() {
})
```
この例では、`DivByZero` エラーと `HasRemainder` エラーの両方で、
デフォルトのエラー型 [ErrorResult](https://godoc.org/goa.design/goa/expr#pkg-variables) が使用されます。
デフォルトのエラー型 [ErrorResult](https://pkg.go.dev/goa.design/goa/v3/expr#pkg-variables) が使用されます。
この型は、次のフィールドを定義します:

* `Name` はエラーの名前です。 生成されたコードは、レスポンスエンコード中にデザインで定義された名前つきフィールドを初期化します。
Expand Down Expand Up @@ -75,7 +75,7 @@ Error("internal_error", func() {

## レスポンスのデザイン

[Response](https://godoc.org/goa.design/goa/dsl#Response) 関数を使用すると、
[Response](https://pkg.go.dev/goa.design/goa/v3/dsl#Response) 関数を使用すると、
特定のエラーに関連付けられた HTTP/gRPC レスポンスを定義できます。

```go
Expand Down
6 changes: 3 additions & 3 deletions content/design/handling_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the generated code to return errors from service methods.
## Design

The Goa DSL makes it possible to define error results on methods and on entire
services using the [Error](https://godoc.org/goa.design/goa/dsl#Error)
services using the [Error](https://pkg.go.dev/goa.design/goa/v3/dsl#Error)
expression:

```go
Expand All @@ -46,7 +46,7 @@ var _ = Service("divider", func() {
```

In this example both the `DivByZero` and `HasRemainder` errors use the default
error type [ErrorResult](https://godoc.org/goa.design/goa/expr#pkg-variables).
error type [ErrorResult](https://pkg.go.dev/goa.design/goa/v3/expr#pkg-variables).
This type defines the following fields:

* `Name` is the name of the error. The generated code takes care of initializing
Expand Down Expand Up @@ -87,7 +87,7 @@ error response.

## Designing Responses

The [Response](https://godoc.org/goa.design/goa/dsl#Response) function makes it
The [Response](https://pkg.go.dev/goa.design/goa/v3/dsl#Response) function makes it
possible to define the HTTP/gRPC responses associated with a given error.

```go
Expand Down
50 changes: 25 additions & 25 deletions content/design/overview.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ parent = "design"

La seguente sezione descrive come usare il DSL goa per descrivere servizi.
Essi forniscono una panoramica dei concetti chiave. Revisiona le
[GoDocs](https://godoc.org/goa.design/goa/dsl) per una reference completa.
[GoDocs](https://pkg.go.dev/goa.design/goa/v3/dsl) per una reference completa.

## L'espressione API

L'espressione [API](https://godoc.org/goa.design/goa/dsl#API) è un DSL di
L'espressione [API](https://pkg.go.dev/goa.design/goa/v3/dsl#API) è un DSL di
primo livello opzionale che lista le proprietà globali di una API come nome,
descrizione e numero di versione. `API` può definire uno o più
[Servers](https://godoc.org/goa.design/goa/dsl#Server), esponendo set differenti
[Servers](https://pkg.go.dev/goa.design/goa/v3/dsl#Server), esponendo set differenti
di servizi.
Un singolo servizio può essere esposto da un qualunque numero (o nessun) server.
Se `Server` è omesso allora un singolo server di default viene automaticamente
Expand Down Expand Up @@ -67,7 +67,7 @@ var _ = API("calc", func() {

## L'espressione Service

La funzione [Service](https://godoc.org/goa.design/goa/dsl#Service) definisce un
La funzione [Service](https://pkg.go.dev/goa.design/goa/v3/dsl#Service) definisce un
gruppo di methods. Questo, a sua volta, si mappa con le risorse REST o con una
[service declaration](https://grpc.io/docs/guides/concepts.html#service-definition)
in gRPC. Un servizio può definire risposte di errore comuni a tutti i service methods.
Expand Down Expand Up @@ -121,14 +121,14 @@ var _ = Service("calc", func() {

## L'espressione Method

I service methods sono descritti usando la funzione [Method](https://godoc.org/goa.design/goa/dsl#Method).
I service methods sono descritti usando la funzione [Method](https://pkg.go.dev/goa.design/goa/v3/dsl#Method).
Tale funzione definisce il payload (input) e il risultato (output). Può anche
elencare un numero arbitrario di error values. Un error ha un nome e opzionalmente
un tipo.
Omettere il payload o il result ha lo stesso effetto che mapparli usando il
tipo built-in `Empty`, il quale mappa su un body vuoto in HTTP e al messaggio
`Empty` in gRPC.
Omettere un error type ha lo stesso effetto che usare quello di default [ErrorResult](https://godoc.org/goa.design/goa/expr#ErrorResult).
Omettere un error type ha lo stesso effetto che usare quello di default [ErrorResult](https://pkg.go.dev/goa.design/goa/v3/expr#ErrorResult).

```go
Method("divide", func() {
Expand Down Expand Up @@ -170,7 +170,7 @@ parameters, eccetera.

### L'espressione gRPC

La funzione [gRPC](https://godoc.org/goa.design/goa/dsl#GRPC) definisce il
La funzione [gRPC](https://pkg.go.dev/goa.design/goa/v3/dsl#GRPC) definisce il
mapping fra payload e risultato a messaggio e metadata gRPC.

```go
Expand All @@ -191,7 +191,7 @@ mapping fra payload e risultato a messaggio e metadata gRPC.

### L'espressione HTTP

La funzione [HTTP](https://godoc.org/goa.design/goa/dsl#HTTP) definisce il
La funzione [HTTP](https://pkg.go.dev/goa.design/goa/v3/dsl#HTTP) definisce il
mapping fra payload e risultato per tutti i tipi collegati a campi di richieste
HTTP, ad esempio request path, query string e, ovviamente, il corpo di richiesta
e risposta. La funzione `HTTP` definisce anche proprietà specifiche per il
Expand Down Expand Up @@ -345,8 +345,8 @@ rappresentazione nei protocolli HTTP e gRPC.


**I tipi personalizzati** possono essere definiti in goa usando
[Type](https://godoc.org/goa.design/goa/dsl#Type) oppure
[ResultType](https://godoc.org/goa.design/goa/dsl#ResultType). Un result type è
[Type](https://pkg.go.dev/goa.design/goa/v3/dsl#Type) oppure
[ResultType](https://pkg.go.dev/goa.design/goa/v3/dsl#ResultType). Un result type è
un tipo che definisce anche un set di "viste". Ogni vista elenca gli attributi
(campi) che devono essere inclusi quando si decodifica un result type usando
quella vista.
Expand All @@ -359,7 +359,7 @@ Nota che dato che le viste si applicano al solo rendering dei campi usarlo in un
payload non avrebbe senso: I tipi da mostrare in un payload possono essere usati
anche nel result, ma non è vero il viceversa.

Le **Map** possono essere definite con [MapOf](https://godoc.org/goa.design/goa/dsl#MapOf).
Le **Map** possono essere definite con [MapOf](https://pkg.go.dev/goa.design/goa/v3/dsl#MapOf).
La sintassi è `MapOf(<KeyType>, <ElemType>)` dove `<KeyType>` può essere un tipo primitivo,
array o tipo personalizzato, mentre `<ElemType>` può anche essere una map. Le Map
sono reppresentate come Go `map` nel protocollo HTTP e come protocol buffer
Expand All @@ -369,9 +369,9 @@ o bytes) come chiavi di una map.

Gli **Array** possono essere definiti in due modi:

* [ArrayOf](https://godoc.org/goa.design/goa/dsl#ArrayOf) che accetta un qualunque tipo
* [ArrayOf](https://pkg.go.dev/goa.design/goa/v3/dsl#ArrayOf) che accetta un qualunque tipo
e ritorna un tipo.
* [CollectionOf](https://godoc.org/goa/design/goa/dsl#CollectionOf) che accetta solamente
* [CollectionOf](https://pkg.go.dev/goa.design/goa/v3/dsl#CollectionOf) che accetta solamente
result types e returna un result type.

Il result type ritornato da `CollectionOf` contiene le stesse viste del result
Expand All @@ -385,18 +385,18 @@ a payload e result type che sono transport-indipendent.

### Payload-to-Request Mapping

La funzione [Payload](https://godoc.org/goa.design/goa/dsl#Payload) descrive
La funzione [Payload](https://pkg.go.dev/goa.design/goa/v3/dsl#Payload) descrive
la forma dei dati presi come argomento dai service methods. Le funzioni `HTTP`
e `GRPC` definiscono come il payload viene costruito a partire da richieste
in arrivo (server-side) e come costruisce la richiesta nel payload (client-side).

Per quanto riguarda **HTTP**,

* La funzione [Param](https://godoc.org/goa.design/goa/dsl#Param) definisce
* La funzione [Param](https://pkg.go.dev/goa.design/goa/v3/dsl#Param) definisce
i valori caricati da paramtetri all'interno di path o query string.
* La funzione [Header](https://godoc.org/goa.design/goa/dsl#Header) definisce
* La funzione [Header](https://pkg.go.dev/goa.design/goa/v3/dsl#Header) definisce
valori caricati dagli header HTTP.
* La funzione [Body](https://godoc.org/goa.design/goa/dsl#Body) definisce i valori
* La funzione [Body](https://pkg.go.dev/goa.design/goa/v3/dsl#Body) definisce i valori
caricati dal corpo della richiesta.

Di default, gli attributi del payload sono mappati al corpo della richiesta HTTP.
Expand All @@ -411,9 +411,9 @@ vengono applicate:

Pe rquanto riguarda **gRPC**,

* La funzione [Message](https://godoc.org/goa.design/goa/dsl#Message) definisce
* La funzione [Message](https://pkg.go.dev/goa.design/goa/v3/dsl#Message) definisce
i valori caricati dal messaggio gRPC.
* La funzione [Metadata](https://godoc.org/goa.design/goa/dsl#Metadata) definisce
* La funzione [Metadata](https://pkg.go.dev/goa.design/goa/v3/dsl#Metadata) definisce
i valori caricati dai [metadata](https://grpc.io/docs/guides/concepts.html#metadata)
del messaggio gRPC.

Expand All @@ -425,16 +425,16 @@ viene applicata:

### Result-To-Response Mapping

La funzione [Result](https://godoc.org/goa.design/goa/dsl#Result) descrive la forma
La funzione [Result](https://pkg.go.dev/goa.design/goa/v3/dsl#Result) descrive la forma
del dato di ritorno di un service method. le funzioni `HTTP` e `GRPC` definiscono
come la risposta viene costruita (server-side) e come il risultato viene creato
dalla risposta ricevuta (client-side).

Per quanto riguarda **HTTP**,

* La funzione [Header](https://godoc.org/goa.design/goa/dsl#Header) definisce i valori caricati
* La funzione [Header](https://pkg.go.dev/goa.design/goa/v3/dsl#Header) definisce i valori caricati
dagli header HTTP.
* La funzione [Body](https://godoc.org/goa.design/goa/dsl#Body) definisce i valori caricati
* La funzione [Body](https://pkg.go.dev/goa.design/goa/v3/dsl#Body) definisce i valori caricati
dal corpo della risposta.

Di default, gli attributi del result sono mappati al corpo della risposta HTTP.
Expand All @@ -446,11 +446,11 @@ vengono applicate:

Per quanto riguarda **gRPC**,

* La funzione [Message](https://godoc.org/goa.design/goa/dsl#Message) definisce i valori caricati
* La funzione [Message](https://pkg.go.dev/goa.design/goa/v3/dsl#Message) definisce i valori caricati
nel messaggio gRPC.
* La funzione [Headers](https://godoc.org/goa.design/goa/dsl#Headers) definisce i valori caricati
* La funzione [Headers](https://pkg.go.dev/goa.design/goa/v3/dsl#Headers) definisce i valori caricati
negli header metadata del messaggio gRPC.
* La funzione [Trailers](https://godoc.org/goa.design/goa/dsl#Trailers) definisce i valori caricati
* La funzione [Trailers](https://pkg.go.dev/goa.design/goa/v3/dsl#Trailers) definisce i valori caricati
negli trailer metadata del messaggio gRPC.

Di default, gli attributi del result sono mappati nel messaggio gRPC. Qualora
Expand Down
Loading

0 comments on commit 4ed9c6c

Please sign in to comment.