go-agent: github.com/sqreen/go-agent/tools/testlib Index | Files

package testlib

import "github.com/sqreen/go-agent/tools/testlib"

Index

Package Files

agent.go rand.go

func NewAgentForMiddlewareTestsWithSecurityResponse Uses

func NewAgentForMiddlewareTestsWithSecurityResponse(actionHandler http.Handler) (*AgentMockup, *HTTPRequestRecordMockup)

func NewAgentForMiddlewareTestsWithUserSecurityResponse Uses

func NewAgentForMiddlewareTestsWithUserSecurityResponse(actionHandler http.Handler) (*AgentMockup, *HTTPRequestRecordMockup)

func NewAgentForMiddlewareTestsWithoutSecurityResponse Uses

func NewAgentForMiddlewareTestsWithoutSecurityResponse() (*AgentMockup, *HTTPRequestRecordMockup)

func RandString Uses

func RandString(size ...int) string

func RandUint32 Uses

func RandUint32(boundaries ...uint32) uint32

type AgentMockup Uses

type AgentMockup struct {
    mock.Mock
}

func (*AgentMockup) ExpectGracefulStop Uses

func (a *AgentMockup) ExpectGracefulStop() *mock.Call

func (*AgentMockup) ExpectNewRequestRecord Uses

func (a *AgentMockup) ExpectNewRequestRecord(r interface{}) *mock.Call

func (*AgentMockup) GracefulStop Uses

func (a *AgentMockup) GracefulStop()

func (*AgentMockup) NewRequestRecord Uses

func (a *AgentMockup) NewRequestRecord(r *http.Request) types.RequestRecord

func (*AgentMockup) ResetExpectations Uses

func (a *AgentMockup) ResetExpectations()

type HTTPRequestRecordMockup Uses

type HTTPRequestRecordMockup struct {
    mock.Mock
}

func (*HTTPRequestRecordMockup) Close Uses

func (r *HTTPRequestRecordMockup) Close()

func (*HTTPRequestRecordMockup) ExpectClose Uses

func (r *HTTPRequestRecordMockup) ExpectClose() *mock.Call

func (*HTTPRequestRecordMockup) ExpectIdentify Uses

func (r *HTTPRequestRecordMockup) ExpectIdentify(id map[string]string) *mock.Call

func (*HTTPRequestRecordMockup) ExpectSecurityResponse Uses

func (r *HTTPRequestRecordMockup) ExpectSecurityResponse() *mock.Call

func (*HTTPRequestRecordMockup) ExpectTrackAuth Uses

func (r *HTTPRequestRecordMockup) ExpectTrackAuth(id map[string]string, success bool) *mock.Call

func (*HTTPRequestRecordMockup) ExpectTrackEvent Uses

func (r *HTTPRequestRecordMockup) ExpectTrackEvent(event string) *mock.Call

func (*HTTPRequestRecordMockup) ExpectTrackSignup Uses

func (r *HTTPRequestRecordMockup) ExpectTrackSignup(id map[string]string) *mock.Call

func (*HTTPRequestRecordMockup) ExpectUserSecurityResponse Uses

func (r *HTTPRequestRecordMockup) ExpectUserSecurityResponse() *mock.Call

func (*HTTPRequestRecordMockup) ExpectWhitelisted Uses

func (r *HTTPRequestRecordMockup) ExpectWhitelisted() *mock.Call

func (*HTTPRequestRecordMockup) ExpectWithProperties Uses

func (r *HTTPRequestRecordMockup) ExpectWithProperties(props types.EventProperties) *mock.Call

func (*HTTPRequestRecordMockup) ExpectWithTimestamp Uses

func (r *HTTPRequestRecordMockup) ExpectWithTimestamp(t time.Time) *mock.Call

func (*HTTPRequestRecordMockup) ExpectWithUserIdentifiers Uses

func (r *HTTPRequestRecordMockup) ExpectWithUserIdentifiers(id map[string]string) *mock.Call

func (*HTTPRequestRecordMockup) Identify Uses

func (r *HTTPRequestRecordMockup) Identify(id map[string]string)

func (*HTTPRequestRecordMockup) NewCustomEvent Uses

func (r *HTTPRequestRecordMockup) NewCustomEvent(event string) types.CustomEvent

func (*HTTPRequestRecordMockup) NewUserAuth Uses

func (r *HTTPRequestRecordMockup) NewUserAuth(id map[string]string, success bool)

func (*HTTPRequestRecordMockup) NewUserSignup Uses

func (r *HTTPRequestRecordMockup) NewUserSignup(id map[string]string)

func (*HTTPRequestRecordMockup) SecurityResponse Uses

func (r *HTTPRequestRecordMockup) SecurityResponse() http.Handler

func (*HTTPRequestRecordMockup) UserSecurityResponse Uses

func (r *HTTPRequestRecordMockup) UserSecurityResponse() http.Handler

func (*HTTPRequestRecordMockup) Whitelisted Uses

func (r *HTTPRequestRecordMockup) Whitelisted() bool

func (*HTTPRequestRecordMockup) WithProperties Uses

func (r *HTTPRequestRecordMockup) WithProperties(props types.EventProperties)

func (*HTTPRequestRecordMockup) WithTimestamp Uses

func (r *HTTPRequestRecordMockup) WithTimestamp(t time.Time)

func (*HTTPRequestRecordMockup) WithUserIdentifiers Uses

func (r *HTTPRequestRecordMockup) WithUserIdentifiers(id map[string]string)

Package testlib imports 5 packages (graph). Updated 2019-08-13. Refresh now. Tools for package owners.