--- Convenience transport options ------------------------------------------ These delegate to elastictransport options so callers don't need to import the transport package for common settings. WithAPIKey configures API Key authentication. The key should be the base64-encoded value returned by the
(apiKey string)
| 112 | // WithAPIKey configures API Key authentication. The key should be the |
| 113 | // base64-encoded value returned by the Elasticsearch create API key endpoint. |
| 114 | func WithAPIKey(apiKey string) Option { |
| 115 | return withTransportOption(elastictransport.WithAPIKey(apiKey)) |
| 116 | } |
| 117 | |
| 118 | // WithBasicAuth configures HTTP Basic Authentication with the given username |
| 119 | // and password. |