Documentation ¶
Index ¶
- type Client
- type Deploy
- type DeployKey
- type DeploymentInfo
- type DeploymentsResponse
- type MockClient
- func (_m *MockClient) ChangeDeployKey(ctx context.Context, team string) (*DeployKey, error)
- func (_m *MockClient) DeployKey(ctx context.Context, team string) (*DeployKey, error)
- func (_m *MockClient) Deployments(ctx context.Context, opts ...RequestOption) ([]Deploy, error)
- func (_m *MockClient) EXPECT() *MockClient_Expecter
- type MockClient_ChangeDeployKey_Call
- func (_c *MockClient_ChangeDeployKey_Call) Return(_a0 *DeployKey, _a1 error) *MockClient_ChangeDeployKey_Call
- func (_c *MockClient_ChangeDeployKey_Call) Run(run func(ctx context.Context, team string)) *MockClient_ChangeDeployKey_Call
- func (_c *MockClient_ChangeDeployKey_Call) RunAndReturn(run func(context.Context, string) (*DeployKey, error)) *MockClient_ChangeDeployKey_Call
- type MockClient_DeployKey_Call
- func (_c *MockClient_DeployKey_Call) Return(_a0 *DeployKey, _a1 error) *MockClient_DeployKey_Call
- func (_c *MockClient_DeployKey_Call) Run(run func(ctx context.Context, team string)) *MockClient_DeployKey_Call
- func (_c *MockClient_DeployKey_Call) RunAndReturn(run func(context.Context, string) (*DeployKey, error)) *MockClient_DeployKey_Call
- type MockClient_Deployments_Call
- func (_c *MockClient_Deployments_Call) Return(_a0 []Deploy, _a1 error) *MockClient_Deployments_Call
- func (_c *MockClient_Deployments_Call) Run(run func(ctx context.Context, opts ...RequestOption)) *MockClient_Deployments_Call
- func (_c *MockClient_Deployments_Call) RunAndReturn(run func(context.Context, ...RequestOption) ([]Deploy, error)) *MockClient_Deployments_Call
- type MockClient_Expecter
- func (_e *MockClient_Expecter) ChangeDeployKey(ctx interface{}, team interface{}) *MockClient_ChangeDeployKey_Call
- func (_e *MockClient_Expecter) DeployKey(ctx interface{}, team interface{}) *MockClient_DeployKey_Call
- func (_e *MockClient_Expecter) Deployments(ctx interface{}, opts ...interface{}) *MockClient_Deployments_Call
- type RequestOption
- type Resource
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Deployments(ctx context.Context, opts ...RequestOption) ([]Deploy, error) ChangeDeployKey(ctx context.Context, team string) (*DeployKey, error) DeployKey(ctx context.Context, team string) (*DeployKey, error) }
func New ¶
func New(cfg config.Hookd, errors api.Int64Counter, log logrus.FieldLogger) Client
New creates a new hookd client
type Deploy ¶
type Deploy struct { DeploymentInfo DeploymentInfo `json:"deployment"` Statuses []Status `json:"statuses"` Resources []Resource `json:"resources"` }
type DeploymentInfo ¶
type DeploymentsResponse ¶
type DeploymentsResponse struct {
Deployments []Deploy `json:"deployments"`
}
type MockClient ¶
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 ¶
ChangeDeployKey provides a mock function with given fields: ctx, team
func (*MockClient) Deployments ¶
func (_m *MockClient) Deployments(ctx context.Context, opts ...RequestOption) ([]Deploy, error)
Deployments provides a mock function with given fields: ctx, opts
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
type MockClient_ChangeDeployKey_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 (_c *MockClient_ChangeDeployKey_Call) Return(_a0 *DeployKey, _a1 error) *MockClient_ChangeDeployKey_Call
func (*MockClient_ChangeDeployKey_Call) Run ¶
func (_c *MockClient_ChangeDeployKey_Call) Run(run func(ctx context.Context, team string)) *MockClient_ChangeDeployKey_Call
func (*MockClient_ChangeDeployKey_Call) RunAndReturn ¶
func (_c *MockClient_ChangeDeployKey_Call) RunAndReturn(run func(context.Context, string) (*DeployKey, error)) *MockClient_ChangeDeployKey_Call
type MockClient_DeployKey_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 (_c *MockClient_DeployKey_Call) Return(_a0 *DeployKey, _a1 error) *MockClient_DeployKey_Call
func (*MockClient_DeployKey_Call) Run ¶
func (_c *MockClient_DeployKey_Call) Run(run func(ctx context.Context, team string)) *MockClient_DeployKey_Call
func (*MockClient_DeployKey_Call) RunAndReturn ¶
func (_c *MockClient_DeployKey_Call) RunAndReturn(run func(context.Context, string) (*DeployKey, error)) *MockClient_DeployKey_Call
type MockClient_Deployments_Call ¶
MockClient_Deployments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deployments'
func (*MockClient_Deployments_Call) Return ¶
func (_c *MockClient_Deployments_Call) Return(_a0 []Deploy, _a1 error) *MockClient_Deployments_Call
func (*MockClient_Deployments_Call) Run ¶
func (_c *MockClient_Deployments_Call) Run(run func(ctx context.Context, opts ...RequestOption)) *MockClient_Deployments_Call
func (*MockClient_Deployments_Call) RunAndReturn ¶
func (_c *MockClient_Deployments_Call) RunAndReturn(run func(context.Context, ...RequestOption) ([]Deploy, error)) *MockClient_Deployments_Call
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
func (*MockClient_Expecter) Deployments ¶
func (_e *MockClient_Expecter) Deployments(ctx interface{}, opts ...interface{}) *MockClient_Deployments_Call
Deployments is a helper method to define mock.On call
- ctx context.Context
- opts ...RequestOption
type RequestOption ¶
func WithCluster ¶
func WithCluster(cluster string) RequestOption
func WithIgnoreTeams ¶
func WithIgnoreTeams(teams ...string) RequestOption
func WithLimit ¶
func WithLimit(limit int) RequestOption
func WithTeam ¶
func WithTeam(team string) RequestOption