type PerRPCCredentials … type SecurityLevel … const InvalidSecurityLevel … const NoSecurity … const IntegrityOnly … const PrivacyAndIntegrity … // String returns SecurityLevel in a string format. func (s SecurityLevel) String() string { … } type CommonAuthInfo … // GetCommonAuthInfo returns the pointer to CommonAuthInfo struct. func (c CommonAuthInfo) GetCommonAuthInfo() CommonAuthInfo { … } type ProtocolInfo … type AuthInfo … var ErrConnDispatched … type TransportCredentials … type Bundle … type RequestInfo … // RequestInfoFromContext extracts the RequestInfo from the context if it exists. // // This API is experimental. func RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) { … } type ClientHandshakeInfo … // ClientHandshakeInfoFromContext returns the ClientHandshakeInfo struct stored // in ctx. // // This API is experimental. func ClientHandshakeInfoFromContext(ctx context.Context) ClientHandshakeInfo { … } // CheckSecurityLevel checks if a connection's security level is greater than or equal to the specified one. // It returns success if 1) the condition is satisfied or 2) AuthInfo struct does not implement GetCommonAuthInfo() method // or 3) CommonAuthInfo.SecurityLevel has an invalid zero value. For 2) and 3), it is for the purpose of backward-compatibility. // // This API is experimental. func CheckSecurityLevel(ai AuthInfo, level SecurityLevel) error { … } type ChannelzSecurityInfo … type ChannelzSecurityValue … type OtherChannelzSecurityValue …