// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package ctmapperpb;

// MapperMetadata represents the state of the CT Mapper after it
// completes a run of loading the Map from the CT Log being watched.
// It is effectively a cursor over the source CT Log.
message MapperMetadata {
  // LogID of the CT log source.
  bytes source_log_id = 1;
  // Log Index in the source log of the highest entry mapped
  // in an earlier run.
  int64 highest_fully_completed_seq = 2;
}

// EntryList represents a mapping stored in the Map after a source
// CT Log has been fetched and mapped.  It holds the entry indices
// from the Log for all certificates and all pre-certificates that
// reference a particular domain.
message EntryList {
  // The domain referenced by entries in the mapped CT Log.
  string domain = 1;
  // All log indexes of mapped Log entries referencing domain in
  // X.509 certs.
  repeated int64 cert_index = 2;
  // All log indexes of mapped Log entries referencing domain in
  // pre-certs.
  repeated int64 precert_index = 3;
}
