Skip to content

Commit 3d53b2a

Browse files
committed
docs(options): add versions to all module options
1 parent c699ff0 commit 3d53b2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+361
-63
lines changed

docs/modules/artemis.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,29 @@ In example: `Run(context.Background(), "apache/activemq-artemis:2.30.0")`.
5252

5353
When starting the Artemis container, you can pass options in a variadic way to configure it.
5454

55-
#### Credentials
55+
#### WithCredentials
56+
57+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
5658

5759
If you need to change the default admin credentials (i.e. `artemis:artemis`) use `WithCredentials`.
5860

5961
<!--codeinclude-->
6062
[With credentials](../../modules/artemis/artemis_test.go) inside_block:withCredentials
6163
<!--/codeinclude-->
6264

63-
#### Enable Anonymous login
65+
#### WithAnonymousLogin
66+
67+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
6468

6569
If you need to enable anonymous logins (which are disabled by default) use `WithAnonymousLogin`.
6670

6771
<!--codeinclude-->
6872
[With Anonymous Login](../../modules/artemis/artemis_test.go) inside_block:withAnonymousLogin
6973
<!--/codeinclude-->
7074

71-
#### Custom Arguments
75+
#### WithExtraArgs
76+
77+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
7278

7379
If you need to pass custom arguments to the `artemis create` command, use `WithExtraArgs`.
7480
The default is `--http-host 0.0.0.0 --relax-jolokia`.
@@ -89,6 +95,8 @@ The Artemis container exposes the following methods:
8995

9096
#### User
9197

98+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
99+
92100
User returns the administrator username.
93101

94102
<!--codeinclude-->
@@ -97,6 +105,8 @@ User returns the administrator username.
97105

98106
#### Password
99107

108+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
109+
100110
Password returns the administrator password.
101111

102112
<!--codeinclude-->
@@ -105,6 +115,8 @@ Password returns the administrator password.
105115

106116
#### BrokerEndpoint
107117

118+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
119+
108120
BrokerEndpoint returns the host:port for the combined protocols endpoint.
109121

110122
<!--codeinclude-->
@@ -113,6 +125,8 @@ BrokerEndpoint returns the host:port for the combined protocols endpoint.
113125

114126
#### ConsoleURL
115127

128+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
129+
116130
ConsoleURL returns the URL for the management console.
117131

118132
<!--codeinclude-->

docs/modules/cassandra.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ In example: `Run(context.Background(), "cassandra:4.1.3")`.
4848

4949
When starting the Cassandra container, you can pass options in a variadic way to configure it.
5050

51-
#### Init Scripts
51+
#### WithInitScripts
52+
53+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
5254

5355
If you would like to do additional initialization in the Cassandra container, add one or more `*.cql` or `*.sh` scripts to the container request with the `WithInitScripts` function.
5456
Those files will be copied after the container is created but before it's started under root directory.
@@ -59,7 +61,9 @@ An example of a `*.sh` script that creates a keyspace and table is shown below:
5961
[Init script content](../../modules/cassandra/testdata/init.sh)
6062
<!--/codeinclude-->
6163

62-
#### Database configuration
64+
#### WithConfigFile
65+
66+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
6367

6468
In the case you have a custom config file for Cassandra, it's possible to copy that file into the container before it's started, using the `WithConfigFile(cfgPath string)` function.
6569

@@ -74,6 +78,8 @@ The Cassandra container exposes the following methods:
7478

7579
#### ConnectionHost
7680

81+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
82+
7783
This method returns the host and port of the Cassandra container, using the default, `9042/tcp` port. E.g. `localhost:9042`
7884

7985
<!--codeinclude-->

docs/modules/chroma.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ The Chroma container exposes the following methods:
6161

6262
#### REST Endpoint
6363

64+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.29.0"><span class="tc-version">:material-tag: v0.29.0</span></a>
65+
6466
This method returns the REST endpoint of the Chroma container, using the default `8000` port.
6567

6668
<!--codeinclude-->

docs/modules/clickhouse.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,17 @@ When starting the ClickHouse container, you can pass options in a variadic way t
5858

5959
#### Set username, password and database name
6060

61+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
62+
6163
If you need to set a different database, and its credentials, you can use `WithUsername`, `WithPassword`, `WithDatabase`
6264
options. E.g. `WithUsername("user")`, `WithPassword("password")`, `WithDatabase("db")`.
6365

6466
!!!info
6567
The default values for the username is `default`, for password is `clickhouse` and for the default database name is `clickhouse`.
6668

67-
#### Init Scripts
69+
#### WithInitScripts
70+
71+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
6872

6973
If you would like to do additional initialization in the ClickHouse container, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts to the container request.
7074
Those files will be copied after the container is created but before it's started under `/docker-entrypoint-initdb.d`. According to ClickHouse Docker image,
@@ -81,6 +85,8 @@ initialization before starting the service.
8185

8286
#### Zookeeper
8387

88+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
89+
8490
Clusterized ClickHouse requires to start Zookeeper and pass link to it via `config.xml`.
8591

8692
<!--codeinclude-->
@@ -90,7 +96,9 @@ Clusterized ClickHouse requires to start Zookeeper and pass link to it via `conf
9096
!!!warning
9197
The `WithZookeeper` option will `panic` if it's not possible to create the Zookeeper config file.
9298

93-
#### Custom configuration
99+
#### WithConfigFile
100+
101+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
94102

95103
If you need to set a custom configuration, the module provides the `WithConfigFile` option to pass the path to a custom configuration file in XML format.
96104

@@ -112,6 +120,8 @@ The ClickHouse container exposes the following methods:
112120

113121
#### ConnectionHost
114122

123+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
124+
115125
This method returns the host and port of the ClickHouse container, using the default, native `9000/tcp` port. E.g. `localhost:9000`
116126

117127
<!--codeinclude-->
@@ -120,6 +130,8 @@ This method returns the host and port of the ClickHouse container, using the def
120130

121131
#### ConnectionString
122132

133+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
134+
123135
This method returns the dsn connection string to connect to the ClickHouse container, using the default, native `9000/tcp` port obtained from the `ConnectionHost` method.
124136
It's possible to pass extra parameters to the connection string, e.g. `dial_timeout=300ms` or `skip_verify=false`, in a variadic way.
125137

docs/modules/cockroachdb.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,59 +48,81 @@ When starting the CockroachDB container, you can pass options in a variadic way
4848
Use the second argument in the `Run` function to set a valid Docker image.
4949
In example: `Run(context.Background(), "cockroachdb/cockroach:latest-v23.1")`.
5050

51-
{% include "../features/common_functional_options_list.md" %}
52-
5351
#### Database
5452

53+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
54+
5555
Set the database that is created & dialled with `cockroachdb.WithDatabase`.
5656

5757
#### User and Password
5858

59+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
60+
5961
You can configure the container to create a user with a password by setting `cockroachdb.WithUser` and `cockroachdb.WithPassword`.
6062

6163
`cockroachdb.WithPassword` is incompatible with `cockroachdb.WithInsecure`.
6264

6365
#### Store size
6466

67+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
68+
6569
Control the maximum amount of memory used for storage, by default this is 100% but can be changed by provided a valid option to `WithStoreSize`. Checkout https://www.cockroachlabs.com/docs/stable/cockroach-start#store for the full range of options available.
6670

6771
#### TLS authentication
6872

73+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
74+
6975
`cockroachdb.WithInsecure` lets you disable the use of TLS on connections.
7076

7177
`cockroachdb.WithInsecure` is incompatible with `cockroachdb.WithPassword`.
7278

7379
#### Initialization Scripts
7480

81+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
82+
7583
`cockroachdb.WithInitScripts` adds the given scripts to those automatically run when the container starts.
7684
These will be ignored if data exists in the `/cockroach/cockroach-data` directory within the container.
7785

86+
#### No Cluster Defaults
87+
88+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
89+
7890
`cockroachdb.WithNoClusterDefaults` disables the default cluster settings script.
7991

8092
Without this option Cockroach containers run `data/cluster-defaults.sql` on startup
8193
which configures the settings recommended by Cockroach Labs for
8294
[local testing clusters](https://www.cockroachlabs.com/docs/stable/local-testing)
8395
unless data exists in the `/cockroach/cockroach-data` directory within the container.
8496

97+
{% include "../features/common_functional_options_list.md" %}
98+
8599
### Container Methods
86100

87101
The CockroachDB container exposes the following methods:
88102

89103
#### ConnectionString
90104

105+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
106+
91107
Dial address to open a new connection.
92108

93109
#### MustConnectionString
94110

111+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
112+
95113
Same as `ConnectionString` but any error to generate the address will raise a panic
96114

97115
#### TLSConfig
98116

117+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
118+
99119
Returns `*tls.Config` setup to allow you to dial your client over TLS, if enabled, else this will error with `cockroachdb.ErrTLSNotEnabled`.
100120

101121
!!!info
102122
The `TLSConfig()` function is deprecated and will be removed in the next major release of _Testcontainers for Go_.
103123

104124
#### ConnectionConfig
105125

126+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
127+
106128
Returns `*pgx.ConnConfig` which can be passed to `pgx.ConnectConfig` to open a new connection.

docs/modules/consul.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ When starting the Consul container, you can pass options in a variadic way to co
5050

5151
#### Configuration File
5252

53+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
54+
5355
If you need to customize the behavior for the deployed node you can use either `WithConfigString(config string)` or `WithConfigFile(configPath string)`.
5456
The configuration has to be in JSON format and will be loaded at the node startup.
5557

@@ -61,6 +63,8 @@ The Consul container exposes the following method:
6163

6264
#### ApiEndpoint
6365

66+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
67+
6468
This method returns the connection string to connect to the Consul container API, using the default `8500` port.
6569

6670
<!--codeinclude-->

docs/modules/couchbase.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ When starting the Couchbase container, you can pass options in a variadic way to
8484

8585
#### Credentials
8686

87+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
88+
8789
If you need to change the default credentials for the admin user, you can use `WithAdminCredentials(user, password)` with a valid username and password.
8890
When the password has less than 6 characters, the container won't be created and the `New` function will throw an error.
8991

@@ -92,6 +94,8 @@ When the password has less than 6 characters, the container won't be created and
9294

9395
#### Buckets
9496

97+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
98+
9599
When creating a new Couchbase container, you can create one or more buckets. The module exposes a `WithBuckets` optional function that accepts a slice of buckets to be created.
96100
To create a new bucket, the module also exposes a `NewBucket` function, where you can pass the bucket name.
97101

@@ -108,6 +112,8 @@ It's possible to customize a newly created bucket, using the following options:
108112

109113
#### Index Storage
110114

115+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
116+
111117
It's possible to set the storage mode to be used for all global secondary indexes in the cluster.
112118

113119
!!!warning
@@ -119,6 +125,8 @@ It's possible to set the storage mode to be used for all global secondary indexe
119125

120126
#### Services
121127

128+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
129+
122130
By default, the container will start with the following services: `kv`, `n1ql`, `fts` and `index`.
123131

124132
!!!warning
@@ -131,13 +139,19 @@ By default, the container will start with the following services: `kv`, `n1ql`,
131139

132140
#### ConnectionString
133141

142+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
143+
134144
The `ConnectionString` method returns the connection string to connect to the Couchbase container instance.
135145
It returns a string with the format `couchbase://<host>:<port>`.
136146

137147
#### Username
138148

149+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
150+
139151
The `Username` method returns the username of the Couchbase administrator.
140152

141153
#### Password
142154

155+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
156+
143157
The `Password` method returns the password of the Couchbase administrator.

docs/modules/databend.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ When starting the Databend container, you can pass options in a variadic way to
4747

4848
#### Set username, password
4949

50+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.34.0"><span class="tc-version">:material-tag: v0.34.0</span></a>
51+
5052
If you need to set a different user/password/database, you can use `WithUsername`, `WithPassword` options.
5153

5254
!!!info
@@ -60,6 +62,8 @@ The Databend container exposes the following methods:
6062

6163
#### ConnectionString
6264

65+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.34.0"><span class="tc-version">:material-tag: v0.34.0</span></a>
66+
6367
This method returns the connection string to connect to the Databend container, using the default `8000` port.
6468
It's possible to pass extra parameters to the connection string, e.g. `sslmode=disable`.
6569
@@ -69,4 +73,6 @@ It's possible to pass extra parameters to the connection string, e.g. `sslmode=d
6973
7074
#### MustGetConnectionString
7175
76+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.34.0"><span class="tc-version">:material-tag: v0.34.0</span></a>
77+
7278
`MustConnectionString` panics if the address cannot be determined.

docs/modules/dind.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The DinD container exposes the following methods:
5353

5454
#### Host
5555

56+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.36.0"><span class="tc-version">:material-tag: v0.36.0</span></a>
57+
5658
The `Host` method returns the DinD URL, to be used for connecting
5759
to the Docker API using a Docker client. It'll be returned in the format of `string`.
5860
@@ -63,6 +65,8 @@ to the Docker API using a Docker client. It'll be returned in the format of `str
6365
6466
#### LoadImage
6567
68+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.36.0"><span class="tc-version">:material-tag: v0.36.0</span></a>
69+
6670
The `LoadImage` method loads an image into the docker in docker daemon.
6771
6872
This is useful for testing images generated locally without having to push them to a public docker registry.

0 commit comments

Comments
 (0)