syntax = "proto3";

package gitaly;

import "lint.proto";

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

// NamespaceService is a service which provides RPCs to manage namespaces of a
// storage. Namespaces had been used before Gitaly migrated to hashed storages
// and shouldn't be used nowadays anymore.
service NamespaceService {

  // This comment is left unintentionally blank.
  rpc AddNamespace(AddNamespaceRequest) returns (AddNamespaceResponse) {
    option (op_type) = {
      op: MUTATOR
      scope_level: STORAGE,
    };
  }

  // This comment is left unintentionally blank.
  rpc RemoveNamespace(RemoveNamespaceRequest) returns (RemoveNamespaceResponse) {
    option (op_type) = {
      op: MUTATOR
      scope_level: STORAGE,
    };
  }

  // This comment is left unintentionally blank.
  rpc RenameNamespace(RenameNamespaceRequest) returns (RenameNamespaceResponse) {
    option (op_type) = {
      op: MUTATOR
      scope_level: STORAGE,
    };
  }

  // This comment is left unintentionally blank.
  rpc NamespaceExists(NamespaceExistsRequest) returns (NamespaceExistsResponse) {
    option (op_type) = {
      op: ACCESSOR
      scope_level: STORAGE,
    };
  }

}

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

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

// This comment is left unintentionally blank.
message RenameNamespaceRequest {
  // This comment is left unintentionally blank.
  string storage_name = 1 [(storage)=true];
  // This comment is left unintentionally blank.
  string from = 2;
  // This comment is left unintentionally blank.
  string to = 3;
}

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

// This comment is left unintentionally blank.
message NamespaceExistsResponse {
  // This comment is left unintentionally blank.
  bool exists = 1;
}

// This comment is left unintentionally blank.
message AddNamespaceResponse {
}

// This comment is left unintentionally blank.
message RemoveNamespaceResponse {
}

// This comment is left unintentionally blank.
message RenameNamespaceResponse {
}
