util

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2013 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BINARY_VERSION = "0.2.22"

Variables

This section is empty.

Functions

func ApiResponse

func ApiResponse(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})

func ByteToBase10 added in v0.2.16

func ByteToBase10(b []byte) (n uint64, err error)

func Commafy added in v0.2.16

func Commafy(i interface{}) string

func GetTopicChannelArgs

func GetTopicChannelArgs(rp Getter) (string, string, error)

func HTTPServer added in v0.2.22

func HTTPServer(listener net.Listener, handler http.Handler)

func StatsdHostKey added in v0.2.22

func StatsdHostKey(h string) string

func StringAdd

func StringAdd(s []string, a string) []string

func StringUnion

func StringUnion(s []string, a []interface{}) []string

func TCPServer added in v0.2.22

func TCPServer(listener net.Listener, handler TCPHandler)

func Version added in v0.2.20

func Version(app string) string

Types

type Getter added in v0.2.17

type Getter interface {
	Get(key string) (string, error)
}

type MockConn

type MockConn struct {
	io.ReadWriter
}

func (MockConn) Close

func (c MockConn) Close() error

func (MockConn) LocalAddr

func (c MockConn) LocalAddr() net.Addr

func (MockConn) RemoteAddr

func (c MockConn) RemoteAddr() net.Addr

func (MockConn) SetDeadline

func (c MockConn) SetDeadline(t time.Time) error

func (MockConn) SetReadDeadline

func (c MockConn) SetReadDeadline(t time.Time) error

func (MockConn) SetWriteDeadline

func (c MockConn) SetWriteDeadline(t time.Time) error

type PostParams added in v0.2.17

type PostParams struct {
	*http.Request
}

func (*PostParams) Get added in v0.2.17

func (p *PostParams) Get(key string) (string, error)

type ReqParams

type ReqParams struct {
	url.Values
	Body []byte
}

func NewReqParams

func NewReqParams(req *http.Request) (*ReqParams, error)

func (*ReqParams) Get added in v0.2.16

func (r *ReqParams) Get(key string) (string, error)

func (*ReqParams) GetAll added in v0.2.16

func (r *ReqParams) GetAll(key string) ([]string, error)

type StatsdClient added in v0.2.16

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

func NewStatsdClient added in v0.2.16

func NewStatsdClient(addr string, prefix string) *StatsdClient

func (*StatsdClient) Close added in v0.2.16

func (c *StatsdClient) Close() error

func (*StatsdClient) CreateSocket added in v0.2.16

func (c *StatsdClient) CreateSocket() error

func (*StatsdClient) Decr added in v0.2.16

func (c *StatsdClient) Decr(stat string, count int64) error

func (*StatsdClient) Gauge added in v0.2.16

func (c *StatsdClient) Gauge(stat string, value int64) error

func (*StatsdClient) Incr added in v0.2.16

func (c *StatsdClient) Incr(stat string, count int64) error

func (*StatsdClient) String added in v0.2.16

func (c *StatsdClient) String() string

func (*StatsdClient) Timing added in v0.2.16

func (c *StatsdClient) Timing(stat string, delta int64) error

type StringArray

type StringArray []string

func (*StringArray) Set

func (a *StringArray) Set(s string) error

func (*StringArray) String

func (a *StringArray) String() string

type TCPHandler added in v0.2.22

type TCPHandler interface {
	Handle(net.Conn)
}

type WaitGroupWrapper

type WaitGroupWrapper struct {
	sync.WaitGroup
}

func (*WaitGroupWrapper) Wrap

func (w *WaitGroupWrapper) Wrap(cb func())

Directories

Path Synopsis
COPIED FROM http://code.google.com/p/go-semver/
COPIED FROM http://code.google.com/p/go-semver/

Jump to

Keyboard shortcuts

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