syntax = "proto3";
package event;

import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";

import "core_shared.proto";

option go_package = "com.github/quabynah-bilson/proche;core";


// GiveAwayService is the service that handles all GiveAway related operations
service GiveAwayService {
  rpc create_giveaway (core.CreateGiveAwayRequest) returns (google.protobuf.StringValue);
  rpc get_giveaway (google.protobuf.StringValue) returns (core.GiveAway);
  rpc get_giveaways (core.CommonAddress) returns (stream core.GiveAwayList);
  rpc get_giveaways_by_owner (google.protobuf.StringValue) returns (stream core.GiveAwayList);
  rpc update_giveaway (core.GiveAway) returns (google.protobuf.Empty);
  rpc delete_giveaway (google.protobuf.StringValue) returns (google.protobuf.Empty);

  // candidates
  rpc get_candidates_for_giveaway(google.protobuf.StringValue) returns (stream core.GiveawayCandidateList);
}
