Documentation ¶
Index ¶
- Constants
- Variables
- func GetMetadataFromHeader(ctx context.Context) (string, bool)
- func GetNamespace(ctx context.Context) (string, error)
- func IsAdminApi(fullMethodName string) bool
- func IsHumanUser(ctx context.Context) bool
- func IsRead(ctx context.Context) bool
- func IsWrite(ctx context.Context) bool
- func SetAccessToken(ctx context.Context, token *AccessToken) context.Context
- func SetNamespace(ctx context.Context, namespace string) context.Context
- func SetRequestMetadata(ctx context.Context, metadata Metadata) context.Context
- type AccessToken
- type AccessTokenNamespaceExtractor
- type Metadata
- func (r *Metadata) GetFullMethod() string
- func (r *Metadata) GetInitialTags() map[string]string
- func (r *Metadata) GetMethodInfo() grpc.MethodInfo
- func (r *Metadata) GetMethodName() string
- func (r *Metadata) GetServiceName() string
- func (r *Metadata) GetServiceType() string
- func (r *Metadata) GetUnAuthenticatedNamespaceName() string
- type MetadataCtxKey
- type NamespaceExtractor
Constants ¶
View Source
const ( // DefaultNamespaceName is for "default" namespace in the cluster which means all the databases created are under a single // namespace. // It is totally fine for a deployment to choose this and just have one namespace. The default assigned value for // this namespace is 1. DefaultNamespaceName string = "default_namespace" DefaultNamespaceId = uint32(1) UnknownValue = "unknown" )
Variables ¶
View Source
var ErrNamespaceNotFound = errors.NotFound("namespace not found")
Functions ¶
func IsAdminApi ¶
func IsHumanUser ¶
func SetAccessToken ¶
func SetAccessToken(ctx context.Context, token *AccessToken) context.Context
Types ¶
type AccessToken ¶
func GetAccessToken ¶
func GetAccessToken(ctx context.Context) (*AccessToken, error)
type AccessTokenNamespaceExtractor ¶
type AccessTokenNamespaceExtractor struct{}
type Metadata ¶
type Metadata struct { IsHuman bool // contains filtered or unexported fields }
func (*Metadata) GetFullMethod ¶
func (*Metadata) GetInitialTags ¶
func (*Metadata) GetMethodInfo ¶
func (r *Metadata) GetMethodInfo() grpc.MethodInfo
func (*Metadata) GetMethodName ¶
func (*Metadata) GetServiceName ¶
func (*Metadata) GetServiceType ¶
func (*Metadata) GetUnAuthenticatedNamespaceName ¶
type MetadataCtxKey ¶
type MetadataCtxKey struct{}
Click to show internal directories.
Click to hide internal directories.