You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .NET Aspire Minio Client integration provides multiple options to configure the server connection based on the requirements and conventions of your project.
29
+
The .NET Aspire MiniO Client integration provides multiple options to configure the server connection based on the requirements and conventions of your project.
30
30
31
31
### Use a connection string
32
32
33
33
When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddMinioClient()`:
34
34
35
35
```csharp
36
-
builder.AddMeilisearchClient("minio");
36
+
builder.AddMinioClient("minio");
37
37
```
38
38
39
39
And then the connection string will be retrieved from the `ConnectionStrings` configuration section:
The .NET Aspire Meilisearch Client integration supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `MeilisearchClientSettings` from configuration by using the `Aspire:Meilisearch:Client` key. Example `appsettings.json` that configures some of the options:
51
+
The .NET Aspire MiniO Client integration supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration).
52
+
It loads the `MinioClientSettings` from configuration by using the `Aspire:Minio:Client` key.
53
+
This key can be overriden by using the `configurationSectionName` method parameter.
54
+
Example `appsettings.json` that configures some of the options:
Also you can pass the `Action<MeilisearchClientSettings> configureSettings` delegate to set up some or all the options inline, for example to set the API key from code:
72
+
Also you can pass the `Action<MinioClientSettings> configureSettings` delegate to set up some or all the options inline, for example to set the API key from code:
@@ -88,16 +92,17 @@ var myService = builder.AddProject<Projects.MyService>()
88
92
.WithReference(minio);
89
93
```
90
94
91
-
The `WithReference` method configures a connection in the `MyService` project named `minio`. In the _Program.cs_ file of `MyService`, the Minio connection can be consumed using:
95
+
The `WithReference` method configures a connection in the `MyService` project named `minio`.
96
+
In the _Program.cs_ file of `MyService`, the MiniO connection can be consumed using:
92
97
93
98
```csharp
94
99
builder.AddMinioClient("minio");
95
100
```
96
101
97
-
Then, in your service, inject `MeilisearchClient` and use it to interact with the Meilisearch API:
102
+
Then, in your service, inject `IMinioClient` and use it to interact with the MiniO or other S3 compatible API:
0 commit comments