Documentation ¶
Index ¶
- type Backend
- func (m Backend) GetAttribute(nodeID string) (backend.NodeAttribute, error)
- func (m Backend) GetCheckinCountsTimeSeries(time.Time, time.Time, map[string][]string) ([]backend.CountPeroid, error)
- func (es Backend) GetCreateCountsTimeSeries(startTime, endTime time.Time, filters map[string][]string) ([]backend.CountPeroid, error)
- func (es Backend) GetDateOfOldestConvergeIndices() (time.Time, bool, error)
- func (es Backend) GetDeletedCountsTimeSeries(startTime, endTime time.Time, filters map[string][]string) ([]backend.CountPeroid, error)
- func (m Backend) GetErrors(int32, map[string][]string) ([]*backend.ChefErrorCount, error)
- func (m Backend) GetInventoryNodes(ctx context.Context, start time.Time, end time.Time, ...) ([]backend.InventoryNode, error)
- func (es Backend) GetLatestRunRolloutBreakdownCounts() (*backend.NodeSegmentRolloutProgress, error)
- func (m Backend) GetListForField(searchTerm string, filters map[string][]string) ([]string, error)
- func (m Backend) GetMissingNodeDurationCounts(durations []string) ([]backend.CountedDuration, error)
- func (m Backend) GetNodeMetadataCounts(filters map[string][]string, types []string, startDate, endDate string) ([]backend.TypeCount, error)
- func (m Backend) GetNodeRunsDailyStatusTimeSeries(nodeID string, startTime, endTime time.Time) ([]backend.RunDurationStatus, error)
- func (m Backend) GetNodes(page int, perPage int, sf string, asc bool, filters map[string][]string, ...) ([]backend.Node, error)
- func (m Backend) GetNodesCounts(filters map[string][]string, startDate string, endDate string) (backend.NodesCounts, error)
- func (m Backend) GetNodesPageByCursor(context.Context, time.Time, time.Time, map[string][]string, interface{}, ...) ([]backend.Node, error)
- func (m Backend) GetPolicyCookbooks(revisionID string) (backend.PolicyCookbooks, error)
- func (m Backend) GetRun(run_id string, lastCcr time.Time) (backend.Run, error)
- func (m Backend) GetRuns(n string, page int, perPage int, filters map[string][]string, start string, ...) ([]backend.AbridgedConverge, error)
- func (m Backend) GetRunsCounts(filters map[string][]string, nodeID string, start string, end string) (backend.RunsCounts, error)
- func (m Backend) GetRunsPageByCursor(context.Context, string, time.Time, time.Time, map[string][]string, time.Time, ...) ([]backend.Run, error)
- func (m Backend) GetSuggestions(term string, text string, filters map[string][]string) ([]backend.Suggestion, error)
- func (es Backend) GetUniqueNodesCount(int64, time.Time) (int64, error)
- func (m Backend) NodeExists(id string, filters map[string][]string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
This Mock backend is a very simple model of how a backend client should look like when implementing the `backend.Client` interface
func New ¶
func New() Backend
Initialize the Mock backend client
Normally you would like to inject its own config parameters coming from the `config.Service` and also if there is a client you need to initialize, here is the place to do it since this struct will be available for you in all the func you need to implement from the `backend.Client` interface
func (Backend) GetAttribute ¶
func (m Backend) GetAttribute(nodeID string) (backend.NodeAttribute, error)
func (Backend) GetCheckinCountsTimeSeries ¶
func (Backend) GetCreateCountsTimeSeries ¶
func (Backend) GetDateOfOldestConvergeIndices ¶
func (Backend) GetDeletedCountsTimeSeries ¶
func (Backend) GetInventoryNodes ¶
func (Backend) GetLatestRunRolloutBreakdownCounts ¶
func (es Backend) GetLatestRunRolloutBreakdownCounts() (*backend.NodeSegmentRolloutProgress, error)
func (Backend) GetListForField ¶
func (Backend) GetMissingNodeDurationCounts ¶
func (m Backend) GetMissingNodeDurationCounts(durations []string) ([]backend.CountedDuration, error)
func (Backend) GetNodeMetadataCounts ¶
func (Backend) GetNodeRunsDailyStatusTimeSeries ¶
func (Backend) GetNodesCounts ¶
func (Backend) GetNodesPageByCursor ¶
func (Backend) GetPolicyCookbooks ¶
func (m Backend) GetPolicyCookbooks(revisionID string) (backend.PolicyCookbooks, error)
func (Backend) GetRunsCounts ¶
func (Backend) GetRunsPageByCursor ¶
func (Backend) GetSuggestions ¶
func (Backend) GetUniqueNodesCount ¶
func (Backend) NodeExists ¶
Implement the backend.Client interface
In order to be a proper backend you have to implement all the contracts that the Client interface has setup, this will ensure that the endpoints we have defined will always be able to get the data from any backend we configure