Documentation ¶
Index ¶
- Variables
- type Request
- func (r *Request) AllResources() ([]model.Resource, error)
- func (r *Request) AllVersions() ([]model.ResourceVersion, error)
- func (r *Request) ByCatalogKindName() (model.Resource, error)
- func (r *Request) ByCatalogKindNameVersion() (model.Resource, error)
- func (r *Request) ByID() (model.Resource, error)
- func (r *Request) ByVersionID() (model.ResourceVersion, error)
- func (r *Request) Query() ([]model.Resource, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FetchError = fmt.Errorf("failed to fetch resources") NotFoundError = fmt.Errorf("resource not found") )
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Db *gorm.DB Log *log.Logger ID uint Name string Match string Kinds []string Catalogs []string Categories []string Tags []string Platforms []string Limit uint Version string Kind string Catalog string VersionID uint }
func (*Request) AllResources ¶
AllResources returns all resources in db sorted by rating and name Limit can be passed for limiting number of resources Field: Limit
func (*Request) AllVersions ¶
func (r *Request) AllVersions() ([]model.ResourceVersion, error)
AllVersions returns all versions of a resource Fields: ID (Resource ID)
func (*Request) ByCatalogKindName ¶
ByCatalogKindName searches resource by catalog name, kind and resource name Fields: Catalog, Kind, Name
func (*Request) ByCatalogKindNameVersion ¶
ByCatalogKindNameVersion searches resource by catalog name, kind, resource name, and version Fields: Catalog, Kind, Name, Version
func (*Request) ByVersionID ¶
func (r *Request) ByVersionID() (model.ResourceVersion, error)
ByVersionID searches resource version by its ID Field: VersionID
Click to show internal directories.
Click to hide internal directories.