Skip to content

Commit 667f85d

Browse files
emanguymikewolfd
authored andcommitted
Add URL encoding for spaces in all .md documents
1 parent 21227fa commit 667f85d

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

practices/development/examples/go-microservice-monorepo/doc/Authentication.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ request, but doesn't otherwise enforce use of credentials when hitting the API.
1010
The `auth` package provides a JWT extractor function to retrieve the claims parsed by the authentication middleware.
1111
This function is called `auth.RetrieveKeycloakClaims()`, and because the authentication token may not always be present,
1212
it returns a boolean in addition to the returned data structure stating whether the token is present or not. It is recommended
13-
that you respond with a 401 Unauthorized if you expect the token to be present. See the [microservice architecture docs](Microservice Architecture.md#writing-rest-controllers-driving-adapters)
13+
that you respond with a 401 Unauthorized if you expect the token to be present. See the [microservice architecture docs](Microservice%20Architecture.md#writing-rest-controllers-driving-adapters)
1414
for information on writing REST controllers.
1515

1616
Here's an example of using `auth.RetrieveKeycloakClaims()`:

practices/development/examples/go-microservice-monorepo/doc/Configuration.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ If those checks do not pass, construction of the registry fails with an error de
5555

5656
Configuration options are created with the `config.NewOption()` function. It takes two parameters - the name of the configuration option
5757
in the environment and whether the option should be required or not. These options are defined in the **options** package if
58-
they're specific to a certain microservice or **sharedoptions** if the option is shared across multiple microservices. See [the repository layout docs](Navigation and Repository Layout.md)
58+
they're specific to a certain microservice or **sharedoptions** if the option is shared across multiple microservices. See [the repository layout docs](Navigation%20and%20Repository%20Layout.md)
5959
for information on where those are. These options can also be documented, so one can see what a configuration option is for when
6060
retrieved from a registry.
6161

@@ -72,7 +72,7 @@ var TheAdditionalTopping = config.NewOption("ADDITIONAL_TOPPING", false)
7272
### Creating a validated configuration option
7373

7474
Configuration options can also use `jellydator/validation` validators to validate the content of configuration options. See
75-
the [validation documentation](Microservice Architecture.md#dtos-validation-and-responding) for more information on validation.
75+
the [validation documentation](Microservice%20Architecture.md#dtos-validation-and-responding) for more information on validation.
7676
These validations are run during the construction of the configuration registry to verify everything is in the correct format.
7777
Validations only run if the option is present, in the case of optional validation options.
7878
To create a validated configuration option, you can either construct it via the alternate constructor `config.NewValidatedOption()`
@@ -91,7 +91,7 @@ var ShortConfigOption = config.NewValidatedOption("SHORT_CONFIG_OPTION", false,
9191
### Creating a configuration registry and registering options
9292

9393
Configuration options are registered with a configuration registry via a `config.RegistryBuilder` which should be defined in
94-
a microservice's **options** package. See the [repository layout docs](Navigation and Repository Layout.md) for where that is.
94+
a microservice's **options** package. See the [repository layout docs](Navigation%20and%20Repository%20Layout.md) for where that is.
9595
Once all the options are added, the `RegistryBuilder.VerifyAndBuild()` function is invoked which verifies the configuration in the
9696
environment and constructs the registry.
9797

practices/development/examples/go-microservice-monorepo/doc/Logging.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ configuration, the "production" state is determined by the `sharedoptions.IsInPr
4545
simple constructor parameter.
4646

4747
See ["Instantiating the logger"](#instantiating-the-logger) for more information on constructing the
48-
logger, and [the repository layout docs](Navigation and Repository Layout.md#layout-of-the-common-library)
48+
logger, and [the repository layout docs](Navigation%20and%20Repository Layout.md#layout-of-the-common-library)
4949
for more information on shared configuration options.
5050

5151
## Adjusting the log level
5252

5353
Log level filters are controlled by both the shared option `sharedoptions.LogLevel` and the shared log level controller defined in the `loglevel` shared feature.
54-
See [the repository layout docs](Navigation and Repository Layout.md) for where to find those packages in the repo.
54+
See [the repository layout docs](Navigation%20and%20Repository Layout.md) for where to find those packages in the repo.
5555

5656
The `loglevel` shared feature exposes HTTP endpoints for live-updating the application log level in production without an application restart.
5757

@@ -105,4 +105,4 @@ initializationErr := logger.InitLoggerFromConfig(*options.Registry)
105105
if initializationErr != nil {
106106
fmt.Println("Initializing the logger failed!")
107107
}
108-
```
108+
```

practices/development/examples/go-microservice-monorepo/doc/Microservice Architecture.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (CoreLogic) GroupSize(ctx context.Context, totalThings, numGroups int, calc
153153
## Writing REST controllers (driving adapters)
154154

155155
REST controllers are driving adapters that connect to the business logic's driving ports. They implement the `router.Controller`
156-
interface (see [repository layout](Navigation and Repository Layout.md) for where that package is) so they can be
156+
interface (see [repository layout](Navigation%20and%20Repository%20Layout.md) for where that package is) so they can be
157157
attached to a `router.Router` instance. They invoke business logic and convert DTO (Data Transfer Object) types to domain types defined in the
158158
business logic by the business logic's driven port definition.
159159

@@ -399,7 +399,7 @@ func MyResponseFromDomain(stringSlice []string) MyCoolResponse {
399399

400400
In order to make error responses consistent across the application and reduce the amount of boilerplate necessary, several
401401
error response functions are available to quickly respond with different HTTP status codes and report an error. These
402-
error response functions are available in the `response` package (see [repository layout](Navigation and Repository Layout.md)
402+
error response functions are available in the `response` package (see [repository layout](Navigation%20and%20Repository%20Layout.md)
403403
for where that is).
404404

405405
The `response.APIErrorHelper` type returned from the canned response functions can be customized after its construction
@@ -485,7 +485,7 @@ wrapping any inserts triggered by driven ports will be automatically rolled back
485485
### Attaching controllers to the router
486486

487487
REST controllers implementing the `router.Controller` interface can be attached to the `router.Router` instance via the
488-
`router.Router.AttachControllers()` function. Each controller is instantiated in its own function in `bootstrap.go` (see [repo layout docs](Navigation and Repository Layout.md))
488+
`router.Router.AttachControllers()` function. Each controller is instantiated in its own function in `bootstrap.go` (see [repo layout docs](Navigation%20and%20Repository%20Layout.md))
489489
and added to the slice of controllers, which is passed along to the `AttachControllers()` function. Here's a small example,
490490
using the sample controller as seen in the previous examples:
491491

@@ -545,7 +545,7 @@ func (DatabaseAdapter) GetSomeData(ctx context.Context) (int, error) {
545545
```
546546

547547
The database connection is attached to the context via the database context middleware, as described in [the middleware docs](Middleware.md#database-connection-middleware).
548-
You can see all the querying options available on the `database.Connection` type (see the [repo layout](Navigation and Repository Layout.md)
548+
You can see all the querying options available on the `database.Connection` type (see the [repo layout](Navigation%20and%20Repository%20Layout.md)
549549
for where the database package is).
550550

551551
### Database-specific DTOs
@@ -588,4 +588,4 @@ func (DatabaseAdapter) GetSomeData(ctx context.Context) (int, error) {
588588

589589
### Communicating with other systems over HTTP
590590

591-
TBD, we can take care of this subsystem in another ticket. Needs to be done in a way that we can mock responses from external systems.
591+
TBD, we can take care of this subsystem in another ticket. Needs to be done in a way that we can mock responses from external systems.

practices/development/examples/go-microservice-monorepo/doc/Middleware.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The database connection middleware holds a `sqlx.DB` database connection and att
2020
This way, database-based driven ports can extract the database connection from the request context which is passed through
2121
every layer.
2222

23-
See [this section in the microservice architecture docs](Microservice Architecture.md#acquiring-a-database-connection)
23+
See [this section in the microservice architecture docs](Microservice%20Architecture.md#acquiring-a-database-connection)
2424
for more information on accessing the database connection.
2525

2626
## Logging middleware

practices/development/examples/go-microservice-monorepo/doc/Navigation and Repository Layout.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ layout, making it easy to find different parts of the API/business logic/etc.
1111
* **auth** - Contains code for extracting authentication information from incoming requests, as well as data structures representing the contents of authentication information. For more info, see [Authentication.md](./Authentication.md).
1212
* **config** - Contains code for defining configuration options and retrieving them from a configuration registry. For more information see [Configuration.md](./Configuration.md)
1313
* **sharedoptions** - Contains common configuration options that may be used by all microservices
14-
* **database** - Contains database-related code, including functions for managing transactions and extracting the database connection from the current request context. Relevant information can be found in [Middleware.md](./Middleware.md), [Microservice Architecture.md](./Microservice Architecture.md), and [Testing.md](./Testing.md).
14+
* **database** - Contains database-related code, including functions for managing transactions and extracting the database connection from the current request context. Relevant information can be found in [Middleware.md](./Middleware.md), [Microservice Architecture.md](./Microservice%20Architecture.md), and [Testing.md](./Testing.md).
1515
* **logger** - Contains the global logger instance and functions for initializing it. For more information, see [Logging.md](./Logging.md).
16-
* **request** - Contains utilities for extracting information from requests, such as deserializing the request body or pulling out the request context. For more information, see [Microservice Architecture.md](./Microservice Architecture.md).
16+
* **request** - Contains utilities for extracting information from requests, such as deserializing the request body or pulling out the request context. For more information, see [Microservice Architecture.md](./Microservice%20Architecture.md).
1717
* **testhelper** - Contains utilities for building HTTP requests in test code. See [Testing.md](./Testing.md) for more information.
18-
* **response** - Contains utilities for generating a standard error structure on HTTP responses. For more information, see [Microservice Architecture.md](./Microservice Architecture.md).
18+
* **response** - Contains utilities for generating a standard error structure on HTTP responses. For more information, see [Microservice Architecture.md](./Microservice%20Architecture.md).
1919
* **dtos** - Contains code for common DTO types used in HTTP responses
2020
* **testhelper** - Contains utilities for deserializing HTTP response bodies into data structures in tests. See [Testing.md](./Testing.md) for more information.
2121
* **types** - Contains useful types for representing things in your code such as nullable values.
2222
* **sharedfeatures** - Contains common software features and controllers that can be used across microservices
23-
* **FEATURE NAME** - The name of the folder describes the microservice feature implemented by the business logic in this directory. See [Microservice Architecture.md](./Microservice Architecture.md) for more information.
23+
* **FEATURE NAME** - The name of the folder describes the microservice feature implemented by the business logic in this directory. See [Microservice Architecture.md](./Microservice%20Architecture.md) for more information.
2424
* **controller** - Contains REST controller definitions and DTOs which use and drive the business logic
2525
* **adapter** - Contains external access adapters used by the business logic to access or send data in external systems, such as message queues or databases.
2626

@@ -35,6 +35,6 @@ to package-level stuff.
3535
* **bootstrap.go** - Functions invoked by main.go to stand up the subsystems of the application, such as initializing the logger and connecting to the database. It also has functions for creating the HTTP router and attaching routes from all REST controllers in the app.
3636
* **options** - Contains the global configuration registry and initialization functions for it. See [Configuration.md](./Configuration.md) for more information.
3737
* **features** - Contains implementations for features that the microservice exposes
38-
* **FEATURE NAME** - The name of the folder describes the microservice feature implemented by the business logic in this directory. See [Microservice Architecture.md](./Microservice Architecture.md) for more information.
38+
* **FEATURE NAME** - The name of the folder describes the microservice feature implemented by the business logic in this directory. See [Microservice Architecture.md](./Microservice%20Architecture.md) for more information.
3939
* **controller** - Contains REST controller definitions which use and drive the business logic
4040
* **adapter** - Contains external access adapters used by the business logic to access or send data in external systems, such as message queues or databases

practices/development/examples/go-microservice-monorepo/doc/Rest API Conventions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Entries can be added to the collection by using the HTTP verb `POST`. `PUT` may
7070
(update if exists, otherwise insert) rather than an insertion into the collection. Requests made with these verbs
7171
contain the contents of the new entry in the request body.
7272

73-
Fields in request bodies should be camel cased (via the go "json" struct tag, see [the microservice architecture docs](Microservice Architecture.md#dtos-validation-and-responding)
73+
Fields in request bodies should be camel cased (via the go "json" struct tag, see [the microservice architecture docs](Microservice%20Architecture.md#dtos-validation-and-responding)
7474
for more info) and acronyms should only capitalize the first letter.
7575

7676
Examples:

0 commit comments

Comments
 (0)