Documentation
¶
Index ¶
Constants ¶
View Source
const ( // QueryFileName The default query file name QueryFileName = "query.rego" // MetadataFileName The default metadata file name MetadataFileName = "metadata.json" // LibraryFileName The default library file name LibraryFileName = "library.rego" // LibrariesBasePath the path to rego libraries LibrariesBasePath = "./assets/libraries/" )
Variables ¶
This section is empty.
Functions ¶
func GetPathToLibrary ¶ added in v1.1.2
GetPathToLibrary returns the libraries path for a given platform
func ReadMetadata ¶ added in v1.1.2
ReadMetadata read query's metadata file inside the query directory
Types ¶
type FilesystemSource ¶
type FilesystemSource struct {
Source string
}
FilesystemSource this type defines a struct with a path to a filesystem source of queries
func (*FilesystemSource) GetGenericQuery ¶ added in v1.1.2
func (s *FilesystemSource) GetGenericQuery(platform string) (string, error)
GetGenericQuery returns the library.rego for the platform passed in the argument
func (*FilesystemSource) GetQueries ¶
func (s *FilesystemSource) GetQueries() ([]model.QueryMetadata, error)
GetQueries walks a given filesource path returns all queries found in an array of QueryMetadata struct
Click to show internal directories.
Click to hide internal directories.