context

package
v0.0.0-...-3712671 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2014 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	// GetRemoteAddr returns the client address
	GetRemoteAddr() string
	// GetUsername returns the username for the request
	GetUsername() string
	// HTML returns an HTML representation of this context
	HTML() template.HTML
	// String returns a string representation of this Context
	String() string
}

Context represents the context for SqlQuery RPC calls.

type DummyContext

type DummyContext struct{}

DummyContext is a dummy implementation of Context

func (*DummyContext) GetRemoteAddr

func (dc *DummyContext) GetRemoteAddr() string

func (*DummyContext) GetUsername

func (dc *DummyContext) GetUsername() string

func (*DummyContext) HTML

func (dc *DummyContext) HTML() template.HTML

func (*DummyContext) String

func (dc *DummyContext) String() string

type GoRPCContext

type GoRPCContext proto.Context

GoRPCContext is a Go RPC implementation of Context

func NewGoRPCContext

func NewGoRPCContext(context *proto.Context) *GoRPCContext

NewGoRPCContext creates a new GoRPCContext

func (*GoRPCContext) GetRemoteAddr

func (grc *GoRPCContext) GetRemoteAddr() string

GetRemoteAddr implements Context.GetRemoteAddr

func (*GoRPCContext) GetUsername

func (grc *GoRPCContext) GetUsername() string

GetUsername implements Context.GetUsername

func (*GoRPCContext) HTML

func (grc *GoRPCContext) HTML() template.HTML

HTML implements Context.HTML

func (*GoRPCContext) String

func (grc *GoRPCContext) String() string

String implements Context.String

Jump to

Keyboard shortcuts

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