network

package
v0.0.0-...-589da53 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkDoesNotHaveGRPCHostConfigured = errors.New("network configuration does not have any gRPC host set")

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	GRPC    HostConfig `json:"grpc"`
	REST    HostConfig `json:"rest"`
	GraphQL HostConfig `json:"graphQL"`
}

type AppsConfig

type AppsConfig struct {
	Console    string `json:"console"`
	Governance string `json:"governance"`
	Explorer   string `json:"explorer"`
}

type DoesNotExistError

type DoesNotExistError struct {
	Name string
}

func NewDoesNotExistError

func NewDoesNotExistError(n string) DoesNotExistError

func (DoesNotExistError) Error

func (e DoesNotExistError) Error() string

type HostConfig

type HostConfig struct {
	Hosts []string `json:"hosts"`
}

type Metadata

type Metadata struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Network

type Network struct {
	Name     string     `json:"name"`
	Metadata []Metadata `json:"metadata"`
	API      APIConfig  `json:"api"`
	Apps     AppsConfig `json:"apps"`
}

func GetNetwork

func GetNetwork(store Store, name string) (*Network, error)

func (*Network) EnsureCanConnectGRPCNode

func (n *Network) EnsureCanConnectGRPCNode() error

type Store

type Store interface {
	NetworkExists(string) (bool, error)
	GetNetwork(string) (*Network, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store
v1

Jump to

Keyboard shortcuts

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