# Functions
CheckPasswordHash compares a password hash generated by CreatePasswordHash() with a given plaintext password.
CountIpsInInput calculates the amount of possible IP addresses within a network range.
CreatePasswordHash creates a salted password hash from a given password.
GenerateToken generates a random string based allowed letters and a given length.
GetLocalIp retrieves the IP address of the local default interface.
GetOutboundIP gets preferred outbound ip of this machine by initializing a logical (fake) connection and reading the local address from it.
HashScramSha256Postgres generates a Scram-Sha-256 hash in the format used by Postgres for storing user passwords.
IntContained checks whether a given int value is contained within one or multiple given slices.
IsConnectionError detects whether a given error is one of the many types and sources of connectivity errors.
IsPlausibleEmail validates whether a given string is a plausible e-mail address.
IsRpcConnectionError validates a given error and checks whether it is a kind of error indicating connectivity issues.
JoinInt converts a slice of ints into strings and concatenates them using the given delimiter.
JoinUint64 converts a slice of int64's into strings and concatenates them using the given delimiter.
JoinWeekdays converts weekday integers into string and concatenates them using the given delimiter.
JsonToStruct parses JSON data (e.g.
NewGracy yields a fresh Gracy keeping track of registered shutdown functions.
NewNotifier initializes a new notifier that can be subscribed to.
NewRpcClient prepares an RPC client struct providing connectivity to an RPC server.
NewSystemMonitor initializes a new system resources monitor, regularly measuring the system utilization.
RemoveFromSlice removes a given element (and potential duplicates) from a slice and returns a new slice.
ServeRpc loops to accept and process RPC connections until the passed context is terminated.
SslSocket initializes an SSL socket listening for RPC connections.
TimeInRange decides whether a given time is between two clocks, ignoring dates.
TimezonesBetween calculates timezones that have a current time between earliest and latest.
TlsConfigFactory returns a secure SSL connection configuration.
TlsConfigFactoryPinned returns an SSL client configuration that is verified by fingerprint matching against a provided public key file.
ToSlice splits a string by separator.
ToValidUtf8String returns a valid utf-8 string by replacing all invalid byte sequences with a hardcoded replacement character.
TrimToUpper converts slice elements to upper case and trim whitespaces.
Uint64Contained checks whether a given int64 value is contained within one or multiple given slices.
UniqueInts gets rid of redundant elements.
UniqueWeekdays gets rid of redundant elements.
ValidPassword checks whether a given string matches password requirements.
ValidUtf8String returns a valid utf-8 string by replacing all invalid byte sequences with a hardcoded replacement character.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
Error indicating that the RPC client is incompatible and needs to be updated.
Error indicating connectivity error which might be gone already or temporary.
Generic error returned by the RPC client, which may not contain sensitive details.
# Structs
No description provided by the author
Gracy handles our graceful shutdown procedure.
Notifier allows to send a notification message to all current subscribers.
No description provided by the author
No description provided by the author
No description provided by the author