Add AdminService (#176)

* add admin service

* go mod tidy

* fix linter: grpc.Dial

* fix ocean get balance

* fix linter

* add .vscode to gitignore

* rework admin balance API

* fix mockedwallet in covenantless pkg

* make proto
This commit is contained in:
Louis Singer
2024-05-31 15:46:46 +02:00
committed by GitHub
parent 329ba555db
commit 9fc49d9f08
27 changed files with 2510 additions and 73 deletions

View File

@@ -7,11 +7,21 @@ import (
)
type Config struct {
Port uint32
NoTLS bool
Port uint32
NoTLS bool
AuthUser string
AuthPass string
}
func (c Config) Validate() error {
if len(c.AuthUser) == 0 {
return fmt.Errorf("missing auth user")
}
if len(c.AuthPass) == 0 {
return fmt.Errorf("missing auth password")
}
lis, err := net.Listen("tcp", c.address())
if err != nil {
return fmt.Errorf("invalid port: %s", err)