i_core

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: BSD-3-Clause Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IApi

type IApi interface {
	Description() string
	ParamType() string
	Params() interface{}
}

type IApiSession

type IApiSession interface {
	SetPathVars(vars map[string]string)
	PathVars() map[string]string
	SetJwtBody(jwtBody map[string]interface{})
	JwtBody() map[string]interface{}
	SetUserId(userId uint64)
	UserId() uint64
	SetJwtHeaderName(headerName string)
	JwtHeaderName() string
	ScanParams(dest interface{}) error
	MustScanParams(dest interface{})
	AddDefer(defer_ func())
	Defers() []func()
	SetData(key string, data interface{})
	Data(key string) interface{}
	Redirect(url string)
	WriteJson(data interface{}) error
	SetHeader(key string, value string)
	WriteText(text string) error
	SetStatusCode(code t_core.StatusCode)
	Host() string
	Path() string
	Body() io.ReadCloser
	Method() string
	Header(name string) string
	RemoteAddress() string
	UrlParams() map[string]string
	FormValues() (map[string][]string, error)
	ReadJSON(jsonObject interface{}) error
	ReadMap() (map[string]interface{}, error)
	Api() IApi
	SetApi(api IApi)
	ResponseWriter() http.ResponseWriter
	SetResponseWriter(w http.ResponseWriter)
	Request() *http.Request
	SetRequest(r *http.Request)
	Params() map[string]interface{}
	SetParams(params map[string]interface{})
	OriginalParams() map[string]interface{}
	SetOriginalParams(originalParams map[string]interface{})
	SetLang(lang string)
	Lang() string
	SetClientType(clientType string)
	ClientType() string
	Logger() i_logger.ILogger
}

type IApiStrategy

type IApiStrategy interface {
	Execute(out IApiSession) *t_error.ErrorInfo
	Name() string
	Description() string
	ErrorCode() uint64
	SetErrorCode(code uint64) IApiStrategy
	SetErrorMsg(msg string) IApiStrategy
	ErrorMsg() string
}

Jump to

Keyboard shortcuts

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