package operator

import (
	"helmet/app/config"
	"helmet/app/logger"
	"helmet/app/rproxy"
)

type OperatorConfig struct {
	Auths []config.Auth
	Proxy *rproxy.Proxy
}

type Operator struct {
	log   *logger.Logger
	auths []config.Auth
	proxy *rproxy.Proxy
}

func NewOperator(conf *OperatorConfig) (*Operator, error) {
	var err error
	oper := &Operator{
		auths: conf.Auths,
		proxy: conf.Proxy,
	}
	oper.log = logger.NewLogger("operator")
	return oper, err
}
