Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToUint16(b []byte) (v uint16)
- func BytesToUint32(b []byte) (v uint32)
- func BytesToUint64(b []byte) (v uint64)
- func Delete(url string, jwt security.EncodedJwt) error
- func Do(req *http.Request) (resp *http.Response, err error)
- func DownloadUrl(fileUrl string) (filename string, rc io.ReadCloser, e error)
- func Get(url string) ([]byte, error)
- func GetBufferStream(url string, values url.Values, allocatedBytes []byte, eachBuffer func([]byte)) error
- func GetFileSize(file *os.File) (size int64, err error)
- func GetUrlStream(url string, values url.Values, readFn func(io.Reader) error) error
- func Head(url string) (http.Header, error)
- func NewListener(addr string, timeout time.Duration) (net.Listener, error)
- func NormalizeUrl(url string) string
- func OnInterrupt(fn func())
- func ParseInt(text string, defaultValue int) int
- func ParseUint64(text string, defaultValue uint64) uint64
- func Post(url string, values url.Values) ([]byte, error)
- func PostBytes(url string, body []byte) ([]byte, error)
- func Readln(r *bufio.Reader) ([]byte, error)
- func SetupProfiling(cpuProfile, memProfile string)
- func TestFolderWritable(folder string) (err error)
- func Uint16toBytes(b []byte, v uint16)
- func Uint32toBytes(b []byte, v uint32)
- func Uint64toBytes(b []byte, v uint64)
- func Uint8toBytes(b []byte, v uint8)
- type ConcurrentReadMap
- type Config
- func (c *Config) GetArray(key string) []interface{}
- func (c *Config) GetBool(key string) bool
- func (c *Config) GetFloat(key string) float64
- func (c *Config) GetInt(key string) int
- func (c *Config) GetString(key string) string
- func (c *Config) LoadMerge(filename string)
- func (c *Config) StringMerge(s string)
- type Conn
- type Listener
Constants ¶
View Source
const (
VERSION = "0.76"
)
Variables ¶
View Source
var (
Transport *http.Transport
)
Functions ¶
func BytesToUint16 ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func DownloadUrl ¶
func DownloadUrl(fileUrl string) (filename string, rc io.ReadCloser, e error)
func GetBufferStream ¶
func GetUrlStream ¶
func NormalizeUrl ¶
func OnInterrupt ¶
func OnInterrupt(fn func())
func ParseUint64 ¶
func SetupProfiling ¶
func SetupProfiling(cpuProfile, memProfile string)
func TestFolderWritable ¶
func Uint16toBytes ¶
func Uint32toBytes ¶
func Uint64toBytes ¶
func Uint8toBytes ¶
Types ¶
type ConcurrentReadMap ¶
A mostly for read map, which can thread-safely initialize the map entries.
func NewConcurrentReadMap ¶
func NewConcurrentReadMap() *ConcurrentReadMap
func (*ConcurrentReadMap) Delete ¶
func (m *ConcurrentReadMap) Delete(key string)
func (*ConcurrentReadMap) Find ¶
func (m *ConcurrentReadMap) Find(key string) (interface{}, bool)
func (*ConcurrentReadMap) Get ¶
func (m *ConcurrentReadMap) Get(key string, newEntry func() interface{}) interface{}
func (*ConcurrentReadMap) Items ¶
func (m *ConcurrentReadMap) Items() (itemsCopy []interface{})
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func LoadConfig ¶
Loads config information from a JSON file
func LoadConfigString ¶
Loads config information from a JSON string
func (*Config) StringMerge ¶
Click to show internal directories.
Click to hide internal directories.