package operator

import (
	"helmet/app/logger"

	"helmet/app/config"
	"helmet/app/rproxy"
)

type OperatorConfig struct {
	Auths []config.Auth
}

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,
	}
	oper.log = logger.NewLogger("operator")
	oper.proxy = rproxy.NewProxy()
	return oper, err
}
