tools

package
v0.0.0-...-fd84699 Latest Latest
Warning

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

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

Documentation

Overview

Package tools (info part)

Package tools (ngrok part)

Package tools for the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateNgrokTunnel

func ActivateNgrokTunnel(ctx context.Context, app *fiber.App)

ActivateNgrokTunnel creates a ngrok tunnel and writes its URL to a file.

It receives a context and a pointer to a fiber.App. It returns nothing.

This code creates an ngrok tunnel and writes the URL to a file named "ngrok.url" in the same directory as the executable file. The ActivateNgrokTunnel function takes in a context and a pointer to a Fiber application. It uses the ngrok package to create the tunnel, and then saves the tunnel URL to a file. Finally, it sets the Fiber application's listener to the created tunnel.

func GetEnv

func GetEnv(key, fallback string) string

GetEnv returns the environment variable

func GetNewHTTPPort

func GetNewHTTPPort() string

GetNewHTTPPort returns a unique http port

func GetVersion

func GetVersion() string

GetVersion returns the current version

func GetWasmFile

func GetWasmFile(wasmFilePath, wasmFileURL, authHeaderName, authHeaderValue string) ([]byte, error)

GetWasmFile load or downloads the wasm file

Types

This section is empty.

Jump to

Keyboard shortcuts

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