mockable

package
v3.16.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mockable contains mockable objects

Index

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
	MockableFetchURLListResult       []model.OOAPIURLInfo
	MockableFetchURLListErr          error
	MockableCheckInInfo              *model.OOAPICheckInInfo
	MockableCheckInErr               error
	MockableResolverIP               string
	MockableSoftwareName             string
	MockableSoftwareVersion          string
	MockableTempDir                  string
	MockableTorArgs                  []string
	MockableTorBinary                string
	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) FetchPsiphonConfig

func (sess *Session) FetchPsiphonConfig(ctx context.Context) ([]byte, error)

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) Logger

func (sess *Session) Logger() model.Logger

Logger implements ExperimentSession.Logger

func (*Session) MaybeResolverIP

func (sess *Session) MaybeResolverIP() string

MaybeResolverIP implements ExperimentSession.MaybeResolverIP.

func (*Session) ProbeASNString

func (sess *Session) ProbeASNString() string

ProbeASNString implements ExperimentSession.ProbeASNString

func (*Session) ProbeCC

func (sess *Session) ProbeCC() string

ProbeCC implements ExperimentSession.ProbeCC

func (*Session) ProbeIP

func (sess *Session) ProbeIP() string

ProbeIP implements ExperimentSession.ProbeIP

func (*Session) ProbeNetworkName

func (sess *Session) ProbeNetworkName() string

ProbeNetworkName implements ExperimentSession.ProbeNetworkName

func (*Session) ProxyURL

func (sess *Session) ProxyURL() *url.URL

ProxyURL implements ExperimentSession.ProxyURL

func (*Session) ResolverIP

func (sess *Session) ResolverIP() string

ResolverIP implements ExperimentSession.ResolverIP

func (*Session) SoftwareName

func (sess *Session) SoftwareName() string

SoftwareName implements ExperimentSession.SoftwareName

func (*Session) SoftwareVersion

func (sess *Session) SoftwareVersion() string

SoftwareVersion implements ExperimentSession.SoftwareVersion

func (*Session) TempDir

func (sess *Session) TempDir() string

TempDir implements ExperimentSession.TempDir

func (*Session) TorArgs

func (sess *Session) TorArgs() []string

TorArgs implements ExperimentSession.TorArgs.

func (*Session) TorBinary

func (sess *Session) TorBinary() string

TorBinary implements ExperimentSession.TorBinary.

func (*Session) TunnelDir added in v3.14.0

func (sess *Session) TunnelDir() string

TunnelDir implements ExperimentSession.TunnelDir.

func (*Session) UserAgent

func (sess *Session) UserAgent() string

UserAgent implements ExperimentSession.UserAgent

Jump to

Keyboard shortcuts

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