simple

package
v0.0.0-...-1a62c48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	// contains filtered or unexported fields
}

BasicAuth use token to auth grcp request

func NewBasicAuth

func NewBasicAuth(username, password string) *BasicAuth

NewBasicAuth return a basicauth obj

func (*BasicAuth) StreamInterceptor

func (b *BasicAuth) StreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamInterceptor define stream interceptor

func (*BasicAuth) UnaryInterceptor

func (b *BasicAuth) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

UnaryInterceptor define unary interceptor

type BasicCredential

type BasicCredential struct {
	// contains filtered or unexported fields
}

BasicCredential for basic credential

func NewBasicCredential

func NewBasicCredential(username, password string) *BasicCredential

NewBasicCredential new a basic credential

func (BasicCredential) GetRequestMetadata

func (c BasicCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata for basic auth

func (BasicCredential) RequireTransportSecurity

func (c BasicCredential) RequireTransportSecurity() bool

RequireTransportSecurity for ssl require

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL