Documentation ¶
Overview ¶
Package mockable contains mockable objects
Index ¶
- type Sessiondeprecated
- func (sess *Session) DefaultHTTPClient() model.HTTPClient
- func (sess *Session) FetchOpenVPNConfig(ctx context.Context, provider, cc string) (*model.OOAPIVPNProviderConfig, error)
- 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) 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
deprecated
type Session struct { MockableTestHelpers map[string][]model.OOAPIService MockableHTTPClient model.HTTPClient 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 MockableFetchOpenVPNConfigErr error MockableCheckInInfo *model.OOAPICheckInResultNettests MockableCheckInErr error MockableResolverIP string MockableSoftwareName string MockableSoftwareVersion string MockableTempDir string MockableTorArgs []string MockableTorBinary string MockableOpenVPNConfig *model.OOAPIVPNProviderConfig MockableTunnelDir string MockableUserAgent string }
Session allows to mock sessions.
Deprecated: use ./internal/model/mocks.Session instead.
func (*Session) DefaultHTTPClient ¶
func (sess *Session) DefaultHTTPClient() model.HTTPClient
DefaultHTTPClient implements ExperimentSession.DefaultHTTPClient
func (*Session) FetchOpenVPNConfig ¶ added in v3.23.0
func (sess *Session) FetchOpenVPNConfig( ctx context.Context, provider, cc string) (*model.OOAPIVPNProviderConfig, error)
FetchOpenVPNConfig implements ExperimentSession.FetchOpenVPNConfig
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) 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