elastic

package
v0.0.0-...-16f8954 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	shared.ServiceInterface
	// External methods
	GetUnaffiliated([]string, int64) (*models.GetUnaffiliatedOutput, error)
	AggsUnaffiliated(string, int64) ([]*models.UnaffiliatedDataOutput, error)
	ContributorsCount(string, string) (int64, error)
	GetTopContributors([]string, []string, int64, int64, int64, int64, string, string, string) (*models.TopContributorsFlatOutput, error)
	UpdateByQuery(string, string, interface{}, string, interface{}, bool) error
	DetAffRange([]*models.EnrollmentProjectRange) ([]*models.EnrollmentProjectRange, string, error)
	GetUUIDsProjects([]string) (map[string][]string, string, error)
	// ES Cache methods
	TopContributorsCacheGet(string) (*TopContributorsCacheEntry, bool)
	TopContributorsCacheSet(string, *TopContributorsCacheEntry)
	TopContributorsCacheDelete(string)
	TopContributorsCacheDeleteExpired()
	// Log to ES
	Log(string, string, string) error
	// contains filtered or unexported methods
}

Service - interface to access ES data

func New

func New(client *elasticsearch.Client, url string) Service

New return ES connection

type TopContributorsCacheEntry

type TopContributorsCacheEntry struct {
	Top *models.TopContributorsFlatOutput `json:"v"`
	Tm  time.Time                         `json:"t"`
	Key string                            `json:"k"`
}

TopContributorsCacheEntry - top contributors single cache entry

Jump to

Keyboard shortcuts

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