func NewPackageCollector(logger log.Logger, client *github.Client, failures *prometheus.CounterVec, duration *prometheus.HistogramVec, cfg config.Target) *PackageCollector {
	if failures != nil {
		failures.WithLabelValues("package").Add(0)
	}
	labels := []string{"type", "name"}
	return &PackageCollector{
		client:   client,
		logger:   log.With(logger, "collector", "package"),
		failures: failures,
		duration: duration,
		config:   cfg,
		BandwidthUsed: prometheus.NewDesc(
			"github_package_billing_gigabytes_bandwidth_used",
			"Total bandwidth used by this type in Gigabytes",
			labels,
			nil,
		),
		BandwidthPaid: prometheus.NewDesc(
			"github_package_billing_paid_gigabytes_bandwidth_used",
			"Total paid bandwidth used by this type in Gigabytes",
			labels,
			nil,
		),
		BandwidthIncluded: prometheus.NewDesc(
			"github_package_billing_included_gigabytes_bandwidth",
			"Included bandwidth for this type in Gigabytes",
			labels,
			nil,
		),
	}
}
NewPackageCollector returns a new PackageCollector.
package exporter
import (
	"context"
	"fmt"
	"time"
	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/log/level"
	"github.com/google/go-github/v35/github"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/promhippie/github_exporter/pkg/config"
)
type PackageCollector struct {
	client   *github.Client
	logger   log.Logger
	failures *prometheus.CounterVec
	duration *prometheus.HistogramVec
	config   config.Target
	BandwidthUsed     *prometheus.Desc
	BandwidthPaid     *prometheus.Desc
	BandwidthIncluded *prometheus.Desc
}