mocks

package
v1.1.38 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Client) AddUser

func (_m *Client) AddUser(project string, instanceName string, user *sqladmin.User) error

AddUser provides a mock function with given fields: project, instanceName, user

func (*Client) DeleteUser

func (_m *Client) DeleteUser(project string, instanceName string, username string) error

DeleteUser provides a mock function with given fields: project, instanceName, username

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) GetInstance

func (_m *Client) GetInstance(project string, instanceName string) (*sqladmin.DatabaseInstance, error)

GetInstance provides a mock function with given fields: project, instanceName

func (*Client) GetInstanceLocalUsers

func (_m *Client) GetInstanceLocalUsers(project string, instanceName string) ([]string, error)

GetInstanceLocalUsers provides a mock function with given fields: project, instanceName

func (*Client) PatchInstance

func (_m *Client) PatchInstance(project string, instanceName string, patchRequest *sqladmin.DatabaseInstance) error

PatchInstance provides a mock function with given fields: project, instanceName, patchRequest

func (*Client) ResetPassword

func (_m *Client) ResetPassword(project string, instanceName string, username string, password string) error

ResetPassword provides a mock function with given fields: project, instanceName, username, password

type Client_AddUser_Call

type Client_AddUser_Call struct {
	*mock.Call
}

Client_AddUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddUser'

func (*Client_AddUser_Call) Return

func (*Client_AddUser_Call) Run

func (_c *Client_AddUser_Call) Run(run func(project string, instanceName string, user *sqladmin.User)) *Client_AddUser_Call

func (*Client_AddUser_Call) RunAndReturn added in v1.0.73

func (_c *Client_AddUser_Call) RunAndReturn(run func(string, string, *sqladmin.User) error) *Client_AddUser_Call

type Client_DeleteUser_Call

type Client_DeleteUser_Call struct {
	*mock.Call
}

Client_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'

func (*Client_DeleteUser_Call) Return

func (*Client_DeleteUser_Call) Run

func (_c *Client_DeleteUser_Call) Run(run func(project string, instanceName string, username string)) *Client_DeleteUser_Call

func (*Client_DeleteUser_Call) RunAndReturn added in v1.0.73

func (_c *Client_DeleteUser_Call) RunAndReturn(run func(string, string, string) error) *Client_DeleteUser_Call

type Client_Expecter

type Client_Expecter struct {
	// contains filtered or unexported fields
}

func (*Client_Expecter) AddUser

func (_e *Client_Expecter) AddUser(project interface{}, instanceName interface{}, user interface{}) *Client_AddUser_Call

AddUser is a helper method to define mock.On call

  • project string
  • instanceName string
  • user *sqladmin.User

func (*Client_Expecter) DeleteUser

func (_e *Client_Expecter) DeleteUser(project interface{}, instanceName interface{}, username interface{}) *Client_DeleteUser_Call

DeleteUser is a helper method to define mock.On call

  • project string
  • instanceName string
  • username string

func (*Client_Expecter) GetInstance

func (_e *Client_Expecter) GetInstance(project interface{}, instanceName interface{}) *Client_GetInstance_Call

GetInstance is a helper method to define mock.On call

  • project string
  • instanceName string

func (*Client_Expecter) GetInstanceLocalUsers

func (_e *Client_Expecter) GetInstanceLocalUsers(project interface{}, instanceName interface{}) *Client_GetInstanceLocalUsers_Call

GetInstanceLocalUsers is a helper method to define mock.On call

  • project string
  • instanceName string

func (*Client_Expecter) PatchInstance

func (_e *Client_Expecter) PatchInstance(project interface{}, instanceName interface{}, patchRequest interface{}) *Client_PatchInstance_Call

PatchInstance is a helper method to define mock.On call

  • project string
  • instanceName string
  • patchRequest *sqladmin.DatabaseInstance

func (*Client_Expecter) ResetPassword

func (_e *Client_Expecter) ResetPassword(project interface{}, instanceName interface{}, username interface{}, password interface{}) *Client_ResetPassword_Call

ResetPassword is a helper method to define mock.On call

  • project string
  • instanceName string
  • username string
  • password string

type Client_GetInstanceLocalUsers_Call

type Client_GetInstanceLocalUsers_Call struct {
	*mock.Call
}

Client_GetInstanceLocalUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstanceLocalUsers'

func (*Client_GetInstanceLocalUsers_Call) Return

func (*Client_GetInstanceLocalUsers_Call) Run

func (_c *Client_GetInstanceLocalUsers_Call) Run(run func(project string, instanceName string)) *Client_GetInstanceLocalUsers_Call

func (*Client_GetInstanceLocalUsers_Call) RunAndReturn added in v1.0.73

type Client_GetInstance_Call

type Client_GetInstance_Call struct {
	*mock.Call
}

Client_GetInstance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstance'

func (*Client_GetInstance_Call) Return

func (*Client_GetInstance_Call) Run

func (_c *Client_GetInstance_Call) Run(run func(project string, instanceName string)) *Client_GetInstance_Call

func (*Client_GetInstance_Call) RunAndReturn added in v1.0.73

type Client_PatchInstance_Call

type Client_PatchInstance_Call struct {
	*mock.Call
}

Client_PatchInstance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchInstance'

func (*Client_PatchInstance_Call) Return

func (*Client_PatchInstance_Call) Run

func (_c *Client_PatchInstance_Call) Run(run func(project string, instanceName string, patchRequest *sqladmin.DatabaseInstance)) *Client_PatchInstance_Call

func (*Client_PatchInstance_Call) RunAndReturn added in v1.0.73

type Client_ResetPassword_Call

type Client_ResetPassword_Call struct {
	*mock.Call
}

Client_ResetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetPassword'

func (*Client_ResetPassword_Call) Return

func (*Client_ResetPassword_Call) Run

func (_c *Client_ResetPassword_Call) Run(run func(project string, instanceName string, username string, password string)) *Client_ResetPassword_Call

func (*Client_ResetPassword_Call) RunAndReturn added in v1.0.73

Jump to

Keyboard shortcuts

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