Documentation ¶
Overview ¶
Author: Paul Côté Last Change Author: Paul Côté Last Date Changed: 2022/09/20
Copyright (C) 2015-2018 Lightning Labs and The Lightning Network Developers ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- type PasswordMsg
- type UnlockerService
- func (u *UnlockerService) ChangePassword(ctx context.Context, req *lanirpc.ChangePwdRequest) (*lanirpc.ChangePwdResponse, error)
- func (u *UnlockerService) Login(ctx context.Context, req *lanirpc.LoginRequest) (*lanirpc.LoginResponse, error)
- func (u *UnlockerService) RegisterWithGrpcServer(grpcServer *grpc.Server) error
- func (u *UnlockerService) RegisterWithRestProxy(ctx context.Context, mux *proxy.ServeMux, restDialOpts []grpc.DialOption, ...) error
- func (u *UnlockerService) SetPassword(ctx context.Context, req *lanirpc.SetPwdRequest) (*lanirpc.SetPwdResponse, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type PasswordMsg ¶
type UnlockerService ¶
type UnlockerService struct { lanirpc.UnimplementedUnlockerServer PasswordMsgs chan *PasswordMsg // contains filtered or unexported fields }
func InitUnlockerService ¶
func InitUnlockerService(db *kvdb.DB, macaroonFiles []string) (*UnlockerService, error)
InitUnlockerService instantiates the UnlockerService
func (*UnlockerService) ChangePassword ¶
func (u *UnlockerService) ChangePassword(ctx context.Context, req *lanirpc.ChangePwdRequest) (*lanirpc.ChangePwdResponse, error)
ChangePassword takes the old password, validates it and sets the new password from the inputted new password only if a previous password has been set
func (*UnlockerService) Login ¶
func (u *UnlockerService) Login(ctx context.Context, req *lanirpc.LoginRequest) (*lanirpc.LoginResponse, error)
Login will login a user
func (*UnlockerService) RegisterWithGrpcServer ¶
func (u *UnlockerService) RegisterWithGrpcServer(grpcServer *grpc.Server) error
RegisterWithGrpcServer registers the gRPC server to the unlocker service
func (*UnlockerService) RegisterWithRestProxy ¶
func (u *UnlockerService) RegisterWithRestProxy(ctx context.Context, mux *proxy.ServeMux, restDialOpts []grpc.DialOption, restProxyDest string) error
RegisterWithRestProxy registers the UnlockerService with the REST proxy
func (*UnlockerService) SetPassword ¶
func (u *UnlockerService) SetPassword(ctx context.Context, req *lanirpc.SetPwdRequest) (*lanirpc.SetPwdResponse, error)
SetPassword will set the password of the kvdb if none has been set