Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripPrefix ¶
StripPrefix removes the prefix of the URN and only returns the ID
Types ¶
type LocationGraph ¶
type LocationGraph struct { ProjectUrn string ProjectType string Tree *tree.Node References []Reference ProjectFiles []ProjectFile }
LocationGraph contains everything for getting information about the location graph in REXos
func GetLocationGraphByProjectUrn ¶
func GetLocationGraphByProjectUrn(handler gorexos.RequestHandler, projectUrn string) (LocationGraph, error)
GetLocationGraphByProjectUrn returns the full location graph for the given project URN
func (*LocationGraph) Beautify ¶
func (t *LocationGraph) Beautify()
Beautify modifies the tree and adds attributes to the graph
func (*LocationGraph) GetTransformations ¶
func (t *LocationGraph) GetTransformations(handler gorexos.RequestHandler) error
GetTransformations fetches all transformations for all references and project files
func (*LocationGraph) WriteToDot ¶
func (t *LocationGraph) WriteToDot(w io.Writer) error
WriteToDot gets the location graph of the project and dumps out the structure as DOT file (graphviz)
type Project ¶
type Project struct { DateCreated string `json:"dateCreated"` LastUpdated string `json:"lastUpdated"` Urn string `json:"urn"` Name string `json:"name"` Owner string `json:"owner"` Public bool `json:"public"` Type string `json:"type"` Scheme string `json:"scheme"` SelfLink string NumberOfProjectFiles uint `json:"numberOfProjectFiles"` TotalProjectFileSize uint `json:"totalProjectFileSize"` RootRexReferenceKey string `json:"rootRexReferenceKey"` }
Project is the data container for top level REXos information
func GetAllProjectsByOwner ¶
func GetAllProjectsByOwner(handler gorexos.RequestHandler, owner string) ([]Project, error)
GetAllProjectsByOwner fetches all project for a given owner
func GetProjectByUrn ¶
func GetProjectByUrn(handler gorexos.RequestHandler, urn string) (Project, error)
GetProjectByUrn fetches the project by a given URN
type ProjectFile ¶
type ProjectFile struct { LastModified string `json:"lastModified"` ContentType string `json:"contentType"` Urn string `json:"urn"` FileSize int `json:"fileSize"` ContentHash string `json:"contentHash"` Name string `json:"name"` Type string `json:"type"` DataTransformation gorexos.Transformation `json:"dataTransformation"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` FileDownload struct { Href string `json:"href"` } `json:"file.download"` } `json:"_links"` }
ProjectFile structure of REXos
func GetProjectFilesByProjectSelfLink ¶
func GetProjectFilesByProjectSelfLink(handler gorexos.RequestHandler, projectSelfLink string) ([]ProjectFile, error)
GetProjectFilesByProjectSelfLink fetches all project files for a given self link
type Reference ¶
type Reference struct { Urn string `json:"urn"` ParentReferenceUrn string `json:"parentReferenceUrn"` RootReference bool `json:"rootReference"` Name string `json:"name"` Key string `json:"key"` Category string `json:"category"` ProjectFileUrn string `json:"projectFileUrn"` WorldTransformation gorexos.Transformation `json:"worldTransformation"` LocalTransformation gorexos.Transformation `json:"localTransformation"` Type string `json:"type"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` Project struct { Href string `json:"href"` Templated bool `json:"templated"` } `json:"project"` ProjectFile struct { Href string `json:"href"` Templated bool `json:"templated"` } `json:"projectFile"` ParentReference struct { Href string `json:"href"` Templated bool `json:"templated"` } `json:"parentReference"` } `json:"_links"` }
Reference is representing a simple form of a REX reference potentially including all its children
func GetReferenceByKey ¶
func GetReferenceByKey(handler gorexos.RequestHandler, key string) (Reference, error)
GetReferenceByKey returns a REX reference by the given key
type Statistics ¶
type Statistics struct { NumberOfProjects int `json:"numberOfProjects"` MaxNumberOfProjects int `json:"maxNumberOfProjects"` TotalUsedDiskSpace int `json:"totalUsedDiskSpace"` MaxTotalUsedDiskSpace int `json:"maxTotalUsedDiskSpace"` }
Statistics is the user general statistics in REXos
func GetUserStatistics ¶
func GetUserStatistics(handler gorexos.RequestHandler, userID string) (Statistics, error)
GetUserStatistics fetches all statistics for a given user