Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Format
- type Formats
- type Id
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Create(context.Context, *Format) (*Format, error)
- func (UnimplementedServiceServer) Delete(context.Context, *Id) (*emptypb.Empty, error)
- func (UnimplementedServiceServer) Get(context.Context, *Id) (*Format, error)
- func (UnimplementedServiceServer) List(context.Context, *emptypb.Empty) (*Formats, error)
- type UnsafeServiceServer
Constants ¶
const ( Service_Create_FullMethodName = "/format.v1.Service/Create" Service_Get_FullMethodName = "/format.v1.Service/Get" Service_Delete_FullMethodName = "/format.v1.Service/Delete" Service_List_FullMethodName = "/format.v1.Service/List" )
Variables ¶
var File_format_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "format.v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Get", Handler: _Service_Get_Handler, }, { MethodName: "Delete", Handler: _Service_Delete_Handler, }, { MethodName: "List", Handler: _Service_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "format.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Format ¶
type Format struct { // name uniquely identifies a format Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Format describes a document format
func (*Format) Descriptor
deprecated
func (*Format) ProtoMessage ¶
func (*Format) ProtoMessage()
func (*Format) ProtoReflect ¶
func (x *Format) ProtoReflect() protoreflect.Message
type Formats ¶
type Formats struct { Formats []*Format `protobuf:"bytes,1,rep,name=formats,proto3" json:"formats,omitempty"` // contains filtered or unexported fields }
Formats uses as a result of List() function
func (*Formats) Descriptor
deprecated
func (*Formats) GetFormats ¶
func (*Formats) ProtoMessage ¶
func (*Formats) ProtoMessage()
func (*Formats) ProtoReflect ¶
func (x *Formats) ProtoReflect() protoreflect.Message
type Id ¶
type Id struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Id allows to provide pure id for an entity
func (*Id) Descriptor
deprecated
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶
func (x *Id) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { // Create allows to create a new format Create(ctx context.Context, in *Format, opts ...grpc.CallOption) (*Format, error) // Get returns format by its name Get(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Format, error) // Delete allows to delete an existing format Delete(ctx context.Context, in *Id, opts ...grpc.CallOption) (*emptypb.Empty, error) // List returns all known formats List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Formats, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // Create allows to create a new format Create(context.Context, *Format) (*Format, error) // Get returns format by its name Get(context.Context, *Id) (*Format, error) // Delete allows to delete an existing format Delete(context.Context, *Id) (*emptypb.Empty, error) // List returns all known formats List(context.Context, *emptypb.Empty) (*Formats, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.