format

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_format_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Format.ProtoReflect.Descriptor instead.

func (*Format) GetBasis

func (x *Format) GetBasis() []*Dimenstion

func (*Format) GetName

func (x *Format) GetName() string

func (*Format) ProtoMessage

func (*Format) ProtoMessage()

func (*Format) ProtoReflect

func (x *Format) ProtoReflect() protoreflect.Message

func (*Format) Reset

func (x *Format) Reset()

func (*Format) String

func (x *Format) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Formats.ProtoReflect.Descriptor instead.

func (*Formats) GetFormats

func (x *Formats) GetFormats() []*Format

func (*Formats) ProtoMessage

func (*Formats) ProtoMessage()

func (*Formats) ProtoReflect

func (x *Formats) ProtoReflect() protoreflect.Message

func (*Formats) Reset

func (x *Formats) Reset()

func (*Formats) String

func (x *Formats) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetId

func (x *Id) GetId() string

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

func (x *Id) ProtoReflect() protoreflect.Message

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

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.

func (UnimplementedServiceServer) Create

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) List

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL