labels.proto 887 B

12345678910111213141516171819202122232425262728
  1. syntax = "proto3";
  2. package model;
  3. import "model/window.proto";
  4. // Sets the golang package for the protobuf generated code
  5. option go_package = "github.com/opencost/opencost/core/pkg/model/pb";
  6. // LabelsResponse is a grouping of LabelSets for a specific window for a type of label grouped by their source.
  7. message LabelsResponse {
  8. // The type of labels in the set (e.g. account_labels, namespace_labels)
  9. string type = 1;
  10. // type dependent identifier for the grouping of labels most likely the cluster id or the configuration key, used
  11. // as part of the export path
  12. string group_id = 2;
  13. // The window for the label sets
  14. Window window = 3;
  15. // Mapping of LabelSets for individual items by a unique identifier
  16. map<string, LabelSet> label_sets = 4;
  17. }
  18. // LabelSet is an internal message meant to enable nesting maps
  19. message LabelSet {
  20. map<string, string> labels = 1;
  21. }