internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package internal provides private utilities for the client CLI application.

Index

Constants

View Source
const DefaultAgentEndpoint = "algo-did.aidtech.network:443"

DefaultAgentEndpoint defines the standard network agent to use when no user-provided value is available.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSettings

type ClientSettings struct {
	Node     string `json:"node" yaml:"node" mapstructure:"node"`
	Timeout  uint   `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	Insecure bool   `json:"insecure" yaml:"insecure" mapstructure:"insecure"`
	Override string `json:"override" yaml:"override" mapstructure:"override"`
	PoW      uint   `json:"pow" yaml:"pow" mapstructure:"pow"`
}

ClientSettings defines the configuration options available when interacting with an AlgoDID network agent.

func (*ClientSettings) Validate

func (cl *ClientSettings) Validate() error

Validate the settings and load sensible default values.

type ResolverSettings

type ResolverSettings struct {
	Port          uint            `json:"port" yaml:"port" mapstructure:"port"`
	ProxyProtocol bool            `json:"proxy_protocol" yaml:"proxy_protocol" mapstructure:"proxy_protocol"`
	TLS           *tlsSettings    `json:"tls" yaml:"tls" mapstructure:"tls"`
	Client        *ClientSettings `json:"client" yaml:"client" mapstructure:"client"`
}

ResolverSettings defines the configuration options available when deploying a DIF compliant resolver endpoint.

func (*ResolverSettings) Load

func (rs *ResolverSettings) Load(v *viper.Viper)

Load available configuration values and set sensible default values.

func (*ResolverSettings) Resolver

func (rs *ResolverSettings) Resolver(conn *grpc.ClientConn) (*resolver.Instance, error)

Resolver instance.

func (*ResolverSettings) ServerOpts

func (rs *ResolverSettings) ServerOpts(handler http.Handler, rc string) []pkgHttp.Option

ServerOpts returns proper settings when exposing the resolver through an HTTP endpoint.

Jump to

Keyboard shortcuts

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