paranoidnetwork

package
v0.0.0-...-dde4a86 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_paranoid_paranoidnetwork_v1_paranoid_proto protoreflect.FileDescriptor
View Source
var ParanoidNetworkService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "paranoid.paranoidnetwork.v1.ParanoidNetworkService",
	HandlerType: (*ParanoidNetworkServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _ParanoidNetworkService_Ping_Handler,
		},
		{
			MethodName: "JoinCluster",
			Handler:    _ParanoidNetworkService_JoinCluster_Handler,
		},
		{
			MethodName: "NewGeneration",
			Handler:    _ParanoidNetworkService_NewGeneration_Handler,
		},
		{
			MethodName: "SendKeyPiece",
			Handler:    _ParanoidNetworkService_SendKeyPiece_Handler,
		},
		{
			MethodName: "RequestKeyPiece",
			Handler:    _ParanoidNetworkService_RequestKeyPiece_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "paranoid/paranoidnetwork/v1/paranoid.proto",
}

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

Functions

func RegisterParanoidNetworkServiceServer

func RegisterParanoidNetworkServiceServer(s grpc.ServiceRegistrar, srv ParanoidNetworkServiceServer)

Types

type JoinClusterRequest

type JoinClusterRequest struct {
	Ip           string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`                                         // required
	Port         string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`                                     // required
	CommonName   string `protobuf:"bytes,3,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"`       // required
	Uuid         string `protobuf:"bytes,4,opt,name=uuid,proto3" json:"uuid,omitempty"`                                     // required
	PoolPassword string `protobuf:"bytes,5,opt,name=pool_password,json=poolPassword,proto3" json:"pool_password,omitempty"` // optional
	// contains filtered or unexported fields
}

func (*JoinClusterRequest) Descriptor deprecated

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

Deprecated: Use JoinClusterRequest.ProtoReflect.Descriptor instead.

func (*JoinClusterRequest) GetCommonName

func (x *JoinClusterRequest) GetCommonName() string

func (*JoinClusterRequest) GetIp

func (x *JoinClusterRequest) GetIp() string

func (*JoinClusterRequest) GetPoolPassword

func (x *JoinClusterRequest) GetPoolPassword() string

func (*JoinClusterRequest) GetPort

func (x *JoinClusterRequest) GetPort() string

func (*JoinClusterRequest) GetUuid

func (x *JoinClusterRequest) GetUuid() string

func (*JoinClusterRequest) ProtoMessage

func (*JoinClusterRequest) ProtoMessage()

func (*JoinClusterRequest) ProtoReflect

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

func (*JoinClusterRequest) Reset

func (x *JoinClusterRequest) Reset()

func (*JoinClusterRequest) String

func (x *JoinClusterRequest) String() string

type JoinClusterResponse

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

func (*JoinClusterResponse) Descriptor deprecated

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

Deprecated: Use JoinClusterResponse.ProtoReflect.Descriptor instead.

func (*JoinClusterResponse) ProtoMessage

func (*JoinClusterResponse) ProtoMessage()

func (*JoinClusterResponse) ProtoReflect

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

func (*JoinClusterResponse) Reset

func (x *JoinClusterResponse) Reset()

func (*JoinClusterResponse) String

func (x *JoinClusterResponse) String() string

type KeyPiece

type KeyPiece struct {
	Data              []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`                                                    // required
	ParentFingerprint []byte `protobuf:"bytes,2,opt,name=parent_fingerprint,json=parentFingerprint,proto3" json:"parent_fingerprint,omitempty"` // required
	Prime             []byte `protobuf:"bytes,3,opt,name=prime,proto3" json:"prime,omitempty"`                                                  // required
	Seq               int64  `protobuf:"varint,4,opt,name=seq,proto3" json:"seq,omitempty"`                                                     // required
	// The Node data for the node who owns this KeyPiece
	OwnerNode *Node `protobuf:"bytes,5,opt,name=owner_node,json=ownerNode,proto3" json:"owner_node,omitempty"` // required
	// The KeyStateMachine generation this key belongs to
	Generation int64 `protobuf:"varint,6,opt,name=generation,proto3" json:"generation,omitempty"` // required
	// contains filtered or unexported fields
}

func (*KeyPiece) Descriptor deprecated

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

Deprecated: Use KeyPiece.ProtoReflect.Descriptor instead.

func (*KeyPiece) GetData

func (x *KeyPiece) GetData() []byte

func (*KeyPiece) GetGeneration

func (x *KeyPiece) GetGeneration() int64

func (*KeyPiece) GetOwnerNode

func (x *KeyPiece) GetOwnerNode() *Node

func (*KeyPiece) GetParentFingerprint

func (x *KeyPiece) GetParentFingerprint() []byte

func (*KeyPiece) GetPrime

func (x *KeyPiece) GetPrime() []byte

func (*KeyPiece) GetSeq

func (x *KeyPiece) GetSeq() int64

func (*KeyPiece) ProtoMessage

func (*KeyPiece) ProtoMessage()

func (*KeyPiece) ProtoReflect

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

func (*KeyPiece) Reset

func (x *KeyPiece) Reset()

func (*KeyPiece) String

func (x *KeyPiece) String() string

type NewGenerationRequest

type NewGenerationRequest struct {
	RequestingNode *Node  `protobuf:"bytes,1,opt,name=requesting_node,json=requestingNode,proto3" json:"requesting_node,omitempty"` // required
	PoolPassword   string `protobuf:"bytes,2,opt,name=pool_password,json=poolPassword,proto3" json:"pool_password,omitempty"`       // required
	// contains filtered or unexported fields
}

func (*NewGenerationRequest) Descriptor deprecated

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

Deprecated: Use NewGenerationRequest.ProtoReflect.Descriptor instead.

func (*NewGenerationRequest) GetPoolPassword

func (x *NewGenerationRequest) GetPoolPassword() string

func (*NewGenerationRequest) GetRequestingNode

func (x *NewGenerationRequest) GetRequestingNode() *Node

func (*NewGenerationRequest) ProtoMessage

func (*NewGenerationRequest) ProtoMessage()

func (*NewGenerationRequest) ProtoReflect

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

func (*NewGenerationRequest) Reset

func (x *NewGenerationRequest) Reset()

func (*NewGenerationRequest) String

func (x *NewGenerationRequest) String() string

type NewGenerationResponse

type NewGenerationResponse struct {
	GenerationNumber int64    `protobuf:"varint,1,opt,name=generation_number,json=generationNumber,proto3" json:"generation_number,omitempty"` // required
	Peers            []string `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`                                                // required
	// contains filtered or unexported fields
}

func (*NewGenerationResponse) Descriptor deprecated

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

Deprecated: Use NewGenerationResponse.ProtoReflect.Descriptor instead.

func (*NewGenerationResponse) GetGenerationNumber

func (x *NewGenerationResponse) GetGenerationNumber() int64

func (*NewGenerationResponse) GetPeers

func (x *NewGenerationResponse) GetPeers() []string

func (*NewGenerationResponse) ProtoMessage

func (*NewGenerationResponse) ProtoMessage()

func (*NewGenerationResponse) ProtoReflect

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

func (*NewGenerationResponse) Reset

func (x *NewGenerationResponse) Reset()

func (*NewGenerationResponse) String

func (x *NewGenerationResponse) String() string

type Node

type Node struct {
	Ip         string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`                                   // required
	Port       string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`                               // required
	CommonName string `protobuf:"bytes,3,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"` // required
	Uuid       string `protobuf:"bytes,4,opt,name=uuid,proto3" json:"uuid,omitempty"`                               // required
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetCommonName

func (x *Node) GetCommonName() string

func (*Node) GetIp

func (x *Node) GetIp() string

func (*Node) GetPort

func (x *Node) GetPort() string

func (*Node) GetUuid

func (x *Node) GetUuid() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type ParanoidNetworkServiceClient

type ParanoidNetworkServiceClient interface {
	// Used for health checking and discovery. Sends the IP and port of the
	// PFSD instance running on the client.
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// Used by a new node to let other nodes it is available to join the cluster.
	JoinCluster(ctx context.Context, in *JoinClusterRequest, opts ...grpc.CallOption) (*JoinClusterResponse, error)
	// Used by a new node to create a new key generation before joining the cluster.
	NewGeneration(ctx context.Context, in *NewGenerationRequest, opts ...grpc.CallOption) (*NewGenerationResponse, error)
	// Cryptography calls
	SendKeyPiece(ctx context.Context, in *SendKeyPieceRequest, opts ...grpc.CallOption) (*SendKeyPieceResponse, error)
	RequestKeyPiece(ctx context.Context, in *RequestKeyPieceRequest, opts ...grpc.CallOption) (*RequestKeyPieceResponse, error)
}

ParanoidNetworkServiceClient is the client API for ParanoidNetworkService 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 ParanoidNetworkServiceServer

type ParanoidNetworkServiceServer interface {
	// Used for health checking and discovery. Sends the IP and port of the
	// PFSD instance running on the client.
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// Used by a new node to let other nodes it is available to join the cluster.
	JoinCluster(context.Context, *JoinClusterRequest) (*JoinClusterResponse, error)
	// Used by a new node to create a new key generation before joining the cluster.
	NewGeneration(context.Context, *NewGenerationRequest) (*NewGenerationResponse, error)
	// Cryptography calls
	SendKeyPiece(context.Context, *SendKeyPieceRequest) (*SendKeyPieceResponse, error)
	RequestKeyPiece(context.Context, *RequestKeyPieceRequest) (*RequestKeyPieceResponse, error)
	// contains filtered or unexported methods
}

ParanoidNetworkServiceServer is the server API for ParanoidNetworkService service. All implementations must embed UnimplementedParanoidNetworkServiceServer for forward compatibility

type PingRequest

type PingRequest struct {
	Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetNode

func (x *PingRequest) GetNode() *Node

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

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

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type RequestKeyPieceRequest

type RequestKeyPieceRequest struct {
	Node       *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`              // required
	Generation int64 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"` // required
	// contains filtered or unexported fields
}

func (*RequestKeyPieceRequest) Descriptor deprecated

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

Deprecated: Use RequestKeyPieceRequest.ProtoReflect.Descriptor instead.

func (*RequestKeyPieceRequest) GetGeneration

func (x *RequestKeyPieceRequest) GetGeneration() int64

func (*RequestKeyPieceRequest) GetNode

func (x *RequestKeyPieceRequest) GetNode() *Node

func (*RequestKeyPieceRequest) ProtoMessage

func (*RequestKeyPieceRequest) ProtoMessage()

func (*RequestKeyPieceRequest) ProtoReflect

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

func (*RequestKeyPieceRequest) Reset

func (x *RequestKeyPieceRequest) Reset()

func (*RequestKeyPieceRequest) String

func (x *RequestKeyPieceRequest) String() string

type RequestKeyPieceResponse

type RequestKeyPieceResponse struct {
	Key *KeyPiece `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // required
	// contains filtered or unexported fields
}

func (*RequestKeyPieceResponse) Descriptor deprecated

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

Deprecated: Use RequestKeyPieceResponse.ProtoReflect.Descriptor instead.

func (*RequestKeyPieceResponse) GetKey

func (x *RequestKeyPieceResponse) GetKey() *KeyPiece

func (*RequestKeyPieceResponse) ProtoMessage

func (*RequestKeyPieceResponse) ProtoMessage()

func (*RequestKeyPieceResponse) ProtoReflect

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

func (*RequestKeyPieceResponse) Reset

func (x *RequestKeyPieceResponse) Reset()

func (*RequestKeyPieceResponse) String

func (x *RequestKeyPieceResponse) String() string

type SendKeyPieceRequest

type SendKeyPieceRequest struct {
	Key        *KeyPiece `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`                                  // required
	AddElement bool      `protobuf:"varint,2,opt,name=add_element,json=addElement,proto3" json:"add_element,omitempty"` // required
	// contains filtered or unexported fields
}

func (*SendKeyPieceRequest) Descriptor deprecated

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

Deprecated: Use SendKeyPieceRequest.ProtoReflect.Descriptor instead.

func (*SendKeyPieceRequest) GetAddElement

func (x *SendKeyPieceRequest) GetAddElement() bool

func (*SendKeyPieceRequest) GetKey

func (x *SendKeyPieceRequest) GetKey() *KeyPiece

func (*SendKeyPieceRequest) ProtoMessage

func (*SendKeyPieceRequest) ProtoMessage()

func (*SendKeyPieceRequest) ProtoReflect

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

func (*SendKeyPieceRequest) Reset

func (x *SendKeyPieceRequest) Reset()

func (*SendKeyPieceRequest) String

func (x *SendKeyPieceRequest) String() string

type SendKeyPieceResponse

type SendKeyPieceResponse struct {
	ClientMustCommit bool `protobuf:"varint,1,opt,name=client_must_commit,json=clientMustCommit,proto3" json:"client_must_commit,omitempty"` // required
	// contains filtered or unexported fields
}

func (*SendKeyPieceResponse) Descriptor deprecated

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

Deprecated: Use SendKeyPieceResponse.ProtoReflect.Descriptor instead.

func (*SendKeyPieceResponse) GetClientMustCommit

func (x *SendKeyPieceResponse) GetClientMustCommit() bool

func (*SendKeyPieceResponse) ProtoMessage

func (*SendKeyPieceResponse) ProtoMessage()

func (*SendKeyPieceResponse) ProtoReflect

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

func (*SendKeyPieceResponse) Reset

func (x *SendKeyPieceResponse) Reset()

func (*SendKeyPieceResponse) String

func (x *SendKeyPieceResponse) String() string

type UnimplementedParanoidNetworkServiceServer

type UnimplementedParanoidNetworkServiceServer struct {
}

UnimplementedParanoidNetworkServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedParanoidNetworkServiceServer) JoinCluster

func (UnimplementedParanoidNetworkServiceServer) NewGeneration

func (UnimplementedParanoidNetworkServiceServer) Ping

func (UnimplementedParanoidNetworkServiceServer) RequestKeyPiece

func (UnimplementedParanoidNetworkServiceServer) SendKeyPiece

type UnsafeParanoidNetworkServiceServer

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

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

Jump to

Keyboard shortcuts

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