Documentation
¶
Index ¶
- type Factory
- func (f *Factory) NewClient(opts Options) *dotenv.Client
- func (f *Factory) NewClientFromAPIKey(apiKey, baseURL, organization string) *dotenv.Client
- func (f *Factory) NewClientFromAccount(account *config.Account, includeOrg bool) (*dotenv.Client, error)
- func (f *Factory) NewUnauthenticatedClient(baseURL string, insecureSkipVerify bool) *dotenv.Client
- func (f *Factory) RefreshTokenAndCreateClient(ctx context.Context, account *config.Account, am *config.AccountManager, ...) (*dotenv.Client, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory provides methods for creating configured SDK clients
func NewFactory ¶
NewFactory creates a new SDK client factory
func (*Factory) NewClient ¶
NewClient creates a new SDK client with the provided options. Options is a config struct built a handful of times at startup, so passing it by value (gocritic hugeParam) is fine and keeps callers simple.
func (*Factory) NewClientFromAPIKey ¶
NewClientFromAPIKey creates an SDK client with API key authentication
func (*Factory) NewClientFromAccount ¶
func (f *Factory) NewClientFromAccount(account *config.Account, includeOrg bool) (*dotenv.Client, error)
NewClientFromAccount creates an SDK client from a config.Account
func (*Factory) NewUnauthenticatedClient ¶
NewUnauthenticatedClient creates an SDK client without authentication
type Options ¶
type Options struct {
// BaseURL is the API base URL
BaseURL string
// Authentication
APIKey string
BearerToken string
// Organization context
Organization string
// TLS configuration
InsecureSkipVerify bool
// TelemetrySecret HMAC-signs CLI telemetry requests. Empty ⇒ unsigned.
TelemetrySecret string
}
Options contains configuration for creating SDK clients
Click to show internal directories.
Click to hide internal directories.