funccli

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(logger logr.Logger, installPath string, checkInterval time.Duration, disableCLIUpdate bool) (*managerImpl, error)

NewManager creates a new func CLI manager

Types

type DeployOptions

type DeployOptions struct {
	Registry         string
	InsecureRegistry bool
	RegistryAuthFile string

	GitUrl string

	Builder string
}

type GitHubRelease

type GitHubRelease struct {
	Name   string `json:"name"`
	Assets []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

GitHubRelease represents the GitHub API response for a release

type Manager

type Manager interface {
	Run(ctx context.Context, dir string, args ...string) (string, error)

	Describe(ctx context.Context, name, namespace string) (funcfn.Instance, error)
	Deploy(ctx context.Context, repoPath string, namespace string, opts DeployOptions) error
	Delete(ctx context.Context, name, namespace string) error

	GetCurrentVersion(ctx context.Context) (string, error)
	GetLatestMiddlewareVersion(ctx context.Context, runtime, invoke string) (string, error)
	GetMiddlewareVersion(ctx context.Context, name, namespace string) (string, error)
}

type MockManager

type MockManager struct {
	mock.Mock
}

MockManager is an autogenerated mock type for the Manager type

func NewMockManager

func NewMockManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockManager

NewMockManager creates a new instance of MockManager. 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 (*MockManager) Delete

func (_mock *MockManager) Delete(ctx context.Context, name string, namespace string) error

Delete provides a mock function for the type MockManager

func (*MockManager) Deploy

func (_mock *MockManager) Deploy(ctx context.Context, repoPath string, namespace string, opts DeployOptions) error

Deploy provides a mock function for the type MockManager

func (*MockManager) Describe

func (_mock *MockManager) Describe(ctx context.Context, name string, namespace string) (functions.Instance, error)

Describe provides a mock function for the type MockManager

func (*MockManager) EXPECT

func (_m *MockManager) EXPECT() *MockManager_Expecter

func (*MockManager) GetCurrentVersion

func (_mock *MockManager) GetCurrentVersion(ctx context.Context) (string, error)

GetCurrentVersion provides a mock function for the type MockManager

func (*MockManager) GetLatestMiddlewareVersion

func (_mock *MockManager) GetLatestMiddlewareVersion(ctx context.Context, runtime string, invoke string) (string, error)

GetLatestMiddlewareVersion provides a mock function for the type MockManager

func (*MockManager) GetMiddlewareVersion

func (_mock *MockManager) GetMiddlewareVersion(ctx context.Context, name string, namespace string) (string, error)

GetMiddlewareVersion provides a mock function for the type MockManager

func (*MockManager) Run

func (_mock *MockManager) Run(ctx context.Context, dir string, args ...string) (string, error)

Run provides a mock function for the type MockManager

type MockManager_Delete_Call

type MockManager_Delete_Call struct {
	*mock.Call
}

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

func (*MockManager_Delete_Call) Return

func (*MockManager_Delete_Call) Run

func (_c *MockManager_Delete_Call) Run(run func(ctx context.Context, name string, namespace string)) *MockManager_Delete_Call

func (*MockManager_Delete_Call) RunAndReturn

func (_c *MockManager_Delete_Call) RunAndReturn(run func(ctx context.Context, name string, namespace string) error) *MockManager_Delete_Call

type MockManager_Deploy_Call

type MockManager_Deploy_Call struct {
	*mock.Call
}

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

func (*MockManager_Deploy_Call) Return

func (*MockManager_Deploy_Call) Run

func (_c *MockManager_Deploy_Call) Run(run func(ctx context.Context, repoPath string, namespace string, opts DeployOptions)) *MockManager_Deploy_Call

func (*MockManager_Deploy_Call) RunAndReturn

func (_c *MockManager_Deploy_Call) RunAndReturn(run func(ctx context.Context, repoPath string, namespace string, opts DeployOptions) error) *MockManager_Deploy_Call

type MockManager_Describe_Call

type MockManager_Describe_Call struct {
	*mock.Call
}

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

func (*MockManager_Describe_Call) Return

func (*MockManager_Describe_Call) Run

func (_c *MockManager_Describe_Call) Run(run func(ctx context.Context, name string, namespace string)) *MockManager_Describe_Call

func (*MockManager_Describe_Call) RunAndReturn

func (_c *MockManager_Describe_Call) RunAndReturn(run func(ctx context.Context, name string, namespace string) (functions.Instance, error)) *MockManager_Describe_Call

type MockManager_Expecter

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

func (*MockManager_Expecter) Delete

func (_e *MockManager_Expecter) Delete(ctx interface{}, name interface{}, namespace interface{}) *MockManager_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • namespace string

func (*MockManager_Expecter) Deploy

func (_e *MockManager_Expecter) Deploy(ctx interface{}, repoPath interface{}, namespace interface{}, opts interface{}) *MockManager_Deploy_Call

Deploy is a helper method to define mock.On call

  • ctx context.Context
  • repoPath string
  • namespace string
  • opts DeployOptions

func (*MockManager_Expecter) Describe

func (_e *MockManager_Expecter) Describe(ctx interface{}, name interface{}, namespace interface{}) *MockManager_Describe_Call

Describe is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • namespace string

func (*MockManager_Expecter) GetCurrentVersion

func (_e *MockManager_Expecter) GetCurrentVersion(ctx interface{}) *MockManager_GetCurrentVersion_Call

GetCurrentVersion is a helper method to define mock.On call

  • ctx context.Context

func (*MockManager_Expecter) GetLatestMiddlewareVersion

func (_e *MockManager_Expecter) GetLatestMiddlewareVersion(ctx interface{}, runtime interface{}, invoke interface{}) *MockManager_GetLatestMiddlewareVersion_Call

GetLatestMiddlewareVersion is a helper method to define mock.On call

  • ctx context.Context
  • runtime string
  • invoke string

func (*MockManager_Expecter) GetMiddlewareVersion

func (_e *MockManager_Expecter) GetMiddlewareVersion(ctx interface{}, name interface{}, namespace interface{}) *MockManager_GetMiddlewareVersion_Call

GetMiddlewareVersion is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • namespace string

func (*MockManager_Expecter) Run

func (_e *MockManager_Expecter) Run(ctx interface{}, dir interface{}, args ...interface{}) *MockManager_Run_Call

Run is a helper method to define mock.On call

  • ctx context.Context
  • dir string
  • args ...string

type MockManager_GetCurrentVersion_Call

type MockManager_GetCurrentVersion_Call struct {
	*mock.Call
}

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

func (*MockManager_GetCurrentVersion_Call) Return

func (*MockManager_GetCurrentVersion_Call) Run

func (*MockManager_GetCurrentVersion_Call) RunAndReturn

type MockManager_GetLatestMiddlewareVersion_Call

type MockManager_GetLatestMiddlewareVersion_Call struct {
	*mock.Call
}

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

func (*MockManager_GetLatestMiddlewareVersion_Call) Return

func (*MockManager_GetLatestMiddlewareVersion_Call) Run

func (*MockManager_GetLatestMiddlewareVersion_Call) RunAndReturn

type MockManager_GetMiddlewareVersion_Call

type MockManager_GetMiddlewareVersion_Call struct {
	*mock.Call
}

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

func (*MockManager_GetMiddlewareVersion_Call) Return

func (*MockManager_GetMiddlewareVersion_Call) Run

func (*MockManager_GetMiddlewareVersion_Call) RunAndReturn

type MockManager_Run_Call

type MockManager_Run_Call struct {
	*mock.Call
}

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

func (*MockManager_Run_Call) Return

func (*MockManager_Run_Call) Run

func (_c *MockManager_Run_Call) Run(run func(ctx context.Context, dir string, args ...string)) *MockManager_Run_Call

func (*MockManager_Run_Call) RunAndReturn

func (_c *MockManager_Run_Call) RunAndReturn(run func(ctx context.Context, dir string, args ...string) (string, error)) *MockManager_Run_Call

Jump to

Keyboard shortcuts

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