inspections

package
v0.0.0-...-acaaaf6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainInspections

func DrainInspections(ctx context.Context, apiClient *httpapi.Client, params *httpapi.ListInspectionsParams, callback func(*httpapi.ListInspectionsResponse, *zap.SugaredLogger) error) error

DrainInspections fetches the inspections in batches and triggers the callback for each batch.

Types

type Client

type Client struct {
	*zap.SugaredLogger

	SkipIDs       []string
	ModifiedAfter time.Time
	TemplateIDs   []string
	Archived      string
	Completed     string
	Incremental   bool
	// contains filtered or unexported fields
}

Client to be used with inspections

func (*Client) Export

func (client *Client) Export(ctx context.Context) error

Export triggers the export

func (*Client) Name

func (client *Client) Name() string

Name returns the name of the client

type InspectionClient

type InspectionClient interface {
	Export(ctx context.Context) error
}

InspectionClient is an interface to get inspections from server

func NewInspectionClient

func NewInspectionClient(cfg *InspectionClientCfg, apiClient *httpapi.Client, exporter exporter.SafetyCultureJSONExporter) InspectionClient

NewInspectionClient returns a new instance of InspectionClient

type InspectionClientCfg

type InspectionClientCfg struct {
	SkipIDs       []string
	ModifiedAfter time.Time
	TemplateIDs   []string
	Archived      string
	Completed     string
	Incremental   bool
}

Jump to

Keyboard shortcuts

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