codebase

package module
v0.0.0-...-edb20bf Latest Latest
Warning

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

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

README

MassAI_BaseCode

Those Go funcs that are used in both MassAI_One and its Sattelites

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 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 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