code: func NewAuthProxy(c *config.Config, sess session.Session, db *db.DB, t *http.Transport,
  	client *registry.Client, logic *logic.Engine, updates *updates.Engine, groupShared bool) (*AuthProxy, error) {
  
  	l, err := makeSocket(c.TransportAddress, groupShared)
  	if err != nil {
  		return nil, err
  	}
  
  	return &AuthProxy{
  		u:       c.RegistryURI,
  		l:       l,
  		c:       c,
  		db:      db,
  		sess:    sess,
  		o:       observer.New(),
  		t:       t,
  		client:  client,
  		logic:   logic,
  		updates: updates,
  	}, nil
  }
docs: // NewAuthProxy returns a new AuthProxy. It will return an error if creation
  // of the domain socket fails, or the upstream registry URL is misconfigured.
  //
  // If groupShared is true, the domain socket will be readable and writable by
  // both the user and the user's group (so daemon can be accessed by multiple
  // users). If false, the socket will only be readable and writable by the user
  // running the daemon.