mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user