Documentation ¶
Index ¶
- func GenerateKeyToFile(fname string) error
- func GetDidResolver(cctx *cli.Context) did.Resolver
- func GetPLCClient(cctx *cli.Context) *api.PLCServer
- func GetXrpcClient(cctx *cli.Context, authreq bool) (*xrpc.Client, error)
- func LoadKeyFromFile(kfile string) (*did.PrivKey, error)
- func NewHttpClient() *http.Client
- func ReadAuth(fname string) (*xrpc.AuthInfo, error)
- func SetupDatabase(dburl string, maxConnections int) (*gorm.DB, error)
- func TryReadConfig()
- func WriteConfig(cfg *CliConfig) error
- type CliConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyToFile ¶
GenerateKeyToFile makes the private key and store it into the file
func GetDidResolver ¶
func GetPLCClient ¶
func LoadKeyFromFile ¶
LoadKeyFromFile reads the private key from file
func NewHttpClient ¶
func SetupDatabase ¶
Supports both previous "dbtype=" prefixed DSNs, and URI-style database config strings, for both sqlite and postgresql.
Examples: - "sqlite=dir/file.sqlite" - "sqlite://file.sqlite" - "postgres=host=localhost user=postgres password=password dbname=pdsdb port=5432 sslmode=disable" - "postgresql://postgres:password@localhost:5432/pdsdb?sslmode=disable"
func TryReadConfig ¶
func TryReadConfig()
func WriteConfig ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.