source

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGettingNonExistingSource  = errors.New("the source does not exist")
	ErrUpdatingNonExistingSource = errors.New("the source to update does not exist")
	ErrInvalidSourceID           = errors.New("the source ID should be a uuid")
)

Functions

This section is empty.

Types

type SourceManager

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

func NewSourceManager

func NewSourceManager(sourceRepo repository.SourceRepository) *SourceManager

func (*SourceManager) BuildSourceFilterAndSortOptions added in v0.14.0

func (m *SourceManager) BuildSourceFilterAndSortOptions(ctx context.Context, query *url.Values) (*entity.SourceFilter, *entity.SortOptions, error)

func (*SourceManager) CreateSource

func (m *SourceManager) CreateSource(ctx context.Context, requestPayload request.CreateSourceRequest) (*entity.Source, error)

func (*SourceManager) DeleteSourceByID

func (m *SourceManager) DeleteSourceByID(ctx context.Context, id uint) error

func (*SourceManager) GetSourceByID

func (m *SourceManager) GetSourceByID(ctx context.Context, id uint) (*entity.Source, error)

func (*SourceManager) ListSources

func (m *SourceManager) ListSources(ctx context.Context, filter *entity.SourceFilter, sortOptions *entity.SortOptions) (*entity.SourceListResult, error)

func (*SourceManager) UpdateSourceByID

func (m *SourceManager) UpdateSourceByID(ctx context.Context, id uint, requestPayload request.UpdateSourceRequest) (*entity.Source, error)

Jump to

Keyboard shortcuts

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