testdoubles

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WharfClientAPIFetcherMock added in v1.2.0

type WharfClientAPIFetcherMock struct {
	mock.Mock
}

WharfClientAPIFetcherMock is a mock variant of the wharfapi.Client with the help of github.com/stretchr/testify/mock.

func (*WharfClientAPIFetcherMock) GetProvider added in v1.2.0

func (m *WharfClientAPIFetcherMock) GetProvider(providerName, urlStr, uploadURLStr string, tokenID uint) (wharfapi.Provider, error)

GetProvider returns a provider as identified by its name, URL, and upload URL strings, as well as its token ID reference.

func (*WharfClientAPIFetcherMock) GetProviderByID added in v1.3.0

func (m *WharfClientAPIFetcherMock) GetProviderByID(providerID uint) (wharfapi.Provider, error)

GetProviderByID returns a provider as identified by its ID.

func (*WharfClientAPIFetcherMock) GetToken added in v1.2.0

func (m *WharfClientAPIFetcherMock) GetToken(token, userName string) (wharfapi.Token, error)

GetToken returns a token as identified by its token and username strings.

func (*WharfClientAPIFetcherMock) GetTokenByID added in v1.3.0

func (m *WharfClientAPIFetcherMock) GetTokenByID(tokenID uint) (wharfapi.Token, error)

GetTokenByID returns a token as identified by its ID.

func (*WharfClientAPIFetcherMock) PostProvider added in v1.2.0

func (m *WharfClientAPIFetcherMock) PostProvider(provider wharfapi.Provider) (wharfapi.Provider, error)

PostProvider creates a new provider and returns the created provider, populated with its newly assigned ID.

func (*WharfClientAPIFetcherMock) PostToken added in v1.2.0

PostToken creates a new token and returns the created token, populated with its newly assigned ID.

func (*WharfClientAPIFetcherMock) PutBranches added in v1.2.0

func (m *WharfClientAPIFetcherMock) PutBranches(branches []wharfapi.Branch) ([]wharfapi.Branch, error)

PutBranches replaces the list of branches for a project.

func (*WharfClientAPIFetcherMock) PutProject added in v1.2.0

func (m *WharfClientAPIFetcherMock) PutProject(project wharfapi.Project) (wharfapi.Project, error)

PutProject creates or updates a project, based on wether the project ID value is non-zero, and returns the created or updated project, populated with its possibly newly assigned ID.

Jump to

Keyboard shortcuts

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