Compare commits

...

21 Commits

Author SHA1 Message Date
690b1b68c3 bump version to 1.0.7 2025-02-08 15:17:47 +01:00
6e619622d2 ... 2025-02-08 14:11:51 +01:00
eb38bc5e60 bump version to 1.0.6 2025-02-08 14:07:15 +01:00
b0da6d1bd2 ... 2025-02-08 09:54:29 +03:00
1377953dcf ... 2025-02-07 16:40:44 +03:00
aa85172700 Merge branch 'development_hetzner' into development_webdav 2025-02-07 13:00:16 +03:00
eff269e911 Merge branch 'development' into development_hetzner 2025-02-07 12:55:30 +03:00
65ec6ee1a3 Merge branch 'development_hetzner' of https://github.com/freeflowuniverse/herolib into development_hetzner 2025-02-07 12:55:21 +03:00
a86b23b2e9 release 2025-02-07 12:52:49 +03:00
bcccd5f247 Merge branch 'development' 2025-02-07 12:52:29 +03:00
cb8c550ed1 chore: bump version to 1.0.5 2025-02-07 12:38:49 +03:00
5fc7019dcc chore: bump version to 1.0.4 2025-02-07 12:30:56 +03:00
8c9248fd94 ... 2025-02-07 12:25:15 +03:00
d1a5f1c268 ... 2025-02-07 12:22:23 +03:00
4a2753d32c refactor(webdav): remove lock_manager from webdav app
- Remove unused `lock_manager` from the `App` struct.
- Comment out the lock and unlock handlers.
- Improve `propfind` response XML generation.
- Fix path handling in `generate_response_element`.
- Update content type handling for files.
- Improve XML generation for resource responses.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-06 15:37:21 +02:00
1c0535a8b4 WIP: Implement WebDAV server
- Add a WebDAV server implementation using the `vweb` framework.
- The server supports basic authentication, request logging, and essential WebDAV methods.
- Implements file operations, authentication, and request logging.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-03 18:02:16 +02:00
a0c253fa05 refactor(tfgrid3deployer): simplify Hetzner node filtering
- Remove `get_hetzner_farm_ids` function.
- Directly filter nodes using the `features` field.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-03 13:57:46 +02:00
17a67870ef WIP(tfgrid3deployer): Support deploying on hetzner nodes
- Add support for deploying VMs, ZDBs, and gateways on Hetzner nodes.
- Introduce `use_hetzner_node` flag to VM, ZDB, and WebName.
- Update `filter_nodes` to filter by Hetzner farm IDs if `on_hetzner` flag is set.
- Implement `get_hetzner_farm_ids` function (currently a placeholder).

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 18:25:04 +02:00
54cfd4c353 feat: add ip-api client
- Add a new ip-api client to the project.
- This client uses the ip-api.com API to get IP information.
- An example is provided in `examples/develop/ipapi`.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 18:04:00 +02:00
717eb1e7d8 WIP: feat: add Hetzner deployment example
- Added a new example demonstrating deployment on Hetzner using the `tfgrid3deployer`.
- The example creates a VM and adds a webname.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 17:29:53 +02:00
03f5885980 Merge pull request #38 from freeflowuniverse/development
dev main
2025-01-28 09:49:18 +03:00
295 changed files with 1775 additions and 33409 deletions

View File

@@ -5,9 +5,7 @@ permissions:
on:
push:
branches: ["main","development"]
workflow_dispatch:
branches: ["main","development"]
jobs:
build:

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ vls.*
vls.log
node_modules/
docs/
vdocs/
photonwrapper.so
x
.env

View File

@@ -6,7 +6,7 @@
## hero install for users
```bash
curl https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development_kristof10/install_hero.sh > /tmp/install_hero.sh
curl https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development/install_hero.sh > /tmp/install_hero.sh
bash /tmp/install_hero.sh
```
@@ -16,7 +16,7 @@ this tool can be used to work with git, build books, play with hero AI, ...
## automated install for developers
```bash
curl 'https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/main/install_v.sh' > /tmp/install_v.sh
curl 'https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development/install_v.sh' > /tmp/install_v.sh
bash /tmp/install_v.sh --analyzer --herolib
#DONT FORGET TO START A NEW SHELL (otherwise the paths will not be set)
```

View File

@@ -31,7 +31,7 @@ fn do() ! {
mut cmd := Command{
name: 'hero'
description: 'Your HERO toolset.'
version: '1.0.2'
version: '1.0.7'
}
// herocmds.cmd_run_add_flags(mut cmd)
@@ -94,4 +94,4 @@ fn main() {
fn pre_func(cmd Command) ! {
herocmds.plbook_run(cmd)!
}
}

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -d use_openssl -enable-globals run
import freeflowuniverse.herolib.clients.ipapi
import os
mut ip_api_client := ipapi.get()!
info := ip_api_client.get_ip_info('37.27.132.46')!
println('info: ${info}')

View File

@@ -0,0 +1 @@
buildah_example

View File

@@ -1,15 +1,14 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.virt.herocontainers
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.installers.virt.pacman
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
mut installer := pacman.get()!
// installer.destroy()!
// installer.install()!
mut podman_installer0 := podman_installer.get()!
// podman_installer0.destroy()!
podman_installer0.install()!
// exit(0)

View File

@@ -2,7 +2,6 @@
import freeflowuniverse.herolib.virt.herocontainers
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core.base
// import freeflowuniverse.herolib.builder
import time
import os

View File

@@ -4,10 +4,11 @@ set -e
os_name="$(uname -s)"
arch_name="$(uname -m)"
version='1.0.7'
# Base URL for GitHub releases
base_url="https://github.com/freeflowuniverse/herolib/releases/download/v1.0.1"
base_url="https://github.com/freeflowuniverse/herolib/releases/download/v${version}"
# Select the URL based on the platform
if [[ "$os_name" == "Linux" && "$arch_name" == "x86_64" ]]; then
@@ -140,4 +141,4 @@ if [ "$file_size" -ge 2 ]; then
else
echo "Downloaded file is less than 10 MB. Process aborted."
exit 1
fi
fi

View File

@@ -0,0 +1,8 @@
!!hero_code.generate_client
name:'ipapi'
classname:'IPApi'
singleton:0
default:1
hasconfig:1
reset:0

View File

@@ -0,0 +1,29 @@
module ipapi
import json
pub struct IPInfo {
pub:
query string
status string
country string
country_code string @[json: 'countryCode']
region string
region_name string @[json: 'regionName']
city string
zip string
lat f32
lon f32
timezone string
isp string
org string
as string
}
pub fn (mut a IPApi) get_ip_info(ip string) !IPInfo {
mut conn := a.connection()!
res := conn.get_json(prefix: 'json/${ip}')!
info := json.decode(IPInfo, res)!
return info
}

View File

@@ -0,0 +1,102 @@
module ipapi
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.playbook
import freeflowuniverse.herolib.ui.console
__global (
ipapi_global map[string]&IPApi
ipapi_default string
)
/////////FACTORY
@[params]
pub struct ArgsGet {
pub mut:
name string
}
fn args_get(args_ ArgsGet) ArgsGet {
mut args := args_
if args.name == '' {
args.name = ipapi_default
}
if args.name == '' {
args.name = 'default'
}
return args
}
pub fn get(args_ ArgsGet) !&IPApi {
mut args := args_get(args_)
if args.name !in ipapi_global {
if args.name == 'default' {
if !config_exists(args) {
if default {
config_save(args)!
}
}
config_load(args)!
}
}
return ipapi_global[args.name] or {
println(ipapi_global)
panic('could not get config for ipapi with name:${args.name}')
}
}
fn config_exists(args_ ArgsGet) bool {
mut args := args_get(args_)
mut context := base.context() or { panic('bug') }
return context.hero_config_exists('ipapi', args.name)
}
fn config_load(args_ ArgsGet) ! {
mut args := args_get(args_)
mut context := base.context()!
mut heroscript := context.hero_config_get('ipapi', args.name)!
play(heroscript: heroscript)!
}
fn config_save(args_ ArgsGet) ! {
mut args := args_get(args_)
mut context := base.context()!
context.hero_config_set('ipapi', args.name, heroscript_default()!)!
}
fn set(o IPApi) ! {
mut o2 := obj_init(o)!
ipapi_global[o.name] = &o2
ipapi_default = o.name
}
@[params]
pub struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
pub fn play(args_ PlayArgs) ! {
mut args := args_
if args.heroscript == '' {
args.heroscript = heroscript_default()!
}
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
mut install_actions := plbook.find(filter: 'ipapi.configure')!
if install_actions.len > 0 {
for install_action in install_actions {
mut p := install_action.params
cfg_play(p)!
}
}
}
// switch instance to be used for ipapi
pub fn switch(name string) {
ipapi_default = name
}

View File

@@ -0,0 +1,58 @@
module ipapi
import freeflowuniverse.herolib.data.paramsparser
import freeflowuniverse.herolib.core.httpconnection
import os
pub const version = '1.14.3'
const singleton = false
const default = true
// TODO: THIS IS EXAMPLE CODE AND NEEDS TO BE CHANGED IN LINE TO STRUCT BELOW, IS STRUCTURED AS HEROSCRIPT
pub fn heroscript_default() !string {
heroscript := "
!!ipapi.configure
name:'default'
"
return heroscript
}
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
@[heap]
pub struct IPApi {
pub mut:
name string = 'default'
conn ?&httpconnection.HTTPConnection @[str: skip]
}
fn cfg_play(p paramsparser.Params) ! {
// THIS IS EXAMPLE CODE AND NEEDS TO BE CHANGED IN LINE WITH struct above
mut mycfg := IPApi{
name: p.get_default('name', 'default')!
}
set(mycfg)!
}
fn obj_init(obj_ IPApi) !IPApi {
// never call get here, only thing we can do here is work on object itself
mut obj := obj_
return obj
}
pub fn (mut client IPApi) connection() !&httpconnection.HTTPConnection {
mut c := client.conn or {
mut c2 := httpconnection.new(
name: 'ipapi_${client.name}'
url: 'http://ip-api.com'
cache: false
retry: 20
)!
c2
}
client.conn = c
return c
}

View File

@@ -0,0 +1,30 @@
# ipapi
To get started
```vlang
import freeflowuniverse.herolib.clients. ipapi
mut client:= ipapi.get()!
client...
```
## example heroscript
```hero
!!ipapi.configure
secret: '...'
host: 'localhost'
port: 8888
```

View File

@@ -115,11 +115,11 @@ fn install() ! {
console.print_header('install ${args.name}')
//THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
// mut url := ''
// if osal.is_linux_arm() {
// if core.is_linux_arm() {
// url = 'https://github.com/${args.name}-dev/${args.name}/releases/download/v??{version}/${args.name}_??{version}_linux_arm64.tar.gz'
// } else if osal.is_linux_intel() {
// } else if core.is_linux_intel() {
// url = 'https://github.com/${args.name}-dev/${args.name}/releases/download/v??{version}/${args.name}_??{version}_linux_amd64.tar.gz'
// } else if osal.is_osx_arm() {
// } else if core.is_osx_arm() {
// url = 'https://github.com/${args.name}-dev/${args.name}/releases/download/v??{version}/${args.name}_??{version}_darwin_arm64.tar.gz'
// } else if osal.is_osx_intel() {
// url = 'https://github.com/${args.name}-dev/${args.name}/releases/download/v??{version}/${args.name}_??{version}_darwin_amd64.tar.gz'

View File

@@ -54,9 +54,9 @@ pub fn v_analyzer_install(args_ InstallArgs) ! {
// if pl == .ubuntu {
// }else{
// mut url := ''
// if osal.is_linux_intel() {
// if core.is_linux_intel() {
// url = 'https://github.com/vlang/v-analyzer/releases/download/nightly/v-analyzer-linux-x86_64.zip'
// } else if osal.is_osx_arm() {
// } else if core.is_osx_arm() {
// url = 'https://github.com/vlang/v-analyzer/releases/download/nightly/v-analyzer-darwin-arm64.zip'
// } else if osal.is_osx_intel() {
// url = 'https://github.com/vlang/v-analyzer/releases/download/nightly/v-analyzer-darwin-x86_64.zip'

View File

@@ -1,12 +0,0 @@
!!hero_code.generate_installer
name:'buildah'
classname:'BuildahInstaller'
singleton:1
templates:0
default:1
title:''
supported_platforms:''
reset:0
startupmanager:0
hasconfig:0
build:0

View File

@@ -1,36 +0,0 @@
module buildah
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.installers.ulist
import freeflowuniverse.herolib.core
// checks if a certain version or above is installed
fn installed() !bool {
osal.execute_silent('buildah -v') or { return false }
return true
}
fn install() ! {
console.print_header('install buildah')
if core.platform()! != .ubuntu {
return error('Only ubuntu is supported for now')
}
cmd := 'sudo apt-get -y update && sudo apt-get -y install buildah'
osal.execute_stdout(cmd)!
console.print_header('Buildah Installed Successfuly')
}
// get the Upload List of the files
fn ulist_get() !ulist.UList {
// mut installer := get()!
// optionally build a UList which is all paths which are result of building, is then used e.g. in upload
return ulist.UList{}
}
fn destroy() ! {
osal.execute_stdout('sudo apt remove --purge -y buildah')!
}

View File

@@ -1,74 +0,0 @@
module buildah
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.playbook
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.sysadmin.startupmanager
import freeflowuniverse.herolib.osal.zinit
import time
__global (
buildah_global map[string]&BuildahInstaller
buildah_default string
)
/////////FACTORY
@[params]
pub struct ArgsGet {
pub mut:
name string
}
pub fn get(args_ ArgsGet) !&BuildahInstaller {
return &BuildahInstaller{}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////# LIVE CYCLE MANAGEMENT FOR INSTALLERS ///////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
fn startupmanager_get(cat zinit.StartupManagerType) !startupmanager.StartupManager {
// unknown
// screen
// zinit
// tmux
// systemd
match cat {
.zinit {
console.print_debug('startupmanager: zinit')
return startupmanager.get(cat: .zinit)!
}
.systemd {
console.print_debug('startupmanager: systemd')
return startupmanager.get(cat: .systemd)!
}
else {
console.print_debug('startupmanager: auto')
return startupmanager.get()!
}
}
}
@[params]
pub struct InstallArgs {
pub mut:
reset bool
}
pub fn (mut self BuildahInstaller) install(args InstallArgs) ! {
switch(self.name)
if args.reset || (!installed()!) {
install()!
}
}
pub fn (mut self BuildahInstaller) destroy() ! {
switch(self.name)
destroy()!
}
// switch instance to be used for buildah
pub fn switch(name string) {
buildah_default = name
}

View File

@@ -1,22 +0,0 @@
module buildah
const singleton = true
const default = true
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
@[heap]
pub struct BuildahInstaller {
pub mut:
name string = 'default'
}
fn obj_init(obj_ BuildahInstaller) !BuildahInstaller {
// never call get here, only thing we can do here is work on object itself
mut obj := obj_
return obj
}
// called before start if done
fn configure() ! {
// mut installer := get()!
}

View File

@@ -1,34 +0,0 @@
# buildah
To get started
```vlang
import freeflowuniverse.herolib.installers.something. buildah
mut installer:= buildah.get()!
installer.start()!
```
## example heroscript
```hero
!!buildah.install
homedir: '/home/user/buildah'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
```

View File

@@ -3,6 +3,7 @@ module pacman
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core
import os
// checks if a certain version or above is installed
@@ -19,7 +20,7 @@ fn install_() ! {
return
}
if core.platform() != .ubuntu {
if core.platform()! != .ubuntu {
return error('only ubuntu supported for this installer.')
}

View File

@@ -1,87 +1,101 @@
module podman
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core.texttools
import freeflowuniverse.herolib.core
import freeflowuniverse.herolib.installers.ulist
import os
// Check if Podman is installed
//////////////////// following actions are not specific to instance of the object
// checks if a certain version or above is installed
fn installed() !bool {
console.print_header('Checking if Podman is installed...')
result := os.execute('podman -v')
return result.exit_code == 0
res := os.execute('${osal.profile_path_source_and()!} podman -v')
if res.exit_code != 0 {
println(res)
return false
}
r := res.output.split_into_lines().filter(it.trim_space().len > 0)
if r.len != 1 {
return error("couldn't parse podman version.\n${res.output}")
}
if texttools.version(version) <= texttools.version(r[0].all_after("version")) {
return true
}
return false
}
//get the Upload List of the files
fn ulist_get() !ulist.UList {
//optionally build a UList which is all paths which are result of building, is then used e.g. in upload
return ulist.UList{}
}
fn upload() ! {
}
// Install Podman
fn install() ! {
if installed()! {
return error('Podman is already installed.')
}
console.print_header('install podman')
mut url := ''
if core.is_linux_arm()! || core.is_linux_intel()!{
osal.package_install("podman,buildah,crun,mmdebstrap")!
return
} else if core.is_linux_intel()! {
url = 'https://github.com/containers/podman/releases/download/v${version}/podman-installer-macos-arm64.pkg'
} else if core.is_osx_intel()! {
url = 'https://github.com/containers/podman/releases/download/v${version}/podman-installer-macos-amd64.pkg'
} else {
return error('unsported platform')
}
console.print_header('Installing Podman...')
platform := core.platform()!
command := get_platform_command(platform, 'install')!
execute_command(command, 'installing Podman')!
console.print_header('Podman installed successfully.')
mut dest := osal.download(
url: url
minsize_kb: 9000
expand_dir: '/tmp/podman'
)!
//dest.moveup_single_subdir()!
panic("implement")
}
// Remove Podman
fn destroy() ! {
if !installed()! {
return error('Podman is not installed.')
}
console.print_header('Removing Podman...')
platform := core.platform()!
command := get_platform_command(platform, 'remove')!
execute_command(command, 'removing Podman')!
console.print_header('Podman removed successfully.')
// mut systemdfactory := systemd.new()!
// systemdfactory.destroy("zinit")!
// osal.process_kill_recursive(name:'zinit')!
// osal.cmd_delete('zinit')!
osal.package_remove('
podman
conmon
buildah
skopeo
runc
')!
// //will remove all paths where go/bin is found
// osal.profile_path_add_remove(paths2delete:"go/bin")!
osal.rm("
podman
conmon
buildah
skopeo
runc
/var/lib/containers
/var/lib/podman
/var/lib/buildah
/tmp/podman
/tmp/conmon
")!
}
// Build Podman (install it)
fn build() ! {
install()!
}
// Get platform-specific commands for installing/removing Podman
fn get_platform_command(platform core.PlatformType, action string) !string {
return match platform {
.ubuntu {
if action == 'install' {
'sudo apt-get -y install podman'
} else if action == 'remove' {
'sudo apt-get -y remove podman'
} else {
return error('Invalid action: ${action}')
}
}
.arch {
if action == 'install' {
'sudo pacman -S --noconfirm podman'
} else if action == 'remove' {
'sudo pacman -R --noconfirm podman'
} else {
return error('Invalid action: ${action}')
}
}
.osx {
if action == 'install' {
'brew install podman'
} else if action == 'remove' {
'brew uninstall podman'
} else {
return error('Invalid action: ${action}')
}
}
else {
return error('Only Ubuntu, Arch, and macOS are supported.')
}
}
}
// Execute a shell command and handle errors
fn execute_command(command string, operation string) ! {
result := os.execute(command)
if result.exit_code != 0 {
return error('Failed ${operation}: ${result.output}')
}
}

View File

@@ -1,71 +1,124 @@
module podman
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.playbook
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.data.paramsparser
import freeflowuniverse.herolib.sysadmin.startupmanager
import freeflowuniverse.herolib.osal.zinit
import freeflowuniverse.herolib.ui.console
import time
__global (
podman_global map[string]&PodmanInstaller
podman_default string
podman_global map[string]&PodmanInstaller
podman_default string
)
/////////FACTORY
@[params]
pub struct ArgsGet {
pub struct ArgsGet{
pub mut:
name string = 'default'
name string
}
pub fn get(args_ ArgsGet) !&PodmanInstaller {
return &PodmanInstaller{}
pub fn get(args_ ArgsGet) !&PodmanInstaller {
return &PodmanInstaller{}
}
@[params]
pub struct PlayArgs {
pub mut:
heroscript string //if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
pub fn play(args_ PlayArgs) ! {
mut args:=args_
mut plbook := args.plbook or {
playbook.new(text: args.heroscript)!
}
mut other_actions := plbook.find(filter: 'podman.')!
for other_action in other_actions {
if other_action.name in ["destroy","install","build"]{
mut p := other_action.params
reset:=p.get_default_false("reset")
if other_action.name == "destroy" || reset{
console.print_debug("install action podman.destroy")
destroy()!
}
if other_action.name == "install"{
console.print_debug("install action podman.install")
install()!
}
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////# LIVE CYCLE MANAGEMENT FOR INSTALLERS ///////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
fn startupmanager_get(cat zinit.StartupManagerType) !startupmanager.StartupManager {
// unknown
// screen
// zinit
// tmux
// systemd
match cat {
.zinit {
console.print_debug('startupmanager: zinit')
return startupmanager.get(cat: .zinit)!
}
.systemd {
console.print_debug('startupmanager: systemd')
return startupmanager.get(cat: .systemd)!
}
else {
console.print_debug('startupmanager: auto')
return startupmanager.get()!
}
}
// unknown
// screen
// zinit
// tmux
// systemd
match cat{
.zinit{
console.print_debug("startupmanager: zinit")
return startupmanager.get(cat:.zinit)!
}
.systemd{
console.print_debug("startupmanager: systemd")
return startupmanager.get(cat:.systemd)!
}else{
console.print_debug("startupmanager: auto")
return startupmanager.get()!
}
}
}
@[params]
pub struct InstallArgs {
pub struct InstallArgs{
pub mut:
reset bool
reset bool
}
pub fn (mut self PodmanInstaller) install(args InstallArgs) ! {
switch(self.name)
if args.reset || !installed()! {
install()!
}
switch(self.name)
if args.reset || (!installed()!) {
install()!
}
}
pub fn (mut self PodmanInstaller) destroy() ! {
switch(self.name)
destroy()!
switch(self.name)
destroy()!
}
// switch instance to be used for podman
//switch instance to be used for podman
pub fn switch(name string) {
podman_default = name
podman_default = name
}
//helpers
@[params]
pub struct DefaultConfigArgs{
instance string = 'default'
}

View File

@@ -1,10 +1,40 @@
module podman
import freeflowuniverse.herolib.data.paramsparser
import freeflowuniverse.herolib.data.encoderhero
import os
pub const version = '4.9.3'
const singleton = true
const default = true
//THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
@[heap]
pub struct PodmanInstaller {
pub mut:
name string = 'default'
name string = 'default'
}
//your checking & initialization code if needed
fn obj_init(mycfg_ PodmanInstaller)!PodmanInstaller{
mut mycfg:=mycfg_
return mycfg
}
//called before start if done
fn configure() ! {
//mut installer := get()!
}
/////////////NORMALLY NO NEED TO TOUCH
pub fn heroscript_dumps(obj PodmanInstaller) !string {
return encoderhero.encode[PodmanInstaller ](obj)!
}
pub fn heroscript_loads(heroscript string) !PodmanInstaller {
mut obj := encoderhero.decode[PodmanInstaller](heroscript)!
return obj
}

View File

@@ -124,6 +124,9 @@ pub fn profile_path_source() !string {
// or empty if it doesn't exist
pub fn profile_path_source_and() !string {
p := profile_path_source() or { return '' }
if p.len==0{
return ""
}
return '${p} && '
}

View File

@@ -53,6 +53,10 @@ pub fn package_install(name_ string) ! {
platform_ := core.platform()!
cpu := core.cputype()!
mut sudo_pre:=""
if core.sudo_required()! {
sudo_pre="sudo "
}
if platform_ == .osx {
if cpu == .arm {
exec(cmd: 'arch --arm64 brew install ${name}') or {
@@ -64,37 +68,14 @@ pub fn package_install(name_ string) ! {
}
}
} else if platform_ == .ubuntu {
// Use sudo if required (based on user's permissions)
use_sudo := core.sudo_required()!
cmd := if use_sudo {
'sudo apt install -y ${name} -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --allow-downgrades --allow-remove-essential --allow-change-held-packages'
} else {
'apt install -y ${name} -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --allow-downgrades --allow-remove-essential --allow-change-held-packages'
}
exec(cmd: cmd) or {
return error('could not install package on Ubuntu: ${name}\nerror:\n${err}')
}
exec(cmd: 'export DEBIAN_FRONTEND=noninteractive && ${sudo_pre}apt install -y ${name} -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --allow-downgrades --allow-remove-essential --allow-change-held-packages')
or { return error('could not install package on Ubuntu: ${name}\nerror:\n${err}')}
} else if platform_ == .alpine {
// Use sudo if required
use_sudo := core.sudo_required()!
cmd := if use_sudo {
'sudo apk add ${name}'
} else {
'apk add ${name}'
}
exec(cmd: cmd) or {
exec(cmd: "${sudo_pre}apk add ${name}") or {
return error('could not install package on Alpine: ${name}\nerror:\n${err}')
}
} else if platform_ == .arch {
// Use sudo if required
use_sudo := core.sudo_required()!
cmd := if use_sudo {
'sudo pacman --noconfirm -Su ${name}'
} else {
'pacman --noconfirm -Su ${name}'
}
exec(cmd: cmd) or {
exec(cmd: '${sudo_pre}pacman --noconfirm -Su ${name}') or {
return error('could not install package on Arch: ${name}\nerror:\n${err}')
}
} else {

View File

@@ -135,6 +135,7 @@ fn (mut self TFDeployment) set_nodes() ! {
has_ipv6: if vm.requirements.public_ip6 { vm.requirements.public_ip6 } else { none }
status: 'up'
features: if vm.requirements.public_ip4 { ['zmachine'] } else { [] }
on_hetzner: vm.requirements.use_hetzner_node
)!
if nodes.len == 0 {
@@ -160,6 +161,7 @@ fn (mut self TFDeployment) set_nodes() ! {
healthy: true
node_id: zdb.requirements.node_id
available_for: u64(self.deployer.twin_id)
on_hetzner: zdb.requirements.use_hetzner_node
)!
if nodes.len == 0 {
@@ -183,6 +185,7 @@ fn (mut self TFDeployment) set_nodes() ! {
node_id: webname.requirements.node_id
available_for: u64(self.deployer.twin_id)
features: ['zmachine']
on_hetzner: webname.requirements.use_hetzner_node
)!
if nodes.len == 0 {

View File

@@ -42,16 +42,36 @@ fn get_mycelium() grid_models.Mycelium {
}
}
pub fn filter_nodes(filter gridproxy_models.NodeFilter) ![]gridproxy_models.Node {
@[params]
pub struct FilterNodesArgs {
gridproxy_models.NodeFilter
pub:
on_hetzner bool
}
pub fn filter_nodes(args FilterNodesArgs) ![]gridproxy_models.Node {
// Resolve the network configuration
net := resolve_network()!
// Create grid proxy client and retrieve the matching nodes
mut gp_client := gridproxy.new(net: net, cache: true)!
mut filter := args.NodeFilter
if args.on_hetzner {
filter.features << ['zmachine-light']
}
nodes := gp_client.get_nodes(filter)!
return nodes
}
// fn get_hetzner_node_ids(nodes []gridproxy_models.Node) ![]u64 {
// // get farm ids that are know to be hetzner's
// // if we need to iterate over all nodes, maybe we should use multi-threading
// panic('Not Implemented')
// return []
// }
fn convert_to_gigabytes(bytes u64) u64 {
return bytes * 1024 * 1024 * 1024
}

View File

@@ -26,7 +26,10 @@ pub mut:
flist string = 'https://hub.grid.tf/tf-official-vms/ubuntu-24.04-latest.flist'
entrypoint string = '/sbin/zinit init'
env map[string]string
nodes []u32 // if set will chose a node from the list to deploy on
// if set will chose a node from the list to deploy on
nodes []u32
// will deploy on one of hetzner nodes
use_hetzner_node bool
}
// MachineModel struct to represent a machine and its associat ed details

View File

@@ -8,9 +8,9 @@ pub mut:
name string @[required]
node_id ?u32
use_wireguard_network bool
use_hetzner_node bool
// must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]
backend string @[required]
use_wireguard bool
tls_passthrough bool
}

153
lib/vfs/webdav/README.md Normal file
View File

@@ -0,0 +1,153 @@
# **WebDAV Server in V**
This project implements a WebDAV server using the `vweb` framework and modules from `crystallib`. The server supports essential WebDAV file operations such as reading, writing, copying, moving, and deleting files and directories. It also includes **authentication** and **request logging** for better control and debugging.
---
## **Features**
- **File Operations**:
Supports standard WebDAV methods: `GET`, `PUT`, `DELETE`, `COPY`, `MOVE`, and `MKCOL` (create directory) for files and directories.
- **Authentication**:
Basic HTTP authentication using an in-memory user database (`username:password`).
- **Request Logging**:
Logs incoming requests for debugging and monitoring purposes.
- **WebDAV Compliance**:
Implements WebDAV HTTP methods with proper responses to ensure compatibility with WebDAV clients.
- **Customizable Middleware**:
Extend or modify middleware for custom logging, authentication, or request handling.
---
## **Usage**
### Running the Server
```v
module main
import freeflowuniverse.herolib.vfs.webdav
fn main() {
mut app := webdav.new_app(
root_dir: '/tmp/rootdir' // Directory to serve via WebDAV
user_db: {
'admin': 'admin' // Username and password for authentication
}
)!
app.run()
}
```
### **Mounting the Server**
Once the server is running, you can mount it as a WebDAV volume:
```bash
sudo mount -t davfs <server_url> <mount_point>
```
For example:
```bash
sudo mount -t davfs http://localhost:8080 /mnt/webdav
```
**Important Note**:
Ensure the `root_dir` is **not the same as the mount point** to avoid performance issues during operations like `ls`.
---
## **Supported Routes**
| **Method** | **Route** | **Description** |
|------------|--------------|----------------------------------------------------------|
| `GET` | `/:path...` | Retrieves the contents of a file. |
| `PUT` | `/:path...` | Creates a new file or updates an existing one. |
| `DELETE` | `/:path...` | Deletes a file or directory. |
| `COPY` | `/:path...` | Copies a file or directory to a new location. |
| `MOVE` | `/:path...` | Moves a file or directory to a new location. |
| `MKCOL` | `/:path...` | Creates a new directory. |
| `OPTIONS` | `/:path...` | Lists supported WebDAV methods. |
| `PROPFIND` | `/:path...` | Retrieves properties (e.g., size, date) of a file or directory. |
---
## **Authentication**
This WebDAV server uses **Basic Authentication**.
Set the `Authorization` header in your client to include your credentials in base64 format:
```http
Authorization: Basic <base64-encoded-credentials>
```
**Example**:
For the credentials `admin:admin`, the header would look like this:
```http
Authorization: Basic YWRtaW46YWRtaW4=
```
---
## **Configuration**
You can configure the WebDAV server using the following parameters when calling `new_app`:
| **Parameter** | **Type** | **Description** |
|-----------------|-------------------|---------------------------------------------------------------|
| `root_dir` | `string` | Root directory to serve files from. |
| `user_db` | `map[string]string` | A map containing usernames as keys and passwords as values. |
| `port` (optional) | `int` | The port on which the server will run. Defaults to `8080`. |
---
## **Example Workflow**
1. Start the server:
```bash
v run webdav_server.v
```
2. Mount the server using `davfs`:
```bash
sudo mount -t davfs http://localhost:8080 /mnt/webdav
```
3. Perform operations:
- Create a new file:
```bash
echo "Hello WebDAV!" > /mnt/webdav/hello.txt
```
- List files:
```bash
ls /mnt/webdav
```
- Delete a file:
```bash
rm /mnt/webdav/hello.txt
```
4. Check server logs for incoming requests and responses.
---
## **Performance Notes**
- Avoid mounting the WebDAV server directly into its own root directory (`root_dir`), as this can cause significant slowdowns for file operations like `ls`.
- Use tools like `cadaver`, `curl`, or `davfs` for interacting with the WebDAV server.
---
## **Dependencies**
- V Programming Language
- Crystallib VFS Module (for WebDAV support)
---
## **Future Enhancements**
- Support for advanced WebDAV methods like `LOCK` and `UNLOCK`.
- Integration with persistent databases for user credentials.
- TLS/SSL support for secure connections.

69
lib/vfs/webdav/app.v Normal file
View File

@@ -0,0 +1,69 @@
module webdav
import vweb
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.ui.console
@[heap]
struct App {
vweb.Context
user_db map[string]string @[required]
root_dir pathlib.Path @[vweb_global]
pub mut:
// lock_manager LockManager
server_port int
middlewares map[string][]vweb.Middleware
}
@[params]
pub struct AppArgs {
pub mut:
server_port int = 8080
root_dir string @[required]
user_db map[string]string @[required]
}
pub fn new_app(args AppArgs) !&App {
root_dir := pathlib.get_dir(path: args.root_dir, create: true)!
mut app := &App{
user_db: args.user_db.clone()
root_dir: root_dir
server_port: args.server_port
}
app.middlewares['/'] << logging_middleware
app.middlewares['/'] << app.auth_middleware
return app
}
@[params]
pub struct RunArgs {
pub mut:
background bool
}
pub fn (mut app App) run(args RunArgs) {
console.print_green('Running the server on port: ${app.server_port}')
if args.background {
spawn vweb.run(app, app.server_port)
} else {
vweb.run(app, app.server_port)
}
}
pub fn (mut app App) not_found() vweb.Result {
app.set_status(404, 'Not Found')
return app.text('Not Found')
}
pub fn (mut app App) server_error() vweb.Result {
app.set_status(500, 'Inernal Server Error')
return app.text('Internal Server Error')
}
pub fn (mut app App) bad_request(message string) vweb.Result {
app.set_status(400, 'Bad Request')
return app.text(message)
}

43
lib/vfs/webdav/auth.v Normal file
View File

@@ -0,0 +1,43 @@
module webdav
import vweb
import encoding.base64
fn (mut app App) auth_middleware(mut ctx vweb.Context) bool {
auth_header := ctx.get_header('Authorization')
if auth_header == '' {
ctx.set_status(401, 'Unauthorized')
ctx.add_header('WWW-Authenticate', 'Basic realm="WebDAV Server"')
ctx.send_response_to_client('', '')
return false
}
if !auth_header.starts_with('Basic ') {
ctx.set_status(401, 'Unauthorized')
ctx.add_header('WWW-Authenticate', 'Basic realm="WebDAV Server"')
ctx.send_response_to_client('', '')
return false
}
auth_decoded := base64.decode_str(auth_header[6..])
split_credentials := auth_decoded.split(':')
if split_credentials.len != 2 {
ctx.set_status(401, 'Unauthorized')
ctx.add_header('WWW-Authenticate', 'Basic realm="WebDAV Server"')
ctx.send_response_to_client('', '')
return false
}
username := split_credentials[0]
hashed_pass := split_credentials[1]
if app.user_db[username] != hashed_pass {
ctx.set_status(401, 'Unauthorized')
ctx.add_header('WWW-Authenticate', 'Basic realm="WebDAV Server"')
ctx.send_response_to_client('', '')
return false
}
return true
}

67
lib/vfs/webdav/bin/main.v Normal file
View File

@@ -0,0 +1,67 @@
import freeflowuniverse.herolib.vfs.webdav
import cli { Command, Flag }
import os
fn main() {
mut cmd := Command{
name: 'webdav'
description: 'Vlang Webdav Server'
}
mut app := Command{
name: 'webdav'
description: 'Vlang Webdav Server'
execute: fn (cmd Command) ! {
port := cmd.flags.get_int('port')!
directory := cmd.flags.get_string('directory')!
user := cmd.flags.get_string('user')!
password := cmd.flags.get_string('password')!
mut server := webdav.new_app(
root_dir: directory
server_port: port
user_db: {
user: password
}
)!
server.run()
return
}
}
app.add_flag(Flag{
flag: .int
name: 'port'
abbrev: 'p'
description: 'server port'
default_value: ['8000']
})
app.add_flag(Flag{
flag: .string
required: true
name: 'directory'
abbrev: 'd'
description: 'server directory'
})
app.add_flag(Flag{
flag: .string
required: true
name: 'user'
abbrev: 'u'
description: 'username'
})
app.add_flag(Flag{
flag: .string
required: true
name: 'password'
abbrev: 'pw'
description: 'user password'
})
app.setup()
app.parse(os.args)
}

87
lib/vfs/webdav/lock.v Normal file
View File

@@ -0,0 +1,87 @@
module webdav
import time
import rand
struct Lock {
resource string
owner string
token string
depth int // 0 for a single resource, 1 for recursive
timeout int // in seconds
created_at time.Time
}
struct LockManager {
mut:
locks map[string]Lock
}
pub fn (mut lm LockManager) lock(resource string, owner string, depth int, timeout int) !string {
if resource in lm.locks {
// Check if the lock is still valid
existing_lock := lm.locks[resource]
if time.now().unix() - existing_lock.created_at.unix() < existing_lock.timeout {
return existing_lock.token // Resource is already locked
}
// Expired lock, remove it
lm.unlock(resource)
}
// Generate a new lock token
token := rand.uuid_v4()
lm.locks[resource] = Lock{
resource: resource
owner: owner
token: token
depth: depth
timeout: timeout
created_at: time.now()
}
return token
}
pub fn (mut lm LockManager) unlock(resource string) bool {
if resource in lm.locks {
lm.locks.delete(resource)
return true
}
return false
}
pub fn (lm LockManager) is_locked(resource string) bool {
if resource in lm.locks {
lock_ := lm.locks[resource]
// Check if lock is expired
if time.now().unix() - lock_.created_at.unix() >= lock_.timeout {
return false
}
return true
}
return false
}
pub fn (mut lm LockManager) unlock_with_token(resource string, token string) bool {
if resource in lm.locks {
lock_ := lm.locks[resource]
if lock_.token == token {
lm.locks.delete(resource)
return true
}
}
return false
}
fn (mut lm LockManager) lock_recursive(resource string, owner string, depth int, timeout int) !string {
if depth == 0 {
return lm.lock(resource, owner, depth, timeout)
}
// Implement logic to lock child resources if depth == 1
return ''
}
pub fn (mut lm LockManager) cleanup_expired_locks() {
// now := time.now().unix()
// lm.locks
// lm.locks = lm.locks.filter(it.value.created_at.unix() + it.value.timeout > now)
}

13
lib/vfs/webdav/logging.v Normal file
View File

@@ -0,0 +1,13 @@
module webdav
import vweb
import freeflowuniverse.herolib.ui.console
fn logging_middleware(mut ctx vweb.Context) bool {
console.print_green('=== New Request ===')
console.print_green('Method: ${ctx.req.method.str()}')
console.print_green('Path: ${ctx.req.url}')
console.print_green('Headers: ${ctx.req.header}')
console.print_green('')
return true
}

259
lib/vfs/webdav/methods.v Normal file
View File

@@ -0,0 +1,259 @@
module webdav
import vweb
import os
import freeflowuniverse.herolib.core.pathlib
import encoding.xml
import freeflowuniverse.herolib.ui.console
import net.urllib
// @['/:path...'; LOCK]
// fn (mut app App) lock_handler(path string) vweb.Result {
// // Not yet working
// // TODO: Test with multiple clients
// resource := app.req.url
// owner := app.get_header('Owner')
// if owner.len == 0 {
// return app.bad_request('Owner header is required.')
// }
// depth := if app.get_header('Depth').len > 0 { app.get_header('Depth').int() } else { 0 }
// timeout := if app.get_header('Timeout').len > 0 { app.get_header('Timeout').int() } else { 3600 }
// token := app.lock_manager.lock(resource, owner, depth, timeout) or {
// app.set_status(423, 'Locked')
// return app.text('Resource is already locked.')
// }
// app.set_status(200, 'OK')
// app.add_header('Lock-Token', token)
// return app.text('Lock granted with token: ${token}')
// }
// @['/:path...'; UNLOCK]
// fn (mut app App) unlock_handler(path string) vweb.Result {
// // Not yet working
// // TODO: Test with multiple clients
// resource := app.req.url
// token := app.get_header('Lock-Token')
// if token.len == 0 {
// console.print_stderr('Unlock failed: `Lock-Token` header required.')
// return app.bad_request('Unlock failed: `Lock-Token` header required.')
// }
// if app.lock_manager.unlock_with_token(resource, token) {
// app.set_status(204, 'No Content')
// return app.text('Lock successfully released')
// }
// console.print_stderr('Resource is not locked or token mismatch.')
// app.set_status(409, 'Conflict')
// return app.text('Resource is not locked or token mismatch')
// }
@['/:path...'; get]
fn (mut app App) get_file(path string) vweb.Result {
mut file_path := pathlib.get_file(path: app.root_dir.path + path) or { return app.not_found() }
if !file_path.exists() {
return app.not_found()
}
file_data := file_path.read() or {
console.print_stderr('failed to read file ${file_path.path}: ${err}')
return app.server_error()
}
ext := os.file_ext(file_path.path)
content_type := if v := vweb.mime_types[ext] {
v
} else {
'text/plain'
}
app.set_status(200, 'Ok')
app.send_response_to_client(content_type, file_data)
return vweb.not_found() // this is for returning a dummy result
}
@['/:path...'; delete]
fn (mut app App) delete(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if !p.exists() {
return app.not_found()
}
if p.is_dir() {
console.print_debug('deleting directory: ${p.path}')
os.rmdir_all(p.path) or { return app.server_error() }
}
if p.is_file() {
console.print_debug('deleting file: ${p.path}')
os.rm(p.path) or { return app.server_error() }
}
console.print_debug('entry: ${p.path} is deleted')
app.set_status(204, 'No Content')
return app.text('entry ${p.path} is deleted')
}
@['/:path...'; put]
fn (mut app App) create_or_update(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if p.is_dir() {
console.print_stderr('Cannot PUT to a directory: ${p.path}')
app.set_status(405, 'Method Not Allowed')
return app.text('HTTP 405: Method Not Allowed')
}
file_data := app.req.data
p = pathlib.get_file(path: p.path, create: true) or {
console.print_stderr('failed to get file ${p.path}: ${err}')
return app.server_error()
}
p.write(file_data) or {
console.print_stderr('failed to write file data ${p.path}: ${err}')
return app.server_error()
}
app.set_status(200, 'Successfully saved file: ${p.path}')
return app.text('HTTP 200: Successfully saved file: ${p.path}')
}
@['/:path...'; copy]
fn (mut app App) copy(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if !p.exists() {
return app.not_found()
}
destination := app.get_header('Destination')
destination_url := urllib.parse(destination) or {
return app.bad_request('Invalid Destination ${destination}: ${err}')
}
destination_path_str := destination_url.path
mut destination_path := pathlib.get(app.root_dir.path + destination_path_str)
if destination_path.exists() {
return app.bad_request('Destination ${destination_path.path} already exists')
}
os.cp_all(p.path, destination_path.path, false) or {
console.print_stderr('failed to copy: ${err}')
return app.server_error()
}
app.set_status(200, 'Successfully copied entry: ${p.path}')
return app.text('HTTP 200: Successfully copied entry: ${p.path}')
}
@['/:path...'; move]
fn (mut app App) move(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if !p.exists() {
return app.not_found()
}
destination := app.get_header('Destination')
destination_url := urllib.parse(destination) or {
return app.bad_request('Invalid Destination ${destination}: ${err}')
}
destination_path_str := destination_url.path
mut destination_path := pathlib.get(app.root_dir.path + destination_path_str)
if destination_path.exists() {
return app.bad_request('Destination ${destination_path.path} already exists')
}
os.mv(p.path, destination_path.path) or {
console.print_stderr('failed to copy: ${err}')
return app.server_error()
}
app.set_status(200, 'Successfully moved entry: ${p.path}')
return app.text('HTTP 200: Successfully moved entry: ${p.path}')
}
@['/:path...'; mkcol]
fn (mut app App) mkcol(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if p.exists() {
return app.bad_request('Another collection exists at ${p.path}')
}
p = pathlib.get_dir(path: p.path, create: true) or {
console.print_stderr('failed to create directory ${p.path}: ${err}')
return app.server_error()
}
app.set_status(201, 'Created')
return app.text('HTTP 201: Created')
}
@['/:path...'; options]
fn (mut app App) options(path string) vweb.Result {
app.set_status(200, 'OK')
app.add_header('DAV', '1,2')
app.add_header('Allow', 'OPTIONS, PROPFIND, MKCOL, GET, HEAD, POST, PUT, DELETE, COPY, MOVE')
app.add_header('MS-Author-Via', 'DAV')
app.add_header('Access-Control-Allow-Origin', '*')
app.add_header('Access-Control-Allow-Methods', 'OPTIONS, PROPFIND, MKCOL, GET, HEAD, POST, PUT, DELETE, COPY, MOVE')
app.add_header('Access-Control-Allow-Headers', 'Authorization, Content-Type')
app.send_response_to_client('text/plain', '')
return vweb.not_found()
}
@['/:path...'; propfind]
fn (mut app App) propfind(path string) vweb.Result {
mut p := pathlib.get(app.root_dir.path + path)
if !p.exists() {
return app.not_found()
}
depth := app.get_header('Depth').int()
responses := app.get_responses(p.path, depth) or {
console.print_stderr('failed to get responses: ${err}')
return app.server_error()
}
doc := xml.XMLDocument{
root: xml.XMLNode{
name: 'D:multistatus'
children: responses
attributes: {
'xmlns:D': 'DAV:'
}
}
}
res := '<?xml version="1.0" encoding="UTF-8"?>${doc.pretty_str('').split('\n')[1..].join('')}'
// println('res: ${res}')
app.set_status(207, 'Multi-Status')
app.send_response_to_client('application/xml', res)
return vweb.not_found()
}
fn (mut app App) generate_element(element string, space_cnt int) string {
mut spaces := ''
for i := 0; i < space_cnt; i++ {
spaces += ' '
}
return '${spaces}<${element}>\n'
}
// TODO: implement
// @['/'; proppatch]
// fn (mut app App) prop_patch() vweb.Result {
// }
// TODO: implement, now it's used with PUT
// @['/'; post]
// fn (mut app App) post() vweb.Result {
// }

172
lib/vfs/webdav/prop.v Normal file
View File

@@ -0,0 +1,172 @@
module webdav
import freeflowuniverse.herolib.core.pathlib
import encoding.xml
import os
import time
import vweb
fn (mut app App) generate_response_element(path string, depth int) xml.XMLNode {
mut path_ := path.all_after(app.root_dir.path)
if !path_.starts_with('/') {
path_ = '/${path_}'
}
if os.is_dir(path) && path_ != '/' {
path_ = '${path_}/'
}
href := xml.XMLNode{
name: 'D:href'
children: [path_]
}
propstat := app.generate_propstat_element(path, depth)
return xml.XMLNode{
name: 'D:response'
children: [href, propstat]
}
}
fn (mut app App) generate_propstat_element(path string, depth int) xml.XMLNode {
mut status := xml.XMLNode{
name: 'D:status'
children: ['HTTP/1.1 200 OK']
}
prop := app.generate_prop_element(path, depth) or {
// TODO: status should be according to returned error
return xml.XMLNode{
name: 'D:propstat'
children: [
xml.XMLNode{
name: 'D:status'
children: ['HTTP/1.1 500 Internal Server Error']
},
]
}
}
return xml.XMLNode{
name: 'D:propstat'
children: [prop, status]
}
}
fn (mut app App) generate_prop_element(path string, depth int) !xml.XMLNode {
if !os.exists(path) {
return error('not found')
}
stat := os.stat(path)!
display_name := xml.XMLNode{
name: 'D:displayname'
children: ['${os.file_name(path)}']
}
content_length := if os.is_dir(path) { 0 } else { stat.size }
get_content_length := xml.XMLNode{
name: 'D:getcontentlength'
children: ['${content_length}']
}
ctime := format_iso8601(time.unix(stat.ctime))
creation_date := xml.XMLNode{
name: 'D:creationdate'
children: ['${ctime}']
}
mtime := format_iso8601(time.unix(stat.mtime))
get_last_mod := xml.XMLNode{
name: 'D:getlastmodified'
children: ['${mtime}']
}
content_type := match os.is_dir(path) {
true {
'httpd/unix-directory'
}
false {
app.get_file_content_type(path)
}
}
get_content_type := xml.XMLNode{
name: 'D:getcontenttype'
children: ['${content_type}']
}
mut get_resource_type_children := []xml.XMLNodeContents{}
if os.is_dir(path) {
get_resource_type_children << xml.XMLNode{
name: 'D:collection xmlns:D="DAV:"'
}
}
get_resource_type := xml.XMLNode{
name: 'D:resourcetype'
children: get_resource_type_children
}
mut nodes := []xml.XMLNodeContents{}
nodes << display_name
nodes << get_last_mod
nodes << get_content_type
nodes << get_resource_type
if !os.is_dir(path) {
nodes << get_content_length
}
nodes << creation_date
mut res := xml.XMLNode{
name: 'D:prop'
children: nodes.clone()
}
return res
}
fn (mut app App) get_file_content_type(path string) string {
ext := os.file_ext(path)
content_type := if v := vweb.mime_types[ext] {
v
} else {
'text/plain; charset=utf-8'
}
return content_type
}
fn format_iso8601(t time.Time) string {
return '${t.year:04d}-${t.month:02d}-${t.day:02d}T${t.hour:02d}:${t.minute:02d}:${t.second:02d}Z'
}
fn (mut app App) get_responses(path string, depth int) ![]xml.XMLNodeContents {
mut responses := []xml.XMLNodeContents{}
responses << app.generate_response_element(path, depth)
if depth == 0 {
return responses
}
if os.is_dir(path) {
mut dir := pathlib.get_dir(path: path) or {
app.set_status(500, 'failed to get directory ${path}: ${err}')
return error('failed to get directory ${path}: ${err}')
}
entries := dir.list(recursive: false) or {
app.set_status(500, 'failed to list directory ${path}: ${err}')
return error('failed to list directory ${path}: ${err}')
}
for entry in entries.paths {
responses << app.generate_response_element(entry.path, depth)
}
}
return responses
}

View File

@@ -0,0 +1,216 @@
module webdav
import net.http
import freeflowuniverse.herolib.core.pathlib
import time
import encoding.base64
import rand
fn test_run() {
root_dir := '/tmp/webdav'
mut app := new_app(
root_dir: root_dir
user_db: {
'mario': '123'
}
)!
app.run()
}
// fn test_get() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// file_name := 'newfile.txt'
// mut p := pathlib.get_file(path: '${root_dir}/${file_name}', create: true)!
// p.write('my new file')!
// mut req := http.new_request(.get, 'http://localhost:${app.server_port}/${file_name}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// response := req.do()!
// assert response.body == 'my new file'
// }
// fn test_put() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// file_name := 'newfile_put.txt'
// mut data := 'my new put file'
// mut req := http.new_request(.put, 'http://localhost:${app.server_port}/${file_name}',
// data)
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// mut response := req.do()!
// mut p := pathlib.get_file(path: '${root_dir}/${file_name}')!
// assert p.exists()
// assert p.read()! == data
// data = 'updated data'
// req = http.new_request(.put, 'http://localhost:${app.server_port}/${file_name}', data)
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// response = req.do()!
// p = pathlib.get_file(path: '${root_dir}/${file_name}')!
// assert p.exists()
// assert p.read()! == data
// }
// fn test_copy() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// file_name1, file_name2 := 'newfile_copy1.txt', 'newfile_copy2.txt'
// mut p1 := pathlib.get_file(path: '${root_dir}/${file_name1}', create: true)!
// data := 'file copy data'
// p1.write(data)!
// mut req := http.new_request(.copy, 'http://localhost:${app.server_port}/${file_name1}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// req.add_custom_header('Destination', 'http://localhost:${app.server_port}/${file_name2}')!
// mut response := req.do()!
// assert p1.exists()
// mut p2 := pathlib.get_file(path: '${root_dir}/${file_name2}')!
// assert p2.exists()
// assert p2.read()! == data
// }
// fn test_move() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// file_name1, file_name2 := 'newfile_move1.txt', 'newfile_move2.txt'
// mut p := pathlib.get_file(path: '${root_dir}/${file_name1}', create: true)!
// data := 'file move data'
// p.write(data)!
// mut req := http.new_request(.move, 'http://localhost:${app.server_port}/${file_name1}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// req.add_custom_header('Destination', 'http://localhost:${app.server_port}/${file_name2}')!
// mut response := req.do()!
// p = pathlib.get_file(path: '${root_dir}/${file_name2}')!
// assert p.exists()
// assert p.read()! == data
// }
// fn test_delete() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// file_name := 'newfile_delete.txt'
// mut p := pathlib.get_file(path: '${root_dir}/${file_name}', create: true)!
// mut req := http.new_request(.delete, 'http://localhost:${app.server_port}/${file_name}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// mut response := req.do()!
// assert !p.exists()
// }
// fn test_mkcol() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// dir_name := 'newdir'
// mut req := http.new_request(.mkcol, 'http://localhost:${app.server_port}/${dir_name}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// mut response := req.do()!
// mut p := pathlib.get_dir(path: '${root_dir}/${dir_name}')!
// assert p.exists()
// }
// fn test_propfind() {
// root_dir := '/tmp/webdav'
// mut app := new_app(
// server_port: rand.int_in_range(8000, 9000)!
// root_dir: root_dir
// user_db: {
// 'mario': '123'
// }
// )!
// app.run(background: true)
// time.sleep(1 * time.second)
// dir_name := 'newdir'
// file1 := 'file1.txt'
// file2 := 'file2.html'
// dir1 := 'dir1'
// mut p := pathlib.get_dir(path: '${root_dir}/${dir_name}', create: true)!
// mut file1_p := pathlib.get_file(path: '${p.path}/${file1}', create: true)!
// mut file2_p := pathlib.get_file(path: '${p.path}/${file2}', create: true)!
// mut dir1_p := pathlib.get_dir(path: '${p.path}/${dir1}', create: true)!
// mut req := http.new_request(.propfind, 'http://localhost:${app.server_port}/${dir_name}',
// '')
// signature := base64.encode_str('mario:123')
// req.add_custom_header('Authorization', 'Basic ${signature}')!
// mut response := req.do()!
// assert response.status_code == 207
// }

View File

@@ -179,8 +179,8 @@ pub fn (mut self Builder) clean() ! {
#set -x
set +e
rm -rf /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc
pacman -Rns $(pacman -Qtdq) --noconfirm
pacman -Scc --noconfirm
#pacman -Rns $(pacman -Qtdq) --noconfirm
#pacman -Scc --noconfirm
rm -rf /var/lib/pacman/sync/*
rm -rf /tmp/*
rm -rf /var/tmp/*

View File

@@ -1,6 +1,7 @@
module herocontainers
import freeflowuniverse.herolib.osal { exec }
import freeflowuniverse.herolib.core
@[heap]
pub struct CEngine {
@@ -51,7 +52,7 @@ pub fn (mut e CEngine) reset_all() ! {
exec(cmd: 'podman rmi -a -f', stdout: false)!
e.builders_delete_all()!
osal.done_reset()!
if core.platform()! == .arch {
if core.platform()! == core.PlatformType.arch {
exec(cmd: 'systemctl status podman.socket', stdout: false)!
}
e.load()!

View File

@@ -2,7 +2,6 @@ module herocontainers
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.installers.virt.pacman
import os
@[params]
@@ -14,17 +13,52 @@ pub struct GetArgs {
pub fn (mut e CEngine) builder_base(args GetArgs) !Builder {
name := 'base'
if !args.reset && e.builder_exists(name)! {
return e.builder_get(name)!
}
console.print_header('buildah base build')
// mut installer:= pacman.get()!
// installer.install()!
mut builder := e.builder_new(name: name, from: 'scratch', delete: true)!
mount_path := builder.mount_to_path()!
if mount_path.len<4{
return error("mount_path needs to be +4 chars")
}
osal.exec(
cmd: 'pacstrap -D -c ${mount_path} base screen bash coreutils curl mc unzip sudo which openssh'
cmd: '
export MOUNT_PATH=\'${mount_path}\'
mmdebstrap --variant=minbase --components="main,universe" --include="apt,base-files,base-passwd,bash,coreutils" noble \${MOUNT_PATH}
echo "Binding essential directories..."
mount --bind /dev "\${MOUNT_PATH}/dev"
mount --bind /proc "\${MOUNT_PATH}/proc"
mount --bind /sys "\${MOUNT_PATH}/sys"
echo "tzdata tzdata/Areas select Europe" | chroot "\${MOUNT_PATH}" debconf-set-selections
echo "tzdata tzdata/Zones/Europe select Brussels" | chroot "\${MOUNT_PATH}" debconf-set-selections
chroot \${MOUNT_PATH} apt update
# Set up APT for non-interactive installation
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
# Update package lists
echo "Updating package lists in chroot..."
chroot \${MOUNT_PATH} apt-get update -yq
# Install required packages
echo "Installing essential packages..."
chroot \${MOUNT_PATH} apt-get install -yq screen bash coreutils curl mc unzip sudo which openssh-client openssh-server redis
echo "Cleaning up..."
umount "\${MOUNT_PATH}/dev" || true
umount "\${MOUNT_PATH}/proc" || true
umount "\${MOUNT_PATH}/sys" || true
'
)!
// builder.set_entrypoint('redis-server')!
builder.commit('localhost/${name}')!

View File

@@ -1,7 +1,7 @@
module herocontainers
import freeflowuniverse.herolib.osal
// import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.ui.console
import json
fn (mut e CEngine) builders_load() ! {
@@ -66,12 +66,14 @@ pub fn (mut e CEngine) builder_get(name string) !Builder {
}
pub fn (mut e CEngine) builders_delete_all() ! {
console.print_debug("remove all")
osal.execute_stdout('buildah rm -a')!
e.builders_load()!
}
pub fn (mut e CEngine) builder_delete(name string) ! {
if e.builder_exists(name)! {
console.print_debug("remove ${name}")
osal.execute_stdout('buildah rm ${name}')!
e.builders_load()!
}

View File

@@ -1,9 +1,8 @@
module herocontainers
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
import freeflowuniverse.herolib.installers.virt.buildah as buildah_installer
import freeflowuniverse.herolib.installers.lang.herolib
import freeflowuniverse.herolib.osal
import freeflowuniverse.herolib.core
@[params]
pub struct NewArgs {
@@ -22,9 +21,7 @@ pub fn new(args_ NewArgs) !CEngine {
if args.install {
mut podman_installer0 := podman_installer.get()!
mut buildah_installer0 := buildah_installer.get()!
podman_installer0.install()!
buildah_installer0.install()!
}
if args.herocompile {

View File

@@ -2,7 +2,7 @@
## how to tag a version and push
```bash
cd ~/Users/despiegk~/code/github/freeflowuniverse/herolib/README.md
git tag -a v1.0.2 -m "some message"
git add . -A ; git commit -m ... ; git pull ; git push origin v1.0.2
cd ~/Users/despiegk~/code/github/freeflowuniverse/herolib
git tag -a v1.0.4 -m "all CI is now working"
git add . -A ; git commit -m ... ; git pull ; git push origin v1.0.4
```

147
release.vsh Executable file
View File

@@ -0,0 +1,147 @@
#!/usr/bin/env -S v run
import os
import net.http
import x.json2 as json
import regex
struct GithubRelease {
tag_name string
}
fn get_latest_release() !string {
url := 'https://api.github.com/repos/freeflowuniverse/herolib/releases/latest'
resp := http.get(url)!
release := json.decode[GithubRelease](resp.body) or {
return error('Failed to decode GitHub response: ${err}')
}
return release.tag_name
}
// Show current version
latest_release := get_latest_release() or {
eprintln('Error getting latest release: ${err}')
exit(1)
}
println('Current latest release: ${latest_release}')
// Ask for new version
new_version := os.input('Enter new version (e.g., 1.0.4): ')
// Validate version format
version_re := regex.regex_opt(r'^[0-9]+\.[0-9]+\.[0-9]+$') or {
eprintln('Error creating regex: ${err}')
exit(1)
}
if !version_re.matches_string(new_version) {
eprintln('Error: Version must be in format X.Y.Z (e.g., 1.0.4)')
exit(1)
}
ourdir := dir(@FILE)
os.chdir(ourdir)!
hero_v_path := '${ourdir}/cli/hero.v'
// Read hero.v
content := os.read_file(hero_v_path) or {
eprintln('Error reading ${hero_v_path}: ${err}')
exit(1)
}
// Find version line
mut version_line_idx := -1
mut lines := content.split_into_lines()
for i, line in lines {
if line.contains('version:') {
version_line_idx = i
break
}
}
if version_line_idx == -1 {
eprintln('Error: Could not find version line in ${hero_v_path}')
exit(1)
}
// Get indentation
old_line := lines[version_line_idx]
indent := old_line.all_before('version:')
// Create backup
os.cp(hero_v_path, '${hero_v_path}.backup') or {
eprintln('Error creating backup: ${err}')
exit(1)
}
// Replace version line
lines[version_line_idx] = ' version: \'${new_version}\''
// Write back to file
os.write_file(hero_v_path, lines.join_lines()) or {
eprintln('Error writing to ${hero_v_path}: ${err}')
// Restore backup
os.cp('${hero_v_path}.backup', hero_v_path) or {
eprintln('Error restoring backup: ${err}')
}
exit(1)
}
// Clean up backup
os.rm('${hero_v_path}.backup') or {
eprintln('Warning: Could not remove backup file: ${err}')
}
// Update version in install_hero.sh
install_hero_path := '${ourdir}/install_hero.sh'
install_hero_content := os.read_file(install_hero_path) or {
eprintln('Error reading ${install_hero_path}: ${err}')
exit(1)
}
// Create backup of install_hero.sh
os.cp(install_hero_path, '${install_hero_path}.backup') or {
eprintln('Error creating backup of install_hero.sh: ${err}')
exit(1)
}
// Replace version in install_hero.sh
mut install_hero_lines := install_hero_content.split_into_lines()
for i, line in install_hero_lines {
if line.contains("version='") {
install_hero_lines[i] = "version='${new_version}'"
break
}
}
// Write back to install_hero.sh
os.write_file(install_hero_path, install_hero_lines.join_lines()) or {
eprintln('Error writing to ${install_hero_path}: ${err}')
// Restore backup
os.cp('${install_hero_path}.backup', install_hero_path) or {
eprintln('Error restoring backup of install_hero.sh: ${err}')
}
exit(1)
}
// Clean up backup of install_hero.sh
os.rm('${install_hero_path}.backup') or {
eprintln('Warning: Could not remove backup file of install_hero.sh: ${err}')
}
cmd:='
git remote set-url origin git@github.com:freeflowuniverse/herolib.git
git add ${hero_v_path} ${install_hero_path}
git commit -m "bump version to ${new_version}"
git pull git@github.com:freeflowuniverse/herolib.git main
git tag -a "v${new_version}" -m "Release version ${new_version}"
git push git@github.com:freeflowuniverse/herolib.git "v${new_version}"
'
println(cmd)
os.execute_or_panic('${cmd}')
println('Release v${new_version} created and pushed!')

View File

@@ -1,452 +0,0 @@
# module arrays
## Contents
- [append](#append)
- [binary_search](#binary_search)
- [carray_to_varray](#carray_to_varray)
- [chunk](#chunk)
- [chunk_while](#chunk_while)
- [concat](#concat)
- [copy](#copy)
- [distinct](#distinct)
- [each](#each)
- [each_indexed](#each_indexed)
- [filter_indexed](#filter_indexed)
- [find_first](#find_first)
- [find_last](#find_last)
- [flat_map](#flat_map)
- [flat_map_indexed](#flat_map_indexed)
- [flatten](#flatten)
- [fold](#fold)
- [fold_indexed](#fold_indexed)
- [group](#group)
- [group_by](#group_by)
- [idx_max](#idx_max)
- [idx_min](#idx_min)
- [index_of_first](#index_of_first)
- [index_of_last](#index_of_last)
- [join_to_string](#join_to_string)
- [lower_bound](#lower_bound)
- [map_indexed](#map_indexed)
- [map_of_counts](#map_of_counts)
- [map_of_indexes](#map_of_indexes)
- [max](#max)
- [merge](#merge)
- [min](#min)
- [partition](#partition)
- [reduce](#reduce)
- [reduce_indexed](#reduce_indexed)
- [rotate_left](#rotate_left)
- [rotate_right](#rotate_right)
- [sum](#sum)
- [uniq](#uniq)
- [uniq_all_repeated](#uniq_all_repeated)
- [uniq_only](#uniq_only)
- [uniq_only_repeated](#uniq_only_repeated)
- [upper_bound](#upper_bound)
- [window](#window)
- [WindowAttribute](#WindowAttribute)
## append
Example
```v
arrays.append([1, 3, 5, 7], [2, 4, 6, 8]) // => [1, 3, 5, 7, 2, 4, 6, 8]
```
[[Return to contents]](#Contents)
## binary_search
Example
```v
arrays.binary_search([1, 2, 3, 4], 4)! // => 3
```
[[Return to contents]](#Contents)
## carray_to_varray
[[Return to contents]](#Contents)
## chunk
Example
```v
arrays.chunk([1, 2, 3, 4, 5, 6, 7, 8, 9], 2)) // => [[1, 2], [3, 4], [5, 6], [7, 8], [9]]
```
[[Return to contents]](#Contents)
## chunk_while
Examples
```v
assert arrays.chunk_while([0,9,2,2,3,2,7,5,9,5],fn(x int,y int)bool{return x<=y})==[[0,9],[2,2,3],[2,7],[5,9],[5]]
assert arrays.chunk_while('aaaabbbcca'.runes(),fn(x rune,y rune)bool{return x==y})==[[`a`,`a`,`a`,`a`],[`b`,`b`,`b`],[`c`,`c`],[`a`]]
assert arrays.chunk_while('aaaabbbcca'.runes(),fn(x rune,y rune)bool{return x==y}).map({it[0]:it.len})==[{`a`:4},{`b`:3},{`c`:2},{`a`:1}]
```
[[Return to contents]](#Contents)
## concat
Examples
```v
arrays.concat([1, 2, 3], 4, 5, 6) == [1, 2, 3, 4, 5, 6] // => true
arrays.concat([1, 2, 3], ...[4, 5, 6]) == [1, 2, 3, 4, 5, 6] // => true
arr << [4, 5, 6] // does what you need if arr is mutable
```
[[Return to contents]](#Contents)
## copy
[[Return to contents]](#Contents)
## distinct
Example
```v
assert arrays.distinct( [5, 5, 1, 5, 2, 1, 1, 9] ) == [1, 2, 5, 9]
```
[[Return to contents]](#Contents)
## each
[[Return to contents]](#Contents)
## each_indexed
[[Return to contents]](#Contents)
## filter_indexed
[[Return to contents]](#Contents)
## find_first
Example
```v
arrays.find_first([1, 2, 3, 4, 5], fn (i int) bool { return i == 3 })? // => 3
```
[[Return to contents]](#Contents)
## find_last
Example
```v
arrays.find_last([1, 2, 3, 4, 5], fn (i int) bool { return i == 3})? // => 3
```
[[Return to contents]](#Contents)
## flat_map
[[Return to contents]](#Contents)
## flat_map_indexed
[[Return to contents]](#Contents)
## flatten
Example
```v
arrays.flatten[int]([[1, 2, 3], [4, 5]]) // => [1, 2, 3, 4, 5]
```
[[Return to contents]](#Contents)
## fold
Example
```v
// Sum the length of each string in an array
a := ['Hi', 'all']
r := arrays.fold[string, int](a, 0,
fn (r int, t string) int { return r + t.len })
assert r == 5
```
[[Return to contents]](#Contents)
## fold_indexed
[[Return to contents]](#Contents)
## group
Example
```v
arrays.group[int]([1, 2, 3], [4, 5, 6]) // => [[1, 4], [2, 5], [3, 6]]
```
[[Return to contents]](#Contents)
## group_by
Example
```v
arrays.group_by[int, string](['H', 'el', 'lo'], fn (v string) int { return v.len }) // => {1: ['H'], 2: ['el', 'lo']}
```
[[Return to contents]](#Contents)
## idx_max
Example
```v
arrays.idx_max([1, 2, 3, 0, 9])! // => 4
```
[[Return to contents]](#Contents)
## idx_min
Example
```v
arrays.idx_min([1, 2, 3, 0, 9])! // => 3
```
[[Return to contents]](#Contents)
## index_of_first
Example
```v
arrays.index_of_first([4,5,0,7,0,9], fn(idx int, x int) bool { return x == 0 }) == 2
```
[[Return to contents]](#Contents)
## index_of_last
Example
```v
arrays.index_of_last([4,5,0,7,0,9], fn(idx int, x int) bool { return x == 0 }) == 4
```
[[Return to contents]](#Contents)
## join_to_string
[[Return to contents]](#Contents)
## lower_bound
Example
```v
arrays.lower_bound([2, 4, 6, 8], 3)! // => 4
```
[[Return to contents]](#Contents)
## map_indexed
[[Return to contents]](#Contents)
## map_of_counts
Example
```v
arrays.map_of_counts([1,2,3,4,4,2,1,4,4]) == {1: 2, 2: 2, 3: 1, 4: 4}
```
[[Return to contents]](#Contents)
## map_of_indexes
Example
```v
arrays.map_of_indexes([1,2,3,4,4,2,1,4,4,999]) == {1: [0, 6], 2: [1, 5], 3: [2], 4: [3, 4, 7, 8], 999: [9]}
```
[[Return to contents]](#Contents)
## max
Example
```v
arrays.max([1, 2, 3, 0, 9])! // => 9
```
[[Return to contents]](#Contents)
## merge
Example
```v
arrays.merge([1, 3, 5, 7], [2, 4, 6, 8]) // => [1, 2, 3, 4, 5, 6, 7, 8]
```
[[Return to contents]](#Contents)
## min
Example
```v
arrays.min([1, 2, 3, 0, 9])! // => 0
```
[[Return to contents]](#Contents)
## partition
[[Return to contents]](#Contents)
## reduce
Example
```v
arrays.reduce([1, 2, 3, 4, 5], fn (t1 int, t2 int) int { return t1 * t2 })! // => 120
```
[[Return to contents]](#Contents)
## reduce_indexed
[[Return to contents]](#Contents)
## rotate_left
Example
```v
mut x := [1,2,3,4,5,6]
arrays.rotate_left(mut x, 2)
println(x) // [3, 4, 5, 6, 1, 2]
```
[[Return to contents]](#Contents)
## rotate_right
Example
```v
mut x := [1,2,3,4,5,6]
arrays.rotate_right(mut x, 2)
println(x) // [5, 6, 1, 2, 3, 4]
```
[[Return to contents]](#Contents)
## sum
Example
```v
arrays.sum([1, 2, 3, 4, 5])! // => 15
```
[[Return to contents]](#Contents)
## uniq
Examples
```v
assert arrays.uniq( []int{} ) == []
assert arrays.uniq( [1, 1] ) == [1]
assert arrays.uniq( [2, 1] ) == [2, 1]
assert arrays.uniq( [5, 5, 1, 5, 2, 1, 1, 9] ) == [5, 1, 5, 2, 1, 9]
```
[[Return to contents]](#Contents)
## uniq_all_repeated
Examples
```v
assert arrays.uniq_all_repeated( []int{} ) == []
assert arrays.uniq_all_repeated( [1, 5] ) == []
assert arrays.uniq_all_repeated( [5, 5] ) == [5,5]
assert arrays.uniq_all_repeated( [5, 5, 1, 5, 2, 1, 1, 9] ) == [5, 5, 1, 1]
```
[[Return to contents]](#Contents)
## uniq_only
Examples
```v
assert arrays.uniq_only( []int{} ) == []
assert arrays.uniq_only( [1, 1] ) == []
assert arrays.uniq_only( [2, 1] ) == [2, 1]
assert arrays.uniq_only( [1, 5, 5, 1, 5, 2, 1, 1, 9] ) == [1, 1, 5, 2, 9]
```
[[Return to contents]](#Contents)
## uniq_only_repeated
Examples
```v
assert arrays.uniq_only_repeated( []int{} ) == []
assert arrays.uniq_only_repeated( [1, 5] ) == []
assert arrays.uniq_only_repeated( [5, 5] ) == [5]
assert arrays.uniq_only_repeated( [5, 5, 1, 5, 2, 1, 1, 9] ) == [5, 1]
```
[[Return to contents]](#Contents)
## upper_bound
Example
```v
arrays.upper_bound([2, 4, 6, 8], 3)! // => 2
```
[[Return to contents]](#Contents)
## window
Examples
```v
arrays.window([1, 2, 3, 4], size: 2) // => [[1, 2], [2, 3], [3, 4]]
arrays.window([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], size: 3, step: 2) // => [[1, 2, 3], [3, 4, 5], [5, 6, 7], [7, 8, 9]]
```
[[Return to contents]](#Contents)
## WindowAttribute
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,32 +0,0 @@
# module arrays.parallel
## Contents
- [amap](#amap)
- [run](#run)
- [Params](#Params)
## amap
Example
```v
squares := parallel.amap([1, 2, 3, 4, 5], 2, fn (i) { return i * i })
```
[[Return to contents]](#Contents)
## run
Example
```v
parallel.run([1, 2, 3, 4, 5], 2, fn (i) { println(i) })
```
[[Return to contents]](#Contents)
## Params
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,124 +0,0 @@
# module benchmark
## Contents
- [Constants](#Constants)
- [new_benchmark](#new_benchmark)
- [new_benchmark_no_cstep](#new_benchmark_no_cstep)
- [new_benchmark_pointer](#new_benchmark_pointer)
- [start](#start)
- [Benchmark](#Benchmark)
- [set_total_expected_steps](#set_total_expected_steps)
- [stop](#stop)
- [step](#step)
- [step_restart](#step_restart)
- [fail](#fail)
- [ok](#ok)
- [skip](#skip)
- [fail_many](#fail_many)
- [ok_many](#ok_many)
- [neither_fail_nor_ok](#neither_fail_nor_ok)
- [measure](#measure)
- [record_measure](#record_measure)
- [step_message_with_label_and_duration](#step_message_with_label_and_duration)
- [step_message_with_label](#step_message_with_label)
- [step_message](#step_message)
- [step_message_ok](#step_message_ok)
- [step_message_fail](#step_message_fail)
- [step_message_skip](#step_message_skip)
- [total_message](#total_message)
- [all_recorded_measures](#all_recorded_measures)
- [total_duration](#total_duration)
- [MessageOptions](#MessageOptions)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## new_benchmark
[[Return to contents]](#Contents)
## new_benchmark_no_cstep
[[Return to contents]](#Contents)
## new_benchmark_pointer
[[Return to contents]](#Contents)
## start
[[Return to contents]](#Contents)
## Benchmark
[[Return to contents]](#Contents)
## set_total_expected_steps
[[Return to contents]](#Contents)
## stop
[[Return to contents]](#Contents)
## step
[[Return to contents]](#Contents)
## step_restart
[[Return to contents]](#Contents)
## fail
[[Return to contents]](#Contents)
## ok
[[Return to contents]](#Contents)
## skip
[[Return to contents]](#Contents)
## fail_many
[[Return to contents]](#Contents)
## ok_many
[[Return to contents]](#Contents)
## neither_fail_nor_ok
[[Return to contents]](#Contents)
## measure
[[Return to contents]](#Contents)
## record_measure
[[Return to contents]](#Contents)
## step_message_with_label_and_duration
[[Return to contents]](#Contents)
## step_message_with_label
[[Return to contents]](#Contents)
## step_message
[[Return to contents]](#Contents)
## step_message_ok
[[Return to contents]](#Contents)
## step_message_fail
[[Return to contents]](#Contents)
## step_message_skip
[[Return to contents]](#Contents)
## total_message
[[Return to contents]](#Contents)
## all_recorded_measures
[[Return to contents]](#Contents)
## total_duration
[[Return to contents]](#Contents)
## MessageOptions
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,201 +0,0 @@
# module bitfield
## Contents
- [bf_and](#bf_and)
- [bf_not](#bf_not)
- [bf_or](#bf_or)
- [bf_xor](#bf_xor)
- [from_bytes](#from_bytes)
- [from_bytes_lowest_bits_first](#from_bytes_lowest_bits_first)
- [from_str](#from_str)
- [hamming](#hamming)
- [join](#join)
- [new](#new)
- [BitField](#BitField)
- [str](#str)
- [free](#free)
- [get_bit](#get_bit)
- [set_bit](#set_bit)
- [clear_bit](#clear_bit)
- [extract](#extract)
- [insert](#insert)
- [extract_lowest_bits_first](#extract_lowest_bits_first)
- [insert_lowest_bits_first](#insert_lowest_bits_first)
- [set_all](#set_all)
- [clear_all](#clear_all)
- [toggle_bit](#toggle_bit)
- [set_if](#set_if)
- [toggle_bits](#toggle_bits)
- [set_bits](#set_bits)
- [clear_bits](#clear_bits)
- [has](#has)
- [all](#all)
- [get_size](#get_size)
- [clone](#clone)
- [==](#==)
- [pop_count](#pop_count)
- [pos](#pos)
- [slice](#slice)
- [reverse](#reverse)
- [resize](#resize)
- [rotate](#rotate)
- [shift_left](#shift_left)
- [shift_right](#shift_right)
## bf_and
[[Return to contents]](#Contents)
## bf_not
[[Return to contents]](#Contents)
## bf_or
[[Return to contents]](#Contents)
## bf_xor
[[Return to contents]](#Contents)
## from_bytes
[[Return to contents]](#Contents)
## from_bytes_lowest_bits_first
[[Return to contents]](#Contents)
## from_str
[[Return to contents]](#Contents)
## hamming
[[Return to contents]](#Contents)
## join
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## BitField
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## get_bit
[[Return to contents]](#Contents)
## set_bit
[[Return to contents]](#Contents)
## clear_bit
[[Return to contents]](#Contents)
## extract
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## extract_lowest_bits_first
[[Return to contents]](#Contents)
## insert_lowest_bits_first
[[Return to contents]](#Contents)
## set_all
[[Return to contents]](#Contents)
## clear_all
[[Return to contents]](#Contents)
## toggle_bit
[[Return to contents]](#Contents)
## set_if
[[Return to contents]](#Contents)
## toggle_bits
Example
```v
toggle_bits(1,3,5,7)
```
[[Return to contents]](#Contents)
## set_bits
Example
```v
set_bits(1,3,5,7)
```
[[Return to contents]](#Contents)
## clear_bits
Example
```v
clear_bits(1,3,5,7)
```
[[Return to contents]](#Contents)
## has
Example
```v
has(1,3,5,7)
```
[[Return to contents]](#Contents)
## all
Example
```v
all(1,3,5,7)
```
[[Return to contents]](#Contents)
## get_size
[[Return to contents]](#Contents)
## clone
[[Return to contents]](#Contents)
## ==
[[Return to contents]](#Contents)
## pop_count
[[Return to contents]](#Contents)
## pos
[[Return to contents]](#Contents)
## slice
[[Return to contents]](#Contents)
## reverse
[[Return to contents]](#Contents)
## resize
[[Return to contents]](#Contents)
## rotate
[[Return to contents]](#Contents)
## shift_left
[[Return to contents]](#Contents)
## shift_right
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

File diff suppressed because it is too large Load Diff

View File

@@ -1,61 +0,0 @@
# module builtin.wchar
## Contents
- [Constants](#Constants)
- [from_rune](#from_rune)
- [from_string](#from_string)
- [length_in_bytes](#length_in_bytes)
- [length_in_characters](#length_in_characters)
- [to_string](#to_string)
- [to_string2](#to_string2)
- [Character](#Character)
- [str](#str)
- [==](#==)
- [to_rune](#to_rune)
- [C.wchar_t](#C.wchar_t)
## Constants
[[Return to contents]](#Contents)
## from_rune
[[Return to contents]](#Contents)
## from_string
[[Return to contents]](#Contents)
## length_in_bytes
[[Return to contents]](#Contents)
## length_in_characters
Example
```v
assert unsafe { wchar.length_in_characters(wchar.from_string('abc')) } == 3
```
[[Return to contents]](#Contents)
## to_string
[[Return to contents]](#Contents)
## to_string2
[[Return to contents]](#Contents)
## Character
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## ==
[[Return to contents]](#Contents)
## to_rune
[[Return to contents]](#Contents)
## C.wchar_t
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,162 +0,0 @@
# module cli
## Contents
- [print_help_for_command](#print_help_for_command)
- [print_manpage_for_command](#print_manpage_for_command)
- [FnCommandCallback](#FnCommandCallback)
- [str](#str)
- [[]Flag](#[]Flag)
- [get_all_found](#get_all_found)
- [get_bool](#get_bool)
- [get_int](#get_int)
- [get_ints](#get_ints)
- [get_float](#get_float)
- [get_floats](#get_floats)
- [get_string](#get_string)
- [get_strings](#get_strings)
- [FlagType](#FlagType)
- [Command](#Command)
- [add_command](#add_command)
- [add_commands](#add_commands)
- [add_flag](#add_flag)
- [add_flags](#add_flags)
- [execute_help](#execute_help)
- [execute_man](#execute_man)
- [full_name](#full_name)
- [help_message](#help_message)
- [is_root](#is_root)
- [manpage](#manpage)
- [parse](#parse)
- [root](#root)
- [setup](#setup)
- [str](#str)
- [version](#version)
- [CommandFlag](#CommandFlag)
- [Flag](#Flag)
- [get_bool](#get_bool)
- [get_int](#get_int)
- [get_ints](#get_ints)
- [get_float](#get_float)
- [get_floats](#get_floats)
- [get_string](#get_string)
- [get_strings](#get_strings)
- [parse](#parse)
## print_help_for_command
[[Return to contents]](#Contents)
## print_manpage_for_command
[[Return to contents]](#Contents)
## FnCommandCallback
## str
[[Return to contents]](#Contents)
## []Flag
## get_all_found
[[Return to contents]](#Contents)
## get_bool
[[Return to contents]](#Contents)
## get_int
[[Return to contents]](#Contents)
## get_ints
[[Return to contents]](#Contents)
## get_float
[[Return to contents]](#Contents)
## get_floats
[[Return to contents]](#Contents)
## get_string
[[Return to contents]](#Contents)
## get_strings
[[Return to contents]](#Contents)
## FlagType
[[Return to contents]](#Contents)
## Command
[[Return to contents]](#Contents)
## add_command
[[Return to contents]](#Contents)
## add_commands
[[Return to contents]](#Contents)
## add_flag
[[Return to contents]](#Contents)
## add_flags
[[Return to contents]](#Contents)
## execute_help
[[Return to contents]](#Contents)
## execute_man
[[Return to contents]](#Contents)
## full_name
[[Return to contents]](#Contents)
## help_message
[[Return to contents]](#Contents)
## is_root
[[Return to contents]](#Contents)
## manpage
[[Return to contents]](#Contents)
## parse
[[Return to contents]](#Contents)
## root
[[Return to contents]](#Contents)
## setup
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## version
[[Return to contents]](#Contents)
## CommandFlag
[[Return to contents]](#Contents)
## Flag
[[Return to contents]](#Contents)
## get_bool
[[Return to contents]](#Contents)
## get_int
[[Return to contents]](#Contents)
## get_ints
[[Return to contents]](#Contents)
## get_float
[[Return to contents]](#Contents)
## get_floats
[[Return to contents]](#Contents)
## get_string
[[Return to contents]](#Contents)
## get_strings
[[Return to contents]](#Contents)
## parse
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,42 +0,0 @@
# module clipboard.dummy
## Contents
- [new_clipboard](#new_clipboard)
- [new_primary](#new_primary)
- [Clipboard](#Clipboard)
- [set_text](#set_text)
- [get_text](#get_text)
- [clear](#clear)
- [free](#free)
- [has_ownership](#has_ownership)
- [check_availability](#check_availability)
## new_clipboard
[[Return to contents]](#Contents)
## new_primary
[[Return to contents]](#Contents)
## Clipboard
[[Return to contents]](#Contents)
## set_text
[[Return to contents]](#Contents)
## get_text
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## has_ownership
[[Return to contents]](#Contents)
## check_availability
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,66 +0,0 @@
# module clipboard
## Contents
- [new](#new)
- [new_primary](#new_primary)
- [Clipboard](#Clipboard)
- [check_availability](#check_availability)
- [check_ownership](#check_ownership)
- [clear](#clear)
- [clear_all](#clear_all)
- [copy](#copy)
- [destroy](#destroy)
- [free](#free)
- [get_text](#get_text)
- [has_ownership](#has_ownership)
- [is_available](#is_available)
- [paste](#paste)
- [set_text](#set_text)
## new
[[Return to contents]](#Contents)
## new_primary
[[Return to contents]](#Contents)
## Clipboard
[[Return to contents]](#Contents)
## check_availability
[[Return to contents]](#Contents)
## check_ownership
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## clear_all
[[Return to contents]](#Contents)
## copy
[[Return to contents]](#Contents)
## destroy
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## get_text
[[Return to contents]](#Contents)
## has_ownership
[[Return to contents]](#Contents)
## is_available
[[Return to contents]](#Contents)
## paste
[[Return to contents]](#Contents)
## set_text
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,62 +0,0 @@
# module clipboard.x11
## Contents
- [new_clipboard](#new_clipboard)
- [new_primary](#new_primary)
- [C.Display](#C.Display)
- [C.XDestroyWindowEvent](#C.XDestroyWindowEvent)
- [C.XSelectionClearEvent](#C.XSelectionClearEvent)
- [C.XSelectionEvent](#C.XSelectionEvent)
- [C.XSelectionRequestEvent](#C.XSelectionRequestEvent)
- [Clipboard](#Clipboard)
- [check_availability](#check_availability)
- [free](#free)
- [clear](#clear)
- [has_ownership](#has_ownership)
- [set_text](#set_text)
- [get_text](#get_text)
## new_clipboard
[[Return to contents]](#Contents)
## new_primary
[[Return to contents]](#Contents)
## C.Display
[[Return to contents]](#Contents)
## C.XDestroyWindowEvent
[[Return to contents]](#Contents)
## C.XSelectionClearEvent
[[Return to contents]](#Contents)
## C.XSelectionEvent
[[Return to contents]](#Contents)
## C.XSelectionRequestEvent
[[Return to contents]](#Contents)
## Clipboard
[[Return to contents]](#Contents)
## check_availability
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## has_ownership
[[Return to contents]](#Contents)
## set_text
[[Return to contents]](#Contents)
## get_text
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,28 +0,0 @@
# module compress.deflate
## Contents
- [compress](#compress)
- [decompress](#decompress)
## compress
Example
```v
compressed := deflate.compress(b)!
```
[[Return to contents]](#Contents)
## decompress
Example
```v
decompressed := deflate.decompress(b)!
```
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,66 +0,0 @@
# module compress.gzip
## Contents
- [Constants](#Constants)
- [compress](#compress)
- [decompress](#decompress)
- [validate](#validate)
- [CompressFlags](#CompressFlags)
- [DecompressFlags](#DecompressFlags)
- [CompressParams](#CompressParams)
- [DecompressParams](#DecompressParams)
- [GzipHeader](#GzipHeader)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## compress
Example
```v
compressed := gzip.compress(b, compression_level:4095)!
```
[[Return to contents]](#Contents)
## decompress
Example
```v
decompressed := gzip.decompress(b)!
```
[[Return to contents]](#Contents)
## validate
[[Return to contents]](#Contents)
## CompressFlags
[[Return to contents]](#Contents)
## DecompressFlags
[[Return to contents]](#Contents)
## CompressParams
[[Return to contents]](#Contents)
## DecompressParams
[[Return to contents]](#Contents)
## GzipHeader
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,18 +0,0 @@
# module compress
## Contents
- [Constants](#Constants)
- [compress](#compress)
- [decompress](#decompress)
## Constants
[[Return to contents]](#Contents)
## compress
[[Return to contents]](#Contents)
## decompress
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,106 +0,0 @@
# module compress.szip
## Contents
- [extract_zip_to_dir](#extract_zip_to_dir)
- [open](#open)
- [zip_files](#zip_files)
- [zip_folder](#zip_folder)
- [Fn_on_extract_entry](#Fn_on_extract_entry)
- [Zip](#Zip)
- [close](#close)
- [open_entry](#open_entry)
- [open_entry_by_index](#open_entry_by_index)
- [close_entry](#close_entry)
- [name](#name)
- [index](#index)
- [is_dir](#is_dir)
- [size](#size)
- [crc32](#crc32)
- [write_entry](#write_entry)
- [create_entry](#create_entry)
- [read_entry](#read_entry)
- [read_entry_buf](#read_entry_buf)
- [extract_entry](#extract_entry)
- [total](#total)
- [CompressionLevel](#CompressionLevel)
- [OpenMode](#OpenMode)
- [C.zip_t](#C.zip_t)
- [ZipFolderOptions](#ZipFolderOptions)
## extract_zip_to_dir
[[Return to contents]](#Contents)
## open
[[Return to contents]](#Contents)
## zip_files
[[Return to contents]](#Contents)
## zip_folder
[[Return to contents]](#Contents)
## Fn_on_extract_entry
[[Return to contents]](#Contents)
## Zip
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## open_entry
[[Return to contents]](#Contents)
## open_entry_by_index
[[Return to contents]](#Contents)
## close_entry
[[Return to contents]](#Contents)
## name
[[Return to contents]](#Contents)
## index
[[Return to contents]](#Contents)
## is_dir
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## crc32
[[Return to contents]](#Contents)
## write_entry
[[Return to contents]](#Contents)
## create_entry
[[Return to contents]](#Contents)
## read_entry
[[Return to contents]](#Contents)
## read_entry_buf
[[Return to contents]](#Contents)
## extract_entry
[[Return to contents]](#Contents)
## total
[[Return to contents]](#Contents)
## CompressionLevel
[[Return to contents]](#Contents)
## OpenMode
[[Return to contents]](#Contents)
## C.zip_t
[[Return to contents]](#Contents)
## ZipFolderOptions
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,28 +0,0 @@
# module compress.zlib
## Contents
- [compress](#compress)
- [decompress](#decompress)
## compress
Example
```v
compressed := zlib.compress(b)!
```
[[Return to contents]](#Contents)
## decompress
Example
```v
decompressed := zlib.decompress(b)!
```
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,148 +0,0 @@
# module compress.zstd
## Contents
- [check_zstd](#check_zstd)
- [compress](#compress)
- [decompress](#decompress)
- [default_c_level](#default_c_level)
- [get_error_name](#get_error_name)
- [is_error](#is_error)
- [load_array](#load_array)
- [max_c_level](#max_c_level)
- [min_c_level](#min_c_level)
- [new_cctx](#new_cctx)
- [new_dctx](#new_dctx)
- [store_array](#store_array)
- [version_number](#version_number)
- [version_string](#version_string)
- [ZSTD_CCtx](#ZSTD_CCtx)
- [set_parameter](#set_parameter)
- [compress_stream2](#compress_stream2)
- [free_cctx](#free_cctx)
- [ZSTD_DCtx](#ZSTD_DCtx)
- [set_parameter](#set_parameter)
- [decompress_stream](#decompress_stream)
- [free_dctx](#free_dctx)
- [ZSTD_EndDirective](#ZSTD_EndDirective)
- [ZSTD_ResetDirective](#ZSTD_ResetDirective)
- [ZSTD_cParameter](#ZSTD_cParameter)
- [ZSTD_dParameter](#ZSTD_dParameter)
- [ZSTD_strategy](#ZSTD_strategy)
- [CompressParams](#CompressParams)
- [DecompressParams](#DecompressParams)
- [ZSTD_bounds](#ZSTD_bounds)
- [ZSTD_inBuffer](#ZSTD_inBuffer)
- [ZSTD_outBuffer](#ZSTD_outBuffer)
## check_zstd
[[Return to contents]](#Contents)
## compress
Example
```v
compressed := zstd.compress(b)!
```
[[Return to contents]](#Contents)
## decompress
Example
```v
decompressed := zstd.decompress(b)!
```
[[Return to contents]](#Contents)
## default_c_level
[[Return to contents]](#Contents)
## get_error_name
[[Return to contents]](#Contents)
## is_error
[[Return to contents]](#Contents)
## load_array
[[Return to contents]](#Contents)
## max_c_level
[[Return to contents]](#Contents)
## min_c_level
[[Return to contents]](#Contents)
## new_cctx
[[Return to contents]](#Contents)
## new_dctx
[[Return to contents]](#Contents)
## store_array
[[Return to contents]](#Contents)
## version_number
[[Return to contents]](#Contents)
## version_string
[[Return to contents]](#Contents)
## ZSTD_CCtx
[[Return to contents]](#Contents)
## set_parameter
[[Return to contents]](#Contents)
## compress_stream2
[[Return to contents]](#Contents)
## free_cctx
[[Return to contents]](#Contents)
## ZSTD_DCtx
[[Return to contents]](#Contents)
## set_parameter
[[Return to contents]](#Contents)
## decompress_stream
[[Return to contents]](#Contents)
## free_dctx
[[Return to contents]](#Contents)
## ZSTD_EndDirective
[[Return to contents]](#Contents)
## ZSTD_ResetDirective
[[Return to contents]](#Contents)
## ZSTD_cParameter
[[Return to contents]](#Contents)
## ZSTD_dParameter
[[Return to contents]](#Contents)
## ZSTD_strategy
[[Return to contents]](#Contents)
## CompressParams
[[Return to contents]](#Contents)
## DecompressParams
[[Return to contents]](#Contents)
## ZSTD_bounds
[[Return to contents]](#Contents)
## ZSTD_inBuffer
[[Return to contents]](#Contents)
## ZSTD_outBuffer
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,166 +0,0 @@
# module context
## Contents
- [background](#background)
- [todo](#todo)
- [with_cancel](#with_cancel)
- [with_deadline](#with_deadline)
- [with_timeout](#with_timeout)
- [with_value](#with_value)
- [Any](#Any)
- [Canceler](#Canceler)
- [Context](#Context)
- [str](#str)
- [BackgroundContext](#BackgroundContext)
- [str](#str)
- [CancelFn](#CancelFn)
- [Key](#Key)
- [TodoContext](#TodoContext)
- [str](#str)
- [CancelContext](#CancelContext)
- [deadline](#deadline)
- [done](#done)
- [err](#err)
- [value](#value)
- [str](#str)
- [EmptyContext](#EmptyContext)
- [deadline](#deadline)
- [done](#done)
- [err](#err)
- [value](#value)
- [str](#str)
- [TimerContext](#TimerContext)
- [deadline](#deadline)
- [done](#done)
- [err](#err)
- [value](#value)
- [cancel](#cancel)
- [str](#str)
- [ValueContext](#ValueContext)
- [deadline](#deadline)
- [done](#done)
- [err](#err)
- [value](#value)
- [str](#str)
## background
[[Return to contents]](#Contents)
## todo
[[Return to contents]](#Contents)
## with_cancel
[[Return to contents]](#Contents)
## with_deadline
[[Return to contents]](#Contents)
## with_timeout
[[Return to contents]](#Contents)
## with_value
[[Return to contents]](#Contents)
## Any
[[Return to contents]](#Contents)
## Canceler
[[Return to contents]](#Contents)
## Context
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## BackgroundContext
## str
[[Return to contents]](#Contents)
## CancelFn
[[Return to contents]](#Contents)
## Key
[[Return to contents]](#Contents)
## TodoContext
## str
[[Return to contents]](#Contents)
## CancelContext
[[Return to contents]](#Contents)
## deadline
[[Return to contents]](#Contents)
## done
[[Return to contents]](#Contents)
## err
[[Return to contents]](#Contents)
## value
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## EmptyContext
[[Return to contents]](#Contents)
## deadline
[[Return to contents]](#Contents)
## done
[[Return to contents]](#Contents)
## err
[[Return to contents]](#Contents)
## value
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## TimerContext
[[Return to contents]](#Contents)
## deadline
[[Return to contents]](#Contents)
## done
[[Return to contents]](#Contents)
## err
[[Return to contents]](#Contents)
## value
[[Return to contents]](#Contents)
## cancel
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## ValueContext
[[Return to contents]](#Contents)
## deadline
[[Return to contents]](#Contents)
## done
[[Return to contents]](#Contents)
## err
[[Return to contents]](#Contents)
## value
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,52 +0,0 @@
# module context.onecontext
## Contents
- [Constants](#Constants)
- [merge](#merge)
- [OneContext](#OneContext)
- [deadline](#deadline)
- [done](#done)
- [err](#err)
- [value](#value)
- [run](#run)
- [str](#str)
- [cancel](#cancel)
- [run_two_contexts](#run_two_contexts)
- [run_multiple_contexts](#run_multiple_contexts)
## Constants
[[Return to contents]](#Contents)
## merge
[[Return to contents]](#Contents)
## OneContext
## deadline
[[Return to contents]](#Contents)
## done
[[Return to contents]](#Contents)
## err
[[Return to contents]](#Contents)
## value
[[Return to contents]](#Contents)
## run
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## cancel
[[Return to contents]](#Contents)
## run_two_contexts
[[Return to contents]](#Contents)
## run_multiple_contexts
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,10 +0,0 @@
# module coroutines
## Contents
- [sleep](#sleep)
## sleep
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,32 +0,0 @@
# module crypto.aes
## Contents
- [Constants](#Constants)
- [new_cipher](#new_cipher)
- [AesCipher](#AesCipher)
- [free](#free)
- [block_size](#block_size)
- [encrypt](#encrypt)
- [decrypt](#decrypt)
## Constants
[[Return to contents]](#Contents)
## new_cipher
[[Return to contents]](#Contents)
## AesCipher
## free
[[Return to contents]](#Contents)
## block_size
[[Return to contents]](#Contents)
## encrypt
[[Return to contents]](#Contents)
## decrypt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,48 +0,0 @@
# module crypto.bcrypt
## Contents
- [Constants](#Constants)
- [compare_hash_and_password](#compare_hash_and_password)
- [generate_from_password](#generate_from_password)
- [generate_salt](#generate_salt)
- [Hashed](#Hashed)
- [free](#free)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## compare_hash_and_password
[[Return to contents]](#Contents)
## generate_from_password
[[Return to contents]](#Contents)
## generate_salt
[[Return to contents]](#Contents)
## Hashed
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,100 +0,0 @@
# module crypto.blake2b
## Contents
- [Constants](#Constants)
- [new160](#new160)
- [new256](#new256)
- [new384](#new384)
- [new512](#new512)
- [new_digest](#new_digest)
- [new_pmac160](#new_pmac160)
- [new_pmac256](#new_pmac256)
- [new_pmac384](#new_pmac384)
- [new_pmac512](#new_pmac512)
- [pmac160](#pmac160)
- [pmac256](#pmac256)
- [pmac384](#pmac384)
- [pmac512](#pmac512)
- [sum160](#sum160)
- [sum256](#sum256)
- [sum384](#sum384)
- [sum512](#sum512)
- [Digest](#Digest)
- [str](#str)
- [write](#write)
- [checksum](#checksum)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## new160
[[Return to contents]](#Contents)
## new256
[[Return to contents]](#Contents)
## new384
[[Return to contents]](#Contents)
## new512
[[Return to contents]](#Contents)
## new_digest
[[Return to contents]](#Contents)
## new_pmac160
[[Return to contents]](#Contents)
## new_pmac256
[[Return to contents]](#Contents)
## new_pmac384
[[Return to contents]](#Contents)
## new_pmac512
[[Return to contents]](#Contents)
## pmac160
[[Return to contents]](#Contents)
## pmac256
[[Return to contents]](#Contents)
## pmac384
[[Return to contents]](#Contents)
## pmac512
[[Return to contents]](#Contents)
## sum160
[[Return to contents]](#Contents)
## sum256
[[Return to contents]](#Contents)
## sum384
[[Return to contents]](#Contents)
## sum512
[[Return to contents]](#Contents)
## Digest
## str
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## checksum
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,100 +0,0 @@
# module crypto.blake2s
## Contents
- [Constants](#Constants)
- [new128](#new128)
- [new160](#new160)
- [new224](#new224)
- [new256](#new256)
- [new_digest](#new_digest)
- [new_pmac128](#new_pmac128)
- [new_pmac160](#new_pmac160)
- [new_pmac224](#new_pmac224)
- [new_pmac256](#new_pmac256)
- [pmac128](#pmac128)
- [pmac160](#pmac160)
- [pmac224](#pmac224)
- [pmac256](#pmac256)
- [sum128](#sum128)
- [sum160](#sum160)
- [sum224](#sum224)
- [sum256](#sum256)
- [Digest](#Digest)
- [str](#str)
- [write](#write)
- [checksum](#checksum)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## new128
[[Return to contents]](#Contents)
## new160
[[Return to contents]](#Contents)
## new224
[[Return to contents]](#Contents)
## new256
[[Return to contents]](#Contents)
## new_digest
[[Return to contents]](#Contents)
## new_pmac128
[[Return to contents]](#Contents)
## new_pmac160
[[Return to contents]](#Contents)
## new_pmac224
[[Return to contents]](#Contents)
## new_pmac256
[[Return to contents]](#Contents)
## pmac128
[[Return to contents]](#Contents)
## pmac160
[[Return to contents]](#Contents)
## pmac224
[[Return to contents]](#Contents)
## pmac256
[[Return to contents]](#Contents)
## sum128
[[Return to contents]](#Contents)
## sum160
[[Return to contents]](#Contents)
## sum224
[[Return to contents]](#Contents)
## sum256
[[Return to contents]](#Contents)
## Digest
## str
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## checksum
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,50 +0,0 @@
# module crypto.blake3
## Contents
- [Constants](#Constants)
- [sum256](#sum256)
- [sum_derive_key256](#sum_derive_key256)
- [sum_keyed256](#sum_keyed256)
- [Digest.new_derive_key_hash](#Digest.new_derive_key_hash)
- [Digest.new_hash](#Digest.new_hash)
- [Digest.new_keyed_hash](#Digest.new_keyed_hash)
- [Digest](#Digest)
- [write](#write)
- [checksum](#checksum)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## sum256
[[Return to contents]](#Contents)
## sum_derive_key256
[[Return to contents]](#Contents)
## sum_keyed256
[[Return to contents]](#Contents)
## Digest.new_derive_key_hash
[[Return to contents]](#Contents)
## Digest.new_hash
[[Return to contents]](#Contents)
## Digest.new_keyed_hash
[[Return to contents]](#Contents)
## Digest
## write
[[Return to contents]](#Contents)
## checksum
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,36 +0,0 @@
# module crypto.blowfish
## Contents
- [Constants](#Constants)
- [expand_key](#expand_key)
- [expand_key_with_salt](#expand_key_with_salt)
- [new_cipher](#new_cipher)
- [new_salted_cipher](#new_salted_cipher)
- [Blowfish](#Blowfish)
- [encrypt](#encrypt)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## expand_key
[[Return to contents]](#Contents)
## expand_key_with_salt
[[Return to contents]](#Contents)
## new_cipher
[[Return to contents]](#Contents)
## new_salted_cipher
[[Return to contents]](#Contents)
## Blowfish
[[Return to contents]](#Contents)
## encrypt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,90 +0,0 @@
# module crypto.cipher
## Contents
- [new_cbc](#new_cbc)
- [new_cfb_decrypter](#new_cfb_decrypter)
- [new_cfb_encrypter](#new_cfb_encrypter)
- [new_ctr](#new_ctr)
- [new_ofb](#new_ofb)
- [safe_xor_bytes](#safe_xor_bytes)
- [xor_bytes](#xor_bytes)
- [xor_words](#xor_words)
- [Block](#Block)
- [BlockMode](#BlockMode)
- [Stream](#Stream)
- [Cbc](#Cbc)
- [free](#free)
- [encrypt_blocks](#encrypt_blocks)
- [decrypt_blocks](#decrypt_blocks)
- [Cfb](#Cfb)
- [free](#free)
- [xor_key_stream](#xor_key_stream)
- [Ctr](#Ctr)
- [free](#free)
- [xor_key_stream](#xor_key_stream)
- [Ofb](#Ofb)
- [xor_key_stream](#xor_key_stream)
## new_cbc
[[Return to contents]](#Contents)
## new_cfb_decrypter
[[Return to contents]](#Contents)
## new_cfb_encrypter
[[Return to contents]](#Contents)
## new_ctr
[[Return to contents]](#Contents)
## new_ofb
[[Return to contents]](#Contents)
## safe_xor_bytes
[[Return to contents]](#Contents)
## xor_bytes
[[Return to contents]](#Contents)
## xor_words
[[Return to contents]](#Contents)
## Block
[[Return to contents]](#Contents)
## BlockMode
[[Return to contents]](#Contents)
## Stream
[[Return to contents]](#Contents)
## Cbc
## free
[[Return to contents]](#Contents)
## encrypt_blocks
[[Return to contents]](#Contents)
## decrypt_blocks
[[Return to contents]](#Contents)
## Cfb
## free
[[Return to contents]](#Contents)
## xor_key_stream
[[Return to contents]](#Contents)
## Ctr
## free
[[Return to contents]](#Contents)
## xor_key_stream
[[Return to contents]](#Contents)
## Ofb
## xor_key_stream
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,38 +0,0 @@
# module crypto.des
## Contents
- [encrypt_block](#encrypt_block)
- [new_cipher](#new_cipher)
- [new_triple_des_cipher](#new_triple_des_cipher)
- [DesCipher](#DesCipher)
- [encrypt](#encrypt)
- [decrypt](#decrypt)
- [TripleDesCipher](#TripleDesCipher)
- [encrypt](#encrypt)
- [decrypt](#decrypt)
## encrypt_block
[[Return to contents]](#Contents)
## new_cipher
[[Return to contents]](#Contents)
## new_triple_des_cipher
[[Return to contents]](#Contents)
## DesCipher
## encrypt
[[Return to contents]](#Contents)
## decrypt
[[Return to contents]](#Contents)
## TripleDesCipher
## encrypt
[[Return to contents]](#Contents)
## decrypt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,102 +0,0 @@
# module crypto.ecdsa
## Contents
- [generate_key](#generate_key)
- [new_key_from_seed](#new_key_from_seed)
- [privkey_from_string](#privkey_from_string)
- [pubkey_from_bytes](#pubkey_from_bytes)
- [pubkey_from_string](#pubkey_from_string)
- [PrivateKey.new](#PrivateKey.new)
- [HashConfig](#HashConfig)
- [Nid](#Nid)
- [C.BIO](#C.BIO)
- [CurveOptions](#CurveOptions)
- [PrivateKey](#PrivateKey)
- [sign](#sign)
- [sign_with_options](#sign_with_options)
- [bytes](#bytes)
- [seed](#seed)
- [public_key](#public_key)
- [equal](#equal)
- [free](#free)
- [PublicKey](#PublicKey)
- [bytes](#bytes)
- [equal](#equal)
- [free](#free)
- [verify](#verify)
- [SignerOpts](#SignerOpts)
## generate_key
[[Return to contents]](#Contents)
## new_key_from_seed
[[Return to contents]](#Contents)
## privkey_from_string
[[Return to contents]](#Contents)
## pubkey_from_bytes
[[Return to contents]](#Contents)
## pubkey_from_string
[[Return to contents]](#Contents)
## PrivateKey.new
[[Return to contents]](#Contents)
## HashConfig
[[Return to contents]](#Contents)
## Nid
[[Return to contents]](#Contents)
## C.BIO
[[Return to contents]](#Contents)
## CurveOptions
[[Return to contents]](#Contents)
## PrivateKey
[[Return to contents]](#Contents)
## sign
[[Return to contents]](#Contents)
## sign_with_options
[[Return to contents]](#Contents)
## bytes
[[Return to contents]](#Contents)
## seed
[[Return to contents]](#Contents)
## public_key
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## PublicKey
[[Return to contents]](#Contents)
## bytes
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## verify
[[Return to contents]](#Contents)
## SignerOpts
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,224 +0,0 @@
# module crypto.ed25519.internal.edwards25519
## Contents
- [Constants](#Constants)
- [new_generator_point](#new_generator_point)
- [new_identity_point](#new_identity_point)
- [new_scalar](#new_scalar)
- [Scalar](#Scalar)
- [add](#add)
- [bytes](#bytes)
- [equal](#equal)
- [invert](#invert)
- [multiply](#multiply)
- [multiply_add](#multiply_add)
- [negate](#negate)
- [non_adjacent_form](#non_adjacent_form)
- [set](#set)
- [set_bytes_with_clamping](#set_bytes_with_clamping)
- [set_canonical_bytes](#set_canonical_bytes)
- [set_uniform_bytes](#set_uniform_bytes)
- [subtract](#subtract)
- [Element](#Element)
- [zero](#zero)
- [one](#one)
- [reduce](#reduce)
- [add](#add)
- [subtract](#subtract)
- [negate](#negate)
- [invert](#invert)
- [square](#square)
- [multiply](#multiply)
- [pow_22523](#pow_22523)
- [sqrt_ratio](#sqrt_ratio)
- [selected](#selected)
- [is_negative](#is_negative)
- [absolute](#absolute)
- [set](#set)
- [set_bytes](#set_bytes)
- [bytes](#bytes)
- [equal](#equal)
- [swap](#swap)
- [mult_32](#mult_32)
- [Point](#Point)
- [add](#add)
- [bytes](#bytes)
- [bytes_montgomery](#bytes_montgomery)
- [equal](#equal)
- [mult_by_cofactor](#mult_by_cofactor)
- [multi_scalar_mult](#multi_scalar_mult)
- [negate](#negate)
- [scalar_base_mult](#scalar_base_mult)
- [scalar_mult](#scalar_mult)
- [set](#set)
- [set_bytes](#set_bytes)
- [subtract](#subtract)
- [vartime_double_scalar_base_mult](#vartime_double_scalar_base_mult)
- [vartime_multiscalar_mult](#vartime_multiscalar_mult)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## new_generator_point
[[Return to contents]](#Contents)
## new_identity_point
[[Return to contents]](#Contents)
## new_scalar
[[Return to contents]](#Contents)
## Scalar
## add
[[Return to contents]](#Contents)
## bytes
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## invert
[[Return to contents]](#Contents)
## multiply
[[Return to contents]](#Contents)
## multiply_add
[[Return to contents]](#Contents)
## negate
[[Return to contents]](#Contents)
## non_adjacent_form
[[Return to contents]](#Contents)
## set
[[Return to contents]](#Contents)
## set_bytes_with_clamping
[[Return to contents]](#Contents)
## set_canonical_bytes
[[Return to contents]](#Contents)
## set_uniform_bytes
[[Return to contents]](#Contents)
## subtract
[[Return to contents]](#Contents)
## Element
[[Return to contents]](#Contents)
## zero
[[Return to contents]](#Contents)
## one
[[Return to contents]](#Contents)
## reduce
[[Return to contents]](#Contents)
## add
[[Return to contents]](#Contents)
## subtract
[[Return to contents]](#Contents)
## negate
[[Return to contents]](#Contents)
## invert
[[Return to contents]](#Contents)
## square
[[Return to contents]](#Contents)
## multiply
[[Return to contents]](#Contents)
## pow_22523
[[Return to contents]](#Contents)
## sqrt_ratio
[[Return to contents]](#Contents)
## selected
[[Return to contents]](#Contents)
## is_negative
[[Return to contents]](#Contents)
## absolute
[[Return to contents]](#Contents)
## set
[[Return to contents]](#Contents)
## set_bytes
[[Return to contents]](#Contents)
## bytes
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## swap
[[Return to contents]](#Contents)
## mult_32
[[Return to contents]](#Contents)
## Point
[[Return to contents]](#Contents)
## add
[[Return to contents]](#Contents)
## bytes
[[Return to contents]](#Contents)
## bytes_montgomery
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## mult_by_cofactor
[[Return to contents]](#Contents)
## multi_scalar_mult
[[Return to contents]](#Contents)
## negate
[[Return to contents]](#Contents)
## scalar_base_mult
[[Return to contents]](#Contents)
## scalar_mult
[[Return to contents]](#Contents)
## set
[[Return to contents]](#Contents)
## set_bytes
[[Return to contents]](#Contents)
## subtract
[[Return to contents]](#Contents)
## vartime_double_scalar_base_mult
[[Return to contents]](#Contents)
## vartime_multiscalar_mult
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,60 +0,0 @@
# module crypto.ed25519
## Contents
- [Constants](#Constants)
- [generate_key](#generate_key)
- [new_key_from_seed](#new_key_from_seed)
- [sign](#sign)
- [verify](#verify)
- [PrivateKey](#PrivateKey)
- [seed](#seed)
- [public_key](#public_key)
- [equal](#equal)
- [sign](#sign)
- [PublicKey](#PublicKey)
- [equal](#equal)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## generate_key
[[Return to contents]](#Contents)
## new_key_from_seed
[[Return to contents]](#Contents)
## sign
[[Return to contents]](#Contents)
## verify
[[Return to contents]](#Contents)
## PrivateKey
[[Return to contents]](#Contents)
## seed
[[Return to contents]](#Contents)
## public_key
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
## sign
[[Return to contents]](#Contents)
## PublicKey
[[Return to contents]](#Contents)
## equal
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,14 +0,0 @@
# module crypto.hmac
## Contents
- [equal](#equal)
- [new](#new)
## equal
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,38 +0,0 @@
# module crypto.internal.subtle
## Contents
- [any_overlap](#any_overlap)
- [constant_time_byte_eq](#constant_time_byte_eq)
- [constant_time_compare](#constant_time_compare)
- [constant_time_copy](#constant_time_copy)
- [constant_time_eq](#constant_time_eq)
- [constant_time_less_or_eq](#constant_time_less_or_eq)
- [constant_time_select](#constant_time_select)
- [inexact_overlap](#inexact_overlap)
## any_overlap
[[Return to contents]](#Contents)
## constant_time_byte_eq
[[Return to contents]](#Contents)
## constant_time_compare
[[Return to contents]](#Contents)
## constant_time_copy
[[Return to contents]](#Contents)
## constant_time_eq
[[Return to contents]](#Contents)
## constant_time_less_or_eq
[[Return to contents]](#Contents)
## constant_time_select
[[Return to contents]](#Contents)
## inexact_overlap
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,10 +0,0 @@
# module crypto
## Contents
- [Hash](#Hash)
## Hash
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,57 +0,0 @@
# module crypto.md5
## Contents
- [Constants](#Constants)
- [hexhash](#hexhash)
- [new](#new)
- [sum](#sum)
- [Digest](#Digest)
- [free](#free)
- [reset](#reset)
- [write](#write)
- [sum](#sum)
- [size](#size)
- [block_size](#block_size)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## hexhash
Example
```v
assert md5.hexhash('V') == '5206560a306a2e085a437fd258eb57ce'
```
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## Digest
## free
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## block_size
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,10 +0,0 @@
# module crypto.pbkdf2
## Contents
- [key](#key)
## key
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,46 +0,0 @@
# module crypto.pem
## Contents
- [decode](#decode)
- [decode_only](#decode_only)
- [Block.new](#Block.new)
- [Header](#Header)
- [str](#str)
- [Block](#Block)
- [encode](#encode)
- [free](#free)
- [header_by_key](#header_by_key)
- [EncodeConfig](#EncodeConfig)
## decode
[[Return to contents]](#Contents)
## decode_only
[[Return to contents]](#Contents)
## Block.new
[[Return to contents]](#Contents)
## Header
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## Block
[[Return to contents]](#Contents)
## encode
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## header_by_key
[[Return to contents]](#Contents)
## EncodeConfig
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,28 +0,0 @@
# module crypto.rand
## Contents
- [bytes](#bytes)
- [int_big](#int_big)
- [int_u64](#int_u64)
- [read](#read)
- [ReadError](#ReadError)
- [msg](#msg)
## bytes
[[Return to contents]](#Contents)
## int_big
[[Return to contents]](#Contents)
## int_u64
[[Return to contents]](#Contents)
## read
[[Return to contents]](#Contents)
## ReadError
## msg
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,24 +0,0 @@
# module crypto.rc4
## Contents
- [new_cipher](#new_cipher)
- [Cipher](#Cipher)
- [free](#free)
- [reset](#reset)
- [xor_key_stream](#xor_key_stream)
## new_cipher
[[Return to contents]](#Contents)
## Cipher
## free
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## xor_key_stream
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,16 +0,0 @@
# module crypto.scrypt
## Contents
- [Constants](#Constants)
- [scrypt](#scrypt)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## scrypt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,50 +0,0 @@
# module crypto.sha1
## Contents
- [Constants](#Constants)
- [hexhash](#hexhash)
- [new](#new)
- [sum](#sum)
- [Digest](#Digest)
- [free](#free)
- [reset](#reset)
- [write](#write)
- [sum](#sum)
- [size](#size)
- [block_size](#block_size)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## hexhash
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## Digest
## free
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## block_size
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,82 +0,0 @@
# module crypto.sha256
## Contents
- [Constants](#Constants)
- [hexhash](#hexhash)
- [hexhash_224](#hexhash_224)
- [new](#new)
- [new224](#new224)
- [sum](#sum)
- [sum224](#sum224)
- [sum256](#sum256)
- [Digest](#Digest)
- [free](#free)
- [reset](#reset)
- [write](#write)
- [sum](#sum)
- [size](#size)
- [block_size](#block_size)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## hexhash
Example
```v
assert sha256.hexhash('V') == 'de5a6f78116eca62d7fc5ce159d23ae6b889b365a1739ad2cf36f925a140d0cc'
```
[[Return to contents]](#Contents)
## hexhash_224
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## new224
[[Return to contents]](#Contents)
## sum
Example
```v
assert sha256.sum('V'.bytes()).len > 0 == true
```
[[Return to contents]](#Contents)
## sum224
[[Return to contents]](#Contents)
## sum256
[[Return to contents]](#Contents)
## Digest
## free
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## block_size
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,118 +0,0 @@
# module crypto.sha3
## Contents
- [Constants](#Constants)
- [keccak256](#keccak256)
- [keccak512](#keccak512)
- [new128xof](#new128xof)
- [new224](#new224)
- [new256](#new256)
- [new256keccak](#new256keccak)
- [new256xof](#new256xof)
- [new384](#new384)
- [new512](#new512)
- [new512keccak](#new512keccak)
- [new_digest](#new_digest)
- [new_xof_digest](#new_xof_digest)
- [shake128](#shake128)
- [shake256](#shake256)
- [sum224](#sum224)
- [sum256](#sum256)
- [sum384](#sum384)
- [sum512](#sum512)
- [Digest](#Digest)
- [write](#write)
- [checksum](#checksum)
- [Padding](#Padding)
- [PaddingConfig](#PaddingConfig)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## keccak256
[[Return to contents]](#Contents)
## keccak512
[[Return to contents]](#Contents)
## new128xof
[[Return to contents]](#Contents)
## new224
[[Return to contents]](#Contents)
## new256
[[Return to contents]](#Contents)
## new256keccak
[[Return to contents]](#Contents)
## new256xof
[[Return to contents]](#Contents)
## new384
[[Return to contents]](#Contents)
## new512
[[Return to contents]](#Contents)
## new512keccak
[[Return to contents]](#Contents)
## new_digest
[[Return to contents]](#Contents)
## new_xof_digest
[[Return to contents]](#Contents)
## shake128
[[Return to contents]](#Contents)
## shake256
[[Return to contents]](#Contents)
## sum224
[[Return to contents]](#Contents)
## sum256
[[Return to contents]](#Contents)
## sum384
[[Return to contents]](#Contents)
## sum512
[[Return to contents]](#Contents)
## Digest
## write
[[Return to contents]](#Contents)
## checksum
[[Return to contents]](#Contents)
## Padding
[[Return to contents]](#Contents)
## PaddingConfig
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,92 +0,0 @@
# module crypto.sha512
## Contents
- [Constants](#Constants)
- [hexhash](#hexhash)
- [hexhash_384](#hexhash_384)
- [hexhash_512_224](#hexhash_512_224)
- [hexhash_512_256](#hexhash_512_256)
- [new](#new)
- [new384](#new384)
- [new512_224](#new512_224)
- [new512_256](#new512_256)
- [sum384](#sum384)
- [sum512](#sum512)
- [sum512_224](#sum512_224)
- [sum512_256](#sum512_256)
- [Digest](#Digest)
- [free](#free)
- [reset](#reset)
- [write](#write)
- [sum](#sum)
- [size](#size)
- [block_size](#block_size)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## hexhash
[[Return to contents]](#Contents)
## hexhash_384
[[Return to contents]](#Contents)
## hexhash_512_224
[[Return to contents]](#Contents)
## hexhash_512_256
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## new384
[[Return to contents]](#Contents)
## new512_224
[[Return to contents]](#Contents)
## new512_256
[[Return to contents]](#Contents)
## sum384
[[Return to contents]](#Contents)
## sum512
[[Return to contents]](#Contents)
## sum512_224
[[Return to contents]](#Contents)
## sum512_256
[[Return to contents]](#Contents)
## Digest
## free
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## write
[[Return to contents]](#Contents)
## sum
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## block_size
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,42 +0,0 @@
# module datatypes.fsm
## Contents
- [new](#new)
- [ConditionFn](#ConditionFn)
- [EventHandlerFn](#EventHandlerFn)
- [StateMachine](#StateMachine)
- [set_state](#set_state)
- [get_state](#get_state)
- [add_state](#add_state)
- [add_transition](#add_transition)
- [run](#run)
## new
[[Return to contents]](#Contents)
## ConditionFn
[[Return to contents]](#Contents)
## EventHandlerFn
[[Return to contents]](#Contents)
## StateMachine
[[Return to contents]](#Contents)
## set_state
[[Return to contents]](#Contents)
## get_state
[[Return to contents]](#Contents)
## add_state
[[Return to contents]](#Contents)
## add_transition
[[Return to contents]](#Contents)
## run
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,510 +0,0 @@
# module datatypes
## Contents
- [new_bloom_filter](#new_bloom_filter)
- [new_bloom_filter_fast](#new_bloom_filter_fast)
- [new_ringbuffer](#new_ringbuffer)
- [BSTree[T]](#BSTree[T])
- [insert](#insert)
- [contains](#contains)
- [remove](#remove)
- [is_empty](#is_empty)
- [in_order_traversal](#in_order_traversal)
- [post_order_traversal](#post_order_traversal)
- [pre_order_traversal](#pre_order_traversal)
- [to_left](#to_left)
- [to_right](#to_right)
- [max](#max)
- [min](#min)
- [BloomFilter[T]](#BloomFilter[T])
- [add](#add)
- [exists](#exists)
- [@union](#@union)
- [intersection](#intersection)
- [DoublyLinkedList[T]](#DoublyLinkedList[T])
- [is_empty](#is_empty)
- [len](#len)
- [first](#first)
- [last](#last)
- [push_back](#push_back)
- [push_front](#push_front)
- [push_many](#push_many)
- [pop_back](#pop_back)
- [pop_front](#pop_front)
- [insert](#insert)
- [index](#index)
- [delete](#delete)
- [str](#str)
- [array](#array)
- [next](#next)
- [iterator](#iterator)
- [back_iterator](#back_iterator)
- [DoublyListIterBack[T]](#DoublyListIterBack[T])
- [next](#next)
- [DoublyListIter[T]](#DoublyListIter[T])
- [next](#next)
- [LinkedList[T]](#LinkedList[T])
- [is_empty](#is_empty)
- [len](#len)
- [first](#first)
- [last](#last)
- [index](#index)
- [push](#push)
- [push_many](#push_many)
- [pop](#pop)
- [shift](#shift)
- [insert](#insert)
- [prepend](#prepend)
- [str](#str)
- [array](#array)
- [next](#next)
- [iterator](#iterator)
- [ListIter[T]](#ListIter[T])
- [next](#next)
- [MinHeap[T]](#MinHeap[T])
- [insert](#insert)
- [insert_many](#insert_many)
- [pop](#pop)
- [peek](#peek)
- [len](#len)
- [Queue[T]](#Queue[T])
- [is_empty](#is_empty)
- [len](#len)
- [peek](#peek)
- [last](#last)
- [index](#index)
- [push](#push)
- [pop](#pop)
- [str](#str)
- [array](#array)
- [RingBuffer[T]](#RingBuffer[T])
- [push](#push)
- [pop](#pop)
- [push_many](#push_many)
- [pop_many](#pop_many)
- [is_empty](#is_empty)
- [is_full](#is_full)
- [capacity](#capacity)
- [clear](#clear)
- [occupied](#occupied)
- [remaining](#remaining)
- [Set[T]](#Set[T])
- [exists](#exists)
- [add](#add)
- [remove](#remove)
- [pick](#pick)
- [rest](#rest)
- [pop](#pop)
- [clear](#clear)
- [==](#==)
- [is_empty](#is_empty)
- [size](#size)
- [copy](#copy)
- [add_all](#add_all)
- [@union](#@union)
- [intersection](#intersection)
- [-](#-)
- [subset](#subset)
- [Stack[T]](#Stack[T])
- [is_empty](#is_empty)
- [len](#len)
- [peek](#peek)
- [push](#push)
- [pop](#pop)
- [str](#str)
- [array](#array)
- [Direction](#Direction)
- [AABB](#AABB)
- [BSTree](#BSTree)
- [DoublyLinkedList](#DoublyLinkedList)
- [DoublyListIter](#DoublyListIter)
- [DoublyListIterBack](#DoublyListIterBack)
- [LinkedList](#LinkedList)
- [ListIter](#ListIter)
- [ListNode](#ListNode)
- [MinHeap](#MinHeap)
- [Quadtree](#Quadtree)
- [create](#create)
- [insert](#insert)
- [retrieve](#retrieve)
- [clear](#clear)
- [get_nodes](#get_nodes)
- [Queue](#Queue)
- [RingBuffer](#RingBuffer)
- [Set](#Set)
- [Stack](#Stack)
## new_bloom_filter
[[Return to contents]](#Contents)
## new_bloom_filter_fast
[[Return to contents]](#Contents)
## new_ringbuffer
[[Return to contents]](#Contents)
## BSTree[T]
## insert
[[Return to contents]](#Contents)
## contains
[[Return to contents]](#Contents)
## remove
[[Return to contents]](#Contents)
## is_empty
[[Return to contents]](#Contents)
## in_order_traversal
[[Return to contents]](#Contents)
## post_order_traversal
[[Return to contents]](#Contents)
## pre_order_traversal
[[Return to contents]](#Contents)
## to_left
[[Return to contents]](#Contents)
## to_right
[[Return to contents]](#Contents)
## max
[[Return to contents]](#Contents)
## min
[[Return to contents]](#Contents)
## BloomFilter[T]
## add
[[Return to contents]](#Contents)
## exists
[[Return to contents]](#Contents)
## @union
[[Return to contents]](#Contents)
## intersection
[[Return to contents]](#Contents)
## DoublyLinkedList[T]
## is_empty
[[Return to contents]](#Contents)
## len
[[Return to contents]](#Contents)
## first
[[Return to contents]](#Contents)
## last
[[Return to contents]](#Contents)
## push_back
[[Return to contents]](#Contents)
## push_front
[[Return to contents]](#Contents)
## push_many
[[Return to contents]](#Contents)
## pop_back
[[Return to contents]](#Contents)
## pop_front
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## index
[[Return to contents]](#Contents)
## delete
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## array
[[Return to contents]](#Contents)
## next
[[Return to contents]](#Contents)
## iterator
[[Return to contents]](#Contents)
## back_iterator
[[Return to contents]](#Contents)
## DoublyListIterBack[T]
## next
[[Return to contents]](#Contents)
## DoublyListIter[T]
## next
[[Return to contents]](#Contents)
## LinkedList[T]
## is_empty
[[Return to contents]](#Contents)
## len
[[Return to contents]](#Contents)
## first
[[Return to contents]](#Contents)
## last
[[Return to contents]](#Contents)
## index
[[Return to contents]](#Contents)
## push
[[Return to contents]](#Contents)
## push_many
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## shift
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## prepend
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## array
[[Return to contents]](#Contents)
## next
[[Return to contents]](#Contents)
## iterator
[[Return to contents]](#Contents)
## ListIter[T]
## next
[[Return to contents]](#Contents)
## MinHeap[T]
## insert
[[Return to contents]](#Contents)
## insert_many
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## peek
[[Return to contents]](#Contents)
## len
[[Return to contents]](#Contents)
## Queue[T]
## is_empty
[[Return to contents]](#Contents)
## len
[[Return to contents]](#Contents)
## peek
[[Return to contents]](#Contents)
## last
[[Return to contents]](#Contents)
## index
[[Return to contents]](#Contents)
## push
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## array
[[Return to contents]](#Contents)
## RingBuffer[T]
## push
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## push_many
[[Return to contents]](#Contents)
## pop_many
[[Return to contents]](#Contents)
## is_empty
[[Return to contents]](#Contents)
## is_full
[[Return to contents]](#Contents)
## capacity
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## occupied
[[Return to contents]](#Contents)
## remaining
[[Return to contents]](#Contents)
## Set[T]
## exists
[[Return to contents]](#Contents)
## add
[[Return to contents]](#Contents)
## remove
[[Return to contents]](#Contents)
## pick
[[Return to contents]](#Contents)
## rest
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## ==
[[Return to contents]](#Contents)
## is_empty
[[Return to contents]](#Contents)
## size
[[Return to contents]](#Contents)
## copy
[[Return to contents]](#Contents)
## add_all
[[Return to contents]](#Contents)
## @union
[[Return to contents]](#Contents)
## intersection
[[Return to contents]](#Contents)
## -
[[Return to contents]](#Contents)
## subset
[[Return to contents]](#Contents)
## Stack[T]
## is_empty
[[Return to contents]](#Contents)
## len
[[Return to contents]](#Contents)
## peek
[[Return to contents]](#Contents)
## push
[[Return to contents]](#Contents)
## pop
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## array
[[Return to contents]](#Contents)
## Direction
[[Return to contents]](#Contents)
## AABB
[[Return to contents]](#Contents)
## BSTree
[[Return to contents]](#Contents)
## DoublyLinkedList
[[Return to contents]](#Contents)
## DoublyListIter
[[Return to contents]](#Contents)
## DoublyListIterBack
[[Return to contents]](#Contents)
## LinkedList
[[Return to contents]](#Contents)
## ListIter
[[Return to contents]](#Contents)
## ListNode
[[Return to contents]](#Contents)
## MinHeap
[[Return to contents]](#Contents)
## Quadtree
[[Return to contents]](#Contents)
## create
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## retrieve
[[Return to contents]](#Contents)
## clear
[[Return to contents]](#Contents)
## get_nodes
[[Return to contents]](#Contents)
## Queue
[[Return to contents]](#Contents)
## RingBuffer
[[Return to contents]](#Contents)
## Set
[[Return to contents]](#Contents)
## Stack
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,38 +0,0 @@
# module db.mssql
## Contents
- [Config](#Config)
- [get_conn_str](#get_conn_str)
- [Connection](#Connection)
- [connect](#connect)
- [close](#close)
- [query](#query)
- [Result](#Result)
- [Row](#Row)
## Config
[[Return to contents]](#Contents)
## get_conn_str
[[Return to contents]](#Contents)
## Connection
[[Return to contents]](#Contents)
## connect
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## query
[[Return to contents]](#Contents)
## Result
[[Return to contents]](#Contents)
## Row
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,400 +0,0 @@
# module db.mysql
## Contents
- [Constants](#Constants)
- [connect](#connect)
- [debug](#debug)
- [get_client_info](#get_client_info)
- [get_client_version](#get_client_version)
- [ConnectionFlag](#ConnectionFlag)
- [FieldType](#FieldType)
- [str](#str)
- [get_len](#get_len)
- [C.MYSQL](#C.MYSQL)
- [C.MYSQL_BIND](#C.MYSQL_BIND)
- [C.MYSQL_FIELD](#C.MYSQL_FIELD)
- [C.MYSQL_RES](#C.MYSQL_RES)
- [C.MYSQL_STMT](#C.MYSQL_STMT)
- [Config](#Config)
- [DB](#DB)
- [affected_rows](#affected_rows)
- [autocommit](#autocommit)
- [change_user](#change_user)
- [close](#close)
- [commit](#commit)
- [create](#create)
- [delete](#delete)
- [drop](#drop)
- [dump_debug_info](#dump_debug_info)
- [escape_string](#escape_string)
- [exec](#exec)
- [exec_none](#exec_none)
- [exec_one](#exec_one)
- [exec_param](#exec_param)
- [exec_param_many](#exec_param_many)
- [get_host_info](#get_host_info)
- [get_option](#get_option)
- [get_server_info](#get_server_info)
- [get_server_version](#get_server_version)
- [info](#info)
- [init_stmt](#init_stmt)
- [insert](#insert)
- [last_id](#last_id)
- [ping](#ping)
- [prepare](#prepare)
- [query](#query)
- [real_query](#real_query)
- [refresh](#refresh)
- [reset](#reset)
- [select](#select)
- [select_db](#select_db)
- [set_option](#set_option)
- [tables](#tables)
- [update](#update)
- [use_result](#use_result)
- [Field](#Field)
- [str](#str)
- [Result](#Result)
- [fetch_row](#fetch_row)
- [n_rows](#n_rows)
- [n_fields](#n_fields)
- [rows](#rows)
- [maps](#maps)
- [fields](#fields)
- [free](#free)
- [Row](#Row)
- [Stmt](#Stmt)
- [str](#str)
- [prepare](#prepare)
- [bind_params](#bind_params)
- [execute](#execute)
- [next](#next)
- [gen_metadata](#gen_metadata)
- [fetch_fields](#fetch_fields)
- [fetch_stmt](#fetch_stmt)
- [close](#close)
- [error](#error)
- [bind_bool](#bind_bool)
- [bind_byte](#bind_byte)
- [bind_u8](#bind_u8)
- [bind_i8](#bind_i8)
- [bind_i16](#bind_i16)
- [bind_u16](#bind_u16)
- [bind_int](#bind_int)
- [bind_u32](#bind_u32)
- [bind_i64](#bind_i64)
- [bind_u64](#bind_u64)
- [bind_f32](#bind_f32)
- [bind_f64](#bind_f64)
- [bind_text](#bind_text)
- [bind_null](#bind_null)
- [bind](#bind)
- [bind_res](#bind_res)
- [bind_result_buffer](#bind_result_buffer)
- [store_result](#store_result)
- [fetch_column](#fetch_column)
- [StmtHandle](#StmtHandle)
- [execute](#execute)
- [close](#close)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## connect
[[Return to contents]](#Contents)
## debug
[[Return to contents]](#Contents)
## get_client_info
[[Return to contents]](#Contents)
## get_client_version
[[Return to contents]](#Contents)
## ConnectionFlag
[[Return to contents]](#Contents)
## FieldType
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## get_len
[[Return to contents]](#Contents)
## C.MYSQL
[[Return to contents]](#Contents)
## C.MYSQL_BIND
[[Return to contents]](#Contents)
## C.MYSQL_FIELD
[[Return to contents]](#Contents)
## C.MYSQL_RES
[[Return to contents]](#Contents)
## C.MYSQL_STMT
[[Return to contents]](#Contents)
## Config
[[Return to contents]](#Contents)
## DB
[[Return to contents]](#Contents)
## affected_rows
[[Return to contents]](#Contents)
## autocommit
[[Return to contents]](#Contents)
## change_user
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## commit
[[Return to contents]](#Contents)
## create
[[Return to contents]](#Contents)
## delete
[[Return to contents]](#Contents)
## drop
[[Return to contents]](#Contents)
## dump_debug_info
[[Return to contents]](#Contents)
## escape_string
[[Return to contents]](#Contents)
## exec
[[Return to contents]](#Contents)
## exec_none
[[Return to contents]](#Contents)
## exec_one
[[Return to contents]](#Contents)
## exec_param
[[Return to contents]](#Contents)
## exec_param_many
[[Return to contents]](#Contents)
## get_host_info
[[Return to contents]](#Contents)
## get_option
[[Return to contents]](#Contents)
## get_server_info
[[Return to contents]](#Contents)
## get_server_version
[[Return to contents]](#Contents)
## info
[[Return to contents]](#Contents)
## init_stmt
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## last_id
[[Return to contents]](#Contents)
## ping
[[Return to contents]](#Contents)
## prepare
[[Return to contents]](#Contents)
## query
[[Return to contents]](#Contents)
## real_query
[[Return to contents]](#Contents)
## refresh
[[Return to contents]](#Contents)
## reset
[[Return to contents]](#Contents)
## select
[[Return to contents]](#Contents)
## select_db
[[Return to contents]](#Contents)
## set_option
[[Return to contents]](#Contents)
## tables
[[Return to contents]](#Contents)
## update
[[Return to contents]](#Contents)
## use_result
[[Return to contents]](#Contents)
## Field
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## Result
[[Return to contents]](#Contents)
## fetch_row
[[Return to contents]](#Contents)
## n_rows
[[Return to contents]](#Contents)
## n_fields
[[Return to contents]](#Contents)
## rows
[[Return to contents]](#Contents)
## maps
[[Return to contents]](#Contents)
## fields
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## Row
[[Return to contents]](#Contents)
## Stmt
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## prepare
[[Return to contents]](#Contents)
## bind_params
[[Return to contents]](#Contents)
## execute
[[Return to contents]](#Contents)
## next
[[Return to contents]](#Contents)
## gen_metadata
[[Return to contents]](#Contents)
## fetch_fields
[[Return to contents]](#Contents)
## fetch_stmt
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## error
[[Return to contents]](#Contents)
## bind_bool
[[Return to contents]](#Contents)
## bind_byte
[[Return to contents]](#Contents)
## bind_u8
[[Return to contents]](#Contents)
## bind_i8
[[Return to contents]](#Contents)
## bind_i16
[[Return to contents]](#Contents)
## bind_u16
[[Return to contents]](#Contents)
## bind_int
[[Return to contents]](#Contents)
## bind_u32
[[Return to contents]](#Contents)
## bind_i64
[[Return to contents]](#Contents)
## bind_u64
[[Return to contents]](#Contents)
## bind_f32
[[Return to contents]](#Contents)
## bind_f64
[[Return to contents]](#Contents)
## bind_text
[[Return to contents]](#Contents)
## bind_null
[[Return to contents]](#Contents)
## bind
[[Return to contents]](#Contents)
## bind_res
[[Return to contents]](#Contents)
## bind_result_buffer
[[Return to contents]](#Contents)
## store_result
[[Return to contents]](#Contents)
## fetch_column
[[Return to contents]](#Contents)
## StmtHandle
[[Return to contents]](#Contents)
## execute
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,130 +0,0 @@
# module db.pg
## Contents
- [connect](#connect)
- [connect_with_conninfo](#connect_with_conninfo)
- [ConnStatusType](#ConnStatusType)
- [ExecStatusType](#ExecStatusType)
- [Oid](#Oid)
- [C.PGconn](#C.PGconn)
- [C.PGresult](#C.PGresult)
- [C.pg_conn](#C.pg_conn)
- [C.pg_result](#C.pg_result)
- [Config](#Config)
- [DB](#DB)
- [close](#close)
- [copy_expert](#copy_expert)
- [create](#create)
- [delete](#delete)
- [drop](#drop)
- [exec](#exec)
- [exec_one](#exec_one)
- [exec_param](#exec_param)
- [exec_param2](#exec_param2)
- [exec_param_many](#exec_param_many)
- [exec_prepared](#exec_prepared)
- [insert](#insert)
- [last_id](#last_id)
- [prepare](#prepare)
- [q_int](#q_int)
- [q_string](#q_string)
- [q_strings](#q_strings)
- [select](#select)
- [update](#update)
- [Row](#Row)
## connect
[[Return to contents]](#Contents)
## connect_with_conninfo
[[Return to contents]](#Contents)
## ConnStatusType
[[Return to contents]](#Contents)
## ExecStatusType
[[Return to contents]](#Contents)
## Oid
[[Return to contents]](#Contents)
## C.PGconn
[[Return to contents]](#Contents)
## C.PGresult
[[Return to contents]](#Contents)
## C.pg_conn
[[Return to contents]](#Contents)
## C.pg_result
[[Return to contents]](#Contents)
## Config
[[Return to contents]](#Contents)
## DB
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## copy_expert
[[Return to contents]](#Contents)
## create
[[Return to contents]](#Contents)
## delete
[[Return to contents]](#Contents)
## drop
[[Return to contents]](#Contents)
## exec
[[Return to contents]](#Contents)
## exec_one
[[Return to contents]](#Contents)
## exec_param
[[Return to contents]](#Contents)
## exec_param2
[[Return to contents]](#Contents)
## exec_param_many
[[Return to contents]](#Contents)
## exec_prepared
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## last_id
[[Return to contents]](#Contents)
## prepare
[[Return to contents]](#Contents)
## q_int
[[Return to contents]](#Contents)
## q_string
[[Return to contents]](#Contents)
## q_strings
[[Return to contents]](#Contents)
## select
[[Return to contents]](#Contents)
## update
[[Return to contents]](#Contents)
## Row
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,234 +0,0 @@
# module db.sqlite
## Contents
- [Constants](#Constants)
- [connect](#connect)
- [connect_full](#connect_full)
- [get_default_vfs](#get_default_vfs)
- [get_vfs](#get_vfs)
- [is_error](#is_error)
- [Sqlite3_file](#Sqlite3_file)
- [Sqlite3_io_methods](#Sqlite3_io_methods)
- [Sqlite3_vfs](#Sqlite3_vfs)
- [register_as_nondefault](#register_as_nondefault)
- [unregister](#unregister)
- [JournalMode](#JournalMode)
- [OpenModeFlag](#OpenModeFlag)
- [Result](#Result)
- [is_error](#is_error)
- [SyncMode](#SyncMode)
- [C.sqlite3](#C.sqlite3)
- [C.sqlite3_file](#C.sqlite3_file)
- [C.sqlite3_io_methods](#C.sqlite3_io_methods)
- [C.sqlite3_stmt](#C.sqlite3_stmt)
- [C.sqlite3_vfs](#C.sqlite3_vfs)
- [DB](#DB)
- [busy_timeout](#busy_timeout)
- [close](#close)
- [create](#create)
- [create_table](#create_table)
- [delete](#delete)
- [drop](#drop)
- [error_message](#error_message)
- [exec](#exec)
- [exec_map](#exec_map)
- [exec_none](#exec_none)
- [exec_one](#exec_one)
- [exec_param](#exec_param)
- [exec_param_many](#exec_param_many)
- [get_affected_rows_count](#get_affected_rows_count)
- [insert](#insert)
- [journal_mode](#journal_mode)
- [last_id](#last_id)
- [last_insert_rowid](#last_insert_rowid)
- [q_int](#q_int)
- [q_string](#q_string)
- [select](#select)
- [str](#str)
- [synchronization_mode](#synchronization_mode)
- [update](#update)
- [Row](#Row)
- [Stmt](#Stmt)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## connect
[[Return to contents]](#Contents)
## connect_full
[[Return to contents]](#Contents)
## get_default_vfs
[[Return to contents]](#Contents)
## get_vfs
[[Return to contents]](#Contents)
## is_error
[[Return to contents]](#Contents)
## Sqlite3_file
[[Return to contents]](#Contents)
## Sqlite3_io_methods
[[Return to contents]](#Contents)
## Sqlite3_vfs
[[Return to contents]](#Contents)
## register_as_nondefault
[[Return to contents]](#Contents)
## unregister
[[Return to contents]](#Contents)
## JournalMode
[[Return to contents]](#Contents)
## OpenModeFlag
[[Return to contents]](#Contents)
## Result
[[Return to contents]](#Contents)
## is_error
[[Return to contents]](#Contents)
## SyncMode
[[Return to contents]](#Contents)
## C.sqlite3
[[Return to contents]](#Contents)
## C.sqlite3_file
[[Return to contents]](#Contents)
## C.sqlite3_io_methods
[[Return to contents]](#Contents)
## C.sqlite3_stmt
[[Return to contents]](#Contents)
## C.sqlite3_vfs
[[Return to contents]](#Contents)
## DB
[[Return to contents]](#Contents)
## busy_timeout
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## create
[[Return to contents]](#Contents)
## create_table
[[Return to contents]](#Contents)
## delete
[[Return to contents]](#Contents)
## drop
[[Return to contents]](#Contents)
## error_message
[[Return to contents]](#Contents)
## exec
[[Return to contents]](#Contents)
## exec_map
[[Return to contents]](#Contents)
## exec_none
[[Return to contents]](#Contents)
## exec_one
[[Return to contents]](#Contents)
## exec_param
[[Return to contents]](#Contents)
## exec_param_many
[[Return to contents]](#Contents)
## get_affected_rows_count
[[Return to contents]](#Contents)
## insert
[[Return to contents]](#Contents)
## journal_mode
[[Return to contents]](#Contents)
## last_id
[[Return to contents]](#Contents)
## last_insert_rowid
[[Return to contents]](#Contents)
## q_int
[[Return to contents]](#Contents)
## q_string
[[Return to contents]](#Contents)
## select
[[Return to contents]](#Contents)
## str
[[Return to contents]](#Contents)
## synchronization_mode
[[Return to contents]](#Contents)
## update
[[Return to contents]](#Contents)
## Row
[[Return to contents]](#Contents)
## Stmt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,60 +0,0 @@
# module dl.loader
## Contents
- [Constants](#Constants)
- [get_or_create_dynamic_lib_loader](#get_or_create_dynamic_lib_loader)
- [registered_dl_loader_keys](#registered_dl_loader_keys)
- [DynamicLibLoader](#DynamicLibLoader)
- [open](#open)
- [close](#close)
- [get_sym](#get_sym)
- [unregister](#unregister)
- [DynamicLibLoaderConfig](#DynamicLibLoaderConfig)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## get_or_create_dynamic_lib_loader
[[Return to contents]](#Contents)
## registered_dl_loader_keys
[[Return to contents]](#Contents)
## DynamicLibLoader
[[Return to contents]](#Contents)
## open
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## get_sym
[[Return to contents]](#Contents)
## unregister
[[Return to contents]](#Contents)
## DynamicLibLoaderConfig
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,58 +0,0 @@
# module dl
## Contents
- [Constants](#Constants)
- [close](#close)
- [dlerror](#dlerror)
- [get_libname](#get_libname)
- [get_shared_library_extension](#get_shared_library_extension)
- [open](#open)
- [open_opt](#open_opt)
- [sym](#sym)
- [sym_opt](#sym_opt)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## close
[[Return to contents]](#Contents)
## dlerror
[[Return to contents]](#Contents)
## get_libname
[[Return to contents]](#Contents)
## get_shared_library_extension
[[Return to contents]](#Contents)
## open
[[Return to contents]](#Contents)
## open_opt
[[Return to contents]](#Contents)
## sym
[[Return to contents]](#Contents)
## sym_opt
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,86 +0,0 @@
# module dlmalloc
## Contents
- [Constants](#Constants)
- [calloc](#calloc)
- [free](#free)
- [get_system_allocator](#get_system_allocator)
- [malloc](#malloc)
- [memalign](#memalign)
- [new](#new)
- [realloc](#realloc)
- [Map_flags](#Map_flags)
- [Mm_prot](#Mm_prot)
- [Allocator](#Allocator)
- [Dlmalloc](#Dlmalloc)
- [calloc_must_clear](#calloc_must_clear)
- [calloc](#calloc)
- [free_](#free_)
- [malloc](#malloc)
- [realloc](#realloc)
- [memalign](#memalign)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## calloc
[[Return to contents]](#Contents)
## free
[[Return to contents]](#Contents)
## get_system_allocator
[[Return to contents]](#Contents)
## malloc
[[Return to contents]](#Contents)
## memalign
[[Return to contents]](#Contents)
## new
[[Return to contents]](#Contents)
## realloc
[[Return to contents]](#Contents)
## Map_flags
[[Return to contents]](#Contents)
## Mm_prot
[[Return to contents]](#Contents)
## Allocator
[[Return to contents]](#Contents)
## Dlmalloc
[[Return to contents]](#Contents)
## calloc_must_clear
[[Return to contents]](#Contents)
## calloc
[[Return to contents]](#Contents)
## free_
[[Return to contents]](#Contents)
## malloc
[[Return to contents]](#Contents)
## realloc
[[Return to contents]](#Contents)
## memalign
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

View File

@@ -1,78 +0,0 @@
# module encoding.base32
## Contents
- [Constants](#Constants)
- [decode](#decode)
- [decode_string_to_string](#decode_string_to_string)
- [decode_to_string](#decode_to_string)
- [encode](#encode)
- [encode_string_to_string](#encode_string_to_string)
- [encode_to_string](#encode_to_string)
- [new_encoding](#new_encoding)
- [new_encoding_with_padding](#new_encoding_with_padding)
- [new_std_encoding](#new_std_encoding)
- [new_std_encoding_with_padding](#new_std_encoding_with_padding)
- [Encoding](#Encoding)
- [encode_to_string](#encode_to_string)
- [encode_string_to_string](#encode_string_to_string)
- [decode_string](#decode_string)
- [decode_string_to_string](#decode_string_to_string)
- [decode](#decode)
## Constants
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
[[Return to contents]](#Contents)
## decode
[[Return to contents]](#Contents)
## decode_string_to_string
[[Return to contents]](#Contents)
## decode_to_string
[[Return to contents]](#Contents)
## encode
[[Return to contents]](#Contents)
## encode_string_to_string
[[Return to contents]](#Contents)
## encode_to_string
[[Return to contents]](#Contents)
## new_encoding
[[Return to contents]](#Contents)
## new_encoding_with_padding
[[Return to contents]](#Contents)
## new_std_encoding
[[Return to contents]](#Contents)
## new_std_encoding_with_padding
[[Return to contents]](#Contents)
## Encoding
## encode_to_string
[[Return to contents]](#Contents)
## encode_string_to_string
[[Return to contents]](#Contents)
## decode_string
[[Return to contents]](#Contents)
## decode_string_to_string
[[Return to contents]](#Contents)
## decode
[[Return to contents]](#Contents)
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55

Some files were not shown because too many files have changed in this diff Show More