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

33 lines
858 B
Protocol Buffer
Raw Normal View History

2024-08-09 15:22:54 +07:00
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];
int64 countback = 5 [(buf.validate.field).int64.gt = 0];
2024-08-09 15:22:54 +07:00
}
enum SubredditType {
SUBREDDIT_TYPE_UNSPECIFIED = 0;
SUBREDDIT_TYPE_SUBREDDIT = 1;
SUBREDDIT_TYPE_USER = 2;
}
message CreateSubredditResponse {
string name = 1;
}