utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastToPrimitiveTypes

func CastToPrimitiveTypes(args map[string]interface{}) map[string]interface{}

CastToPrimitiveTypes casts the values of a map to its primitive type (e.g. time.Duration to float64) to prevent structpb invalid type(s) errors.

func NewCommand

func NewCommand(cmd string, args []string, env []string) *exec.Cmd

NewCommand returns a command with the given arguments and environment variables.

func SHA256SUM

func SHA256SUM(filename string) (string, *gerr.GatewayDError)

SHA256SUM returns the sha256 checksum of a file. Ref: https://github.com/codingsince1985/checksum A little copying is better than a little dependency.

func Verify

func Verify(params, returnVal *structpb.Struct) bool

Verify compares two structs and returns true if they are equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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