File size: 332 Bytes
d6f631f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package namespacedriver

import "context"

// NamespaceDecoder gets the namespace from the request.
type NamespaceDecoder interface {
	GetNamespace(ctx context.Context) (string, bool)
}

type StaticNamespaceDecoder string

func (d StaticNamespaceDecoder) GetNamespace(ctx context.Context) (string, bool) {
	return string(d), true
}