Documentation ¶
Overview ¶
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterConfigHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigClient) error
- func RegisterConfigHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServer) error
- func RegisterConfigServer(s *grpc.Server, srv ConfigServer)
- type ConfigClient
- type ConfigServer
- type GetIONConfigRequest
- type GetIONConfigResponse
- func (*GetIONConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetIONConfigResponse) GetIonConfig() *IONConfig
- func (*GetIONConfigResponse) ProtoMessage()
- func (x *GetIONConfigResponse) ProtoReflect() protoreflect.Message
- func (x *GetIONConfigResponse) Reset()
- func (x *GetIONConfigResponse) String() string
- type GetLightningConfigRequest
- type GetLightningConfigResponse
- func (*GetLightningConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetLightningConfigResponse) GetLightningConfig() *LightningConfig
- func (*GetLightningConfigResponse) ProtoMessage()
- func (x *GetLightningConfigResponse) ProtoReflect() protoreflect.Message
- func (x *GetLightningConfigResponse) Reset()
- func (x *GetLightningConfigResponse) String() string
- type IONConfig
- type LightningConfig
- func (*LightningConfig) Descriptor() ([]byte, []int)deprecated
- func (x *LightningConfig) GetAdminMacaroon() string
- func (x *LightningConfig) GetAdminMacaroonHex() string
- func (x *LightningConfig) GetIp() string
- func (x *LightningConfig) GetListening() bool
- func (x *LightningConfig) GetPort() string
- func (x *LightningConfig) GetPubkey() string
- func (x *LightningConfig) GetTlsCert() string
- func (x *LightningConfig) GetTlsCertHex() string
- func (*LightningConfig) ProtoMessage()
- func (x *LightningConfig) ProtoReflect() protoreflect.Message
- func (x *LightningConfig) Reset()
- func (x *LightningConfig) String() string
- type SaveIONConfigRequest
- func (*SaveIONConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SaveIONConfigRequest) GetIonConfig() *IONConfig
- func (*SaveIONConfigRequest) ProtoMessage()
- func (x *SaveIONConfigRequest) ProtoReflect() protoreflect.Message
- func (x *SaveIONConfigRequest) Reset()
- func (x *SaveIONConfigRequest) String() string
- type SaveIONConfigResponse
- type SaveLightningConfigRequest
- func (*SaveLightningConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SaveLightningConfigRequest) GetLightningConfig() *LightningConfig
- func (*SaveLightningConfigRequest) ProtoMessage()
- func (x *SaveLightningConfigRequest) ProtoReflect() protoreflect.Message
- func (x *SaveLightningConfigRequest) Reset()
- func (x *SaveLightningConfigRequest) String() string
- type SaveLightningConfigResponse
- type UnimplementedConfigServer
- func (*UnimplementedConfigServer) GetIONConfig(context.Context, *GetIONConfigRequest) (*GetIONConfigResponse, error)
- func (*UnimplementedConfigServer) GetLightningConfig(context.Context, *GetLightningConfigRequest) (*GetLightningConfigResponse, error)
- func (*UnimplementedConfigServer) SaveIONConfig(context.Context, *SaveIONConfigRequest) (*SaveIONConfigResponse, error)
- func (*UnimplementedConfigServer) SaveLightningConfig(context.Context, *SaveLightningConfigRequest) (*SaveLightningConfigResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_proto_imp_api_config_config_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConfigHandler ¶
RegisterConfigHandler registers the http handlers for service Config to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfigHandlerClient ¶
func RegisterConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigClient) error
RegisterConfigHandlerClient registers the http handlers for service Config to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConfigClient" to call the correct interceptors.
func RegisterConfigHandlerFromEndpoint ¶
func RegisterConfigHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterConfigHandlerFromEndpoint is same as RegisterConfigHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfigHandlerServer ¶
func RegisterConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServer) error
RegisterConfigHandlerServer registers the http handlers for service Config to "mux". UnaryRPC :call ConfigServer 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 RegisterConfigHandlerFromEndpoint instead.
func RegisterConfigServer ¶
func RegisterConfigServer(s *grpc.Server, srv ConfigServer)
Types ¶
type ConfigClient ¶
type ConfigClient interface { //* // GetLightningConfig gets the lightning configs for the daemon. GetLightningConfig(ctx context.Context, in *GetLightningConfigRequest, opts ...grpc.CallOption) (*GetLightningConfigResponse, error) //* // SaveLightningConfig save the lightning config and restart the daemon. SaveLightningConfig(ctx context.Context, in *SaveLightningConfigRequest, opts ...grpc.CallOption) (*SaveLightningConfigResponse, error) //* // GetIONConfig gets the ion configs for the daemon. GetIONConfig(ctx context.Context, in *GetIONConfigRequest, opts ...grpc.CallOption) (*GetIONConfigResponse, error) //* // SaveIONConfig will save the ion config and restart the daemon. SaveIONConfig(ctx context.Context, in *SaveIONConfigRequest, opts ...grpc.CallOption) (*SaveIONConfigResponse, error) }
ConfigClient is the client API for Config service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConfigClient ¶
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient
type ConfigServer ¶
type ConfigServer interface { //* // GetLightningConfig gets the lightning configs for the daemon. GetLightningConfig(context.Context, *GetLightningConfigRequest) (*GetLightningConfigResponse, error) //* // SaveLightningConfig save the lightning config and restart the daemon. SaveLightningConfig(context.Context, *SaveLightningConfigRequest) (*SaveLightningConfigResponse, error) //* // GetIONConfig gets the ion configs for the daemon. GetIONConfig(context.Context, *GetIONConfigRequest) (*GetIONConfigResponse, error) //* // SaveIONConfig will save the ion config and restart the daemon. SaveIONConfig(context.Context, *SaveIONConfigRequest) (*SaveIONConfigResponse, error) }
ConfigServer is the server API for Config service.
type GetIONConfigRequest ¶
type GetIONConfigRequest struct {
// contains filtered or unexported fields
}
* Represents a request to get the ion config.
func (*GetIONConfigRequest) Descriptor
deprecated
func (*GetIONConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetIONConfigRequest.ProtoReflect.Descriptor instead.
func (*GetIONConfigRequest) ProtoMessage ¶
func (*GetIONConfigRequest) ProtoMessage()
func (*GetIONConfigRequest) ProtoReflect ¶
func (x *GetIONConfigRequest) ProtoReflect() protoreflect.Message
func (*GetIONConfigRequest) Reset ¶
func (x *GetIONConfigRequest) Reset()
func (*GetIONConfigRequest) String ¶
func (x *GetIONConfigRequest) String() string
type GetIONConfigResponse ¶
type GetIONConfigResponse struct { IonConfig *IONConfig `protobuf:"bytes,1,opt,name=ion_config,json=ionConfig,proto3" json:"ion_config,omitempty"` // The ion config // contains filtered or unexported fields }
* Represents a response containing the ion config.
func (*GetIONConfigResponse) Descriptor
deprecated
func (*GetIONConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetIONConfigResponse.ProtoReflect.Descriptor instead.
func (*GetIONConfigResponse) GetIonConfig ¶
func (x *GetIONConfigResponse) GetIonConfig() *IONConfig
func (*GetIONConfigResponse) ProtoMessage ¶
func (*GetIONConfigResponse) ProtoMessage()
func (*GetIONConfigResponse) ProtoReflect ¶
func (x *GetIONConfigResponse) ProtoReflect() protoreflect.Message
func (*GetIONConfigResponse) Reset ¶
func (x *GetIONConfigResponse) Reset()
func (*GetIONConfigResponse) String ¶
func (x *GetIONConfigResponse) String() string
type GetLightningConfigRequest ¶
type GetLightningConfigRequest struct {
// contains filtered or unexported fields
}
* Represents a request to get the lightning config.
func (*GetLightningConfigRequest) Descriptor
deprecated
func (*GetLightningConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetLightningConfigRequest.ProtoReflect.Descriptor instead.
func (*GetLightningConfigRequest) ProtoMessage ¶
func (*GetLightningConfigRequest) ProtoMessage()
func (*GetLightningConfigRequest) ProtoReflect ¶
func (x *GetLightningConfigRequest) ProtoReflect() protoreflect.Message
func (*GetLightningConfigRequest) Reset ¶
func (x *GetLightningConfigRequest) Reset()
func (*GetLightningConfigRequest) String ¶
func (x *GetLightningConfigRequest) String() string
type GetLightningConfigResponse ¶
type GetLightningConfigResponse struct { LightningConfig *LightningConfig `protobuf:"bytes,1,opt,name=lightning_config,json=lightningConfig,proto3" json:"lightning_config,omitempty"` // The lightning config // contains filtered or unexported fields }
* Represents a response containing the lightning config.
func (*GetLightningConfigResponse) Descriptor
deprecated
func (*GetLightningConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetLightningConfigResponse.ProtoReflect.Descriptor instead.
func (*GetLightningConfigResponse) GetLightningConfig ¶
func (x *GetLightningConfigResponse) GetLightningConfig() *LightningConfig
func (*GetLightningConfigResponse) ProtoMessage ¶
func (*GetLightningConfigResponse) ProtoMessage()
func (*GetLightningConfigResponse) ProtoReflect ¶
func (x *GetLightningConfigResponse) ProtoReflect() protoreflect.Message
func (*GetLightningConfigResponse) Reset ¶
func (x *GetLightningConfigResponse) Reset()
func (*GetLightningConfigResponse) String ¶
func (x *GetLightningConfigResponse) String() string
type IONConfig ¶
type IONConfig struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // the lightning IP address Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` // the lightning admin macaroon // contains filtered or unexported fields }
func (*IONConfig) Descriptor
deprecated
func (*IONConfig) ProtoMessage ¶
func (*IONConfig) ProtoMessage()
func (*IONConfig) ProtoReflect ¶
func (x *IONConfig) ProtoReflect() protoreflect.Message
type LightningConfig ¶
type LightningConfig struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // the lightning IP address Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` // the lightning IP port Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // the lightning pubkey TlsCert string `protobuf:"bytes,4,opt,name=tls_cert,json=tlsCert,proto3" json:"tls_cert,omitempty"` // the lightning tls cert AdminMacaroon string `protobuf:"bytes,5,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` // the lightning admin macaroon file Listening bool `protobuf:"varint,6,opt,name=listening,proto3" json:"listening,omitempty"` // the lightning admin macaroon file TlsCertHex string `protobuf:"bytes,7,opt,name=tls_cert_hex,json=tlsCertHex,proto3" json:"tls_cert_hex,omitempty"` // the lightning tls cert hex instead of file AdminMacaroonHex string `protobuf:"bytes,8,opt,name=admin_macaroon_hex,json=adminMacaroonHex,proto3" json:"admin_macaroon_hex,omitempty"` // the lightning admin macaroon hex instead of file // contains filtered or unexported fields }
func (*LightningConfig) Descriptor
deprecated
func (*LightningConfig) Descriptor() ([]byte, []int)
Deprecated: Use LightningConfig.ProtoReflect.Descriptor instead.
func (*LightningConfig) GetAdminMacaroon ¶
func (x *LightningConfig) GetAdminMacaroon() string
func (*LightningConfig) GetAdminMacaroonHex ¶
func (x *LightningConfig) GetAdminMacaroonHex() string
func (*LightningConfig) GetIp ¶
func (x *LightningConfig) GetIp() string
func (*LightningConfig) GetListening ¶
func (x *LightningConfig) GetListening() bool
func (*LightningConfig) GetPort ¶
func (x *LightningConfig) GetPort() string
func (*LightningConfig) GetPubkey ¶
func (x *LightningConfig) GetPubkey() string
func (*LightningConfig) GetTlsCert ¶
func (x *LightningConfig) GetTlsCert() string
func (*LightningConfig) GetTlsCertHex ¶
func (x *LightningConfig) GetTlsCertHex() string
func (*LightningConfig) ProtoMessage ¶
func (*LightningConfig) ProtoMessage()
func (*LightningConfig) ProtoReflect ¶
func (x *LightningConfig) ProtoReflect() protoreflect.Message
func (*LightningConfig) Reset ¶
func (x *LightningConfig) Reset()
func (*LightningConfig) String ¶
func (x *LightningConfig) String() string
type SaveIONConfigRequest ¶
type SaveIONConfigRequest struct { IonConfig *IONConfig `protobuf:"bytes,1,opt,name=ion_config,json=ionConfig,proto3" json:"ion_config,omitempty"` // The ion config // contains filtered or unexported fields }
* Represents a request to save the ion config.
func (*SaveIONConfigRequest) Descriptor
deprecated
func (*SaveIONConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use SaveIONConfigRequest.ProtoReflect.Descriptor instead.
func (*SaveIONConfigRequest) GetIonConfig ¶
func (x *SaveIONConfigRequest) GetIonConfig() *IONConfig
func (*SaveIONConfigRequest) ProtoMessage ¶
func (*SaveIONConfigRequest) ProtoMessage()
func (*SaveIONConfigRequest) ProtoReflect ¶
func (x *SaveIONConfigRequest) ProtoReflect() protoreflect.Message
func (*SaveIONConfigRequest) Reset ¶
func (x *SaveIONConfigRequest) Reset()
func (*SaveIONConfigRequest) String ¶
func (x *SaveIONConfigRequest) String() string
type SaveIONConfigResponse ¶
type SaveIONConfigResponse struct {
// contains filtered or unexported fields
}
* Represents a response containing the ion save config results.
func (*SaveIONConfigResponse) Descriptor
deprecated
func (*SaveIONConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use SaveIONConfigResponse.ProtoReflect.Descriptor instead.
func (*SaveIONConfigResponse) ProtoMessage ¶
func (*SaveIONConfigResponse) ProtoMessage()
func (*SaveIONConfigResponse) ProtoReflect ¶
func (x *SaveIONConfigResponse) ProtoReflect() protoreflect.Message
func (*SaveIONConfigResponse) Reset ¶
func (x *SaveIONConfigResponse) Reset()
func (*SaveIONConfigResponse) String ¶
func (x *SaveIONConfigResponse) String() string
type SaveLightningConfigRequest ¶
type SaveLightningConfigRequest struct { LightningConfig *LightningConfig `protobuf:"bytes,1,opt,name=lightning_config,json=lightningConfig,proto3" json:"lightning_config,omitempty"` // The lightning config // contains filtered or unexported fields }
* Represents a request to save the lightning config.
func (*SaveLightningConfigRequest) Descriptor
deprecated
func (*SaveLightningConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use SaveLightningConfigRequest.ProtoReflect.Descriptor instead.
func (*SaveLightningConfigRequest) GetLightningConfig ¶
func (x *SaveLightningConfigRequest) GetLightningConfig() *LightningConfig
func (*SaveLightningConfigRequest) ProtoMessage ¶
func (*SaveLightningConfigRequest) ProtoMessage()
func (*SaveLightningConfigRequest) ProtoReflect ¶
func (x *SaveLightningConfigRequest) ProtoReflect() protoreflect.Message
func (*SaveLightningConfigRequest) Reset ¶
func (x *SaveLightningConfigRequest) Reset()
func (*SaveLightningConfigRequest) String ¶
func (x *SaveLightningConfigRequest) String() string
type SaveLightningConfigResponse ¶
type SaveLightningConfigResponse struct {
// contains filtered or unexported fields
}
* Represents a response containing the lightning save config results.
func (*SaveLightningConfigResponse) Descriptor
deprecated
func (*SaveLightningConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use SaveLightningConfigResponse.ProtoReflect.Descriptor instead.
func (*SaveLightningConfigResponse) ProtoMessage ¶
func (*SaveLightningConfigResponse) ProtoMessage()
func (*SaveLightningConfigResponse) ProtoReflect ¶
func (x *SaveLightningConfigResponse) ProtoReflect() protoreflect.Message
func (*SaveLightningConfigResponse) Reset ¶
func (x *SaveLightningConfigResponse) Reset()
func (*SaveLightningConfigResponse) String ¶
func (x *SaveLightningConfigResponse) String() string
type UnimplementedConfigServer ¶
type UnimplementedConfigServer struct { }
UnimplementedConfigServer can be embedded to have forward compatible implementations.
func (*UnimplementedConfigServer) GetIONConfig ¶
func (*UnimplementedConfigServer) GetIONConfig(context.Context, *GetIONConfigRequest) (*GetIONConfigResponse, error)
func (*UnimplementedConfigServer) GetLightningConfig ¶
func (*UnimplementedConfigServer) GetLightningConfig(context.Context, *GetLightningConfigRequest) (*GetLightningConfigResponse, error)
func (*UnimplementedConfigServer) SaveIONConfig ¶
func (*UnimplementedConfigServer) SaveIONConfig(context.Context, *SaveIONConfigRequest) (*SaveIONConfigResponse, error)
func (*UnimplementedConfigServer) SaveLightningConfig ¶
func (*UnimplementedConfigServer) SaveLightningConfig(context.Context, *SaveLightningConfigRequest) (*SaveLightningConfigResponse, error)