Documentation
¶
Overview ¶
Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func AddNetworkFlagsToCmd(cmd *cobra.Command, networkFlags *NetworkFlags, addEndpoint bool, ...)
- func GetNetworkFlagsGroup(cmd *cobra.Command, networkFlags *NetworkFlags, addEndpoint bool, ...) flags.GroupedFlags
- func GetNetworkFromCmdLineFlags(app *application.Lux, promptStr string, networkFlags NetworkFlags, ...) (models.Network, error)
- type CustomEndpointNetwork
- type NetworkFlags
- type NetworkOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultSupportedNetworkOptions = []NetworkOption{ Local, Devnet, Testnet, Mainnet, } NonLocalSupportedNetworkOptions = []NetworkOption{ Devnet, Testnet, Mainnet, } NonMainnetSupportedNetworkOptions = []NetworkOption{ Local, Devnet, Testnet, } LocalClusterSupportedNetworkOptions = []NetworkOption{ Local, Cluster, } )
Functions ¶
func AddNetworkFlagsToCmd ¶
func AddNetworkFlagsToCmd(cmd *cobra.Command, networkFlags *NetworkFlags, addEndpoint bool, supportedNetworkOptions []NetworkOption)
func GetNetworkFlagsGroup ¶
func GetNetworkFlagsGroup(cmd *cobra.Command, networkFlags *NetworkFlags, addEndpoint bool, supportedNetworkOptions []NetworkOption) flags.GroupedFlags
func GetNetworkFromCmdLineFlags ¶
func GetNetworkFromCmdLineFlags( app *application.Lux, promptStr string, networkFlags NetworkFlags, requireDevnetEndpointSpecification bool, onlyEndpointBasedDevnets bool, supportedNetworkOptions []NetworkOption, subnetName string, ) (models.Network, error)
Types ¶
type CustomEndpointNetwork ¶
CustomEndpointNetwork wraps a Network with a custom endpoint
func (*CustomEndpointNetwork) GetEndpoint ¶
func (c *CustomEndpointNetwork) GetEndpoint() string
GetEndpoint returns the custom endpoint
type NetworkFlags ¶
type NetworkOption ¶
type NetworkOption int64
const ( Undefined NetworkOption = iota Mainnet Testnet Local Devnet Cluster )
func GetNetworkFromSidecar ¶
func GetNetworkFromSidecar(sc models.Sidecar, defaultOption []NetworkOption) []NetworkOption
func GetSupportedNetworkOptionsForSubnet ¶
func GetSupportedNetworkOptionsForSubnet( app *application.Lux, subnetName string, supportedNetworkOptions []NetworkOption, ) ([]NetworkOption, []string, []string, error)
func NetworkOptionFromString ¶
func NetworkOptionFromString(s string) NetworkOption
func (NetworkOption) String ¶
func (n NetworkOption) String() string
Click to show internal directories.
Click to hide internal directories.