resources

package
v0.0.0-...-8f6ea6c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResourcesRepository

func CreateResourcesRepository(newResourcesRepository ResourcesRepository)

Types

type DefaultResourcesRepository

type DefaultResourcesRepository struct {
	ResourcesRepository
}

func (*DefaultResourcesRepository) GetResource

func (r *DefaultResourcesRepository) GetResource(resourceName string) (*Resource, error)

func (*DefaultResourcesRepository) IsResourceExist

func (r *DefaultResourcesRepository) IsResourceExist(resourceName string) bool

type Resource

type Resource struct {
	Name     string `bson:"name,omitempty"`
	Category string `bson:"category,omitempty"`
}

type Resources

type Resources []Resource

type ResourcesRepository

type ResourcesRepository interface {
	ListResources() *[]Resource
	GetResource(resourceName string) (*Resource, error)
	IsResourceExist(resourceName string) bool
}

func GetResourcesRepository

func GetResourcesRepository() ResourcesRepository

Jump to

Keyboard shortcuts

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