gen

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package gen is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_imp_api_core_core_proto protoreflect.FileDescriptor

Functions

func RegisterCoreHandler

func RegisterCoreHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCoreHandler registers the http handlers for service Core to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCoreHandlerClient

func RegisterCoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CoreClient) error

RegisterCoreHandlerClient registers the http handlers for service Core to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CoreClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CoreClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CoreClient" to call the correct interceptors.

func RegisterCoreHandlerFromEndpoint

func RegisterCoreHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCoreHandlerFromEndpoint is same as RegisterCoreHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCoreHandlerServer

func RegisterCoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CoreServer) error

RegisterCoreHandlerServer registers the http handlers for service Core to "mux". UnaryRPC :call CoreServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCoreHandlerFromEndpoint instead.

func RegisterCoreServer

func RegisterCoreServer(s *grpc.Server, srv CoreServer)

Types

type CommunicationStatus

type CommunicationStatus struct {
	WebsocketConnections []string `protobuf:"bytes,1,rep,name=websocket_connections,json=websocketConnections,proto3" json:"websocket_connections,omitempty"`
	// contains filtered or unexported fields
}

func (*CommunicationStatus) Descriptor deprecated

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

Deprecated: Use CommunicationStatus.ProtoReflect.Descriptor instead.

func (*CommunicationStatus) GetWebsocketConnections

func (x *CommunicationStatus) GetWebsocketConnections() []string

func (*CommunicationStatus) ProtoMessage

func (*CommunicationStatus) ProtoMessage()

func (*CommunicationStatus) ProtoReflect

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

func (*CommunicationStatus) Reset

func (x *CommunicationStatus) Reset()

func (*CommunicationStatus) String

func (x *CommunicationStatus) String() string

type CoreClient

type CoreClient interface {
	//*
	// Status gives the status of various services the daemon is running.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

CoreClient is the client API for Core service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCoreClient

func NewCoreClient(cc grpc.ClientConnInterface) CoreClient

type CoreServer

type CoreServer interface {
	//*
	// Status gives the status of various services the daemon is running.
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
}

CoreServer is the server API for Core service.

type KeyStatus

type KeyStatus struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // The status of the daemon db/key. NOT_INITIALIZED means an InitSeed() is needed. LOCKED means an UnlockSeed() is needed. READY means the daemon is ready.
	// contains filtered or unexported fields
}

func (*KeyStatus) Descriptor deprecated

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

Deprecated: Use KeyStatus.ProtoReflect.Descriptor instead.

func (*KeyStatus) GetStatus

func (x *KeyStatus) GetStatus() string

func (*KeyStatus) ProtoMessage

func (*KeyStatus) ProtoMessage()

func (*KeyStatus) ProtoReflect

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

func (*KeyStatus) Reset

func (x *KeyStatus) Reset()

func (*KeyStatus) String

func (x *KeyStatus) String() string

type LightningStatus

type LightningStatus struct {
	NodeStatusList []*NodeStatus `protobuf:"bytes,1,rep,name=node_status_list,json=nodeStatusList,proto3" json:"node_status_list,omitempty"`
	// contains filtered or unexported fields
}

func (*LightningStatus) Descriptor deprecated

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

Deprecated: Use LightningStatus.ProtoReflect.Descriptor instead.

func (*LightningStatus) GetNodeStatusList

func (x *LightningStatus) GetNodeStatusList() []*NodeStatus

func (*LightningStatus) ProtoMessage

func (*LightningStatus) ProtoMessage()

func (*LightningStatus) ProtoReflect

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

func (*LightningStatus) Reset

func (x *LightningStatus) Reset()

func (*LightningStatus) String

func (x *LightningStatus) String() string

type NodeStatus

type NodeStatus struct {
	Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`  // The pubkey of the node the status is meant for
	Active bool   `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` // The active status of this node.
	// contains filtered or unexported fields
}

func (*NodeStatus) Descriptor deprecated

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

Deprecated: Use NodeStatus.ProtoReflect.Descriptor instead.

func (*NodeStatus) GetActive

func (x *NodeStatus) GetActive() bool

func (*NodeStatus) GetPubkey

func (x *NodeStatus) GetPubkey() string

func (*NodeStatus) ProtoMessage

func (*NodeStatus) ProtoMessage()

func (*NodeStatus) ProtoReflect

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

func (*NodeStatus) Reset

func (x *NodeStatus) Reset()

func (*NodeStatus) String

func (x *NodeStatus) String() string

type StatusRequest

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

* Represents a status request message.

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	KeyStatus           *KeyStatus           `protobuf:"bytes,1,opt,name=key_status,json=keyStatus,proto3" json:"key_status,omitempty"`                               // KeyStatus information
	LightningStatus     *LightningStatus     `protobuf:"bytes,2,opt,name=lightning_status,json=lightningStatus,proto3" json:"lightning_status,omitempty"`             // LightningStatus information
	CommunicationStatus *CommunicationStatus `protobuf:"bytes,3,opt,name=communication_status,json=communicationStatus,proto3" json:"communication_status,omitempty"` // CommunicationStatus information
	// contains filtered or unexported fields
}

* Represents a response back from a status request.

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetCommunicationStatus

func (x *StatusResponse) GetCommunicationStatus() *CommunicationStatus

func (*StatusResponse) GetKeyStatus

func (x *StatusResponse) GetKeyStatus() *KeyStatus

func (*StatusResponse) GetLightningStatus

func (x *StatusResponse) GetLightningStatus() *LightningStatus

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedCoreServer

type UnimplementedCoreServer struct {
}

UnimplementedCoreServer can be embedded to have forward compatible implementations.

func (*UnimplementedCoreServer) Status

Jump to

Keyboard shortcuts

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