syntax = "proto3";

package gitaly;

import "google/protobuf/timestamp.proto";
import "lint.proto";

option go_package = "gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb";

// InternalGitaly is a gRPC service meant to be served by a Gitaly node, but
// only reachable by Praefect or other Gitalies
service InternalGitaly {
  // WalkRepos walks the storage and streams back all known git repos on the
  // requested storage
  rpc WalkRepos (WalkReposRequest) returns (stream WalkReposResponse) {
    option (op_type) = {
      op:          ACCESSOR
      scope_level: STORAGE
    };
  }
}

// This comment is left unintentionally blank.
message WalkReposRequest {
  // This comment is left unintentionally blank.
  string storage_name = 1 [(storage)=true];
}

// This comment is left unintentionally blank.
message WalkReposResponse {
  // This comment is left unintentionally blank.
  string relative_path = 1;
  // modification_time is the modification time of the repository directory.
  // This can be used as a proxy for when the repository was last
  // modified.
  google.protobuf.Timestamp modification_time = 2;
}
