Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterceptAPIKey ¶ added in v0.17.0
func InterceptAPIKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
InterceptAPIKey reads apikey from requests and puts the value into the context.
func NewAPIKeyInterceptor ¶
func NewAPIKeyInterceptor() grpc.UnaryServerInterceptor
NewAPIKeyInterceptor creates instance of apikey interceptor
Types ¶
type DeprecatedAPIKeyCredentials ¶ added in v0.22.0
type DeprecatedAPIKeyCredentials struct {
// contains filtered or unexported fields
}
DeprecatedAPIKeyCredentials implements grpc/credentials.PerRPCCredentials for authenticating with the grpc server. This does not work with drpc.
func NewDeprecatedAPIKeyCredentials ¶ added in v0.22.0
func NewDeprecatedAPIKeyCredentials(apikey string) *DeprecatedAPIKeyCredentials
NewDeprecatedAPIKeyCredentials returns a new DeprecatedAPIKeyCredentials
func (*DeprecatedAPIKeyCredentials) GetRequestMetadata ¶ added in v0.22.0
func (creds *DeprecatedAPIKeyCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata gets the current request metadata, refreshing tokens if required.
func (*DeprecatedAPIKeyCredentials) RequireTransportSecurity ¶ added in v0.22.0
func (creds *DeprecatedAPIKeyCredentials) RequireTransportSecurity() bool
RequireTransportSecurity indicates whether the credentials requires transport security.
Click to show internal directories.
Click to hide internal directories.