Documentation ¶
Overview ¶
Package mockable contains mockable objects
Index ¶
- type Session
- func (sess *Session) DefaultHTTPClient() *http.Client
- func (sess *Session) FetchPsiphonConfig(ctx context.Context) ([]byte, error)
- func (sess *Session) FetchTorTargets(ctx context.Context, cc string) (map[string]model.OOAPITorTarget, error)
- func (sess *Session) FetchURLList(ctx context.Context, config model.OOAPIURLListConfig) ([]model.OOAPIURLInfo, error)
- func (sess *Session) GetTestHelpersByName(name string) ([]model.OOAPIService, bool)
- func (sess *Session) KeyValueStore() model.KeyValueStore
- func (sess *Session) Logger() model.Logger
- func (sess *Session) MaybeResolverIP() string
- func (sess *Session) ProbeASNString() string
- func (sess *Session) ProbeCC() string
- func (sess *Session) ProbeIP() string
- func (sess *Session) ProbeNetworkName() string
- func (sess *Session) ProxyURL() *url.URL
- func (sess *Session) ResolverIP() string
- func (sess *Session) SoftwareName() string
- func (sess *Session) SoftwareVersion() string
- func (sess *Session) TempDir() string
- func (sess *Session) TorArgs() []string
- func (sess *Session) TorBinary() string
- func (sess *Session) TunnelDir() string
- func (sess *Session) UserAgent() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { MockableTestHelpers map[string][]model.OOAPIService MockableHTTPClient *http.Client MockableLogger model.Logger MockableMaybeResolverIP string MockableProbeASNString string MockableProbeCC string MockableProbeIP string MockableProbeNetworkName string MockableProxyURL *url.URL MockableFetchPsiphonConfigResult []byte MockableFetchPsiphonConfigErr error MockableFetchTorTargetsResult map[string]model.OOAPITorTarget MockableFetchTorTargetsErr error MockableFetchURLListResult []model.OOAPIURLInfo MockableFetchURLListErr error MockableResolverIP string MockableSoftwareName string MockableSoftwareVersion string MockableTempDir string MockableTorArgs []string MockableTorBinary string MockableTunnelDir string MockableUserAgent string }
Session allows to mock sessions.
func (*Session) DefaultHTTPClient ¶
DefaultHTTPClient implements ExperimentSession.DefaultHTTPClient
func (*Session) FetchPsiphonConfig ¶
FetchPsiphonConfig implements ExperimentSession.FetchPsiphonConfig
func (*Session) FetchTorTargets ¶
func (sess *Session) FetchTorTargets( ctx context.Context, cc string) (map[string]model.OOAPITorTarget, error)
FetchTorTargets implements ExperimentSession.TorTargets
func (*Session) FetchURLList ¶
func (sess *Session) FetchURLList( ctx context.Context, config model.OOAPIURLListConfig) ([]model.OOAPIURLInfo, error)
FetchURLList implements ExperimentSession.FetchURLList.
func (*Session) GetTestHelpersByName ¶
func (sess *Session) GetTestHelpersByName(name string) ([]model.OOAPIService, bool)
GetTestHelpersByName implements ExperimentSession.GetTestHelpersByName
func (*Session) KeyValueStore ¶
func (sess *Session) KeyValueStore() model.KeyValueStore
KeyValueStore returns the configured key-value store.
func (*Session) MaybeResolverIP ¶
MaybeResolverIP implements ExperimentSession.MaybeResolverIP.
func (*Session) ProbeASNString ¶
ProbeASNString implements ExperimentSession.ProbeASNString
func (*Session) ProbeNetworkName ¶
ProbeNetworkName implements ExperimentSession.ProbeNetworkName
func (*Session) ResolverIP ¶
ResolverIP implements ExperimentSession.ResolverIP
func (*Session) SoftwareName ¶
SoftwareName implements ExperimentSession.SoftwareName
func (*Session) SoftwareVersion ¶
SoftwareVersion implements ExperimentSession.SoftwareVersion