Documentation ¶
Index ¶
- func Config(i interface{}) chan struct{}
- func Crud[T any](opts *CrudOpts)
- func CtxDB(c context.Context) (*gorm.DB, error)
- func CtxDb(c context.Context) (db *gorm.DB, close func(), err error)
- func CtxDone(c context.Context) func()
- func CtxErr(c context.Context, err error) bool
- func CtxReq(c context.Context) *http.Request
- func CtxRes(c context.Context) http.ResponseWriter
- func CtxSessionID(c context.Context) string
- func CtxTenant(c context.Context) string
- func CtxVars(c context.Context) map[string]string
- func DB() (ret *gorm.DB, err error)
- func DBClose(n string) error
- func DBCloseAll()
- func DBN(n string) (ret *gorm.DB, err error)
- func DataDel(k string) (int64, error)
- func DataGet(k string) (string, error)
- func DataHDel(k string, v ...string) (int64, error)
- func DataHGet(k string, v string) (string, error)
- func DataHGetAll(k string) (map[string]string, error)
- func DataHSet(k string, v ...interface{}) (int64, error)
- func DataSet(k string, v interface{}, to int) error
- func Debug(s string, p ...interface{})
- func Dec(in []byte) (out []byte, err error)
- func Dequeue(q string, to int) ([]string, error)
- func Enc(in []byte) (out []byte, err error)
- func Enqueue(q string, v ...interface{}) error
- func Err(err error)
- func Fatal(s ...interface{})
- func Hash(in []byte) (out []byte, err error)
- func HttpHandle[TIN, TOUT any](hpath string, method string, perm PermDef, ...)
- func HttpRouter() *mux.Router
- func HttpRun(addr string)
- func HttpStart(addr string) *http.Server
- func HttpStop()
- func Init(s string)
- func IsDocker() bool
- func LockMainRoutine()
- func Log(s string, p ...interface{})
- func OnStop(f func())
- func Pub(ch string, msg interface{})
- func QRpc(q string, i interface{}, o interface{}) error
- func QSend(q string, i interface{}) error
- func QServe(q string, f func(i interface{}) (o interface{}, err error))
- func ServerTiming(w http.ResponseWriter, metric string, desc string, t time.Time)
- func SessionDec(s string) (t string, id string, hash []byte, err error)
- func SessionDel(rawid string) (ret int64, err error)
- func SessionEnc(s *Session) (id string, sessbs []byte)
- func SessionSave(s *Session) (id string, err error)
- func Sub(ch ...string) (ret <-chan *Msg, closefn func())
- type ApiEntry
- type CookieName
- type CrudOpts
- type CtxKey
- type EMPTY_TYPE
- type HeaderName
- type LoginRequest
- type LoginResponse
- type Msg
- type PermDef
- type SecGroup
- type SecPerm
- type SecUser
- type Session
- type VO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxSessionID ¶
func DBCloseAll ¶
func DBCloseAll()
func HttpHandle ¶
func HttpRouter ¶
func LockMainRoutine ¶
func LockMainRoutine()
func ServerTiming ¶
func SessionDel ¶
func SessionEnc ¶
func SessionSave ¶
Types ¶
type CookieName ¶
type CookieName string
const ( COOKIE_SESSION CookieName = "SESSIONID" COOKIE_TENANT CookieName = "TENANTID" )
type CrudOpts ¶
type EMPTY_TYPE ¶
type EMPTY_TYPE struct{}
type HeaderName ¶
type HeaderName string
const ( HEADER_APIKEY HeaderName = "X-APIKEY" HEADER_TENAT HeaderName = "X-TENANT" )
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.