testgin

package
v0.0.0-...-2be15ab Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MulanPSL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Test101User = webdto.FindBeanWebUserId().FromStr(test101)

Functions

func InjectGinTestframe

func InjectGinTestframe(s *GinTestframe)

func LoadGinTestframe

func LoadGinTestframe() baseiface.ISingleton

Types

type GinTestframe

type GinTestframe struct {
	basedto.BaseEntity

	Method   string
	RouteUrl string

	GinFunc gin.HandlerFunc
	Url     string
	Body    []byte
	Headers map[string]string
	Token   string

	IfUseMiddle bool
	*webclient.WebClient
	// contains filtered or unexported fields
}

func FindBeanGinTestframe

func FindBeanGinTestframe() *GinTestframe

FindBeanGinTestframe

func NewGinTestframe

func NewGinTestframe() *GinTestframe

func (GinTestframe) Body2Bytes

func (self GinTestframe) Body2Bytes(body any) []byte

func (*GinTestframe) CheckErr

func (self *GinTestframe) CheckErr(s suite.Suite, err error)

func (*GinTestframe) DefaultAgentMiddleware

func (self *GinTestframe) DefaultAgentMiddleware() gin.HandlerFunc

func (*GinTestframe) DefaultAgentMiddlewareAs

func (self *GinTestframe) DefaultAgentMiddlewareAs(user *webdto.WebUserId) gin.HandlerFunc

func (*GinTestframe) Exec

func (self *GinTestframe) Exec(url string, body []byte) *httptest.ResponseRecorder

cfginfo.FindBeanCfgInfo().ShowCfgInfo()

func (*GinTestframe) Get

func (self *GinTestframe) Get(param gin.H) *httptest.ResponseRecorder

func (*GinTestframe) Get2Result

func (self *GinTestframe) Get2Result(h gin.H) *basedto.IchubResult

func (*GinTestframe) GetAs

func (self *GinTestframe) GetAs(h gin.H, out any) *httptest.ResponseRecorder

func (*GinTestframe) GetUrl

func (self *GinTestframe) GetUrl(url string) *httptest.ResponseRecorder

func (*GinTestframe) GetUrlAs

func (self *GinTestframe) GetUrlAs(url string, out any) *httptest.ResponseRecorder

func (*GinTestframe) GetWebUrl

func (self *GinTestframe) GetWebUrl(serviceName string, url string) *basedto.IchubResult

func (*GinTestframe) GetWebUrlDefault

func (self *GinTestframe) GetWebUrlDefault(url string) *basedto.IchubResult

func (*GinTestframe) Header

func (self *GinTestframe) Header(key string, value any) *GinTestframe

func (*GinTestframe) HeaderLangChina

func (self *GinTestframe) HeaderLangChina() *GinTestframe

func (*GinTestframe) HeaderLangEnglish

func (self *GinTestframe) HeaderLangEnglish() *GinTestframe

func (*GinTestframe) HeaderToken

func (self *GinTestframe) HeaderToken(value any) *GinTestframe

func (*GinTestframe) IfGet

func (self *GinTestframe) IfGet() bool

func (*GinTestframe) IfPost

func (self *GinTestframe) IfPost() bool

func (*GinTestframe) Init

func (self *GinTestframe) Init(method string, route string, ginFunc gin.HandlerFunc, token string) *GinTestframe

func (*GinTestframe) InitGet

func (self *GinTestframe) InitGet(route string, ginFunc gin.HandlerFunc, tokens ...string) *GinTestframe

func (*GinTestframe) InitPost

func (self *GinTestframe) InitPost(route string, ginFunc gin.HandlerFunc, tokens ...string) *GinTestframe

func (*GinTestframe) MapParam2Array

func (self *GinTestframe) MapParam2Array(param gin.H) []string

func (*GinTestframe) Middle

func (self *GinTestframe) Middle() gin.HandlerFunc

func (*GinTestframe) Post

func (self *GinTestframe) Post(body any) *httptest.ResponseRecorder

func (*GinTestframe) Post2PageResult

func (self *GinTestframe) Post2PageResult(req any) *page.PageResult

func (*GinTestframe) Post2Result

func (self *GinTestframe) Post2Result(body any, out any) *basedto.IchubResult

func (*GinTestframe) PostAs

func (self *GinTestframe) PostAs(body any, out any) *httptest.ResponseRecorder

func (*GinTestframe) PostModel

func (self *GinTestframe) PostModel(req any, list any) *page.PageResult

func (*GinTestframe) PostWebUrl

func (self *GinTestframe) PostWebUrl(body any, serviceName string, url string) *page.PageResult

func (*GinTestframe) PostWebUrlDefault

func (self *GinTestframe) PostWebUrlDefault(body any, url string) *page.PageResult

func (*GinTestframe) SetMiddle

func (self *GinTestframe) SetMiddle(middle gin.HandlerFunc) *GinTestframe

func (*GinTestframe) Use

func (self *GinTestframe) Use(middle gin.HandlerFunc) *GinTestframe

func (*GinTestframe) UseDefault

func (self *GinTestframe) UseDefault() *GinTestframe

func (*GinTestframe) UseDefaultAs

func (self *GinTestframe) UseDefaultAs(user *webdto.WebUserId) *GinTestframe

Jump to

Keyboard shortcuts

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