sessions

package
v0.0.0-...-c87944f Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTokenNotFound = errors.New("token not found")
	ErrEmptyRequest  = errors.New("empty request")
	ErrNotFound      = errors.New("user not found")
	ErrWrongCreds    = errors.New("bad users creds")
)
View Source
var StreamInterceptor = func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
	return handler(srv, &Stream{ss})
}
View Source
var UnaryInterceptor = func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {

	ctx = context.WithValue(ctx, "REQID", "someID")

	return handler(ctx, req)
}

Functions

func New

func New() pb.SessionServer

Types

type ConnGetter

type ConnGetter func() redis.Conn

type Stream

type Stream struct {
	grpc.ServerStream
}

func (*Stream) Context

func (as *Stream) Context() context.Context

Jump to

Keyboard shortcuts

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