resourcesync

package
v1.4.0-main Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountByResourceSyncOrgAndStatusResult

type CountByResourceSyncOrgAndStatusResult struct {
	OrgID  string
	Status string
	Count  int64
}

CountByResourceSyncOrgAndStatusResult holds the result of the group by query for organization and status.

type ResourceSyncStore

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

func (*ResourceSyncStore) Count

func (s *ResourceSyncStore) Count(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (int64, error)

func (*ResourceSyncStore) CountByOrgAndStatus

func (s *ResourceSyncStore) CountByOrgAndStatus(ctx context.Context, orgId *uuid.UUID, status *string) ([]CountByResourceSyncOrgAndStatusResult, error)

CountByOrgAndStatus returns the count of resource syncs grouped by org_id and status.

func (*ResourceSyncStore) Create

func (s *ResourceSyncStore) Create(ctx context.Context, orgId uuid.UUID, resource *domain.ResourceSync, eventCallback store.EventCallback) (*domain.ResourceSync, error)

func (*ResourceSyncStore) CreateOrUpdate

func (s *ResourceSyncStore) CreateOrUpdate(ctx context.Context, orgId uuid.UUID, resource *domain.ResourceSync, eventCallback store.EventCallback) (*domain.ResourceSync, bool, error)

func (*ResourceSyncStore) Delete

func (s *ResourceSyncStore) Delete(ctx context.Context, orgId uuid.UUID, name string, callback store.RemoveOwnerCallback, callbackEvent store.EventCallback) error

func (*ResourceSyncStore) Get

func (s *ResourceSyncStore) Get(ctx context.Context, orgId uuid.UUID, name string) (*domain.ResourceSync, error)

func (*ResourceSyncStore) InitialMigration

func (s *ResourceSyncStore) InitialMigration(ctx context.Context) error

func (*ResourceSyncStore) List

func (s *ResourceSyncStore) List(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (*domain.ResourceSyncList, error)

func (*ResourceSyncStore) Update

func (s *ResourceSyncStore) Update(ctx context.Context, orgId uuid.UUID, resource *domain.ResourceSync, eventCallback store.EventCallback) (*domain.ResourceSync, error)

func (*ResourceSyncStore) UpdateStatus

func (s *ResourceSyncStore) UpdateStatus(ctx context.Context, orgId uuid.UUID, resource *domain.ResourceSync, eventCallback store.EventCallback) (*domain.ResourceSync, error)

type Store

type Store interface {
	InitialMigration(ctx context.Context) error

	Create(ctx context.Context, orgId uuid.UUID, resourceSync *domain.ResourceSync, callbackEvent store.EventCallback) (*domain.ResourceSync, error)
	Update(ctx context.Context, orgId uuid.UUID, resourceSync *domain.ResourceSync, callbackEvent store.EventCallback) (*domain.ResourceSync, error)
	CreateOrUpdate(ctx context.Context, orgId uuid.UUID, resourceSync *domain.ResourceSync, callbackEvent store.EventCallback) (*domain.ResourceSync, bool, error)
	Get(ctx context.Context, orgId uuid.UUID, name string) (*domain.ResourceSync, error)
	List(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (*domain.ResourceSyncList, error)
	Delete(ctx context.Context, orgId uuid.UUID, name string, callback store.RemoveOwnerCallback, callbackEvent store.EventCallback) error
	UpdateStatus(ctx context.Context, orgId uuid.UUID, resource *domain.ResourceSync, eventCallback store.EventCallback) (*domain.ResourceSync, error)
	Count(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (int64, error)
	CountByOrgAndStatus(ctx context.Context, orgId *uuid.UUID, status *string) ([]CountByResourceSyncOrgAndStatusResult, error)
}

func NewResourceSyncStore

func NewResourceSyncStore(db *gorm.DB, log logrus.FieldLogger) Store

Jump to

Keyboard shortcuts

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