Documentation ¶
Index ¶
- func BoolCpy(c bool) *bool
- func Clear(params *FakeParamsGetter, render *FakeRender, ...)
- func FakeRequest(method, url string, body interface{}) *http.Request
- func FakeRequestRaw(method, url string, body []byte) *http.Request
- func GenToken(strSize int) string
- func IntCpy(c int) *int
- func RandInt(min int, max int) int
- func StrCpy(c string) *string
- func TimeCpy(c time.Time) *time.Time
- func ToJSONTime(t time.Time) string
- type FakeModelsGetter
- type FakeParamsGetter
- type FakeRender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clear ¶
func Clear(params *FakeParamsGetter, render *FakeRender, recorder *httptest.ResponseRecorder)
func FakeRequest ¶
func ToJSONTime ¶
Types ¶
type FakeModelsGetter ¶
type FakeModelsGetter struct { RedirectURL string GrantAll bool SessionValidity time.Duration SessionTokenLength int }
func NewFakeModelsGetter ¶
func NewFakeModelsGetter() *FakeModelsGetter
func (*FakeModelsGetter) GetGrantAll ¶
func (g *FakeModelsGetter) GetGrantAll() bool
func (*FakeModelsGetter) GetRedirectURL ¶
func (g *FakeModelsGetter) GetRedirectURL() string
func (*FakeModelsGetter) GetSessionTokenLength ¶
func (g *FakeModelsGetter) GetSessionTokenLength() int
func (*FakeModelsGetter) GetSessionValidity ¶
func (g *FakeModelsGetter) GetSessionValidity() time.Duration
type FakeParamsGetter ¶
type FakeParamsGetter struct {
// contains filtered or unexported fields
}
func NewFakeParamsGetter ¶
func NewFakeParamsGetter() *FakeParamsGetter
func (*FakeParamsGetter) Clear ¶
func (g *FakeParamsGetter) Clear()
func (*FakeParamsGetter) ClearURLParams ¶
func (g *FakeParamsGetter) ClearURLParams()
func (*FakeParamsGetter) GetURLParam ¶
func (g *FakeParamsGetter) GetURLParam(req *http.Request, key string) string
func (*FakeParamsGetter) SetURLParam ¶
func (g *FakeParamsGetter) SetURLParam(key, value string)
type FakeRender ¶
type FakeRender struct { Status int APIError *zest.APIError Err error // contains filtered or unexported fields }
func NewFakeRender ¶
func NewFakeRender() *FakeRender
func (*FakeRender) Clear ¶
func (r *FakeRender) Clear()
func (*FakeRender) JSON ¶
func (r *FakeRender) JSON(w http.ResponseWriter, status int, object interface{})
func (*FakeRender) JSONError ¶
func (r *FakeRender) JSONError(w http.ResponseWriter, status int, apiError *zest.APIError, err error)
Click to show internal directories.
Click to hide internal directories.