// Code generated by Wire. DO NOT EDIT.

//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package client

import (
	"go-dyndns/addrproviders"
	"go-dyndns/cache"
	"go-dyndns/log"
	"go-dyndns/updater"
	"net/http"
)

// Injectors from wire.go:

func CreateClient(logger log.Logger) (*DynDnsClient, error) {
	clientClientConfig, err := loadConfig()
	if err != nil {
		return nil, err
	}
	cacheCache, err := cache.CreateCache()
	if err != nil {
		return nil, err
	}
	providerType := clientClientConfig.IpProvider
	httpClient := _wireClientValue
	addressProvider, err := addrproviders.CreateProvider(providerType, httpClient)
	if err != nil {
		return nil, err
	}
	updaterUpdater, err := updater.CreateUpdater(logger, httpClient)
	if err != nil {
		return nil, err
	}
	dynDnsClient := newDynDnsClient(clientClientConfig, logger, cacheCache, addressProvider, updaterUpdater)
	return dynDnsClient, nil
}

var (
	_wireClientValue = http.DefaultClient
)
