Documentation ¶
Index ¶
- Variables
- type BasicAuth
- func (*BasicAuth) Descriptor() ([]byte, []int)
- func (c *BasicAuth) GetAuthorization() string
- func (m *BasicAuth) GetPassword() string
- func (c *BasicAuth) GetRequestMetadata(ctx context.Context, uris ...string) (map[string]string, error)
- func (m *BasicAuth) GetUsername() string
- func (c *BasicAuth) NewContext(ctx context.Context) context.Context
- func (*BasicAuth) ProtoMessage()
- func (c *BasicAuth) RequireTransportSecurity() bool
- func (m *BasicAuth) Reset()
- func (m *BasicAuth) String() string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BasicAuth ¶
type BasicAuth struct { Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func BasicAuthFromContext ¶
BasicAuthFromContext gets the basic auth from the specified context.Context.
If no basic auth is present, BasicAuthFromContext returns nil.
func (*BasicAuth) GetAuthorization ¶
GetAuthorization gets the request authorization.
func (*BasicAuth) GetRequestMetadata ¶
func (c *BasicAuth) GetRequestMetadata(ctx context.Context, uris ...string) (map[string]string, error)
GetRequestMetadata gets the request metadata for gRPC.
func (*BasicAuth) NewContext ¶
NewContext returns a new context.Context with the basic auth attached.
func (*BasicAuth) RequireTransportSecurity ¶
RequireTransportSecurity says whether BasicAuth requires transport security.
Click to show internal directories.
Click to hide internal directories.