config

package
v0.0.0-...-683fbd4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Overview

******************************************************************************

  • Copyright 2021 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration interface {
	AsString() string
}

type HashInfo

type HashInfo struct {
	Type contracts.HashType `json:"type,omitempty" yaml:"type"`
}

func (*HashInfo) UnmarshalJSON

func (h *HashInfo) UnmarshalJSON(data []byte) (err error)

func (*HashInfo) UnmarshalYAML

func (h *HashInfo) UnmarshalYAML(data *yaml.Node) (err error)

type HederaConfig

type HederaConfig struct {
	NetType                contracts.NetType `json:"netType,omitempty"    yaml:"netType"`
	Consensus              ServiceInfo       `json:"consensus,omitempty" yaml:"consensus"` // Only populated when NetType is "local"
	Mirror                 ServiceInfo       `json:"mirror,omitempty"   yaml:"mirror"`     // Only populated when NetType is "local"
	AccountId              string            `json:"accountId,omitempty"  yaml:"accountId"`
	PrivateKeyPath         string            `json:"privateKeyPath,omitempty" yaml:"privateKeyPath"`
	Topics                 []string          `json:"topics,omitempty"     yaml:"topics"`
	DefaultMaxTxFee        float64           `json:"defaultMaxTxFee,omitempty" yaml:"defaultMaxTxFee"`
	DefaultMaxQueryPayment float64           `json:"defaultMaxQueryPayment,omitempty" yaml:"defaultMaxQueryPayment"`
	ShouldBroadcastTopic   bool              `json:"shouldBroadcastTopic,omitempty" yaml:"shouldBroadcastTopic"`

	// TODO (Ali Amin): Add support for other providers
	BroadcastStream MqttConfig `json:"broadcastStream,omitempty" yaml:"broadcastStream"`
}

type KeyInfo

type KeyInfo struct {
	Type contracts.KeyAlgorithm `json:"type,omitempty" yaml:"type"` // Type indicates the algorithm used to generate the key
	Path string                 `json:"path,omitempty" yaml:"path"` // Path indicates the filesystem path to the key.

}

func (*KeyInfo) UnmarshalJSON

func (k *KeyInfo) UnmarshalJSON(data []byte) (err error)

func (*KeyInfo) UnmarshalYAML

func (k *KeyInfo) UnmarshalYAML(data *yaml.Node) (err error)

type LoggingInfo

type LoggingInfo struct {
	MinLogLevel slog.Level `json:"minLogLevel,omitempty"`
}

type MockStreamConfig

type MockStreamConfig struct {
	Provider ServiceInfo `json:"provider,omitempty" yaml:"provider"`
}

MockStreamConfig exposes properties to simulate a stream connection for testing.

type MqttConfig

type MqttConfig struct {
	ClientId  string      `json:"clientId,omitempty" yaml:"clientId"`
	Qos       int         `json:"qos,omitempty" yaml:"qos"`
	User      string      `json:"user,omitempty" yaml:"user"`
	Password  string      `json:"password,omitempty" yaml:"password"`
	Provider  ServiceInfo `json:"provider,omitempty" yaml:"provider"`
	Cleanness bool        `json:"cleanness,omitempty" yaml:"cleanness"`
	Topics    []string    `json:"topics,omitempty" yaml:"topics"`
}

MqttConfig exposes properties relevant to connecting to an existing MQTT broker

type SdkInfo

type SdkInfo struct {
	Annotators []contracts.AnnotationType `json:"annotators,omitempty" yaml:"annotators"`
	Hash       HashInfo                   `json:"hash,omitempty" yaml:"hash"`
	Signature  SignatureInfo              `json:"signature,omitempty" yaml:"signature"`
	Stream     StreamInfo                 `json:"stream,omitempty" yaml:"stream"`
	Layer      contracts.LayerType        `json:"layer,omitempty" yaml:"layer"`
}

func (*SdkInfo) UnmarshalJSON

func (s *SdkInfo) UnmarshalJSON(data []byte) (err error)

func (*SdkInfo) UnmarshalYAML

func (s *SdkInfo) UnmarshalYAML(data *yaml.Node) (err error)

type ServiceInfo

type ServiceInfo struct {
	Host     string `json:"host,omitempty" yaml:"host"`
	Port     int    `json:"port,omitempty" yaml:"port"`
	Protocol string `json:"protocol,omitempty" yaml:"protocol"`
}

ServiceInfo describes a service endpoint that the deployed service is a client of. Right now, this is implicitly an HTTP interaction

func (ServiceInfo) Address

func (s ServiceInfo) Address() string

Address constructs a string representing the hostname/IP and port of a given endpoint

func (ServiceInfo) Uri

func (s ServiceInfo) Uri() string

Uri constructs a string from the populated elements of the ServiceInfo

type SignatureInfo

type SignatureInfo struct {
	PublicKey  KeyInfo `json:"public,omitempty" yaml:"public"`
	PrivateKey KeyInfo `json:"private,omitempty" yaml:"private"`
}

type StreamInfo

type StreamInfo struct {
	Type   contracts.StreamType `json:"type,omitempty" yaml:"type"`
	Config interface{}          `json:"config,omitempty" yaml:"config"`
}

StreamInfo facilitates configuration of a given streaming platform that will receive annotations

func (*StreamInfo) UnmarshalJSON

func (s *StreamInfo) UnmarshalJSON(data []byte) (err error)

func (*StreamInfo) UnmarshalYAML

func (s *StreamInfo) UnmarshalYAML(data *yaml.Node) (err error)

Jump to

Keyboard shortcuts

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