factory

package
v4.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2025 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package factory provides factory functions for creating TeamVault connectors and HTTP clients.

This package simplifies the creation of TeamVault connectors by providing high-level factory functions that handle configuration parsing and proper initialization of connector chains including caching and disk fallback capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConnector

func CreateConnector(
	httpClient *http.Client,
	apiURL teamvault.Url,
	apiUser teamvault.User,
	apiPassword teamvault.Password,
	staging teamvault.Staging,
	cacheEnabled bool,
	currentDateTime libtime.CurrentDateTime,
) teamvault.Connector

func CreateConnectorWithConfig

func CreateConnectorWithConfig(
	ctx context.Context,
	httpClient *http.Client,
	configPath teamvault.TeamvaultConfigPath,
	apiURL teamvault.Url,
	apiUser teamvault.User,
	apiPassword teamvault.Password,
	staging teamvault.Staging,
	cacheEnabled bool,
	currentDateTime libtime.CurrentDateTime,
) (teamvault.Connector, error)

func CreateHttpClient

func CreateHttpClient(ctx context.Context) (*http.Client, error)

func CreateRemoteConnector

func CreateRemoteConnector(
	httpClient *http.Client,
	apiURL teamvault.Url,
	apiUser teamvault.User,
	apiPassword teamvault.Password,
	currentDateTime libtime.CurrentDateTime,
) teamvault.Connector

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL