Versions in this module Expand all Collapse all v1 v1.0.0 Jun 25, 2019 Changes in this version + const AggBucketKey + const BucketKeyAsStringKey + const BucketKeyKey + const BucketPrefix + const BucketValueKey + const BucketValueValueKey + const IndexPrefixLineItems + var Client *elastic.Client + var ErrFailedJsonParsing = errors.New("failed to parse JSON document") + var ErrKeyNotFound = errors.New("could not find 'key' field") + var ErrNoAggregation = errors.New("found no next aggregation and no value") + var ErrNoSingleAggregationBranch = errors.New("document's aggregations branch") + var ErrNoSingleRootAggregation = errors.New("document does not have a single aggregation at its root") + func CleanByBillRepositoryId(ctx context.Context, aaUId, brId int) error + func CleanCurrentMonthBillByBillRepositoryId(ctx context.Context, aaUId, brId int) error + func IndexNameForUser(u users.User, p string) string + func IndexNameForUserId(i int, p string) string + func NewSignedElasticClient(endpoint string, creds *credentials.Credentials) (*elastic.Client, error) + func NewSignedElasticClientOptions(endpoint string, creds *credentials.Credentials) ([]elastic.ClientOptionFunc, error) + func NewSignedHttpClient(creds *credentials.Credentials, region, service string) (*http.Client, error) + func NewSignedHttpClientForElasticSearch(endpoint string, creds *credentials.Credentials) (*http.Client, error) + type AccountsAndIndexes struct + Accounts []string + Indexes []string + func GetAccountsAndIndexes(accountList []string, user users.User, tx *sql.Tx, indexPrefix string) (AccountsAndIndexes, int, error) + type SimplifiedCostsDocument struct + Children []SimplifiedCostsDocument + ChildrenKind string + HasValue bool + Key string + Value float64 + func SimplifyCostsDocument(ctx context.Context, sr *elastic.SearchResult) (SimplifiedCostsDocument, error) + func (scd SimplifiedCostsDocument) ToJsonable() map[string]interface{}