Module util

Source

Structs§

DescribeElement
DescribeElementName
DescribeReducer
DescribeSchema
IdentityTokenJson
InitDefaultResult

Enums§

InitDefaultResultType
ModuleLanguage

Constants§

VALID_PROTOCOLS

Functions§

add_auth_header_opt
Add an authorization header, if provided, to the request builder.
contains_protocol
database_address
Determine the address of the database.
describe_reducer
detect_module_language
get_auth_header
Gets the auth_header for a request to the server depending on how you want to identify yourself. If you specify anon_identity = true then no auth_header is returned. If you specify an identity this function will try to find the identity in the config file. If no identity can be found, the program will exit(1). If you do not specify an identity this function will either get the default identity if one exists or create and save a new default identity returning the one that was just created.
get_auth_header_only
See get_auth_header.
host_or_url_to_host_and_protocol
init_default
is_hex_identity
print_identity_config
select_identity_config
Selects an identity_config from the config file. If you specify the identity it will either return the identity_config for the specified identity, or return an error if it cannot be found. If you do not specify an identity this function will either get the default identity if one exists or create and save a new default identity.
spacetime_dns
Converts a name to a database address.
spacetime_register_tld
Registers the given top level domain to the given identity. If None is passed in as identity, the default identity will be looked up in the config and it will be used instead. Returns Ok() if the domain is successfully registered, returns Err otherwise.
spacetime_reverse_dns
Returns all known names for the given address.
spacetime_server_fingerprint
unauth_error_context
url_to_host_and_protocol
y_or_n
Prompt the user for y or n from stdin.