comb

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 22 Imported by: 0

README

comb

Tools for building any kind of apps.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache func() Cacher
View Source
var Config func() Configer
View Source
var Log func() Logger
View Source
var Metric func() Metricer
View Source
var RouterMux func() RouterMuxer
View Source
var SQL func() SQLer

Functions

func Client

func Client() *http.Client

func ListenAndServe

func ListenAndServe()

func Up

func Up(version string)

Types

type Cacher

type Cacher interface {
	Set(key string, value []byte, expiration int32) error
	Get(key string) ([]byte, error)
	GetMulti(keys []string) (map[string][]byte, error)
	Delete(key string) error
}

type Configer

type Configer interface {
	Set(key string, value interface{})
	Int(key string) int
	Int64(key string) int64
	String(key string) string
	Bool(key string) bool
	Duration(key string) time.Duration
}

type HttpErrorMessage

type HttpErrorMessage struct {
	Error   bool   `json:"error"`
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type HttpErrorMessages

type HttpErrorMessages struct {
	Error    bool     `json:"error"`
	Code     int      `json:"code"`
	Messages []string `json:"messages"`
}

type HttpSuccessMessage added in v0.0.3

type HttpSuccessMessage struct {
	Error   bool   `json:"error"`
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Logger

type Logger interface {
	Info(path string)
	Error(err error, msg string)
	Fatal(err error, msg string)
	Custom(msg string, level string)
}

type Metricer

type Metricer interface {
	Refresh()
	String() string
}

type RouterMuxer

type RouterMuxer interface {
	Handle(method, path string, handle httprouter.Handle)
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

type SQLer

type SQLer interface {
	Conn() *dbr.Connection
	Ping() error
	Buffer() dbr.Buffer
}

Jump to

Keyboard shortcuts

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