ingestic

package
v0.0.0-...-6794c67 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ESClient

type ESClient struct {
	// contains filtered or unexported fields
}

func NewESClient

func NewESClient(client *elastic.Client) *ESClient

func (*ESClient) CancelProjectUpdateTask

func (backend *ESClient) CancelProjectUpdateTask(ctx context.Context, projectUpdateID string,
	id project_update_lib.SerializedProjectUpdateTaskID) error

func (*ESClient) CreateTemplate

func (backend *ESClient) CreateTemplate(ctx context.Context, templateName string, mapping string)

func (*ESClient) GetProfilesMissingMetadata

func (backend *ESClient) GetProfilesMissingMetadata(profileIDs []string) (map[string]*relaxting.ESInspecProfile, error)

Internal helper method to get profile meta information to complement reports being ingested without profile metadata information

func (*ESClient) InitializeStore

func (backend *ESClient) InitializeStore(ctx context.Context)

InitializeStore runs the necessary initialization processes to make elasticsearch usable in particular it creates the indexes and aliases for documents to be added

func (*ESClient) InsertInspecProfile

func (backend *ESClient) InsertInspecProfile(ctx context.Context, data *relaxting.ESInspecProfile) error

func (*ESClient) InsertInspecReport

func (backend *ESClient) InsertInspecReport(ctx context.Context, id string, endTime time.Time, data *relaxting.ESInSpecReport) error

func (*ESClient) InsertInspecSummary

func (backend *ESClient) InsertInspecSummary(ctx context.Context, id string, endTime time.Time, data *relaxting.ESInSpecSummary) error

func (*ESClient) JobCancel

func (backend *ESClient) JobCancel(ctx context.Context, jobID string) error

func (*ESClient) JobStatus

func (backend *ESClient) JobStatus(ctx context.Context, jobID string) (project_update_lib.JobStatus, error)

func (*ESClient) ListProjectUpdateTasks

func (backend *ESClient) ListProjectUpdateTasks(ctx context.Context) ([]project_update_lib.SerializedProjectUpdateTask, error)

func (*ESClient) ProfileExists

func (backend *ESClient) ProfileExists(hash string) (bool, error)

ProfileExists returns true if profile exists already in ES.. false if not

func (*ESClient) ProfilesMissing

func (backend *ESClient) ProfilesMissing(allHashes []string) (missingHashes []string, err error)

ProfilesMissing takes an array of profile sha256 IDs and returns back the ones that are missing from the profiles metadata index

func (*ESClient) RunProjectUpdateTask

func (backend *ESClient) RunProjectUpdateTask(ctx context.Context, projectUpdateID string,
	params map[string]string, projectTaggingRules map[string]*authz.ProjectRules) (
	project_update_lib.SerializedProjectUpdateTaskID,
	project_update_lib.SerializedProjectUpdateTaskStatus,
	error)

func (*ESClient) UpdateProjectTags

func (backend *ESClient) UpdateProjectTags(ctx context.Context, projectTaggingRules map[string]*authz.ProjectRules) ([]string, error)

func (*ESClient) UpdateReportProjectsTags

func (backend *ESClient) UpdateReportProjectsTags(ctx context.Context, projectTaggingRules map[string]*authz.ProjectRules) (string, error)

func (*ESClient) UpdateReportProjectsTagsForIndex

func (backend *ESClient) UpdateReportProjectsTagsForIndex(ctx context.Context, index string, projectTaggingRules map[string]*authz.ProjectRules) (string, error)

func (*ESClient) UpdateSummaryProjectsTags

func (backend *ESClient) UpdateSummaryProjectsTags(ctx context.Context, projectTaggingRules map[string]*authz.ProjectRules) (string, error)

func (*ESClient) UpdateSummaryProjectsTagsForIndex

func (backend *ESClient) UpdateSummaryProjectsTagsForIndex(ctx context.Context, index string, projectTaggingRules map[string]*authz.ProjectRules) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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