repository

package
v1.3.0-test Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryStore

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

func (*RepositoryStore) Count

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

func (*RepositoryStore) CountByOrg

func (s *RepositoryStore) CountByOrg(ctx context.Context, orgId *uuid.UUID) ([]store.CountByOrgResult, error)

CountByOrg returns the count of repositories grouped by org_id.

func (*RepositoryStore) Create

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

func (*RepositoryStore) CreateOrUpdate

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

func (*RepositoryStore) Delete

func (s *RepositoryStore) Delete(ctx context.Context, orgId uuid.UUID, name string, eventCallback store.EventCallback) error

func (*RepositoryStore) Get

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

func (*RepositoryStore) GetDeviceRefs

func (s *RepositoryStore) GetDeviceRefs(ctx context.Context, orgId uuid.UUID, name string) (*domain.DeviceList, error)

func (*RepositoryStore) GetFleetRefs

func (s *RepositoryStore) GetFleetRefs(ctx context.Context, orgId uuid.UUID, name string) (*domain.FleetList, error)

func (*RepositoryStore) GetInternal

func (s *RepositoryStore) GetInternal(ctx context.Context, orgId uuid.UUID, name string) (*model.Repository, error)

func (*RepositoryStore) InitialMigration

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

func (*RepositoryStore) List

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

func (*RepositoryStore) ListIgnoreOrg

func (s *RepositoryStore) ListIgnoreOrg(ctx context.Context) ([]model.Repository, error)

func (*RepositoryStore) Update

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

func (*RepositoryStore) UpdateStatus

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

type Store

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

	Create(ctx context.Context, orgId uuid.UUID, repository *domain.Repository, eventCallback store.EventCallback) (*domain.Repository, error)
	Update(ctx context.Context, orgId uuid.UUID, repository *domain.Repository, eventCallback store.EventCallback) (*domain.Repository, error)
	CreateOrUpdate(ctx context.Context, orgId uuid.UUID, repository *domain.Repository, eventCallback store.EventCallback) (*domain.Repository, bool, error)
	Get(ctx context.Context, orgId uuid.UUID, name string) (*domain.Repository, error)
	List(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (*domain.RepositoryList, error)
	Delete(ctx context.Context, orgId uuid.UUID, name string, eventCallback store.EventCallback) error
	UpdateStatus(ctx context.Context, orgId uuid.UUID, resource *domain.Repository, eventCallback store.EventCallback) (*domain.Repository, error)

	GetFleetRefs(ctx context.Context, orgId uuid.UUID, name string) (*domain.FleetList, error)
	GetDeviceRefs(ctx context.Context, orgId uuid.UUID, name string) (*domain.DeviceList, error)

	// Used by domain metrics
	Count(ctx context.Context, orgId uuid.UUID, listParams store.ListParams) (int64, error)
	CountByOrg(ctx context.Context, orgId *uuid.UUID) ([]store.CountByOrgResult, error)
}

func NewRepositoryStore

func NewRepositoryStore(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