github.com/avenga/couper@v1.12.2/config/runtime/access_control.go (about)

     1  package runtime
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/avenga/couper/accesscontrol"
     7  	"github.com/avenga/couper/config"
     8  )
     9  
    10  type ACDefinitions map[string]*AccessControl
    11  
    12  type AccessControl struct {
    13  	Control      accesscontrol.AccessControl
    14  	ErrorHandler []*config.ErrorHandler
    15  }
    16  
    17  func (m ACDefinitions) Add(name string, ac accesscontrol.AccessControl, eh []*config.ErrorHandler) {
    18  	n := strings.TrimSpace(name)
    19  	m[n] = &AccessControl{
    20  		Control:      ac,
    21  		ErrorHandler: eh,
    22  	}
    23  }