fakes

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	AddStub func(handle, ip string, metadata map[string]interface{}) error

	DeleteStub func(handle string) error

	ReadAllStub func() (map[string]datastore.Container, error)
	// contains filtered or unexported fields
}

func (*Datastore) Add

func (fake *Datastore) Add(handle string, ip string, metadata map[string]interface{}) error

func (*Datastore) AddArgsForCall

func (fake *Datastore) AddArgsForCall(i int) (string, string, map[string]interface{})

func (*Datastore) AddCallCount

func (fake *Datastore) AddCallCount() int

func (*Datastore) AddReturns

func (fake *Datastore) AddReturns(result1 error)

func (*Datastore) Delete

func (fake *Datastore) Delete(handle string) error

func (*Datastore) DeleteArgsForCall

func (fake *Datastore) DeleteArgsForCall(i int) string

func (*Datastore) DeleteCallCount

func (fake *Datastore) DeleteCallCount() int

func (*Datastore) DeleteReturns

func (fake *Datastore) DeleteReturns(result1 error)

func (*Datastore) Invocations

func (fake *Datastore) Invocations() map[string][][]interface{}

func (*Datastore) ReadAll

func (fake *Datastore) ReadAll() (map[string]datastore.Container, error)

func (*Datastore) ReadAllCallCount

func (fake *Datastore) ReadAllCallCount() int

func (*Datastore) ReadAllReturns

func (fake *Datastore) ReadAllReturns(result1 map[string]datastore.Container, result2 error)

type ExternalPolicyClient

type ExternalPolicyClient struct {
	GetPoliciesStub func(token string) ([]models.Policy, error)

	GetPoliciesByIDStub func(token string, ids ...string) ([]models.Policy, error)

	DeletePoliciesStub func(token string, policies []models.Policy) error

	AddPoliciesStub func(token string, policies []models.Policy) error
	// contains filtered or unexported fields
}

func (*ExternalPolicyClient) AddPolicies

func (fake *ExternalPolicyClient) AddPolicies(token string, policies []models.Policy) error

func (*ExternalPolicyClient) AddPoliciesArgsForCall

func (fake *ExternalPolicyClient) AddPoliciesArgsForCall(i int) (string, []models.Policy)

func (*ExternalPolicyClient) AddPoliciesCallCount

func (fake *ExternalPolicyClient) AddPoliciesCallCount() int

func (*ExternalPolicyClient) AddPoliciesReturns

func (fake *ExternalPolicyClient) AddPoliciesReturns(result1 error)

func (*ExternalPolicyClient) DeletePolicies

func (fake *ExternalPolicyClient) DeletePolicies(token string, policies []models.Policy) error

func (*ExternalPolicyClient) DeletePoliciesArgsForCall

func (fake *ExternalPolicyClient) DeletePoliciesArgsForCall(i int) (string, []models.Policy)

func (*ExternalPolicyClient) DeletePoliciesCallCount

func (fake *ExternalPolicyClient) DeletePoliciesCallCount() int

func (*ExternalPolicyClient) DeletePoliciesReturns

func (fake *ExternalPolicyClient) DeletePoliciesReturns(result1 error)

func (*ExternalPolicyClient) GetPolicies

func (fake *ExternalPolicyClient) GetPolicies(token string) ([]models.Policy, error)

func (*ExternalPolicyClient) GetPoliciesArgsForCall

func (fake *ExternalPolicyClient) GetPoliciesArgsForCall(i int) string

func (*ExternalPolicyClient) GetPoliciesByID

func (fake *ExternalPolicyClient) GetPoliciesByID(token string, ids ...string) ([]models.Policy, error)

func (*ExternalPolicyClient) GetPoliciesByIDArgsForCall

func (fake *ExternalPolicyClient) GetPoliciesByIDArgsForCall(i int) (string, []string)

func (*ExternalPolicyClient) GetPoliciesByIDCallCount

func (fake *ExternalPolicyClient) GetPoliciesByIDCallCount() int

func (*ExternalPolicyClient) GetPoliciesByIDReturns

func (fake *ExternalPolicyClient) GetPoliciesByIDReturns(result1 []models.Policy, result2 error)

func (*ExternalPolicyClient) GetPoliciesCallCount

func (fake *ExternalPolicyClient) GetPoliciesCallCount() int

func (*ExternalPolicyClient) GetPoliciesReturns

func (fake *ExternalPolicyClient) GetPoliciesReturns(result1 []models.Policy, result2 error)

func (*ExternalPolicyClient) Invocations

func (fake *ExternalPolicyClient) Invocations() map[string][][]interface{}

type FileLocker

type FileLocker struct {
	OpenStub func() (*os.File, error)
	// contains filtered or unexported fields
}

func (*FileLocker) Invocations

func (fake *FileLocker) Invocations() map[string][][]interface{}

func (*FileLocker) Open

func (fake *FileLocker) Open() (*os.File, error)

func (*FileLocker) OpenCallCount

func (fake *FileLocker) OpenCallCount() int

func (*FileLocker) OpenReturns

func (fake *FileLocker) OpenReturns(result1 *os.File, result2 error)

type HTTPClient

type HTTPClient struct {
	DoStub func(*http.Request) (*http.Response, error)
	// contains filtered or unexported fields
}

func (*HTTPClient) Do

func (fake *HTTPClient) Do(arg1 *http.Request) (*http.Response, error)

func (*HTTPClient) DoArgsForCall

func (fake *HTTPClient) DoArgsForCall(i int) *http.Request

func (*HTTPClient) DoCallCount

func (fake *HTTPClient) DoCallCount() int

func (*HTTPClient) DoReturns

func (fake *HTTPClient) DoReturns(result1 *http.Response, result2 error)

func (*HTTPClient) Invocations

func (fake *HTTPClient) Invocations() map[string][][]interface{}

type IPTables

type IPTables struct {
	ExistsStub func(table, chain string, rulespec ...string) (bool, error)

	InsertStub func(table, chain string, pos int, rulespec ...string) error

	AppendUniqueStub func(table, chain string, rulespec ...string) error

	DeleteStub func(table, chain string, rulespec ...string) error

	ListStub func(table, chain string) ([]string, error)

	NewChainStub func(table, chain string) error

	ClearChainStub func(table, chain string) error

	DeleteChainStub func(table, chain string) error
	// contains filtered or unexported fields
}

func (*IPTables) AppendUnique

func (fake *IPTables) AppendUnique(table string, chain string, rulespec ...string) error

func (*IPTables) AppendUniqueArgsForCall

func (fake *IPTables) AppendUniqueArgsForCall(i int) (string, string, []string)

func (*IPTables) AppendUniqueCallCount

func (fake *IPTables) AppendUniqueCallCount() int

func (*IPTables) AppendUniqueReturns

func (fake *IPTables) AppendUniqueReturns(result1 error)

func (*IPTables) ClearChain

func (fake *IPTables) ClearChain(table string, chain string) error

func (*IPTables) ClearChainArgsForCall

func (fake *IPTables) ClearChainArgsForCall(i int) (string, string)

func (*IPTables) ClearChainCallCount

func (fake *IPTables) ClearChainCallCount() int

func (*IPTables) ClearChainReturns

func (fake *IPTables) ClearChainReturns(result1 error)

func (*IPTables) Delete

func (fake *IPTables) Delete(table string, chain string, rulespec ...string) error

func (*IPTables) DeleteArgsForCall

func (fake *IPTables) DeleteArgsForCall(i int) (string, string, []string)

func (*IPTables) DeleteCallCount

func (fake *IPTables) DeleteCallCount() int

func (*IPTables) DeleteChain

func (fake *IPTables) DeleteChain(table string, chain string) error

func (*IPTables) DeleteChainArgsForCall

func (fake *IPTables) DeleteChainArgsForCall(i int) (string, string)

func (*IPTables) DeleteChainCallCount

func (fake *IPTables) DeleteChainCallCount() int

func (*IPTables) DeleteChainReturns

func (fake *IPTables) DeleteChainReturns(result1 error)

func (*IPTables) DeleteReturns

func (fake *IPTables) DeleteReturns(result1 error)

func (*IPTables) Exists

func (fake *IPTables) Exists(table string, chain string, rulespec ...string) (bool, error)

func (*IPTables) ExistsArgsForCall

func (fake *IPTables) ExistsArgsForCall(i int) (string, string, []string)

func (*IPTables) ExistsCallCount

func (fake *IPTables) ExistsCallCount() int

func (*IPTables) ExistsReturns

func (fake *IPTables) ExistsReturns(result1 bool, result2 error)

func (*IPTables) Insert

func (fake *IPTables) Insert(table string, chain string, pos int, rulespec ...string) error

func (*IPTables) InsertArgsForCall

func (fake *IPTables) InsertArgsForCall(i int) (string, string, int, []string)

func (*IPTables) InsertCallCount

func (fake *IPTables) InsertCallCount() int

func (*IPTables) InsertReturns

func (fake *IPTables) InsertReturns(result1 error)

func (*IPTables) Invocations

func (fake *IPTables) Invocations() map[string][][]interface{}

func (*IPTables) List

func (fake *IPTables) List(table string, chain string) ([]string, error)

func (*IPTables) ListArgsForCall

func (fake *IPTables) ListArgsForCall(i int) (string, string)

func (*IPTables) ListCallCount

func (fake *IPTables) ListCallCount() int

func (*IPTables) ListReturns

func (fake *IPTables) ListReturns(result1 []string, result2 error)

func (*IPTables) NewChain

func (fake *IPTables) NewChain(table string, chain string) error

func (*IPTables) NewChainArgsForCall

func (fake *IPTables) NewChainArgsForCall(i int) (string, string)

func (*IPTables) NewChainCallCount

func (fake *IPTables) NewChainCallCount() int

func (*IPTables) NewChainReturns

func (fake *IPTables) NewChainReturns(result1 error)

type JSONClient

type JSONClient struct {
	DoStub func(method, route string, reqData, respData interface{}, token string) error
	// contains filtered or unexported fields
}

func (*JSONClient) Do

func (fake *JSONClient) Do(method string, route string, reqData interface{}, respData interface{}, token string) error

func (*JSONClient) DoArgsForCall

func (fake *JSONClient) DoArgsForCall(i int) (string, string, interface{}, interface{}, string)

func (*JSONClient) DoCallCount

func (fake *JSONClient) DoCallCount() int

func (*JSONClient) DoReturns

func (fake *JSONClient) DoReturns(result1 error)

func (*JSONClient) Invocations

func (fake *JSONClient) Invocations() map[string][][]interface{}

type Marshaler

type Marshaler struct {
	MarshalStub func(input interface{}) ([]byte, error)
	// contains filtered or unexported fields
}

func (*Marshaler) Invocations

func (fake *Marshaler) Invocations() map[string][][]interface{}

func (*Marshaler) Marshal

func (fake *Marshaler) Marshal(input interface{}) ([]byte, error)

func (*Marshaler) MarshalArgsForCall

func (fake *Marshaler) MarshalArgsForCall(i int) interface{}

func (*Marshaler) MarshalCallCount

func (fake *Marshaler) MarshalCallCount() int

func (*Marshaler) MarshalReturns

func (fake *Marshaler) MarshalReturns(result1 []byte, result2 error)

type OverwriteableFile

type OverwriteableFile struct {
	ReadStub func(p []byte) (n int, err error)

	WriteStub func(p []byte) (n int, err error)

	SeekStub func(offset int64, whence int) (int64, error)

	TruncateStub func(size int64) error
	// contains filtered or unexported fields
}

func (*OverwriteableFile) Invocations

func (fake *OverwriteableFile) Invocations() map[string][][]interface{}

func (*OverwriteableFile) Read

func (fake *OverwriteableFile) Read(p []byte) (n int, err error)

func (*OverwriteableFile) ReadArgsForCall

func (fake *OverwriteableFile) ReadArgsForCall(i int) []byte

func (*OverwriteableFile) ReadCallCount

func (fake *OverwriteableFile) ReadCallCount() int

func (*OverwriteableFile) ReadReturns

func (fake *OverwriteableFile) ReadReturns(result1 int, result2 error)

func (*OverwriteableFile) Seek

func (fake *OverwriteableFile) Seek(offset int64, whence int) (int64, error)

func (*OverwriteableFile) SeekArgsForCall

func (fake *OverwriteableFile) SeekArgsForCall(i int) (int64, int)

func (*OverwriteableFile) SeekCallCount

func (fake *OverwriteableFile) SeekCallCount() int

func (*OverwriteableFile) SeekReturns

func (fake *OverwriteableFile) SeekReturns(result1 int64, result2 error)

func (*OverwriteableFile) Truncate

func (fake *OverwriteableFile) Truncate(size int64) error

func (*OverwriteableFile) TruncateArgsForCall

func (fake *OverwriteableFile) TruncateArgsForCall(i int) int64

func (*OverwriteableFile) TruncateCallCount

func (fake *OverwriteableFile) TruncateCallCount() int

func (*OverwriteableFile) TruncateReturns

func (fake *OverwriteableFile) TruncateReturns(result1 error)

func (*OverwriteableFile) Write

func (fake *OverwriteableFile) Write(p []byte) (n int, err error)

func (*OverwriteableFile) WriteArgsForCall

func (fake *OverwriteableFile) WriteArgsForCall(i int) []byte

func (*OverwriteableFile) WriteCallCount

func (fake *OverwriteableFile) WriteCallCount() int

func (*OverwriteableFile) WriteReturns

func (fake *OverwriteableFile) WriteReturns(result1 int, result2 error)

type Rule

type Rule struct {
	EnforceStub func(table, chain string, ipt rules.IPTables, logger lager.Logger) error
	// contains filtered or unexported fields
}

func (*Rule) Enforce

func (fake *Rule) Enforce(table string, chain string, ipt rules.IPTables, logger lager.Logger) error

func (*Rule) EnforceArgsForCall

func (fake *Rule) EnforceArgsForCall(i int) (string, string, rules.IPTables, lager.Logger)

func (*Rule) EnforceCallCount

func (fake *Rule) EnforceCallCount() int

func (*Rule) EnforceReturns

func (fake *Rule) EnforceReturns(result1 error)

func (*Rule) Invocations

func (fake *Rule) Invocations() map[string][][]interface{}

type RuleEnforcer

type RuleEnforcer struct {
	EnforceRulesAndChainStub func(rules.RulesWithChain) error

	EnforceOnChainStub func(chain rules.Chain, r []rules.Rule) error

	EnforceStub func(table, parentChain, chain string, r []rules.Rule) error
	// contains filtered or unexported fields
}

func (*RuleEnforcer) Enforce

func (fake *RuleEnforcer) Enforce(table string, parentChain string, chain string, r []rules.Rule) error

func (*RuleEnforcer) EnforceArgsForCall

func (fake *RuleEnforcer) EnforceArgsForCall(i int) (string, string, string, []rules.Rule)

func (*RuleEnforcer) EnforceCallCount

func (fake *RuleEnforcer) EnforceCallCount() int

func (*RuleEnforcer) EnforceOnChain

func (fake *RuleEnforcer) EnforceOnChain(chain rules.Chain, r []rules.Rule) error

func (*RuleEnforcer) EnforceOnChainArgsForCall

func (fake *RuleEnforcer) EnforceOnChainArgsForCall(i int) (rules.Chain, []rules.Rule)

func (*RuleEnforcer) EnforceOnChainCallCount

func (fake *RuleEnforcer) EnforceOnChainCallCount() int

func (*RuleEnforcer) EnforceOnChainReturns

func (fake *RuleEnforcer) EnforceOnChainReturns(result1 error)

func (*RuleEnforcer) EnforceReturns

func (fake *RuleEnforcer) EnforceReturns(result1 error)

func (*RuleEnforcer) EnforceRulesAndChain

func (fake *RuleEnforcer) EnforceRulesAndChain(arg1 rules.RulesWithChain) error

func (*RuleEnforcer) EnforceRulesAndChainArgsForCall

func (fake *RuleEnforcer) EnforceRulesAndChainArgsForCall(i int) rules.RulesWithChain

func (*RuleEnforcer) EnforceRulesAndChainCallCount

func (fake *RuleEnforcer) EnforceRulesAndChainCallCount() int

func (*RuleEnforcer) EnforceRulesAndChainReturns

func (fake *RuleEnforcer) EnforceRulesAndChainReturns(result1 error)

func (*RuleEnforcer) Invocations

func (fake *RuleEnforcer) Invocations() map[string][][]interface{}

type Serializer

type Serializer struct {
	DecodeAllStub func(file io.ReadSeeker, outData interface{}) error

	EncodeAndOverwriteStub func(file serial.OverwriteableFile, outData interface{}) error
	// contains filtered or unexported fields
}

func (*Serializer) DecodeAll

func (fake *Serializer) DecodeAll(file io.ReadSeeker, outData interface{}) error

func (*Serializer) DecodeAllArgsForCall

func (fake *Serializer) DecodeAllArgsForCall(i int) (io.ReadSeeker, interface{})

func (*Serializer) DecodeAllCallCount

func (fake *Serializer) DecodeAllCallCount() int

func (*Serializer) DecodeAllReturns

func (fake *Serializer) DecodeAllReturns(result1 error)

func (*Serializer) EncodeAndOverwrite

func (fake *Serializer) EncodeAndOverwrite(file serial.OverwriteableFile, outData interface{}) error

func (*Serializer) EncodeAndOverwriteArgsForCall

func (fake *Serializer) EncodeAndOverwriteArgsForCall(i int) (serial.OverwriteableFile, interface{})

func (*Serializer) EncodeAndOverwriteCallCount

func (fake *Serializer) EncodeAndOverwriteCallCount() int

func (*Serializer) EncodeAndOverwriteReturns

func (fake *Serializer) EncodeAndOverwriteReturns(result1 error)

func (*Serializer) Invocations

func (fake *Serializer) Invocations() map[string][][]interface{}

type Sleeper

type Sleeper struct {
	SleepStub func(time.Duration)
	// contains filtered or unexported fields
}

func (*Sleeper) Invocations

func (fake *Sleeper) Invocations() map[string][][]interface{}

func (*Sleeper) Sleep

func (fake *Sleeper) Sleep(arg1 time.Duration)

func (*Sleeper) SleepArgsForCall

func (fake *Sleeper) SleepArgsForCall(i int) time.Duration

func (*Sleeper) SleepCallCount

func (fake *Sleeper) SleepCallCount() int

type TimeStamper

type TimeStamper struct {
	CurrentTimeStub func() int
	// contains filtered or unexported fields
}

func (*TimeStamper) CurrentTime

func (fake *TimeStamper) CurrentTime() int

func (*TimeStamper) CurrentTimeCallCount

func (fake *TimeStamper) CurrentTimeCallCount() int

func (*TimeStamper) CurrentTimeReturns

func (fake *TimeStamper) CurrentTimeReturns(result1 int)

func (*TimeStamper) Invocations

func (fake *TimeStamper) Invocations() map[string][][]interface{}

type Unmarshaler

type Unmarshaler struct {
	UnmarshalStub func(input []byte, output interface{}) error
	// contains filtered or unexported fields
}

func (*Unmarshaler) Invocations

func (fake *Unmarshaler) Invocations() map[string][][]interface{}

func (*Unmarshaler) Unmarshal

func (fake *Unmarshaler) Unmarshal(input []byte, output interface{}) error

func (*Unmarshaler) UnmarshalArgsForCall

func (fake *Unmarshaler) UnmarshalArgsForCall(i int) ([]byte, interface{})

func (*Unmarshaler) UnmarshalCallCount

func (fake *Unmarshaler) UnmarshalCallCount() int

func (*Unmarshaler) UnmarshalReturns

func (fake *Unmarshaler) UnmarshalReturns(result1 error)

Jump to

Keyboard shortcuts

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