service/vault-factory/vault_factory.go
func New(config Config) (spec.VaultFactory, error) {
	newVaultFactory := &vaultFactory{
		Config: config,
	}

	// Dependencies.
	if newVaultFactory.Address == "" {
		return nil, microerror.Maskf(invalidConfigError, "Vault address must not be empty")
	}
	if newVaultFactory.AdminToken == "" {
		return nil, microerror.Maskf(invalidConfigError, "Vault admin token must not be empty")
	}

	return newVaultFactory, nil
}
func New(config Config) (spec.VaultFactory, error) {
	newVaultFactory := &vaultFactory{
		Config: config,
	}

	// Dependencies.
	if newVaultFactory.Address == "" {
		return nil, microerror.Maskf(invalidConfigError, "Vault address must not be empty")
	}
	if newVaultFactory.AdminToken == "" {
		return nil, microerror.Maskf(invalidConfigError, "Vault admin token must not be empty")
	}

	return newVaultFactory, nil
}
// New creates a new configured Vault factory.