buf: protobuf now used managed mode
This commit is contained in:
parent
37ca5f54bc
commit
02720647a8
|
@ -20,8 +20,8 @@ import (
|
|||
"github.com/stephenafamo/bob"
|
||||
"github.com/tigorlazuardi/bluemage/go/api"
|
||||
"github.com/tigorlazuardi/bluemage/go/config"
|
||||
v1DeviceConnect "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1/v1connect"
|
||||
v1SubredditsConnect "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1/v1connect"
|
||||
v1DeviceConnect "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1/devicev1connect"
|
||||
v1SubredditsConnect "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1/subredditsv1connect"
|
||||
"github.com/tigorlazuardi/bluemage/go/gen/reddit"
|
||||
"github.com/tigorlazuardi/bluemage/go/pkg/errs"
|
||||
"github.com/tigorlazuardi/bluemage/go/pkg/log"
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/tigorlazuardi/bluemage/go/api"
|
||||
"github.com/tigorlazuardi/bluemage/go/gen/converter"
|
||||
device "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1"
|
||||
"github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1/v1connect"
|
||||
v1connect "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1/devicev1connect"
|
||||
"github.com/tigorlazuardi/bluemage/go/pkg/errs"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/tigorlazuardi/bluemage/go/api"
|
||||
"github.com/tigorlazuardi/bluemage/go/gen/converter"
|
||||
subreddits "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1"
|
||||
"github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1/v1connect"
|
||||
v1connect "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1/subredditsv1connect"
|
||||
"github.com/tigorlazuardi/bluemage/go/pkg/errs"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
version: v2
|
||||
managed:
|
||||
enabled: true
|
||||
disable:
|
||||
- module: buf.build/bufbuild/protovalidate
|
||||
|
||||
override:
|
||||
- file_option: go_package_prefix
|
||||
value: github.com/tigorlazuardi/bluemage/go/gen/proto
|
||||
plugins:
|
||||
- local: protoc-gen-go
|
||||
out: ../../go/gen/proto
|
||||
|
|
|
@ -4,8 +4,6 @@ package device.v1;
|
|||
|
||||
import "device/v1/list.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message CountDevicesRequest {
|
||||
// Limits the counts to devices that contains the given name.
|
||||
// case insensitive.
|
||||
|
|
|
@ -4,8 +4,6 @@ package device.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message CreateDeviceRequest {
|
||||
// The `slug` is a unique identifier for the device, used to identify the device within the system.
|
||||
// Each `slug` must be unique across all devices.
|
||||
|
|
|
@ -9,8 +9,6 @@ import "device/v1/get.proto";
|
|||
import "device/v1/list.proto";
|
||||
import "device/v1/update.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
service DeviceService {
|
||||
// GetDevice fetches a device by its slug.
|
||||
//
|
||||
|
|
|
@ -4,8 +4,6 @@ package device.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message DeviceExistsRequest {
|
||||
// The `slug` is a unique identifier for the device.
|
||||
string slug = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
|
@ -5,8 +5,6 @@ package device.v1;
|
|||
import "buf/validate/validate.proto";
|
||||
import "device/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message GetDeviceRequest {
|
||||
// The `slug` is a unique identifier for the device.
|
||||
string slug = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
|
@ -4,8 +4,6 @@ package device.v1;
|
|||
|
||||
import "device/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message ListDevicesRequest {
|
||||
// searches the name and slug of the devices.
|
||||
// case insensitive.
|
||||
|
|
|
@ -2,8 +2,6 @@ syntax = "proto3";
|
|||
|
||||
package device.v1;
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message Device {
|
||||
string slug = 1;
|
||||
bool disabled = 2;
|
||||
|
|
|
@ -4,8 +4,6 @@ package device.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
|
||||
|
||||
message UpdateDeviceRequest {
|
||||
string slug = 1 [(buf.validate.field).string.min_len = 1];
|
||||
DeviceSetter set = 2;
|
||||
|
|
|
@ -5,8 +5,6 @@ package images.v1;
|
|||
import "buf/validate/validate.proto";
|
||||
import "images/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/images/v1";
|
||||
|
||||
service ImageService {
|
||||
rpc RecentlyAddedImages(RecentlyAddedImagesRequest) returns (RecentlyAddedImagesResponse) {}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ syntax = "proto3";
|
|||
|
||||
package images.v1;
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/images/v1";
|
||||
|
||||
message Image {
|
||||
int32 id = 1;
|
||||
string subreddit = 2;
|
||||
|
|
|
@ -4,8 +4,6 @@ package subreddits.v1;
|
|||
|
||||
import "subreddits/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message CountSubredditsRequest {
|
||||
// Limits the counts to subreddits that contains the given name.
|
||||
// case insensitive.
|
||||
|
|
|
@ -5,8 +5,6 @@ package subreddits.v1;
|
|||
import "buf/validate/validate.proto";
|
||||
import "subreddits/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message CreateSubredditRequest {
|
||||
// name of the subreddits to insert.
|
||||
//
|
||||
|
|
|
@ -4,8 +4,6 @@ package subreddits.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message DeleteSubredditRequest {
|
||||
// name of the subreddit to delete
|
||||
string name = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
|
@ -4,8 +4,6 @@ package subreddits.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message SubredditExistsRequest {
|
||||
// name of the subreddit. Case insensitive.
|
||||
string name = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
|
@ -5,8 +5,6 @@ package subreddits.v1;
|
|||
import "buf/validate/validate.proto";
|
||||
import "subreddits/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message GetSubredditRequest {
|
||||
// name of the subreddit. Case insensitive.
|
||||
//
|
||||
|
|
|
@ -4,8 +4,6 @@ package subreddits.v1;
|
|||
|
||||
import "subreddits/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message ListSubredditsRequest {
|
||||
// Searches the name of the Subreddit.
|
||||
// case insensitive.
|
||||
|
|
|
@ -5,8 +5,6 @@ package subreddits.v1;
|
|||
import "buf/validate/validate.proto";
|
||||
import "subreddits/v1/types.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message ResolveSubredditNameRequest {
|
||||
// name of the subreddit to resolve (check existence and casing).
|
||||
string name = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
|
@ -11,8 +11,6 @@ import "subreddits/v1/list.proto";
|
|||
import "subreddits/v1/resolve.proto";
|
||||
import "subreddits/v1/update.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
service SubredditsService {
|
||||
// CreateSubreddit creates a new subreddit
|
||||
//
|
||||
|
|
|
@ -2,8 +2,6 @@ syntax = "proto3";
|
|||
|
||||
package subreddits.v1;
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message Subreddit {
|
||||
string name = 1;
|
||||
bool disabled = 2;
|
||||
|
|
|
@ -4,8 +4,6 @@ package subreddits.v1;
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/subreddits/v1";
|
||||
|
||||
message UpdateSubredditRequest {
|
||||
// The name of the subreddit to update.
|
||||
string name = 1 [(buf.validate.field).string.min_len = 1];
|
||||
|
|
Loading…
Reference in a new issue