proto

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_protobuf_goflake_proto protoreflect.FileDescriptor
View Source
var FlakeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "goflake.FlakeService",
	HandlerType: (*FlakeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUUID",
			Handler:    _FlakeService_GetUUID_Handler,
		},
		{
			MethodName: "Decompose",
			Handler:    _FlakeService_Decompose_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/protobuf/goflake.proto",
}

FlakeService_ServiceDesc is the grpc.ServiceDesc for FlakeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterFlakeServiceServer

func RegisterFlakeServiceServer(s grpc.ServiceRegistrar, srv FlakeServiceServer)

Types

type DecomposeRequest

type DecomposeRequest struct {
	Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // UUID to decompose
	// contains filtered or unexported fields
}

func (*DecomposeRequest) Descriptor deprecated

func (*DecomposeRequest) Descriptor() ([]byte, []int)

Deprecated: Use DecomposeRequest.ProtoReflect.Descriptor instead.

func (*DecomposeRequest) GetUuid

func (x *DecomposeRequest) GetUuid() uint64

func (*DecomposeRequest) ProtoMessage

func (*DecomposeRequest) ProtoMessage()

func (*DecomposeRequest) ProtoReflect

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

func (*DecomposeRequest) Reset

func (x *DecomposeRequest) Reset()

func (*DecomposeRequest) String

func (x *DecomposeRequest) String() string

type DecomposeResponse

type DecomposeResponse struct {
	Uuid         string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`                                     // the uuid of the flake that was decomposed
	Timestamp    string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                           // RFC3339
	DatacenterId string `protobuf:"bytes,3,opt,name=datacenter_id,json=datacenterId,proto3" json:"datacenter_id,omitempty"` // the datacenter id of the flake
	MachineId    string `protobuf:"bytes,4,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`          // the machine id of the flake
	Sequence     string `protobuf:"bytes,5,opt,name=sequence,proto3" json:"sequence,omitempty"`                             // the sequence of the flake
	Msb          bool   `protobuf:"varint,6,opt,name=msb,proto3" json:"msb,omitempty"`                                      // false for 0, true for 1
	// contains filtered or unexported fields
}

func (*DecomposeResponse) Descriptor deprecated

func (*DecomposeResponse) Descriptor() ([]byte, []int)

Deprecated: Use DecomposeResponse.ProtoReflect.Descriptor instead.

func (*DecomposeResponse) GetDatacenterId

func (x *DecomposeResponse) GetDatacenterId() string

func (*DecomposeResponse) GetMachineId

func (x *DecomposeResponse) GetMachineId() string

func (*DecomposeResponse) GetMsb

func (x *DecomposeResponse) GetMsb() bool

func (*DecomposeResponse) GetSequence

func (x *DecomposeResponse) GetSequence() string

func (*DecomposeResponse) GetTimestamp

func (x *DecomposeResponse) GetTimestamp() string

func (*DecomposeResponse) GetUuid

func (x *DecomposeResponse) GetUuid() string

func (*DecomposeResponse) ProtoMessage

func (*DecomposeResponse) ProtoMessage()

func (*DecomposeResponse) ProtoReflect

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

func (*DecomposeResponse) Reset

func (x *DecomposeResponse) Reset()

func (*DecomposeResponse) String

func (x *DecomposeResponse) String() string

type FlakeServiceClient

type FlakeServiceClient interface {
	GetUUID(ctx context.Context, in *GetUUIDRequest, opts ...grpc.CallOption) (*GetUUIDResponse, error)
	Decompose(ctx context.Context, in *DecomposeRequest, opts ...grpc.CallOption) (*DecomposeResponse, error)
}

FlakeServiceClient is the client API for FlakeService 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.

type FlakeServiceServer

type FlakeServiceServer interface {
	GetUUID(context.Context, *GetUUIDRequest) (*GetUUIDResponse, error)
	Decompose(context.Context, *DecomposeRequest) (*DecomposeResponse, error)
	// contains filtered or unexported methods
}

FlakeServiceServer is the server API for FlakeService service. All implementations must embed UnimplementedFlakeServiceServer for forward compatibility

type GetUUIDRequest

type GetUUIDRequest struct {
	// contains filtered or unexported fields
}

func (*GetUUIDRequest) Descriptor deprecated

func (*GetUUIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUUIDRequest.ProtoReflect.Descriptor instead.

func (*GetUUIDRequest) ProtoMessage

func (*GetUUIDRequest) ProtoMessage()

func (*GetUUIDRequest) ProtoReflect

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

func (*GetUUIDRequest) Reset

func (x *GetUUIDRequest) Reset()

func (*GetUUIDRequest) String

func (x *GetUUIDRequest) String() string

type GetUUIDResponse

type GetUUIDResponse struct {
	Uuid uint64 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // new UUID
	// contains filtered or unexported fields
}

func (*GetUUIDResponse) Descriptor deprecated

func (*GetUUIDResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetUUIDResponse.ProtoReflect.Descriptor instead.

func (*GetUUIDResponse) GetUuid

func (x *GetUUIDResponse) GetUuid() uint64

func (*GetUUIDResponse) ProtoMessage

func (*GetUUIDResponse) ProtoMessage()

func (*GetUUIDResponse) ProtoReflect

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

func (*GetUUIDResponse) Reset

func (x *GetUUIDResponse) Reset()

func (*GetUUIDResponse) String

func (x *GetUUIDResponse) String() string

type UnimplementedFlakeServiceServer

type UnimplementedFlakeServiceServer struct {
}

UnimplementedFlakeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFlakeServiceServer) Decompose

func (UnimplementedFlakeServiceServer) GetUUID

type UnsafeFlakeServiceServer

type UnsafeFlakeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFlakeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FlakeServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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