Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenFilter ¶
func NewTokenFilter(config TokenFilterConfig) libHTTP.Filter
NewTokenFilter returns a component that implements the http.Filter interface and can conditionally allow or disallow a request on the basis of a recognized token having been provided.
Types ¶
type Service ¶
type Service interface { // Handle handles a CloudEvent. Handle(context.Context, cloudEvents.Event) error }
Service is an interface for components that can handle CloudEvents. Implementations of this interface are transport-agnostic.
func NewService ¶
func NewService(eventsClient core.EventsClient) Service
NewService returns an implementation of the Service interface for handling CloudEvents.
type TokenFilterConfig ¶
type TokenFilterConfig interface { // AddToken adds a token to the TokenFilterConfig instance's internal map of // sources to tokens. It hashes the token as it does this so that plain text // tokens do not float around in memory long-term. AddToken(source, token string) // contains filtered or unexported methods }
func NewTokenFilterConfig ¶
func NewTokenFilterConfig() TokenFilterConfig
Click to show internal directories.
Click to hide internal directories.