ahautil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureStatusShippedLc          string = "shipped"
	FeatureStatusWillNotImplementLc string = "will not implement"
)

Variables

View Source
var Debug = false

Functions

func FeatureCustomField added in v0.2.0

func FeatureCustomField(want string, feat *aha.Feature) string

func FeatureTagMatch added in v0.2.0

func FeatureTagMatch(feature *aha.Feature, tagFilterMap map[string]string) bool

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 GetBeginTimeForFeatureOrRelease added in v0.2.0

func GetBeginTimeForFeatureOrRelease(feature *aha.Feature) (time.Time, error)

func GetEndTimeForFeatureOrRelease added in v0.2.0

func GetEndTimeForFeatureOrRelease(feature *aha.Feature) (time.Time, error)

func GetReleasesAndFeaturesForProductsAndQuarters added in v0.2.0

func GetReleasesAndFeaturesForProductsAndQuarters(
	ctx context.Context, clientAPIs ClientAPIs, products []string, yyyyq1, yyyyq2 int32) (*ReleaseSet, *FeatureSet, error)

GetReleasesAndFeaturesForProductsAndQuarters returns releases and features given a product and date rate.

func ReferencePrefixFromReferenceNum added in v0.2.0

func ReferencePrefixFromReferenceNum(refNum string) string

Types

type AhaElasticsearch added in v0.2.0

type AhaElasticsearch struct {
	AhaAPIs  *ClientAPIs
	EsClient *elastirad.Client
}

func (*AhaElasticsearch) IndexFeatureId added in v0.2.0

func (ae *AhaElasticsearch) IndexFeatureId(featureId string) error

func (*AhaElasticsearch) IndexFeaturesUpdatedSince added in v0.2.0

func (ae *AhaElasticsearch) IndexFeaturesUpdatedSince(updatedSince time.Time) error

type ClientAPIs

type ClientAPIs struct {
	APIClient *aha.APIClient
	Config    *aha.Configuration
}

func NewClientAPIs added in v0.2.0

func NewClientAPIs(account, apiKey string) ClientAPIs

func NewClientAPIsHTTPClient added in v0.2.0

func NewClientAPIsHTTPClient(httpClient *http.Client) ClientAPIs

func (*ClientAPIs) GetFeatureById

func (apis *ClientAPIs) GetFeatureById(featureId string) (*aha.Feature, error)

func (*ClientAPIs) GetFeaturesFullByReleaseId added in v0.2.0

func (apis *ClientAPIs) GetFeaturesFullByReleaseId(ctx context.Context, releaseId string) ([]*aha.Feature, error)

func (*ClientAPIs) GetFeaturesMetaByReleaseId added in v0.2.0

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

func (apis *ClientAPIs) UpdateFeatureStartDueDatesToRelease(ctx context.Context, releaseId string) ([]*aha.Feature, error)

type Feature added in v0.2.0

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 added in v0.2.0

func AhaFeatureSearch(esClient elastirad.Client, refPrefix string, dt time.Time) ([]Feature, error)

func AhaToEsFeature added in v0.2.0

func AhaToEsFeature(f *aha.Feature) Feature

type FeatureSet added in v0.2.0

type FeatureSet struct {
	ClientAPIs   ClientAPIs              `json:"-"`
	FeatureMap   map[string]*aha.Feature `json:"featureMap,omitempty"`
	TagFilterMap map[string]string       `json:"tagFilterMap,omitempty"`
}

func NewFeatureSet added in v0.2.0

func NewFeatureSet() *FeatureSet

func NewFeatureSetForReleasesIds added in v0.2.0

func NewFeatureSetForReleasesIds(clientAPIs ClientAPIs, ids []string) (*FeatureSet, error)

NewFeatureSetForReleasesIds returns a new FeatureSet given a list of ReleaseIds.

func ReadFeatureSet added in v0.2.0

func ReadFeatureSet(featuresPath string) (*FeatureSet, error)

func (*FeatureSet) GetFeaturesMapByTag added in v0.2.0

func (fs *FeatureSet) GetFeaturesMapByTag() (map[string]map[string]*aha.Feature, error)

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 added in v0.2.0

func (fs *FeatureSet) LoadFeatureCheckTags(feature *aha.Feature) bool

func (*FeatureSet) LoadFeaturesForRelease added in v0.2.0

func (fs *FeatureSet) LoadFeaturesForRelease(ctx context.Context, releaseId string) error

func (*FeatureSet) LoadFeaturesForReleases added in v0.2.0

func (fs *FeatureSet) LoadFeaturesForReleases(ctx context.Context, releaseIds []string) error

func (*FeatureSet) ReadFile added in v0.2.0

func (fs *FeatureSet) ReadFile(featuresPath string) error

func (*FeatureSet) TrimSpaceTagFilterMap added in v0.2.0

func (fs *FeatureSet) TrimSpaceTagFilterMap()

type ReleaseSet added in v0.2.0

type ReleaseSet struct {
	ClientAPIs ClientAPIs
	ReleaseMap map[string]aha.Release `json:"releaseMap"`
}

func NewReleaseSet added in v0.2.0

func NewReleaseSet() ReleaseSet

func (*ReleaseSet) AddReleases added in v0.2.0

func (rs *ReleaseSet) AddReleases(releases []aha.Release)

func (*ReleaseSet) GetReleasesForDates added in v0.2.0

func (rs *ReleaseSet) GetReleasesForDates(ctx context.Context, beg time.Time, end time.Time) ([]aha.Release, error)

func (*ReleaseSet) GetReleasesForQuarters added in v0.2.0

func (rs *ReleaseSet) GetReleasesForQuarters(yyyyq1, yyyyq2 int32) (ReleaseSet, error)

GetReleasesForQuarters retrives a filter of products within 2 quarters.

func (*ReleaseSet) Ids added in v0.2.0

func (rs *ReleaseSet) Ids() []string

ReleaseIds returns the list of Release Ids.

func (*ReleaseSet) LoadReleasesForProduct added in v0.2.0

func (rs *ReleaseSet) LoadReleasesForProduct(ctx context.Context, productSlug string) error

func (*ReleaseSet) LoadReleasesForProducts added in v0.2.0

func (rs *ReleaseSet) LoadReleasesForProducts(ctx context.Context, productSlugs []string) error

func (*ReleaseSet) RefNums added in v0.2.0

func (rs *ReleaseSet) RefNums() []string

ReleaseIds returns the list of Release Ids.

func (*ReleaseSet) ReferenceNumbers added in v0.2.0

func (rs *ReleaseSet) ReferenceNumbers() []string

ReferenceNumbers returns the list of Release Reference Numbers.

func (*ReleaseSet) ReleaseCount added in v0.2.0

func (rs *ReleaseSet) ReleaseCount() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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