internal

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package internal provide private utilities for the CLI didctl application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// Agent holds the configuration required to operate a "service provider" RPC node.
	Agent *agent `json:"agent" yaml:"agent" mapstructure:"agent"`

	// Client holds the configuration required to connect to an agent node.
	Client *client `json:"client" yaml:"client" mapstructure:"client"`

	// Resolver determines the registered DID providers to be used on a "resolve"
	// operations.
	Resolver []*resolver.Provider `json:"resolver" yaml:"resolver" mapstructure:"resolver"`
}

Settings provide utilities to manage configuration options available when utilizing the different components available through the CLI `didctl` application.

func (*Settings) ClientRPC

func (s *Settings) ClientRPC() ([]rpc.ClientOption, error)

ClientRPC returns the configuration options available to establish a connection to an agent RPC server.

func (*Settings) Gateway

func (s *Settings) Gateway(oop *otel.Operator) []rpc.GatewayOption

Gateway returns the configuration options available to set up an HTTP gateway.

func (*Settings) Load

func (s *Settings) Load(v *viper.Viper) error

Load available config values from Viper into the settings instance.

func (*Settings) OTEL

func (s *Settings) OTEL(log xlog.Logger) []otel.OperatorOption

OTEL returns the configuration options available to set up an OTEL operator.

func (*Settings) Overrides

func (s *Settings) Overrides(cmd string) []cli.Param

Overrides return the available flag overrides for the command specified. Specific settings can be provided via: configuration file, ENV variable and command flags.

func (*Settings) ReleaseCode added in v0.9.1

func (s *Settings) ReleaseCode() string

ReleaseCode returns the release identifier for the application. A release identifier is of the form: `service-name@version+commit_hash`. If `version` or `commit_hash` are not available will be omitted.

func (*Settings) Server

func (s *Settings) Server(oop *otel.Operator) ([]rpc.ServerOption, error)

Server returns the configuration options available to set up an RPC server.

func (*Settings) SetDefaults

func (s *Settings) SetDefaults(v *viper.Viper, home, appID string)

SetDefaults loads default values to the provided viper instance.

Jump to

Keyboard shortcuts

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