Documentation ¶
Index ¶
Constants ¶
View Source
const (
MetadataAuthorization string = "Authorization"
)
Variables ¶
This section is empty.
Functions ¶
func BuildAuthorization ¶
func ParseAuthorization ¶
func ParseAuthorization(auth string, fc BasicAuthFunc) bool
Types ¶
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
func NewBasicAuth ¶
func NewBasicAuth(fc BasicAuthFunc) *BasicAuth
func (BasicAuth) Stream ¶
func (a BasicAuth) Stream( srv any, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler, ) error
type BasicAuthClient ¶
type BasicAuthClient struct {
// contains filtered or unexported fields
}
func NewBasicAuthClient ¶
func NewBasicAuthClient(username, password string) *BasicAuthClient
func (BasicAuthClient) Stream ¶
func (c BasicAuthClient) Stream( ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
func (BasicAuthClient) Unary ¶
func (c BasicAuthClient) Unary( ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
type BasicAuthFunc ¶
func NewMemoryBasicAuthFunc ¶
func NewMemoryBasicAuthFunc(users map[string]string) BasicAuthFunc
Click to show internal directories.
Click to hide internal directories.