resource

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGettingNonExistingResource = errors.New("the resource does not exist")
	ErrInvalidResourceID          = errors.New("invalid resource ID")
)

Functions

This section is empty.

Types

type ResourceManager

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

func NewResourceManager

func NewResourceManager(resourceRepo repository.ResourceRepository) *ResourceManager

func (*ResourceManager) BuildResourceFilterAndSortOptions added in v0.14.0

func (m *ResourceManager) BuildResourceFilterAndSortOptions(ctx context.Context, query *url.Values) (*entity.ResourceFilter, *entity.SortOptions, error)

func (*ResourceManager) BuildResourceGraphFilter added in v0.14.0

func (m *ResourceManager) BuildResourceGraphFilter(ctx context.Context, query *url.Values) (*entity.ResourceFilter, error)

func (*ResourceManager) GetResourceByID

func (m *ResourceManager) GetResourceByID(ctx context.Context, id uint) (*entity.Resource, error)

func (*ResourceManager) ListResources

func (m *ResourceManager) ListResources(ctx context.Context, filter *entity.ResourceFilter, sortOptions *entity.SortOptions) (*entity.ResourceListResult, error)

Jump to

Keyboard shortcuts

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