hookd

package
v0.0.0-...-e127d2b Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 9 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 interface {
	ChangeDeployKey(ctx context.Context, team string) (*DeployKey, error)
	DeployKey(ctx context.Context, team string) (*DeployKey, error)
}

func New

func New(endpoint, psk string, log logrus.FieldLogger) Client

New creates a new hookd client

type DeployKey

type DeployKey struct {
	Team    string    `json:"team"`
	Key     string    `json:"key"`
	Expires time.Time `json:"expires"`
	Created time.Time `json:"created"`
}

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockClient

NewMockClient creates a new instance of MockClient. 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 (*MockClient) ChangeDeployKey

func (_m *MockClient) ChangeDeployKey(ctx context.Context, team string) (*DeployKey, error)

ChangeDeployKey provides a mock function with given fields: ctx, team

func (*MockClient) DeployKey

func (_m *MockClient) DeployKey(ctx context.Context, team string) (*DeployKey, error)

DeployKey provides a mock function with given fields: ctx, team

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

type MockClient_ChangeDeployKey_Call

type MockClient_ChangeDeployKey_Call struct {
	*mock.Call
}

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

func (*MockClient_ChangeDeployKey_Call) Return

func (*MockClient_ChangeDeployKey_Call) Run

func (*MockClient_ChangeDeployKey_Call) RunAndReturn

type MockClient_DeployKey_Call

type MockClient_DeployKey_Call struct {
	*mock.Call
}

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

func (*MockClient_DeployKey_Call) Return

func (*MockClient_DeployKey_Call) Run

func (*MockClient_DeployKey_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) ChangeDeployKey

func (_e *MockClient_Expecter) ChangeDeployKey(ctx interface{}, team interface{}) *MockClient_ChangeDeployKey_Call

ChangeDeployKey is a helper method to define mock.On call

  • ctx context.Context
  • team string

func (*MockClient_Expecter) DeployKey

func (_e *MockClient_Expecter) DeployKey(ctx interface{}, team interface{}) *MockClient_DeployKey_Call

DeployKey is a helper method to define mock.On call

  • ctx context.Context
  • team string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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