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

31 lines
866 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";
2024-08-15 14:13:40 +07:00
import "subreddits/v1/types.proto";
2024-08-09 15:22:54 +07:00
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];
2024-08-15 14:13:40 +07:00
// disabled disable the subreddit.
//
// disabled subreddit is left out from the scheduler.
bool disabled = 2;
2024-08-09 15:22:54 +07:00
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
}
message CreateSubredditResponse {
string name = 1;
}