polarion

package
v0.0.0-...-c96734c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

README

A Go API for Polarion

(This is a hack)

Polarion is an ALM tool (now) from Siemens (See https://polarion.plm.automation.siemens.com). 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.

Documentation

Overview

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 !

NOTE https://gist.github.com/mbohun/1448d44901372e1fb1b5

Index

Constants

This section is empty.

Variables

View Source
var PolarionBasePath = ""

Functions

func ListDirectories

func ListDirectories(path string) []string

func Sanitize

func Sanitize(text string) string

Sanitize a string for use as an anchor source:github.com/shurcooL/sanitized_anchor_name

Types

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

Jump to

Keyboard shortcuts

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