Bluemage/schemas/proto/subreddits/v1/create.proto

33 lines
860 B
Protocol Buffer

syntax = "proto3";
package subreddits.v1;
import "buf/validate/validate.proto";
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
message CreateSubredditRequest {
// name of the subreddits to insert.
//
// accept insensitive casing, but casing
// will change to what Reddit has for
// consistency.
string name = 1 [(buf.validate.field).string.min_len = 1];
bool disable_scheduler = 2;
SubredditType type = 3;
// schedule is cron job spec to set schedule on when
// the runner for this subreddit runs.
string schedule = 4 [(buf.validate.field).string.min_len = 1];
uint32 countback = 5 [(buf.validate.field).uint32.gt = 0];
}
enum SubredditType {
SUBREDDIT_TYPE_UNSPECIFIED = 0;
SUBREDDIT_TYPE_SUBREDDIT = 1;
SUBREDDIT_TYPE_USER = 2;
}
message CreateSubredditResponse {
string name = 1;
}