resourcesv2service

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceCache *resourceCache

Functions

func DeleteResource

func DeleteResource(ctx context.Context, resource *rorresources.Resource) error

func GetResourceByUID

func GetResourceByUID(ctx context.Context, uid string) *rorresources.ResourceSet

func GetResourceCache

func GetResourceCache() *resourceCache

Types

type ResourceDBProvider

type ResourceDBProvider interface {
	Set(ctx context.Context, resource *rorresources.Resource) error
	Get(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (*rorresources.ResourceSet, error)
	Del(ctx context.Context, resource *rorresources.Resource) error
	GetHashlistByQuery(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (apiresourcecontracts.HashList, error)
}

func NewResourceMongoDB

func NewResourceMongoDB(db *mongodb.MongodbCon) ResourceDBProvider

type ResourceMongoDB

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

func (*ResourceMongoDB) Del

func (r *ResourceMongoDB) Del(ctx context.Context, resource *rorresources.Resource) error

func (*ResourceMongoDB) Get

func (*ResourceMongoDB) GetHashlistByQuery

func (r *ResourceMongoDB) GetHashlistByQuery(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (apiresourcecontracts.HashList, error)

func (*ResourceMongoDB) Set

func (r *ResourceMongoDB) Set(ctx context.Context, resource *rorresources.Resource) error

Jump to

Keyboard shortcuts

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