ahautil

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureStatusShippedLc          string = "shipped"
	FeatureStatusWillNotImplementLc string = "will not implement"
)
View Source
const APISlugMe = "/api/v1/me"

Variables

View Source
var Debug = false

Functions

func FeatureCustomField

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

func FeatureTagMatch

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

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

func GetEndTimeForFeatureOrRelease

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

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.

func ReferencePrefixFromReferenceNum

func ReferencePrefixFromReferenceNum(refNum string) string

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

func (ae *AhaElasticsearch) IndexFeaturesUpdatedSince(ctx context.Context, updatedSince time.Time) error

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 (apis *ClientAPIs) GetFeaturesFullByReleaseId(ctx context.Context, releaseId string) ([]*aha.Feature, error)

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

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

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 AhaFeatureSearch(ctx context.Context, esClient httpsimple.Client, refPrefix string, dt time.Time) ([]Feature, error)

func AhaToEsFeature

func AhaToEsFeature(f *aha.Feature) Feature

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

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

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 (rs *ReleaseSet) GetReleasesForDates(ctx context.Context, beg time.Time, end time.Time) ([]aha.Release, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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