utils

package
v0.30.14 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const HTTPReqTimeout = 1 * time.Minute

Variables

View Source
var Settings = &Hub{}
View Source
var Version = "0.10"

Functions

func DecodeB64 added in v0.25.27

func DecodeB64(str string) ([]byte, error)

func DisposeNonce

func DisposeNonce(n uint64)

DisposeNonce frees the nonce value for others to use.

func IndyBaseDir

func IndyBaseDir() string

func NewNonce

func NewNonce() uint64

NewNonce generates new uint64 nonce with Go's crypto package

func NewNonceStr

func NewNonceStr() string

NewNonceStr generates new nonce with Go's crypto package, and returns value as string.

func NonceNum

func NonceNum(s string) uint64

func NonceToStr

func NonceToStr(n uint64) string

func ParseNonce

func ParseNonce(ns string) uint64

func ReserveNonce

func ReserveNonce(n uint64) uint64

func UUID

func UUID() string

UUID generates new nonce with Go's crypto package, and returns value as string.

Types

type Hub

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

func (*Hub) ExportPath

func (h *Hub) ExportPath() string

func (*Hub) GRPCAdmin

func (h *Hub) GRPCAdmin() string

func (*Hub) HostAddr

func (h *Hub) HostAddr() string

func (*Hub) LocalTestMode

func (h *Hub) LocalTestMode() bool

func (*Hub) RegisterBackupInterval

func (h *Hub) RegisterBackupInterval() time.Duration

func (*Hub) RegisterBackupName

func (h *Hub) RegisterBackupName() string

func (*Hub) RegisterName

func (h *Hub) RegisterName() string

func (*Hub) ServiceName

func (h *Hub) ServiceName() string

ServiceName returns service name for a2a communication

func (*Hub) SetExportPath

func (h *Hub) SetExportPath(exportPath string)

SetExportPath sets path for wallet exports.

func (*Hub) SetGRPCAdmin

func (h *Hub) SetGRPCAdmin(gRPCAdmin string)

func (*Hub) SetHostAddr

func (h *Hub) SetHostAddr(ipName string)

SetHostAddr sets current host name of this service agency. The host name is used in the URLs and endpoints.

func (*Hub) SetLocalTestMode

func (h *Hub) SetLocalTestMode(localTestMode bool)

func (*Hub) SetRegisterBackupInterval

func (h *Hub) SetRegisterBackupInterval(interval time.Duration)

func (*Hub) SetRegisterBackupName

func (h *Hub) SetRegisterBackupName(name string)

func (*Hub) SetRegisterName

func (h *Hub) SetRegisterName(registerName string)

func (*Hub) SetServiceName

func (h *Hub) SetServiceName(n string)

SetServiceName sets the service name for a2a communication

func (*Hub) SetTimeout

func (h *Hub) SetTimeout(to time.Duration)

SetTimeout sets the default timeout for HTTP and WS requests.

func (*Hub) SetVersionInfo

func (h *Hub) SetVersionInfo(info string)

SetVersionInfo sets current version info of this agency. The info is shown in the certain API calls like Ping.

func (*Hub) SetWalletBackupPath

func (h *Hub) SetWalletBackupPath(path string)

func (*Hub) SetWalletBackupTime

func (h *Hub) SetWalletBackupTime(t string)

func (*Hub) Timeout

func (h *Hub) Timeout() time.Duration

func (*Hub) VersionInfo

func (h *Hub) VersionInfo() string

func (*Hub) WalletBackupPath

func (h *Hub) WalletBackupPath() string

func (*Hub) WalletBackupTime

func (h *Hub) WalletBackupTime() string

func (*Hub) WalletExportPath

func (h *Hub) WalletExportPath(filename string) (exportPath, url string)

type Reg

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

func (*Reg) Add

func (r *Reg) Add(key keyDID, value ...string)

func (*Reg) EnumValues

func (r *Reg) EnumValues(handler func(k keyDID, v []string) bool)

func (*Reg) Exist

func (r *Reg) Exist(key keyDID) bool

func (*Reg) Load

func (r *Reg) Load(filename string) (err error)

func (*Reg) Reset

func (r *Reg) Reset(filename string) (err error)

func (*Reg) Save

func (r *Reg) Save(filename string) (err error)

Jump to

Keyboard shortcuts

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