chore: buf generate

This commit is contained in:
Steven
2024-08-01 22:03:07 +08:00
parent 26fa172641
commit cc91b1e512
22 changed files with 220 additions and 88 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/workspace_setting_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting"
@ -63,7 +63,7 @@ func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context,
// WorkspaceSettingServiceServer is the server API for WorkspaceSettingService service.
// All implementations must embed UnimplementedWorkspaceSettingServiceServer
// for forward compatibility
// for forward compatibility.
type WorkspaceSettingServiceServer interface {
// GetWorkspaceSetting returns the setting by name.
GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error)
@ -72,9 +72,12 @@ type WorkspaceSettingServiceServer interface {
mustEmbedUnimplementedWorkspaceSettingServiceServer()
}
// UnimplementedWorkspaceSettingServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceSettingServiceServer struct {
}
// UnimplementedWorkspaceSettingServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedWorkspaceSettingServiceServer struct{}
func (UnimplementedWorkspaceSettingServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceSetting not implemented")
@ -84,6 +87,7 @@ func (UnimplementedWorkspaceSettingServiceServer) SetWorkspaceSetting(context.Co
}
func (UnimplementedWorkspaceSettingServiceServer) mustEmbedUnimplementedWorkspaceSettingServiceServer() {
}
func (UnimplementedWorkspaceSettingServiceServer) testEmbeddedByValue() {}
// UnsafeWorkspaceSettingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceSettingServiceServer will
@ -93,6 +97,13 @@ type UnsafeWorkspaceSettingServiceServer interface {
}
func RegisterWorkspaceSettingServiceServer(s grpc.ServiceRegistrar, srv WorkspaceSettingServiceServer) {
// If the following call pancis, it indicates UnimplementedWorkspaceSettingServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&WorkspaceSettingService_ServiceDesc, srv)
}