Documentation ¶
Index ¶
- Variables
- func DeleteResource(ctx context.Context, resource *rorresources.Resource) error
- func GetResourceByQuery(ctx context.Context, query *rorresources.ResourceQuery) *rorresources.ResourceSet
- func GetResourceByUID(ctx context.Context, uid string) *rorresources.ResourceSet
- func GetResourceCache() *resourceCache
- func HandleResourceUpdate(ctx context.Context, resource *rorresources.Resource) rorresources.ResourceUpdateResults
- func NewOrUpdateResource(ctx context.Context, resource *rorresources.Resource) rorresources.ResourceUpdateResults
- func ResourceGetHashlist(ctx context.Context, owner rortypes.RorResourceOwnerReference) (apiresourcecontracts.HashList, error)
- type ResourceDBProvider
- type ResourceMongoDB
- func (r *ResourceMongoDB) Del(ctx context.Context, resource *rorresources.Resource) error
- func (r *ResourceMongoDB) Get(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (*rorresources.ResourceSet, error)
- func (r *ResourceMongoDB) GetHashlistByQuery(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (apiresourcecontracts.HashList, error)
- func (r *ResourceMongoDB) Set(ctx context.Context, resource *rorresources.Resource) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ResourceCache *resourceCache
Functions ¶
func DeleteResource ¶
func DeleteResource(ctx context.Context, resource *rorresources.Resource) error
func GetResourceByQuery ¶
func GetResourceByQuery(ctx context.Context, query *rorresources.ResourceQuery) *rorresources.ResourceSet
func GetResourceByUID ¶
func GetResourceByUID(ctx context.Context, uid string) *rorresources.ResourceSet
func GetResourceCache ¶
func GetResourceCache() *resourceCache
func HandleResourceUpdate ¶
func HandleResourceUpdate(ctx context.Context, resource *rorresources.Resource) rorresources.ResourceUpdateResults
func NewOrUpdateResource ¶
func NewOrUpdateResource(ctx context.Context, resource *rorresources.Resource) rorresources.ResourceUpdateResults
func ResourceGetHashlist ¶
func ResourceGetHashlist(ctx context.Context, owner rortypes.RorResourceOwnerReference) (apiresourcecontracts.HashList, error)
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 (r *ResourceMongoDB) Get(ctx context.Context, rorResourceQuery *rorresources.ResourceQuery) (*rorresources.ResourceSet, error)
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
Click to show internal directories.
Click to hide internal directories.