resourcesync

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package resourcesync is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResourceSyncFromUntrusted

func CreateResourceSyncFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

CreateResourceSyncFromUntrusted sanitizes an untrusted resourcesync document, then creates it.

func ReplaceResourceSyncFromUntrusted

func ReplaceResourceSyncFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, name string, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

ReplaceResourceSyncFromUntrusted sanitizes an untrusted resourcesync document, then replaces it.

func SanitizeResourceSync

func SanitizeResourceSync(rs *domain.ResourceSync)

SanitizeResourceSync clears status and managed metadata from an untrusted resourcesync document (HTTP body).

Types

type MockService

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

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) CreateResourceSync

func (m *MockService) CreateResourceSync(ctx context.Context, orgId uuid.UUID, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

CreateResourceSync mocks base method.

func (*MockService) DeleteResourceSync

func (m *MockService) DeleteResourceSync(ctx context.Context, orgId uuid.UUID, name string) domain.Status

DeleteResourceSync mocks base method.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

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

func (*MockService) GetResourceSync

func (m *MockService) GetResourceSync(ctx context.Context, orgId uuid.UUID, name string) (*domain.ResourceSync, domain.Status)

GetResourceSync mocks base method.

func (*MockService) ListResourceSyncs

func (m *MockService) ListResourceSyncs(ctx context.Context, orgId uuid.UUID, params domain.ListResourceSyncsParams) (*domain.ResourceSyncList, domain.Status)

ListResourceSyncs mocks base method.

func (*MockService) PatchResourceSync

func (m *MockService) PatchResourceSync(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.ResourceSync, domain.Status)

PatchResourceSync mocks base method.

func (*MockService) ReplaceResourceSync

func (m *MockService) ReplaceResourceSync(ctx context.Context, orgId uuid.UUID, name string, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

ReplaceResourceSync mocks base method.

func (*MockService) ReplaceResourceSyncStatus

func (m *MockService) ReplaceResourceSyncStatus(ctx context.Context, orgId uuid.UUID, name string, resourceSync domain.ResourceSync) (*domain.ResourceSync, domain.Status)

ReplaceResourceSyncStatus mocks base method.

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) CreateResourceSync

func (mr *MockServiceMockRecorder) CreateResourceSync(ctx, orgId, rs any) *gomock.Call

CreateResourceSync indicates an expected call of CreateResourceSync.

func (*MockServiceMockRecorder) DeleteResourceSync

func (mr *MockServiceMockRecorder) DeleteResourceSync(ctx, orgId, name any) *gomock.Call

DeleteResourceSync indicates an expected call of DeleteResourceSync.

func (*MockServiceMockRecorder) GetResourceSync

func (mr *MockServiceMockRecorder) GetResourceSync(ctx, orgId, name any) *gomock.Call

GetResourceSync indicates an expected call of GetResourceSync.

func (*MockServiceMockRecorder) ListResourceSyncs

func (mr *MockServiceMockRecorder) ListResourceSyncs(ctx, orgId, params any) *gomock.Call

ListResourceSyncs indicates an expected call of ListResourceSyncs.

func (*MockServiceMockRecorder) PatchResourceSync

func (mr *MockServiceMockRecorder) PatchResourceSync(ctx, orgId, name, patch any) *gomock.Call

PatchResourceSync indicates an expected call of PatchResourceSync.

func (*MockServiceMockRecorder) ReplaceResourceSync

func (mr *MockServiceMockRecorder) ReplaceResourceSync(ctx, orgId, name, rs any) *gomock.Call

ReplaceResourceSync indicates an expected call of ReplaceResourceSync.

func (*MockServiceMockRecorder) ReplaceResourceSyncStatus

func (mr *MockServiceMockRecorder) ReplaceResourceSyncStatus(ctx, orgId, name, resourceSync any) *gomock.Call

ReplaceResourceSyncStatus indicates an expected call of ReplaceResourceSyncStatus.

type Service

type Service interface {
	CreateResourceSync(ctx context.Context, orgId uuid.UUID, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)
	ListResourceSyncs(ctx context.Context, orgId uuid.UUID, params domain.ListResourceSyncsParams) (*domain.ResourceSyncList, domain.Status)
	GetResourceSync(ctx context.Context, orgId uuid.UUID, name string) (*domain.ResourceSync, domain.Status)
	ReplaceResourceSync(ctx context.Context, orgId uuid.UUID, name string, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)
	DeleteResourceSync(ctx context.Context, orgId uuid.UUID, name string) domain.Status
	PatchResourceSync(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.ResourceSync, domain.Status)
	ReplaceResourceSyncStatus(ctx context.Context, orgId uuid.UUID, name string, resourceSync domain.ResourceSync) (*domain.ResourceSync, domain.Status)
}

func WrapWithTracing

func WrapWithTracing(inner Service) Service

WrapWithTracing returns a Service that wraps inner with tracing spans, or nil if inner is nil.

type ServiceHandler

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

func NewServiceHandler

func NewServiceHandler(store resourcesyncstore.Store, catalogStore catalogstore.Store, fleetStore fleetstore.Store, events events.Service, log logrus.FieldLogger) *ServiceHandler

NewServiceHandler creates a new resourcesync ServiceHandler instance.

func (*ServiceHandler) CreateResourceSync

func (h *ServiceHandler) CreateResourceSync(ctx context.Context, orgId uuid.UUID, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

func (*ServiceHandler) DeleteResourceSync

func (h *ServiceHandler) DeleteResourceSync(ctx context.Context, orgId uuid.UUID, name string) domain.Status

func (*ServiceHandler) GetResourceSync

func (h *ServiceHandler) GetResourceSync(ctx context.Context, orgId uuid.UUID, name string) (*domain.ResourceSync, domain.Status)

func (*ServiceHandler) ListResourceSyncs

func (*ServiceHandler) PatchResourceSync

func (h *ServiceHandler) PatchResourceSync(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.ResourceSync, domain.Status)

Only metadata.labels and spec can be patched. If we try to patch other fields, HTTP 400 Bad Request is returned.

func (*ServiceHandler) ReplaceResourceSync

func (h *ServiceHandler) ReplaceResourceSync(ctx context.Context, orgId uuid.UUID, name string, rs domain.ResourceSync) (*domain.ResourceSync, domain.Status)

func (*ServiceHandler) ReplaceResourceSyncStatus

func (h *ServiceHandler) ReplaceResourceSyncStatus(ctx context.Context, orgId uuid.UUID, name string, resourceSync domain.ResourceSync) (*domain.ResourceSync, domain.Status)

type TracedService

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

TracedService wraps a Service implementation with OpenTelemetry tracing.

func (*TracedService) CreateResourceSync

func (_d *TracedService) CreateResourceSync(ctx context.Context, orgId uuid.UUID, rs domain.ResourceSync) (rp1 *domain.ResourceSync, s1 domain.Status)

func (*TracedService) DeleteResourceSync

func (_d *TracedService) DeleteResourceSync(ctx context.Context, orgId uuid.UUID, name string) (s1 domain.Status)

func (*TracedService) GetResourceSync

func (_d *TracedService) GetResourceSync(ctx context.Context, orgId uuid.UUID, name string) (rp1 *domain.ResourceSync, s1 domain.Status)

func (*TracedService) ListResourceSyncs

func (_d *TracedService) ListResourceSyncs(ctx context.Context, orgId uuid.UUID, params domain.ListResourceSyncsParams) (rp1 *domain.ResourceSyncList, s1 domain.Status)

func (*TracedService) PatchResourceSync

func (_d *TracedService) PatchResourceSync(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (rp1 *domain.ResourceSync, s1 domain.Status)

func (*TracedService) ReplaceResourceSync

func (_d *TracedService) ReplaceResourceSync(ctx context.Context, orgId uuid.UUID, name string, rs domain.ResourceSync) (rp1 *domain.ResourceSync, s1 domain.Status)

func (*TracedService) ReplaceResourceSyncStatus

func (_d *TracedService) ReplaceResourceSyncStatus(ctx context.Context, orgId uuid.UUID, name string, resourceSync domain.ResourceSync) (rp1 *domain.ResourceSync, s1 domain.Status)

Jump to

Keyboard shortcuts

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