Documentation
¶
Index ¶
- Constants
- Variables
- func FeatureCustomField(want string, feat *aha.Feature) string
- func FeatureTagMatch(feature *aha.Feature, tagFilterMap map[string]string) bool
- func GetBeginTimeForFeatureOrRelease(feature *aha.Feature) (time.Time, error)
- func GetEndTimeForFeatureOrRelease(feature *aha.Feature) (time.Time, error)
- func GetReleasesAndFeaturesForProductsAndQuarters(ctx context.Context, clientAPIs ClientAPIs, products []string, ...) (*ReleaseSet, *FeatureSet, error)
- func ReferencePrefixFromReferenceNum(refNum string) string
- type AhaElasticsearch
- type ClientAPIs
- func (apis *ClientAPIs) GetFeatureById(featureId string) (*aha.Feature, error)
- func (apis *ClientAPIs) GetFeaturesFullByReleaseId(ctx context.Context, releaseId string) ([]*aha.Feature, error)
- func (apis *ClientAPIs) GetFeaturesMetaByReleaseId(ctx context.Context, releaseId string) ([]aha.FeatureMeta, error)
- func (apis *ClientAPIs) GetReleaseById(releaseId string) (*aha.Release, error)
- func (apis *ClientAPIs) UpdateFeatureStartDueDatesToRelease(ctx context.Context, releaseId string) ([]*aha.Feature, error)
- type Feature
- type FeatureSet
- func (fs *FeatureSet) GetFeaturesMapByTag() (map[string]map[string]*aha.Feature, error)
- func (fs *FeatureSet) LoadFeatureCheckTags(feature *aha.Feature) bool
- func (fs *FeatureSet) LoadFeaturesForRelease(ctx context.Context, releaseId string) error
- func (fs *FeatureSet) LoadFeaturesForReleases(ctx context.Context, releaseIds []string) error
- func (fs *FeatureSet) ReadFile(featuresPath string) error
- func (fs *FeatureSet) TrimSpaceTagFilterMap()
- type ReleaseSet
- func (rs *ReleaseSet) AddReleases(releases []aha.Release)
- func (rs *ReleaseSet) GetReleasesForDates(ctx context.Context, beg time.Time, end time.Time) ([]aha.Release, error)
- func (rs *ReleaseSet) GetReleasesForQuarters(yyyyq1, yyyyq2 int) (ReleaseSet, error)
- func (rs *ReleaseSet) Ids() []string
- func (rs *ReleaseSet) LoadReleasesForProduct(ctx context.Context, productSlug string) error
- func (rs *ReleaseSet) LoadReleasesForProducts(ctx context.Context, productSlugs []string) error
- func (rs *ReleaseSet) RefNums() []string
- func (rs *ReleaseSet) ReferenceNumbers() []string
- func (rs *ReleaseSet) ReleaseCount() int
Constants ¶
const ( FeatureStatusShippedLc string = "shipped" FeatureStatusWillNotImplementLc string = "will not implement" )
const APISlugMe = "/api/v1/me"
Variables ¶
var Debug = false
Functions ¶
func FeatureTagMatch ¶
FeatureTagMatch takes an `*aha.Feature` and cmopares it to a tagFilterMap, returning `true` if there's a match and `false` if there isn't.
func GetReleasesAndFeaturesForProductsAndQuarters ¶
func GetReleasesAndFeaturesForProductsAndQuarters( ctx context.Context, clientAPIs ClientAPIs, products []string, yyyyq1, yyyyq2 int) (*ReleaseSet, *FeatureSet, error)
GetReleasesAndFeaturesForProductsAndQuarters returns releases and features given a product and date rate.
Types ¶
type AhaElasticsearch ¶
type AhaElasticsearch struct { AhaAPIs *ClientAPIs EsClient httpsimple.Client }
func (*AhaElasticsearch) IndexFeatureId ¶
func (ae *AhaElasticsearch) IndexFeatureId(ctx context.Context, featureID string) error
func (*AhaElasticsearch) IndexFeaturesUpdatedSince ¶
type ClientAPIs ¶
type ClientAPIs struct { APIClient *aha.APIClient Config *aha.Configuration }
func NewClientAPIs ¶
func NewClientAPIs(account, apiKey string) (ClientAPIs, error)
func NewClientAPIsHTTPClient ¶
func NewClientAPIsHTTPClient(serverURL string, httpClient *http.Client) ClientAPIs
func (*ClientAPIs) GetFeatureById ¶
func (apis *ClientAPIs) GetFeatureById(featureId string) (*aha.Feature, error)
func (*ClientAPIs) GetFeaturesFullByReleaseId ¶
func (*ClientAPIs) GetFeaturesMetaByReleaseId ¶
func (apis *ClientAPIs) GetFeaturesMetaByReleaseId(ctx context.Context, releaseId string) ([]aha.FeatureMeta, error)
func (*ClientAPIs) GetReleaseById ¶
func (apis *ClientAPIs) GetReleaseById(releaseId string) (*aha.Release, error)
func (*ClientAPIs) UpdateFeatureStartDueDatesToRelease ¶
type Feature ¶
type Feature struct { Id string `json:"id,omitempty"` ReferenceNum string `json:"reference_num,omitempty"` Name string `json:"name,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` // Start date in YYYY-MM-DD format. StartDate string `json:"start_date,omitempty"` // Due date in YYYY-MM-DD format. DueDate string `json:"due_date,omitempty"` Url string `json:"url,omitempty"` Resource string `json:"resource,omitempty"` Tags []string `json:"tags,omitempty"` ReferencePrefix string `json:"reference_prefix,omitempty"` }
Feature is struct with additional properties to search on, notably ReferencePrefix.
func AhaFeatureSearch ¶
func AhaToEsFeature ¶
type FeatureSet ¶
type FeatureSet struct { ClientAPIs ClientAPIs `json:"-"` FeatureMap map[string]*aha.Feature `json:"featureMap,omitempty"` TagFilterMap map[string]string `json:"tagFilterMap,omitempty"` }
func NewFeatureSet ¶
func NewFeatureSet() *FeatureSet
func NewFeatureSetForReleasesIds ¶
func NewFeatureSetForReleasesIds(clientAPIs ClientAPIs, ids []string) (*FeatureSet, error)
NewFeatureSetForReleasesIds returns a new FeatureSet given a list of ReleaseIds.
func ReadFeatureSet ¶
func ReadFeatureSet(featuresPath string) (*FeatureSet, error)
func (*FeatureSet) GetFeaturesMapByTag ¶
GetFeaturesMapByTag returns a map[string]map[string] where the first key is a filter tag and the second key is the feature id.
func (*FeatureSet) LoadFeatureCheckTags ¶
func (fs *FeatureSet) LoadFeatureCheckTags(feature *aha.Feature) bool
func (*FeatureSet) LoadFeaturesForRelease ¶
func (fs *FeatureSet) LoadFeaturesForRelease(ctx context.Context, releaseId string) error
func (*FeatureSet) LoadFeaturesForReleases ¶
func (fs *FeatureSet) LoadFeaturesForReleases(ctx context.Context, releaseIds []string) error
func (*FeatureSet) ReadFile ¶
func (fs *FeatureSet) ReadFile(featuresPath string) error
func (*FeatureSet) TrimSpaceTagFilterMap ¶
func (fs *FeatureSet) TrimSpaceTagFilterMap()
type ReleaseSet ¶
type ReleaseSet struct { ClientAPIs ClientAPIs ReleaseMap map[string]aha.Release `json:"releaseMap"` }
func NewReleaseSet ¶
func NewReleaseSet() ReleaseSet
func (*ReleaseSet) AddReleases ¶
func (rs *ReleaseSet) AddReleases(releases []aha.Release)
func (*ReleaseSet) GetReleasesForDates ¶
func (*ReleaseSet) GetReleasesForQuarters ¶
func (rs *ReleaseSet) GetReleasesForQuarters(yyyyq1, yyyyq2 int) (ReleaseSet, error)
GetReleasesForQuarters retrives a filter of products within 2 quarters.
func (*ReleaseSet) Ids ¶
func (rs *ReleaseSet) Ids() []string
ReleaseIds returns the list of Release Ids.
func (*ReleaseSet) LoadReleasesForProduct ¶
func (rs *ReleaseSet) LoadReleasesForProduct(ctx context.Context, productSlug string) error
func (*ReleaseSet) LoadReleasesForProducts ¶
func (rs *ReleaseSet) LoadReleasesForProducts(ctx context.Context, productSlugs []string) error
func (*ReleaseSet) RefNums ¶
func (rs *ReleaseSet) RefNums() []string
ReleaseIds returns the list of Release Ids.
func (*ReleaseSet) ReferenceNumbers ¶
func (rs *ReleaseSet) ReferenceNumbers() []string
ReferenceNumbers returns the list of Release Reference Numbers.
func (*ReleaseSet) ReleaseCount ¶
func (rs *ReleaseSet) ReleaseCount() int