codebase

package
v0.0.0-...-d13aec0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoEntityRegistered   = "Entity registered correctly"
	InfoEntityUnregistered = "Entity unregistered correctly"
	InfoEntityConnected    = "Entity connected correctly"
	InfoEntityDisconnected = "Entity disconnected correctly"
	InfoInputDataSent      = "Data sent correctly"
	InfoOutputDataValid    = "Data outputs valid"

	ErrorAlreadyRegistered      = "Entity already registered"
	ErrorNotRegistered          = "Entity not registered"
	ErrorValueNotPositive       = "Value is not a positive number"
	ErrorLengthInvalid          = "length specified is invalid"
	ErrorEntityNotConnected     = "Entity not connected"
	ErrorEntityAlreadyConnected = "Entity already connected"
	ErrorCodingFailed           = "Encoding / Decoding failed"
)

Variables

This section is empty.

Functions

func Base64ToByteSlice

func Base64ToByteSlice(data string) ([]byte, error)

func BuildConnectURL

func BuildConnectURL(baseURL, entityID string) string

func BuildDisconnectURL

func BuildDisconnectURL(baseURL, entityID string) string

func BuildGetOutputsURL

func BuildGetOutputsURL(baseURL, entityID string) string

func BuildRegisterURL

func BuildRegisterURL(baseURL, entityID, bytesIn, bytesOut string) string

func BuildSendInputsURL

func BuildSendInputsURL(baseURL, entityID, stringLength string) string

func BuildUnregisterURL

func BuildUnregisterURL(baseURL, entityID string) string

func ByteSliceToBase64URL

func ByteSliceToBase64URL(data []byte) string

func CreateFolder

func CreateFolder(folderPath string) error

func DisplayAndOptionallyExit

func DisplayAndOptionallyExit(errorMessage string, exit bool)

func NewGUID

func NewGUID() string

func RandomBytes

func RandomBytes(numBytes int) ([]byte, error)

func RuneToSignals

func RuneToSignals(r rune) ([]bool, bool)

RuneToSignals translates a single rune into 32 separate parallel signals represented as a slice of booleans

func SendRequest

func SendRequest(url string)

func SignalsToRune

func SignalsToRune(signals []bool) (rune, bool)

SignalsToRune reconstructs a single rune from 32 separate parallel signals represented as a slice of booleans

func WriteToBody

func WriteToBody(w http.ResponseWriter, message string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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