Documentation ¶
Index ¶
- type CantabularClientMock
- func (mock *CantabularClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
- func (mock *CantabularClientMock) CheckerAPIExt(ctx context.Context, state *healthcheck.CheckState) error
- func (mock *CantabularClientMock) CheckerAPIExtCalls() []struct{ ... }
- func (mock *CantabularClientMock) CheckerCalls() []struct{ ... }
- func (mock *CantabularClientMock) StaticDatasetQueryStreamCSV(ctx context.Context, req cantabular.StaticDatasetQueryRequest, ...) (int32, error)
- func (mock *CantabularClientMock) StaticDatasetQueryStreamCSVCalls() []struct{ ... }
- type DatasetAPIClientMock
- func (mock *DatasetAPIClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
- func (mock *DatasetAPIClientMock) CheckerCalls() []struct{ ... }
- func (mock *DatasetAPIClientMock) GetInstance(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) (dataset.Instance, string, error)
- func (mock *DatasetAPIClientMock) GetInstanceCalls() []struct{ ... }
- func (mock *DatasetAPIClientMock) PutVersion(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) error
- func (mock *DatasetAPIClientMock) PutVersionCalls() []struct{ ... }
- type FilterAPIClientMock
- func (mock *FilterAPIClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
- func (mock *FilterAPIClientMock) CheckerCalls() []struct{ ... }
- func (mock *FilterAPIClientMock) GetDimensions(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) (filter.Dimensions, string, error)
- func (mock *FilterAPIClientMock) GetDimensionsCalls() []struct{ ... }
- func (mock *FilterAPIClientMock) GetOutput(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) (filter.Model, error)
- func (mock *FilterAPIClientMock) GetOutputCalls() []struct{ ... }
- func (mock *FilterAPIClientMock) UpdateFilterOutput(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) error
- func (mock *FilterAPIClientMock) UpdateFilterOutputCalls() []struct{ ... }
- type HTTPServerMock
- type HealthCheckerMock
- func (mock *HealthCheckerMock) AddAndGetCheck(name string, checker healthcheck.Checker) (*healthcheck.Check, error)
- func (mock *HealthCheckerMock) AddAndGetCheckCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Handler(w http.ResponseWriter, req *http.Request)
- func (mock *HealthCheckerMock) HandlerCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Start(ctx context.Context)
- func (mock *HealthCheckerMock) StartCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Stop()
- func (mock *HealthCheckerMock) StopCalls() []struct{}
- func (mock *HealthCheckerMock) Subscribe(s healthcheck.Subscriber, checks ...*healthcheck.Check)
- func (mock *HealthCheckerMock) SubscribeCalls() []struct{ ... }
- type S3ClientMock
- func (mock *S3ClientMock) BucketName() string
- func (mock *S3ClientMock) BucketNameCalls() []struct{}
- func (mock *S3ClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
- func (mock *S3ClientMock) CheckerCalls() []struct{ ... }
- func (mock *S3ClientMock) Head(key string) (*s3.HeadObjectOutput, error)
- func (mock *S3ClientMock) HeadCalls() []struct{ ... }
- func (mock *S3ClientMock) Session() *session.Session
- func (mock *S3ClientMock) SessionCalls() []struct{}
- func (mock *S3ClientMock) UploadWithContext(ctx context.Context, input *s3manager.UploadInput, ...) (*s3manager.UploadOutput, error)
- func (mock *S3ClientMock) UploadWithContextCalls() []struct{ ... }
- func (mock *S3ClientMock) UploadWithPSK(input *s3manager.UploadInput, psk []byte) (*s3manager.UploadOutput, error)
- func (mock *S3ClientMock) UploadWithPSKCalls() []struct{ ... }
- type VaultClientMock
- func (mock *VaultClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
- func (mock *VaultClientMock) CheckerCalls() []struct{ ... }
- func (mock *VaultClientMock) WriteKey(path string, key string, value string) error
- func (mock *VaultClientMock) WriteKeyCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CantabularClientMock ¶ added in v0.2.0
type CantabularClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error // CheckerAPIExtFunc mocks the CheckerAPIExt method. CheckerAPIExtFunc func(ctx context.Context, state *healthcheck.CheckState) error // StaticDatasetQueryStreamCSVFunc mocks the StaticDatasetQueryStreamCSV method. StaticDatasetQueryStreamCSVFunc func(ctx context.Context, req cantabular.StaticDatasetQueryRequest, consume func(ctx context.Context, r io.Reader) error) (int32, error) // contains filtered or unexported fields }
CantabularClientMock is a mock implementation of service.CantabularClient.
func TestSomethingThatUsesCantabularClient(t *testing.T) { // make and configure a mocked service.CantabularClient mockedCantabularClient := &CantabularClientMock{ CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error { panic("mock out the Checker method") }, CheckerAPIExtFunc: func(ctx context.Context, state *healthcheck.CheckState) error { panic("mock out the CheckerAPIExt method") }, StaticDatasetQueryStreamCSVFunc: func(ctx context.Context, req cantabular.StaticDatasetQueryRequest, consume func(ctx context.Context, r io.Reader) error) (int32, error) { panic("mock out the StaticDatasetQueryStreamCSV method") }, } // use mockedCantabularClient in code that requires service.CantabularClient // and then make assertions. }
func (*CantabularClientMock) Checker ¶ added in v0.2.0
func (mock *CantabularClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*CantabularClientMock) CheckerAPIExt ¶ added in v0.6.0
func (mock *CantabularClientMock) CheckerAPIExt(ctx context.Context, state *healthcheck.CheckState) error
CheckerAPIExt calls CheckerAPIExtFunc.
func (*CantabularClientMock) CheckerAPIExtCalls ¶ added in v0.6.0
func (mock *CantabularClientMock) CheckerAPIExtCalls() []struct { Ctx context.Context State *healthcheck.CheckState }
CheckerAPIExtCalls gets all the calls that were made to CheckerAPIExt. Check the length with:
len(mockedCantabularClient.CheckerAPIExtCalls())
func (*CantabularClientMock) CheckerCalls ¶ added in v0.2.0
func (mock *CantabularClientMock) CheckerCalls() []struct { ContextMoqParam context.Context CheckState *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedCantabularClient.CheckerCalls())
func (*CantabularClientMock) StaticDatasetQueryStreamCSV ¶ added in v0.6.0
func (mock *CantabularClientMock) StaticDatasetQueryStreamCSV(ctx context.Context, req cantabular.StaticDatasetQueryRequest, consume func(ctx context.Context, r io.Reader) error) (int32, error)
StaticDatasetQueryStreamCSV calls StaticDatasetQueryStreamCSVFunc.
func (*CantabularClientMock) StaticDatasetQueryStreamCSVCalls ¶ added in v0.6.0
func (mock *CantabularClientMock) StaticDatasetQueryStreamCSVCalls() []struct { Ctx context.Context Req cantabular.StaticDatasetQueryRequest Consume func(ctx context.Context, r io.Reader) error }
StaticDatasetQueryStreamCSVCalls gets all the calls that were made to StaticDatasetQueryStreamCSV. Check the length with:
len(mockedCantabularClient.StaticDatasetQueryStreamCSVCalls())
type DatasetAPIClientMock ¶ added in v0.2.0
type DatasetAPIClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error // GetInstanceFunc mocks the GetInstance method. GetInstanceFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, instanceID string, ifMatch string) (dataset.Instance, string, error) // PutVersionFunc mocks the PutVersion method. PutVersionFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, datasetID string, edition string, version string, v dataset.Version) error // contains filtered or unexported fields }
DatasetAPIClientMock is a mock implementation of service.DatasetAPIClient.
func TestSomethingThatUsesDatasetAPIClient(t *testing.T) { // make and configure a mocked service.DatasetAPIClient mockedDatasetAPIClient := &DatasetAPIClientMock{ CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error { panic("mock out the Checker method") }, GetInstanceFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, instanceID string, ifMatch string) (dataset.Instance, string, error) { panic("mock out the GetInstance method") }, PutVersionFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, datasetID string, edition string, version string, v dataset.Version) error { panic("mock out the PutVersion method") }, } // use mockedDatasetAPIClient in code that requires service.DatasetAPIClient // and then make assertions. }
func (*DatasetAPIClientMock) Checker ¶ added in v0.2.0
func (mock *DatasetAPIClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*DatasetAPIClientMock) CheckerCalls ¶ added in v0.2.0
func (mock *DatasetAPIClientMock) CheckerCalls() []struct { ContextMoqParam context.Context CheckState *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedDatasetAPIClient.CheckerCalls())
func (*DatasetAPIClientMock) GetInstance ¶ added in v0.2.0
func (mock *DatasetAPIClientMock) GetInstance(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, instanceID string, ifMatch string) (dataset.Instance, string, error)
GetInstance calls GetInstanceFunc.
func (*DatasetAPIClientMock) GetInstanceCalls ¶ added in v0.2.0
func (mock *DatasetAPIClientMock) GetInstanceCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string CollectionID string InstanceID string IfMatch string }
GetInstanceCalls gets all the calls that were made to GetInstance. Check the length with:
len(mockedDatasetAPIClient.GetInstanceCalls())
func (*DatasetAPIClientMock) PutVersion ¶ added in v0.7.0
func (mock *DatasetAPIClientMock) PutVersion(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, datasetID string, edition string, version string, v dataset.Version) error
PutVersion calls PutVersionFunc.
func (*DatasetAPIClientMock) PutVersionCalls ¶ added in v0.7.0
func (mock *DatasetAPIClientMock) PutVersionCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string CollectionID string DatasetID string Edition string Version string V dataset.Version }
PutVersionCalls gets all the calls that were made to PutVersion. Check the length with:
len(mockedDatasetAPIClient.PutVersionCalls())
type FilterAPIClientMock ¶ added in v1.0.0
type FilterAPIClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error // GetDimensionsFunc mocks the GetDimensions method. GetDimensionsFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, filterID string, q *filter.QueryParams) (filter.Dimensions, string, error) // GetOutputFunc mocks the GetOutput method. GetOutputFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) (filter.Model, error) // UpdateFilterOutputFunc mocks the UpdateFilterOutput method. UpdateFilterOutputFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterOutputID string, m *filter.Model) error // contains filtered or unexported fields }
FilterAPIClientMock is a mock implementation of service.FilterAPIClient.
func TestSomethingThatUsesFilterAPIClient(t *testing.T) { // make and configure a mocked service.FilterAPIClient mockedFilterAPIClient := &FilterAPIClientMock{ CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error { panic("mock out the Checker method") }, GetDimensionsFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, filterID string, q *filter.QueryParams) (filter.Dimensions, string, error) { panic("mock out the GetDimensions method") }, GetOutputFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) (filter.Model, error) { panic("mock out the GetOutput method") }, UpdateFilterOutputFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterOutputID string, m *filter.Model) error { panic("mock out the UpdateFilterOutput method") }, } // use mockedFilterAPIClient in code that requires service.FilterAPIClient // and then make assertions. }
func (*FilterAPIClientMock) Checker ¶ added in v1.0.0
func (mock *FilterAPIClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*FilterAPIClientMock) CheckerCalls ¶ added in v1.0.0
func (mock *FilterAPIClientMock) CheckerCalls() []struct { ContextMoqParam context.Context CheckState *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedFilterAPIClient.CheckerCalls())
func (*FilterAPIClientMock) GetDimensions ¶ added in v1.0.0
func (mock *FilterAPIClientMock) GetDimensions(ctx context.Context, userAuthToken string, serviceAuthToken string, collectionID string, filterID string, q *filter.QueryParams) (filter.Dimensions, string, error)
GetDimensions calls GetDimensionsFunc.
func (*FilterAPIClientMock) GetDimensionsCalls ¶ added in v1.0.0
func (mock *FilterAPIClientMock) GetDimensionsCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string CollectionID string FilterID string Q *filter.QueryParams }
GetDimensionsCalls gets all the calls that were made to GetDimensions. Check the length with:
len(mockedFilterAPIClient.GetDimensionsCalls())
func (*FilterAPIClientMock) GetOutput ¶ added in v1.0.0
func (mock *FilterAPIClientMock) GetOutput(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) (filter.Model, error)
GetOutput calls GetOutputFunc.
func (*FilterAPIClientMock) GetOutputCalls ¶ added in v1.0.0
func (mock *FilterAPIClientMock) GetOutputCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string DownloadServiceToken string CollectionID string FilterOutputID string }
GetOutputCalls gets all the calls that were made to GetOutput. Check the length with:
len(mockedFilterAPIClient.GetOutputCalls())
func (*FilterAPIClientMock) UpdateFilterOutput ¶ added in v1.0.0
func (mock *FilterAPIClientMock) UpdateFilterOutput(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterOutputID string, m *filter.Model) error
UpdateFilterOutput calls UpdateFilterOutputFunc.
func (*FilterAPIClientMock) UpdateFilterOutputCalls ¶ added in v1.0.0
func (mock *FilterAPIClientMock) UpdateFilterOutputCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string DownloadServiceToken string FilterOutputID string M *filter.Model }
UpdateFilterOutputCalls gets all the calls that were made to UpdateFilterOutput. Check the length with:
len(mockedFilterAPIClient.UpdateFilterOutputCalls())
type HTTPServerMock ¶
type HTTPServerMock struct { // ListenAndServeFunc mocks the ListenAndServe method. ListenAndServeFunc func() error // ShutdownFunc mocks the Shutdown method. ShutdownFunc func(ctx context.Context) error // contains filtered or unexported fields }
HTTPServerMock is a mock implementation of service.HTTPServer.
func TestSomethingThatUsesHTTPServer(t *testing.T) { // make and configure a mocked service.HTTPServer mockedHTTPServer := &HTTPServerMock{ ListenAndServeFunc: func() error { panic("mock out the ListenAndServe method") }, ShutdownFunc: func(ctx context.Context) error { panic("mock out the Shutdown method") }, } // use mockedHTTPServer in code that requires service.HTTPServer // and then make assertions. }
func (*HTTPServerMock) ListenAndServe ¶
func (mock *HTTPServerMock) ListenAndServe() error
ListenAndServe calls ListenAndServeFunc.
func (*HTTPServerMock) ListenAndServeCalls ¶
func (mock *HTTPServerMock) ListenAndServeCalls() []struct { }
ListenAndServeCalls gets all the calls that were made to ListenAndServe. Check the length with:
len(mockedHTTPServer.ListenAndServeCalls())
func (*HTTPServerMock) Shutdown ¶
func (mock *HTTPServerMock) Shutdown(ctx context.Context) error
Shutdown calls ShutdownFunc.
func (*HTTPServerMock) ShutdownCalls ¶
func (mock *HTTPServerMock) ShutdownCalls() []struct { Ctx context.Context }
ShutdownCalls gets all the calls that were made to Shutdown. Check the length with:
len(mockedHTTPServer.ShutdownCalls())
type HealthCheckerMock ¶
type HealthCheckerMock struct { // AddAndGetCheckFunc mocks the AddAndGetCheck method. AddAndGetCheckFunc func(name string, checker healthcheck.Checker) (*healthcheck.Check, error) // HandlerFunc mocks the Handler method. HandlerFunc func(w http.ResponseWriter, req *http.Request) // StartFunc mocks the Start method. StartFunc func(ctx context.Context) // StopFunc mocks the Stop method. StopFunc func() // SubscribeFunc mocks the Subscribe method. SubscribeFunc func(s healthcheck.Subscriber, checks ...*healthcheck.Check) // contains filtered or unexported fields }
HealthCheckerMock is a mock implementation of service.HealthChecker.
func TestSomethingThatUsesHealthChecker(t *testing.T) { // make and configure a mocked service.HealthChecker mockedHealthChecker := &HealthCheckerMock{ AddAndGetCheckFunc: func(name string, checker healthcheck.Checker) (*healthcheck.Check, error) { panic("mock out the AddAndGetCheck method") }, HandlerFunc: func(w http.ResponseWriter, req *http.Request) { panic("mock out the Handler method") }, StartFunc: func(ctx context.Context) { panic("mock out the Start method") }, StopFunc: func() { panic("mock out the Stop method") }, SubscribeFunc: func(s healthcheck.Subscriber, checks ...*healthcheck.Check) { panic("mock out the Subscribe method") }, } // use mockedHealthChecker in code that requires service.HealthChecker // and then make assertions. }
func (*HealthCheckerMock) AddAndGetCheck ¶ added in v0.6.0
func (mock *HealthCheckerMock) AddAndGetCheck(name string, checker healthcheck.Checker) (*healthcheck.Check, error)
AddAndGetCheck calls AddAndGetCheckFunc.
func (*HealthCheckerMock) AddAndGetCheckCalls ¶ added in v0.6.0
func (mock *HealthCheckerMock) AddAndGetCheckCalls() []struct { Name string Checker healthcheck.Checker }
AddAndGetCheckCalls gets all the calls that were made to AddAndGetCheck. Check the length with:
len(mockedHealthChecker.AddAndGetCheckCalls())
func (*HealthCheckerMock) Handler ¶
func (mock *HealthCheckerMock) Handler(w http.ResponseWriter, req *http.Request)
Handler calls HandlerFunc.
func (*HealthCheckerMock) HandlerCalls ¶
func (mock *HealthCheckerMock) HandlerCalls() []struct { W http.ResponseWriter Req *http.Request }
HandlerCalls gets all the calls that were made to Handler. Check the length with:
len(mockedHealthChecker.HandlerCalls())
func (*HealthCheckerMock) Start ¶
func (mock *HealthCheckerMock) Start(ctx context.Context)
Start calls StartFunc.
func (*HealthCheckerMock) StartCalls ¶
func (mock *HealthCheckerMock) StartCalls() []struct { Ctx context.Context }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedHealthChecker.StartCalls())
func (*HealthCheckerMock) StopCalls ¶
func (mock *HealthCheckerMock) StopCalls() []struct { }
StopCalls gets all the calls that were made to Stop. Check the length with:
len(mockedHealthChecker.StopCalls())
func (*HealthCheckerMock) Subscribe ¶ added in v0.6.0
func (mock *HealthCheckerMock) Subscribe(s healthcheck.Subscriber, checks ...*healthcheck.Check)
Subscribe calls SubscribeFunc.
func (*HealthCheckerMock) SubscribeCalls ¶ added in v0.6.0
func (mock *HealthCheckerMock) SubscribeCalls() []struct { S healthcheck.Subscriber Checks []*healthcheck.Check }
SubscribeCalls gets all the calls that were made to Subscribe. Check the length with:
len(mockedHealthChecker.SubscribeCalls())
type S3ClientMock ¶ added in v0.8.0
type S3ClientMock struct { // BucketNameFunc mocks the BucketName method. BucketNameFunc func() string // CheckerFunc mocks the Checker method. CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error // HeadFunc mocks the Head method. HeadFunc func(key string) (*s3.HeadObjectOutput, error) // SessionFunc mocks the Session method. SessionFunc func() *session.Session // UploadWithContextFunc mocks the UploadWithContext method. UploadWithContextFunc func(ctx context.Context, input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) // UploadWithPSKFunc mocks the UploadWithPSK method. UploadWithPSKFunc func(input *s3manager.UploadInput, psk []byte) (*s3manager.UploadOutput, error) // contains filtered or unexported fields }
S3ClientMock is a mock implementation of service.S3Client.
func TestSomethingThatUsesS3Client(t *testing.T) { // make and configure a mocked service.S3Client mockedS3Client := &S3ClientMock{ BucketNameFunc: func() string { panic("mock out the BucketName method") }, CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error { panic("mock out the Checker method") }, HeadFunc: func(key string) (*s3.HeadObjectOutput, error) { panic("mock out the Head method") }, SessionFunc: func() *session.Session { panic("mock out the Session method") }, UploadWithContextFunc: func(ctx context.Context, input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) { panic("mock out the UploadWithContext method") }, UploadWithPSKFunc: func(input *s3manager.UploadInput, psk []byte) (*s3manager.UploadOutput, error) { panic("mock out the UploadWithPSK method") }, } // use mockedS3Client in code that requires service.S3Client // and then make assertions. }
func (*S3ClientMock) BucketName ¶ added in v0.8.0
func (mock *S3ClientMock) BucketName() string
BucketName calls BucketNameFunc.
func (*S3ClientMock) BucketNameCalls ¶ added in v0.8.0
func (mock *S3ClientMock) BucketNameCalls() []struct { }
BucketNameCalls gets all the calls that were made to BucketName. Check the length with:
len(mockedS3Client.BucketNameCalls())
func (*S3ClientMock) Checker ¶ added in v0.8.0
func (mock *S3ClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*S3ClientMock) CheckerCalls ¶ added in v0.8.0
func (mock *S3ClientMock) CheckerCalls() []struct { ContextMoqParam context.Context CheckState *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedS3Client.CheckerCalls())
func (*S3ClientMock) Head ¶ added in v0.8.0
func (mock *S3ClientMock) Head(key string) (*s3.HeadObjectOutput, error)
Head calls HeadFunc.
func (*S3ClientMock) HeadCalls ¶ added in v0.8.0
func (mock *S3ClientMock) HeadCalls() []struct { Key string }
HeadCalls gets all the calls that were made to Head. Check the length with:
len(mockedS3Client.HeadCalls())
func (*S3ClientMock) Session ¶ added in v0.8.0
func (mock *S3ClientMock) Session() *session.Session
Session calls SessionFunc.
func (*S3ClientMock) SessionCalls ¶ added in v0.8.0
func (mock *S3ClientMock) SessionCalls() []struct { }
SessionCalls gets all the calls that were made to Session. Check the length with:
len(mockedS3Client.SessionCalls())
func (*S3ClientMock) UploadWithContext ¶ added in v0.8.0
func (mock *S3ClientMock) UploadWithContext(ctx context.Context, input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
UploadWithContext calls UploadWithContextFunc.
func (*S3ClientMock) UploadWithContextCalls ¶ added in v0.8.0
func (mock *S3ClientMock) UploadWithContextCalls() []struct { Ctx context.Context Input *s3manager.UploadInput Options []func(*s3manager.Uploader) }
UploadWithContextCalls gets all the calls that were made to UploadWithContext. Check the length with:
len(mockedS3Client.UploadWithContextCalls())
func (*S3ClientMock) UploadWithPSK ¶ added in v0.8.0
func (mock *S3ClientMock) UploadWithPSK(input *s3manager.UploadInput, psk []byte) (*s3manager.UploadOutput, error)
UploadWithPSK calls UploadWithPSKFunc.
func (*S3ClientMock) UploadWithPSKCalls ¶ added in v0.8.0
func (mock *S3ClientMock) UploadWithPSKCalls() []struct { Input *s3manager.UploadInput Psk []byte }
UploadWithPSKCalls gets all the calls that were made to UploadWithPSK. Check the length with:
len(mockedS3Client.UploadWithPSKCalls())
type VaultClientMock ¶ added in v0.3.0
type VaultClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error // WriteKeyFunc mocks the WriteKey method. WriteKeyFunc func(path string, key string, value string) error // contains filtered or unexported fields }
VaultClientMock is a mock implementation of service.VaultClient.
func TestSomethingThatUsesVaultClient(t *testing.T) { // make and configure a mocked service.VaultClient mockedVaultClient := &VaultClientMock{ CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error { panic("mock out the Checker method") }, WriteKeyFunc: func(path string, key string, value string) error { panic("mock out the WriteKey method") }, } // use mockedVaultClient in code that requires service.VaultClient // and then make assertions. }
func (*VaultClientMock) Checker ¶ added in v0.3.0
func (mock *VaultClientMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*VaultClientMock) CheckerCalls ¶ added in v0.3.0
func (mock *VaultClientMock) CheckerCalls() []struct { ContextMoqParam context.Context CheckState *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedVaultClient.CheckerCalls())
func (*VaultClientMock) WriteKey ¶ added in v0.3.0
func (mock *VaultClientMock) WriteKey(path string, key string, value string) error
WriteKey calls WriteKeyFunc.
func (*VaultClientMock) WriteKeyCalls ¶ added in v0.3.0
func (mock *VaultClientMock) WriteKeyCalls() []struct { Path string Key string Value string }
WriteKeyCalls gets all the calls that were made to WriteKey. Check the length with:
len(mockedVaultClient.WriteKeyCalls())