Documentation ¶
Index ¶
- Constants
- Variables
- func GetNameSpaceFromHeader(ctx context.Context) string
- func GetNamespace(ctx context.Context) (string, error)
- func IsAdminApi(fullMethodName string) 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 RequestMetadata) context.Context
- type AccessToken
- type AccessTokenNamespaceExtractor
- type NamespaceExtractor
- type RequestMetadata
- func GetGrpcEndPointMetadataFromFullMethod(ctx context.Context, fullMethod string, methodType string) RequestMetadata
- func GetRequestMetadata(ctx context.Context) (*RequestMetadata, error)
- func NewRequestEndpointMetadata(ctx context.Context, serviceName string, methodInfo grpc.MethodInfo) RequestMetadata
- func (r *RequestMetadata) GetFullMethod() string
- func (r *RequestMetadata) GetInitialTags() map[string]string
- func (r *RequestMetadata) GetMethodInfo() grpc.MethodInfo
- func (r *RequestMetadata) GetMethodName() string
- func (r *RequestMetadata) GetServiceName() string
- func (r *RequestMetadata) GetServiceType() string
- func (r *RequestMetadata) GetUnAuthenticatedNamespaceName() string
- type RequestMetadataCtxKey
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 = api.Errorf(api.Code_NOT_FOUND, "namespace not found")
Functions ¶
func GetNameSpaceFromHeader ¶
func IsAdminApi ¶
func SetAccessToken ¶
func SetAccessToken(ctx context.Context, token *AccessToken) context.Context
func SetRequestMetadata ¶
func SetRequestMetadata(ctx context.Context, metadata RequestMetadata) context.Context
Types ¶
type AccessToken ¶
func GetAccessToken ¶
func GetAccessToken(ctx context.Context) (*AccessToken, error)
type AccessTokenNamespaceExtractor ¶
type AccessTokenNamespaceExtractor struct { }
type NamespaceExtractor ¶
NamespaceExtractor - extract the namespace from context
type RequestMetadata ¶
type RequestMetadata struct {
// contains filtered or unexported fields
}
func GetGrpcEndPointMetadataFromFullMethod ¶
func GetGrpcEndPointMetadataFromFullMethod(ctx context.Context, fullMethod string, methodType string) RequestMetadata
func GetRequestMetadata ¶
func GetRequestMetadata(ctx context.Context) (*RequestMetadata, error)
func NewRequestEndpointMetadata ¶
func NewRequestEndpointMetadata(ctx context.Context, serviceName string, methodInfo grpc.MethodInfo) RequestMetadata
func (*RequestMetadata) GetFullMethod ¶
func (r *RequestMetadata) GetFullMethod() string
func (*RequestMetadata) GetInitialTags ¶
func (r *RequestMetadata) GetInitialTags() map[string]string
func (*RequestMetadata) GetMethodInfo ¶
func (r *RequestMetadata) GetMethodInfo() grpc.MethodInfo
func (*RequestMetadata) GetMethodName ¶
func (r *RequestMetadata) GetMethodName() string
func (*RequestMetadata) GetServiceName ¶
func (r *RequestMetadata) GetServiceName() string
func (*RequestMetadata) GetServiceType ¶
func (r *RequestMetadata) GetServiceType() string
func (*RequestMetadata) GetUnAuthenticatedNamespaceName ¶
func (r *RequestMetadata) GetUnAuthenticatedNamespaceName() string
type RequestMetadataCtxKey ¶
type RequestMetadataCtxKey struct { }
Click to show internal directories.
Click to hide internal directories.