Documentation ¶
Index ¶
- Constants
- Variables
- func Client(insecure bool) *http.Client
- func DefaultConfig() (string, error)
- func DefectsURI(domain, project string, defect int) string
- func ReadEnv(prefix string, a *Instance)
- func ReleasesURI(domain, project string, release string) string
- type Defect
- type DefectsResponse
- type Delivery
- type Domain
- type DomainsResponse
- type Instance
- func (a *Instance) Defects(domain, project string) ([]Defect, error)
- func (a *Instance) Domains() ([]Domain, error)
- func (a *Instance) GetDefect(defect int) (*Defect, error)
- func (a *Instance) GetRelease(ID string) (*Release, error)
- func (a *Instance) NewReleases(releaseIDs []string) error
- func (a *Instance) PutDefect(d Defect) (*Defect, error)
- func (a *Instance) SignIn() error
- func (a *Instance) SignOut() error
- func (a *Instance) URL(uri string) string
- func (a *Instance) UpdateDefects(defects []string) error
- type Release
- type Tmt
Constants ¶
const ( // SignInURL according to ALM REST documentation SignInURL = "/api/authentication/sign-in" // SignOutURL according to ALM REST documentation SignOutURL = "/api/authentication/sign-out" )
Variables ¶
var ( // ErrMissingTmt indicates a missing root entry /tmt ErrMissingTmt = errors.New("missing required element tmt") // ErrEmptyTmt indicates root entry /tmt exists, but has no embedded // information. ErrEmptyTmt = errors.New("empty tmt:, missing required elements") // ErrMissingDomain indicates absence of tmt/domain ErrMissingDomain = errors.New("missing required element /tmt/domain") // ErrMissingProject indicates absence of tmt/project ErrMissingProject = errors.New("missing required element /tmt/project") )
A couple of parsing errors
Functions ¶
func DefaultConfig ¶
DefaultConfig returns the fully qualified filename of the config file, i.e. `${HOME}/.alm.yaml`
func DefectsURI ¶ added in v1.0.0
DefectsURI returns the relative, constant REST API path for given defect.
func ReadEnv ¶
ReadEnv updates members in an ALM instance with values from corresponding environment variables, useful for twelve-factor apps.
func ReleasesURI ¶ added in v1.0.0
ReleasesURI returns relative, constant REST API for given parameter set.
Types ¶
type Defect ¶
type Defect struct { ID int `json:"id"` Subject int `json:"subject"` Status string `json:"status"` Type string `json:"type"` }
Defect represents a subset of an ALM defect
func ParseDefect ¶
ParseDefect tries to convert bytes in JSON format into a Defect.
type DefectsResponse ¶ added in v1.0.0
type DefectsResponse struct {
Defects []Defect `json:"results"`
}
DefectsResponse represents a REST api call request.
type Delivery ¶ added in v1.0.0
type Delivery struct {
Tmt Tmt
}
Delivery represents an ALM domain model
type Domain ¶ added in v1.0.0
type Domain struct {
Name string `json:"name"`
}
Domain represents ALM domain model
type DomainsResponse ¶ added in v1.0.0
type DomainsResponse struct {
Domains []Domain `json:"results"`
}
DomainsResponse contains a list of all available domains in ALM.
type Instance ¶ added in v1.0.0
type Instance struct { Protocol string Server string Port int Context string Username string Password string Domain string Project string FromStatus, IntoStatus string Client http.Client }
Instance represents one remote service instance.
func Merge ¶ added in v1.0.0
Merge multiple partly filled structs into one, precedence from the left to the right
func (*Instance) Defects ¶ added in v1.0.0
Defects issues a REST call to retrieve a list of defects for given parameter set.
func (*Instance) Domains ¶ added in v1.0.0
Domains issues a REST call to retrieve a list of all available ALM domains.
func (*Instance) GetRelease ¶ added in v1.0.0
GetRelease issues a REST call to retrieve a Release.
func (*Instance) NewReleases ¶ added in v1.0.0
NewReleases logs existing releases to stdout.
func (*Instance) SignIn ¶ added in v1.0.0
SignIn authenticates against ALM. https://admhelp.microfocus.com/alm/en/12.55/api_refs/REST/Content/REST_API/sign_in.htm
func (*Instance) URL ¶ added in v1.0.0
URL returns a relative, constant REST API URL into a specific instance one
func (*Instance) UpdateDefects ¶ added in v1.0.0
UpdateDefects issues a REST call to update status of defects.