utils

package
v0.0.0-...-02b76df Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNetwork

func CreateNetwork(ctx *pulumi.Context, nwName string) (*docker.Network, error)

Create network

func GetDefaultNetworkName

func GetDefaultNetworkName(ctx *pulumi.Context) string

func GetEnvList

func GetEnvList(ctx *pulumi.Context, p string) ([]string, error)

GetEnvList fetches the list of environment variables for a given prefix

func GetEnvVars

func GetEnvVars(ctx *pulumi.Context, p string) (out []string, err error)

GetEnvVars fetches all of the specified environment variables for a given prefix

func GetVars

func GetVars(ctx *pulumi.Context, p string, envVars []string) (out []string)

GetVars fetches the environment variables as the expected string format in an array given the prefix and the envVar name

func RemovePrefix

func RemovePrefix(s string) string

RemovePrefix filters out any prefixes attached to keys from the core node (if present)

Types

type FlowReport

type FlowReport []struct {
	Name string `json:"name"`
	Txs  []struct {
		Contract string `json:"contract"`
		Hash     string `json:"hash"`
		Success  bool   `json:"success"`
	}
	Data   map[string]string `json:"data"`
	StepId int               `json:"stepId"`
}

type Gauntlet

type Gauntlet struct {
	// contains filtered or unexported fields
}

func NewGauntlet

func NewGauntlet(path string) (Gauntlet, error)

func (Gauntlet) ExecCommand

func (g Gauntlet) ExecCommand(arg ...string) error

func (Gauntlet) Flag

func (g Gauntlet) Flag(flag string, value string) string

func (Gauntlet) ReadCommandFlowReport

func (g Gauntlet) ReadCommandFlowReport() (FlowReport, error)

func (Gauntlet) ReadCommandReport

func (g Gauntlet) ReadCommandReport() (Report, error)

type Image

type Image struct {
	Name  string
	Tag   string
	Img   *docker.RemoteImage
	Local *docker.Image
}

Image implements the struct for fetching images

func (*Image) Build

func (i *Image) Build(ctx *pulumi.Context, context string, dockerfile string) error

Build the image for the specified dockerfile in the YAML config

func (*Image) Pull

func (i *Image) Pull(ctx *pulumi.Context) error

Pull retrieves the specified container image

type Report

type Report struct {
	Responses []struct {
		Tx struct {
			Hash    string `json:"hash"`
			Address string `json:"address"`
		}
		Contract string `json:"contract"`
	} `json:"responses"`
	Data map[string]string `json:"data"`
}

type Status

type Status struct {
	// contains filtered or unexported fields
}

Status provides logging during setup

func LogStatus

func LogStatus(input string) Status

LogStatus creates the status object

func (*Status) Check

func (s *Status) Check(e error) error

Check parses and prints accordingly

func (Status) Exists

func (s Status) Exists()

Exists prints an additional note when called

Jump to

Keyboard shortcuts

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