Versions in this module Expand all Collapse all v1 v1.0.0 Jun 24, 2021 Changes in this version + var ErrConnDispatched = errors.New("credentials: rawConn is dispatched out of gRPC") + func CheckSecurityLevel(ctx context.Context, level SecurityLevel) error + type AuthInfo interface + AuthType func() string + type Bundle interface + NewWithMode func(mode string) (Bundle, error) + PerRPCCredentials func() PerRPCCredentials + TransportCredentials func() TransportCredentials + type ChannelzSecurityInfo interface + GetSecurityValue func() ChannelzSecurityValue + type ChannelzSecurityValue interface + type CommonAuthInfo struct + SecurityLevel SecurityLevel + func (c *CommonAuthInfo) GetCommonAuthInfo() *CommonAuthInfo + type OtherChannelzSecurityValue struct + Name string + Value proto.Message + type PerRPCCredentials interface + GetRequestMetadata func(ctx context.Context, uri ...string) (map[string]string, error) + RequireTransportSecurity func() bool + type ProtocolInfo struct + ProtocolVersion string + SecurityProtocol string + SecurityVersion string + ServerName string + type RequestInfo struct + AuthInfo AuthInfo + Method string + func RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) + type SecurityLevel int + const IntegrityOnly + const NoSecurity + const PrivacyAndIntegrity + func (s SecurityLevel) String() string + type TLSChannelzSecurityValue struct + LocalCertificate []byte + RemoteCertificate []byte + StandardName string + type TLSInfo struct + State tls.ConnectionState + func (t TLSInfo) AuthType() string + func (t TLSInfo) GetSecurityValue() ChannelzSecurityValue + type TransportCredentials interface + ClientHandshake func(context.Context, string, net.Conn) (net.Conn, AuthInfo, error) + Clone func() TransportCredentials + Info func() ProtocolInfo + OverrideServerName func(string) error + ServerHandshake func(net.Conn) (net.Conn, AuthInfo, error) + func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials + func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) + func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials + func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) + func NewTLS(c *tls.Config) TransportCredentials