Help us shape the future of Go! Take the 2026 Go Developer Survey

reporter

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package reporter is a generated GoMock package.

package reporter contains an abstraction for scanning Coder Kubernetes workspaces using JFrog JFrog and uploading results to a Coder deployment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoderClient

type CoderClient interface {
	AgentManifest(ctx context.Context, token string) (agentsdk.Manifest, error)
	PostJFrogXrayScan(ctx context.Context, req codersdk.JFrogXrayScan) error
}

func NewClient

func NewClient(coderURL *url.URL, token string) CoderClient

type K8sReporter

type K8sReporter struct {
	Client        kubernetes.Interface
	LabelSelector string
	FieldSelector string
	Namespace     string
	CoderClient   CoderClient
	Logger        slog.Logger
	JFrogClient   jfrog.Client
	ResultsChan   chan codersdk.JFrogXrayScan
	// contains filtered or unexported fields
}

func (*K8sReporter) Init

func (k *K8sReporter) Init(ctx context.Context) error

func (*K8sReporter) Start

func (k *K8sReporter) Start(stop chan struct{})

type MockCoderClient

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

MockCoderClient is a mock of CoderClient interface.

func NewMockCoderClient

func NewMockCoderClient(ctrl *gomock.Controller) *MockCoderClient

NewMockCoderClient creates a new mock instance.

func (*MockCoderClient) AgentManifest

func (m *MockCoderClient) AgentManifest(arg0 context.Context, arg1 string) (agentsdk.Manifest, error)

AgentManifest mocks base method.

func (*MockCoderClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCoderClient) PostJFrogXrayScan

func (m *MockCoderClient) PostJFrogXrayScan(arg0 context.Context, arg1 codersdk.JFrogXrayScan) error

PostJFrogXrayScan mocks base method.

type MockCoderClientMockRecorder

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

MockCoderClientMockRecorder is the mock recorder for MockCoderClient.

func (*MockCoderClientMockRecorder) AgentManifest

func (mr *MockCoderClientMockRecorder) AgentManifest(arg0, arg1 any) *gomock.Call

AgentManifest indicates an expected call of AgentManifest.

func (*MockCoderClientMockRecorder) PostJFrogXrayScan

func (mr *MockCoderClientMockRecorder) PostJFrogXrayScan(arg0, arg1 any) *gomock.Call

PostJFrogXrayScan indicates an expected call of PostJFrogXrayScan.

Jump to

Keyboard shortcuts

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