tests

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateString

func GenerateString() string

func InsertUser

func InsertUser(t *testing.T, db *sql.DB, uid uuid.UUID)

func NewAPIServer

func NewAPIServer(t *testing.T, runtime *server.Runtime) (*server.ApiServer, *server.Pipeline)

func NewAuthenticatedAPIClient

func NewAuthenticatedAPIClient(t *testing.T, customID string) (*grpc.ClientConn, apigrpc.NakamaClient, *api.Session, context.Context)

func NewConsoleLogger

func NewConsoleLogger(output *os.File, verbose bool) *zap.Logger

func NewDB

func NewDB(t *testing.T) *sql.DB

func NewSession

func NewSession(t *testing.T, customID string) (*grpc.ClientConn, apigrpc.NakamaClient, *api.Session, context.Context)

func UserIDFromSession

func UserIDFromSession(session *api.Session) (uuid.UUID, error)

Types

type DummyMessageRouter

type DummyMessageRouter struct{}

func (*DummyMessageRouter) SendDeferred

func (d *DummyMessageRouter) SendDeferred(*zap.Logger, bool, uint8, []*server.DeferredMessage)

func (*DummyMessageRouter) SendToPresenceIDs

func (d *DummyMessageRouter) SendToPresenceIDs(*zap.Logger, []*server.PresenceID, bool, uint8, *rtapi.Envelope)

func (*DummyMessageRouter) SendToStream

type DummySession

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

func (*DummySession) ClientIP

func (d *DummySession) ClientIP() string

func (*DummySession) ClientPort

func (d *DummySession) ClientPort() string

func (*DummySession) Close

func (d *DummySession) Close(reason string)

func (*DummySession) Consume

func (d *DummySession) Consume(func(logger *zap.Logger, session server.Session, envelope *rtapi.Envelope) bool)

func (*DummySession) Context

func (d *DummySession) Context() context.Context

func (*DummySession) Expiry

func (d *DummySession) Expiry() int64

func (*DummySession) Format

func (d *DummySession) Format() server.SessionFormat

func (*DummySession) ID

func (d *DummySession) ID() uuid.UUID

func (*DummySession) Logger

func (d *DummySession) Logger() *zap.Logger

func (*DummySession) Send

func (d *DummySession) Send(isStream bool, mode uint8, envelope *rtapi.Envelope) error

func (*DummySession) SendBytes

func (d *DummySession) SendBytes(isStream bool, mode uint8, payload []byte) error

func (*DummySession) SetUsername

func (d *DummySession) SetUsername(string)

func (*DummySession) UserID

func (d *DummySession) UserID() uuid.UUID

func (*DummySession) Username

func (d *DummySession) Username() string

Jump to

Keyboard shortcuts

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