network

package
v0.68.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 2 Imported by: 1

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    GRPCConfig    `json:"grpc"`
	REST    RESTConfig    `json:"rest"`
	GraphQL GraphQLConfig `json:"graphQl"`
}

type AppsConfig added in v0.68.0

type AppsConfig struct {
	Console   string `json:"console"`
	TokenDApp string `json:"tokenDApp"`
	Explorer  string `json:"explorer"`
}

type DoesNotExistError added in v0.55.0

type DoesNotExistError struct {
	Name string
}

func NewDoesNotExistError added in v0.55.0

func NewDoesNotExistError(n string) DoesNotExistError

func (DoesNotExistError) Error added in v0.55.0

func (e DoesNotExistError) Error() string

type GRPCConfig

type GRPCConfig struct {
	Hosts   []string `json:"hosts"`
	Retries uint64   `json:"retries"`
}

type GraphQLConfig

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

type Metadata added in v0.68.0

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 RESTConfig

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

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