A Go API for Polarion

(This is a hack)

Polarion is an ALM tool (now) from Siemens (See Polarion stores its data in Subversion repositories in XML format, with one repository per project. The current API is a read-only view of a working copy of just one revision of the data.



    This package implements an API over a working copy of a Subversion repository of a Polarion project. It qualifies as a hack.

    NOTE To build a local copy with revisions, svnrdump can be used, and then a local SVN or Git server repo created. But: Git doesn't support files > 100 MB !




    This section is empty.


    View Source
    var PolarionBasePath = ""


    func ListDirectories

    func ListDirectories(path string) []string

    func Sanitize

    func Sanitize(text string) string

      Sanitize a string for use as an anchor


      type Document

      type Document struct {
      	ID    string
      	Space string
      	Prj   *Project
      	Path  string
      	Items []string
      	Tree  *ogdl.Graph
      	Toc   *ogdl.Graph

      func (*Document) Html

      func (doc *Document) Html() string

      type Item

      type Item struct {
      	ID   string
      	Type string
      	Tree *ogdl.Graph
      	Path string

      func (*Item) Document

      func (item *Item) Document() string
      type Link struct {
      	Source      *Item
      	Destination *Item
      	Type        string

        Link holds the relation between two workitems, which may possibly reside in another project.

        type Polarion

        type Polarion struct {
        	// items contain all the workitems present in all the projects in []folders
        	Items map[string]*Item
        	Links []*Link
        	// contains filtered or unexported fields

          Polarion holds information common to all projects

          func (*Polarion) AddFolder

          func (P *Polarion) AddFolder(path string)

          func (*Polarion) AddProject

          func (P *Polarion) AddProject(path string)

          func (*Polarion) Document

          func (P *Polarion) Document(prj, space, doc string) *Document

          func (*Polarion) Documents

          func (P *Polarion) Documents(prj string) *ogdl.Graph

          func (*Polarion) Item

          func (P *Polarion) Item(id string) *Item

          func (*Polarion) Projects

          func (P *Polarion) Projects() *ogdl.Graph

          type Project

          type Project struct {
          	ID   string
          	Path string
          	Items map[string]*Item
          	// contains filtered or unexported fields

            Project is a container in RAM of parts of the project on disk.

            The project ID used is the base name of the path in upper case. If the ID differs from the folder name it has to be changed manually after the call to Open.

            func (*Project) Documents

            func (p *Project) Documents(space string) []string

              Documents returns all names of directories in the modules/<space>/ directory of the project

              func (*Project) Spaces

              func (p *Project) Spaces() []string

                Spaces returns all names of directories in the modules/ directory of the project

                Source Files