Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorizeApplicationContext()
- func AuthorizeOrganizationContext(persist bool)
- func BuildConfigKeyWithApp(keyPartial, appID string) string
- func BuildConfigKeyWithOrg(keyPartial, orgID string) string
- func BuildConfigKeyWithUser(keyPartial, userID string) string
- func CacheCommands(cmd *cobra.Command)
- func CmdExists(cmd *cobra.Command, args []string) (bool, string)
- func CmdExistsOrExit(cmd *cobra.Command, args []string)
- func EtherscanBaseURL(networkID string) *string
- func FreeInput(label string, defaultValue string, validation string) string
- func InfrastructureCredentialsConfigFactory() map[string]interface{}
- func InitConfig()
- func InitWorkgroupContract() *nchain.Contract
- func RegisterWorkgroupOrganization(applicationID string)
- func RequireAPIToken() string
- func RequireAccount(params map[string]interface{}) error
- func RequireApplication() error
- func RequireApplicationToken() string
- func RequireConnector(params map[string]interface{}) error
- func RequireContract(contractID, contractType *string, printCreationTxLink bool) error
- func RequireInfrastructureFlags(cmd *cobra.Command, withImage bool)
- func RequireNetwork() error
- func RequireOrganization() error
- func RequireOrganizationEndpoints(fn func(), apiPort, messagingPort int)
- func RequireOrganizationKeypair(spec string) (*vault.Key, error)
- func RequireOrganizationToken() string
- func RequireOrganizationVault()
- func RequirePublicNetwork() error
- func RequireUserAuthToken() string
- func RequireVault() error
- func RequireWallet() error
- func RequireWorkgroup() error
- func ResolveCapabilities() (map[string]interface{}, error)
- func SelectInput(args []string, label string) string
Constants ¶
const ( ASCIIBanner = `` /* 853-byte string literal not displayed */ // Viper downcases key names, so hyphenating for better readability. // 'Partial' keys are to be combined with the application ID they are associated with. // and NOT used by themselves. AuthTokenConfigKey = "auth-token" // user-scoped API token key APIAccessTokenConfigKeyPartial = "api-token" // app- or org-scoped API token key APIRefreshTokenConfigKeyPartial = "api-refresh-token" // app- or org-scoped API token key AccountConfigKeyPartial = "account" // app-scoped account ID key OrganizationConfigKeyPartial = "organization" // app-scoped organization ID key WalletConfigKeyPartial = "wallet" // app-scoped HD wallet ID key )
const InfrastructureTargetAWS = "aws"
const InfrastructureTargetAzure = "azure"
Variables ¶
var ( Application *ident.Application ApplicationID string OrganizationID string Organization *ident.Organization UserID string User *ident.User AccountID string ConnectorID string ContractID string NetworkID string NodeID string WalletID string Verbose bool )
var ( EngineID string ProviderID string Region string TargetID string Image string HealthCheckPath string TaskRole string TCPIngressPorts string UDPIngressPorts string AWSAccessKeyID string AWSSecretAccessKey string AzureTenantID string AzureClientID string AzureClientSecret string )
var APIEndpoint string
var ApplicationAccessToken string
var CfgFile string
var ExposeAPITunnel bool
var ExposeMessagingTunnel bool
var MessagingEndpoint string
var OrganizationAccessToken string
var OrganizationRefreshToken string
var ResolvedBaselineOrgAddress string // HACK
var Tunnel bool
var VaultID string
Functions ¶
func AuthorizeApplicationContext ¶
func AuthorizeApplicationContext()
func AuthorizeOrganizationContext ¶
func AuthorizeOrganizationContext(persist bool)
func BuildConfigKeyWithApp ¶
BuildConfigKeyWithApp combines the given key partial and app ID according to a consistent convention. Returns an empty string if the given appID is empty. Viper's getters likewise return empty strings when passed an empty string.
func BuildConfigKeyWithOrg ¶
BuildConfigKeyWithOrg combines the given key partial and org ID according to a consistent convention. Returns an empty string if the given orgID is empty. Viper's getters likewise return empty strings when passed an empty string.
func BuildConfigKeyWithUser ¶
BuildConfigKeyWithUser combines the given key partial and user ID according to a consistent convention. Returns an empty string if the given userID is empty. Viper's getters likewise return empty strings when passed an empty string.
func CacheCommands ¶
func CmdExistsOrExit ¶
func EtherscanBaseURL ¶
func InfrastructureCredentialsConfigFactory ¶
func InfrastructureCredentialsConfigFactory() map[string]interface{}
func InitWorkgroupContract ¶
func RegisterWorkgroupOrganization ¶
func RegisterWorkgroupOrganization(applicationID string)
func RequireAPIToken ¶
func RequireAPIToken() string
func RequireAccount ¶
RequireAccount is equivalent to a required --account flag
func RequireApplication ¶
func RequireApplication() error
RequireApplication is equivalent to a required --application flag
func RequireApplicationToken ¶
func RequireApplicationToken() string
func RequireConnector ¶
RequireConnector is equivalent to a required --connector flag
func RequireContract ¶
func RequireNetwork ¶
func RequireNetwork() error
RequireNetwork is equivalent to a required --network flag
func RequireOrganization ¶
func RequireOrganization() error
RequireOrganization is equivalent to a required --organization flag
func RequireOrganizationEndpoints ¶
func RequireOrganizationEndpoints(fn func(), apiPort, messagingPort int)
RequireOrganizationEndpoints fn is the function to call after the tunnel has been established, prior to the runloop and signal handling is installed
func RequireOrganizationToken ¶
func RequireOrganizationToken() string
func RequireOrganizationVault ¶
func RequireOrganizationVault()
func RequirePublicNetwork ¶
func RequirePublicNetwork() error
RequirePublicNetwork is equivalent to a required --network flag; but list options filtered to show only public networks
func RequireUserAuthToken ¶
func RequireUserAuthToken() string
func RequireWallet ¶
func RequireWallet() error
RequireWallet is equivalent to a required --wallet flag
func RequireWorkgroup ¶
func RequireWorkgroup() error
RequireWorkgroup is equivalent to a required --workgroup flag (yes, this is identical to RequireApplication() with exception to the Printf content...)
func ResolveCapabilities ¶
func SelectInput ¶
Types ¶
This section is empty.