Versions in this module Expand all Collapse all v0 v0.0.3 Apr 10, 2023 Changes in this version type Opts + CertFile string + KeyFile string v0.0.2 Nov 14, 2022 Changes in this version + func WriteJSON(w http.ResponseWriter, obj interface{}) error + type JSON struct + Data interface{} + func (r JSON) Render(w http.ResponseWriter) (err error) + func (r JSON) WriteContentType(w http.ResponseWriter) v0.0.1 Nov 11, 2022 Changes in this version + func Env(key string) string + func Envs(i interface{}, mode ...string) + func InitLogger(rw io.Writer) + func RegisterFilter(filter Filter, values ...string) bool + func RegisterURI(uri URI, cangoName ...string) bool + func RegisterURIWithPrefix(prefix string, uri URI, cangoName ...string) bool + func SessionGet(r *http.Request, key string, value interface{}) + func SessionPut(r *http.Request, rw http.ResponseWriter, key string, value interface{}, ...) + func SetError(code int, fn func(w http.ResponseWriter, r *http.Request)) + func SetGorillaSessionStore(store sessions.Store) + func Version() string + type Addr struct + Host string + Port int + func (addr Addr) String() string + type Can struct + func NewCan(name ...string) *Can + func (can *Can) FallbackHandler(handler http.Handler) *Can + func (can *Can) Filter(f Filter, uris ...URI) *Can + func (can *Can) GinRoute(eg *gin.Engine) + func (can *Can) Mode(runMode string) *Can + func (can *Can) RegTplFunc(name string, fn interface{}) *Can + func (can *Can) Route(uris ...URI) *Can + func (can *Can) RouteFunc(fns ...interface{}) *Can + func (can *Can) RouteFuncWithPrefix(prefix string, fns ...interface{}) *Can + func (can *Can) RouteWithPrefix(prefix string, uris ...URI) *Can + func (can *Can) Run(as ...interface{}) error + func (can *Can) ServeHTTP(rw http.ResponseWriter, r *http.Request) + func (can *Can) SetJsonWriter(rth responseTypeHandler) *Can + func (can *Can) ToGins() []*GinHandler + func (p *Can) Shutdown() *Can + type Caster func(string) reflect.Value + type Constructor interface + Construct func(request *WebRequest) + type Content struct + String string + func (c Content) WithCode(code int) *ContentWithCode + type ContentWithCode struct + Code int + String string + type DeleteMethod httpMethod + type DoNothing struct + type Filter interface + PostHandle func(request *WebRequest) interface{} + PreHandle func(request *WebRequest) interface{} + type FilterType reflect.Type + type GetMethod httpMethod + type GinHandler struct + Handle func(ctx *gin.Context) + HttpMethods map[string]bool + Url string + type HeadMethod httpMethod + type IniConfig struct + func NewIniConfig(filePath string) *IniConfig + func (ic *IniConfig) Env(key string) string + func (ic *IniConfig) Envs(i interface{}) + type Invoker struct + type ModelView struct + Model interface{} + Tpl string + type OptionsMethod httpMethod + type Opts struct + CanlogPath string + CookieSessionKey string + CookieSessionSecure string + DebugTpl bool + Host string + Port int + StaticDir string + TplDir string + TplSuffix []string + type PatchMethod httpMethod + type PostMethod httpMethod + type PutMethod httpMethod + type Redirect struct + Url string + func (r Redirect) WithCode(code int) *RedirectWithCode + type RedirectWithCode struct + Code int + Url string + type StaticFile struct + Path string + type TraceMethod httpMethod + type URI interface + Request func() *WebRequest + type WebRequest struct + func (wr *WebRequest) IsDelete() bool + func (wr *WebRequest) IsGet() bool + func (wr *WebRequest) IsHead() bool + func (wr *WebRequest) IsOptions() bool + func (wr *WebRequest) IsPatch() bool + func (wr *WebRequest) IsPost() bool + func (wr *WebRequest) IsPut() bool + func (wr *WebRequest) IsTrace() bool + func (wr *WebRequest) SessionGet(key string, value interface{}) + func (wr *WebRequest) SessionPut(key string, value interface{}, opts ...*sessions.Options) + func (wr *WebRequest) SetCookie(ck *http.Cookie)