client

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToServerNoAuth

func ConnectToServerNoAuth() (conn *grpc.ClientConn, err error)

ConnectToServerNoAuth creates a connection to the server without any authorization

func ConnectToServerWithAuth

func ConnectToServerWithAuth(token string) (conn *grpc.ClientConn, err error)

ConnectToServerWithAuth creates a connection to the server without any authorization

Types

type NoAuth

type NoAuth struct{}

NoAuth is the auth token used to call gRPC APIs that does not require auth

func (*NoAuth) GetRequestMetadata

func (t *NoAuth) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

GetRequestMetadata gets the request metadata

func (*NoAuth) RequireTransportSecurity

func (t *NoAuth) RequireTransportSecurity() bool

RequireTransportSecurity requires transport authority

type TokenAuth

type TokenAuth struct {
	Token string
}

TokenAuth is the auth token used to call gRPC APIs that requires auth

func (*TokenAuth) GetRequestMetadata

func (t *TokenAuth) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

GetRequestMetadata gets the request metadata

func (*TokenAuth) RequireTransportSecurity

func (t *TokenAuth) RequireTransportSecurity() bool

RequireTransportSecurity requires transport authority

Jump to

Keyboard shortcuts

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