Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Dimenstion
- func (*Dimenstion) Descriptor() ([]byte, []int)deprecated
- func (x *Dimenstion) GetMax() int32
- func (x *Dimenstion) GetMin() int32
- func (x *Dimenstion) GetName() string
- func (x *Dimenstion) GetType() string
- func (*Dimenstion) ProtoMessage()
- func (x *Dimenstion) ProtoReflect() protoreflect.Message
- func (x *Dimenstion) Reset()
- func (x *Dimenstion) String() string
- 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) (*Format, 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 Dimenstion ¶
type Dimenstion struct {
// name is the dimension name
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type of the dimension value - int/string
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// min is the minimum value. For int - the minimum int value, for string - the minimum string length
Min int32 `protobuf:"varint,3,opt,name=min,proto3" json:"min,omitempty"`
// max is the maximum value. For int - the maximum int value, for string - the maximum string length
Max int32 `protobuf:"varint,4,opt,name=max,proto3" json:"max,omitempty"`
// contains filtered or unexported fields
}
Dimension is one of the coordinates in a basis
func (*Dimenstion) Descriptor
deprecated
func (*Dimenstion) Descriptor() ([]byte, []int)
Deprecated: Use Dimenstion.ProtoReflect.Descriptor instead.
func (*Dimenstion) GetMax ¶
func (x *Dimenstion) GetMax() int32
func (*Dimenstion) GetMin ¶
func (x *Dimenstion) GetMin() int32
func (*Dimenstion) GetName ¶
func (x *Dimenstion) GetName() string
func (*Dimenstion) GetType ¶
func (x *Dimenstion) GetType() string
func (*Dimenstion) ProtoMessage ¶
func (*Dimenstion) ProtoMessage()
func (*Dimenstion) ProtoReflect ¶
func (x *Dimenstion) ProtoReflect() protoreflect.Message
func (*Dimenstion) Reset ¶
func (x *Dimenstion) Reset()
func (*Dimenstion) String ¶
func (x *Dimenstion) String() string
type Format ¶
type Format struct {
// name uniquely identifies a format
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// basis defines a coordinate system for describing index's records for the format
Basis []*Dimenstion `protobuf:"bytes,2,rep,name=basis,proto3" json:"basis,omitempty"`
// contains filtered or unexported fields
}
Format describes a document format
func (*Format) Descriptor
deprecated
func (*Format) GetBasis ¶
func (x *Format) GetBasis() []*Dimenstion
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) (*Format, 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) (*Format, 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.