github.com/prebid/prebid-server/v2@v2.18.0/privacy/component.go (about)

     1  package privacy
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  const (
     8  	ComponentTypeBidder       = "bidder"
     9  	ComponentTypeAnalytics    = "analytics"
    10  	ComponentTypeRealTimeData = "rtd"
    11  	ComponentTypeGeneral      = "general"
    12  )
    13  
    14  type Component struct {
    15  	Type string
    16  	Name string
    17  }
    18  
    19  func (c Component) MatchesName(v string) bool {
    20  	return strings.EqualFold(c.Name, v)
    21  }
    22  
    23  func (c Component) MatchesType(v string) bool {
    24  	return strings.EqualFold(c.Type, v)
    25  }