Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb8c550ed1 | |||
| 5fc7019dcc | |||
| 8c9248fd94 | |||
| d1a5f1c268 | |||
| 96bc5c9e5d | |||
| 20927485d9 | |||
| a034708f21 | |||
| 19a2577564 | |||
| e34d804dda | |||
| cd6c899661 | |||
| 4b2f83ceaf |
8
.github/workflows/documentation.yml
vendored
8
.github/workflows/documentation.yml
vendored
@@ -17,6 +17,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-documentation:
|
deploy-documentation:
|
||||||
|
#if: startsWith(github.ref, 'refs/tags/')
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
@@ -26,22 +27,21 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Vlang
|
- name: Setup Vlang
|
||||||
run: ./install_v.sh --github-actions
|
run: ./install_v.sh
|
||||||
|
|
||||||
- name: Generate documentation
|
- name: Generate documentation
|
||||||
run: |
|
run: |
|
||||||
./doc.vsh
|
./doc.vsh
|
||||||
# ls /home/runner/work/herolib/docs
|
|
||||||
find .
|
find .
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v4
|
uses: actions/configure-pages@v4
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v2
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: "/home/runner/work/herolib/herolib/docs"
|
path: "/home/runner/work/herolib/herolib/docs"
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v3
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
@@ -5,15 +5,12 @@ permissions:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main","development"]
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
branches: ["main","development"]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -31,6 +28,7 @@ jobs:
|
|||||||
os: macos-13
|
os: macos-13
|
||||||
short-name: macos-i64
|
short-name: macos-i64
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
||||||
@@ -54,7 +52,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
|
v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,7 +25,6 @@ dump.rdb
|
|||||||
output/
|
output/
|
||||||
*.db
|
*.db
|
||||||
.stellar
|
.stellar
|
||||||
vdocs/
|
|
||||||
data.ms/
|
data.ms/
|
||||||
test_basic
|
test_basic
|
||||||
cli/hero
|
cli/hero
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
## hero install for users
|
## hero install for users
|
||||||
|
|
||||||
```bash
|
```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
|
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
|
## automated install for developers
|
||||||
|
|
||||||
```bash
|
```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
|
bash /tmp/install_v.sh --analyzer --herolib
|
||||||
#DONT FORGET TO START A NEW SHELL (otherwise the paths will not be set)
|
#DONT FORGET TO START A NEW SHELL (otherwise the paths will not be set)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ fn do() ! {
|
|||||||
mut cmd := Command{
|
mut cmd := Command{
|
||||||
name: 'hero'
|
name: 'hero'
|
||||||
description: 'Your HERO toolset.'
|
description: 'Your HERO toolset.'
|
||||||
version: '2.0.6'
|
version: '1.0.5'
|
||||||
}
|
}
|
||||||
|
|
||||||
// herocmds.cmd_run_add_flags(mut cmd)
|
// herocmds.cmd_run_add_flags(mut cmd)
|
||||||
|
|||||||
38
doc.vsh
38
doc.vsh
@@ -26,9 +26,9 @@ os.chdir(herolib_path) or {
|
|||||||
panic('Failed to change directory to herolib: ${err}')
|
panic('Failed to change directory to herolib: ${err}')
|
||||||
}
|
}
|
||||||
|
|
||||||
os.rmdir_all('_docs') or {}
|
os.mkdir_all('_docs') or {}
|
||||||
os.rmdir_all('docs') or {}
|
os.mkdir_all('docs') or {}
|
||||||
os.rmdir_all('vdocs') or {}
|
os.mkdir_all('vdocs') or {}
|
||||||
|
|
||||||
// Generate HTML documentation
|
// Generate HTML documentation
|
||||||
println('Generating HTML documentation...')
|
println('Generating HTML documentation...')
|
||||||
@@ -42,13 +42,12 @@ os.chdir(abs_dir_of_script) or {
|
|||||||
|
|
||||||
// Generate Markdown documentation
|
// Generate Markdown documentation
|
||||||
println('Generating Markdown documentation...')
|
println('Generating Markdown documentation...')
|
||||||
os.rmdir_all('vdocs') or {}
|
|
||||||
|
|
||||||
// if os.system('v doc -m -no-color -f md -o ../vdocs/v/') != 0 {
|
// if os.system('v doc -m -no-color -f md -o ../vdocs/v/') != 0 {
|
||||||
// panic('Failed to generate V markdown documentation')
|
// panic('Failed to generate V markdown documentation')
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if os.system('v doc -m -no-color -f md -o vdocs/herolib/') != 0 {
|
if os.system('v doc -m -no-color -f md -o vdocs/') != 0 {
|
||||||
panic('Failed to generate Hero markdown documentation')
|
panic('Failed to generate Hero markdown documentation')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,4 +61,33 @@ $if !linux {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create Jekyll required files
|
||||||
|
println('Creating Jekyll files...')
|
||||||
|
os.mkdir_all('docs/assets/css') or {}
|
||||||
|
|
||||||
|
// Create style.scss
|
||||||
|
style_content := '---\n---\n\n@import "{{ site.theme }}";'
|
||||||
|
os.write_file('docs/assets/css/style.scss', style_content) or {
|
||||||
|
panic('Failed to create style.scss: ${err}')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create _config.yml
|
||||||
|
config_content := 'title: HeroLib Documentation
|
||||||
|
description: Documentation for the HeroLib project
|
||||||
|
theme: jekyll-theme-primer
|
||||||
|
baseurl: /herolib
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- Gemfile
|
||||||
|
- Gemfile.lock
|
||||||
|
- node_modules
|
||||||
|
- vendor/bundle/
|
||||||
|
- vendor/cache/
|
||||||
|
- vendor/gems/
|
||||||
|
- vendor/ruby/'
|
||||||
|
|
||||||
|
os.write_file('docs/_config.yml', config_content) or {
|
||||||
|
panic('Failed to create _config.yml: ${err}')
|
||||||
|
}
|
||||||
|
|
||||||
println('Documentation generation completed successfully!')
|
println('Documentation generation completed successfully!')
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
|
import freeflowuniverse.herolib.clients.mailclient
|
||||||
|
|
||||||
import freeflowuniverse.herolib.clients. mailclient
|
// remove the previous one, otherwise the env variables are not read
|
||||||
|
mailclient.config_delete(name: 'test')!
|
||||||
|
|
||||||
//remove the previous one, otherwise the env variables are not read
|
|
||||||
mailclient.config_delete(name:"test")!
|
|
||||||
|
|
||||||
// env variables which need to be set are:
|
// env variables which need to be set are:
|
||||||
// - MAIL_FROM=...
|
// - MAIL_FROM=...
|
||||||
@@ -14,11 +12,14 @@ mailclient.config_delete(name:"test")!
|
|||||||
// - MAIL_SERVER=...
|
// - MAIL_SERVER=...
|
||||||
// - MAIL_USERNAME=...
|
// - MAIL_USERNAME=...
|
||||||
|
|
||||||
|
mut client := mailclient.get(name: 'test')!
|
||||||
mut client:= mailclient.get(name:"test")!
|
|
||||||
|
|
||||||
println(client)
|
println(client)
|
||||||
|
|
||||||
client.send(subject:'this is a test',to:'kristof@incubaid.com',body:'
|
client.send(
|
||||||
|
subject: 'this is a test'
|
||||||
|
to: 'kristof@incubaid.com'
|
||||||
|
body: '
|
||||||
this is my email content
|
this is my email content
|
||||||
')!
|
'
|
||||||
|
)!
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import freeflowuniverse.herolib.core
|
import freeflowuniverse.herolib.core
|
||||||
import freeflowuniverse.herolib.clients.postgresql_client
|
import freeflowuniverse.herolib.clients.postgresql_client
|
||||||
|
|
||||||
|
|
||||||
// Configure PostgreSQL client
|
// Configure PostgreSQL client
|
||||||
heroscript := "
|
heroscript := "
|
||||||
!!postgresql_client.configure
|
!!postgresql_client.configure
|
||||||
@@ -19,7 +18,7 @@ heroscript := "
|
|||||||
postgresql_client.play(heroscript: heroscript)!
|
postgresql_client.play(heroscript: heroscript)!
|
||||||
|
|
||||||
// Get the configured client
|
// Get the configured client
|
||||||
mut db_client := postgresql_client.get(name: "test")!
|
mut db_client := postgresql_client.get(name: 'test')!
|
||||||
|
|
||||||
// Check if test database exists, create if not
|
// Check if test database exists, create if not
|
||||||
if !db_client.db_exists('test')! {
|
if !db_client.db_exists('test')! {
|
||||||
@@ -31,15 +30,14 @@ if !db_client.db_exists('test')! {
|
|||||||
db_client.dbname = 'test'
|
db_client.dbname = 'test'
|
||||||
|
|
||||||
// Create table if not exists
|
// Create table if not exists
|
||||||
create_table_sql := "CREATE TABLE IF NOT EXISTS users (
|
create_table_sql := 'CREATE TABLE IF NOT EXISTS users (
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
name VARCHAR(100) NOT NULL,
|
name VARCHAR(100) NOT NULL,
|
||||||
email VARCHAR(255) UNIQUE NOT NULL,
|
email VARCHAR(255) UNIQUE NOT NULL,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
)"
|
)'
|
||||||
|
|
||||||
println('Creating table users if not exists...')
|
println('Creating table users if not exists...')
|
||||||
db_client.exec(create_table_sql)!
|
db_client.exec(create_table_sql)!
|
||||||
|
|
||||||
println('Database and table setup completed successfully!')
|
println('Database and table setup completed successfully!')
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ mut:
|
|||||||
}
|
}
|
||||||
|
|
||||||
mut person := Person{
|
mut person := Person{
|
||||||
name: 'Bob'
|
name: 'Bob'
|
||||||
birthday: time.now()
|
birthday: time.now()
|
||||||
}
|
}
|
||||||
heroscript := encoderhero.encode[Person](person)!
|
heroscript := encoderhero.encode[Person](person)!
|
||||||
|
|
||||||
@@ -22,9 +22,8 @@ println(heroscript)
|
|||||||
person2 := encoderhero.decode[Person](heroscript)!
|
person2 := encoderhero.decode[Person](heroscript)!
|
||||||
println(person2)
|
println(person2)
|
||||||
|
|
||||||
//show that it doesn't matter which action & method is used
|
// show that it doesn't matter which action & method is used
|
||||||
heroscript2:="!!a.b name:Bob age:20 birthday:'2025-02-06 09:57:30'"
|
heroscript2 := "!!a.b name:Bob age:20 birthday:'2025-02-06 09:57:30'"
|
||||||
person3 := encoderhero.decode[Person](heroscript)!
|
person3 := encoderhero.decode[Person](heroscript)!
|
||||||
|
|
||||||
println(person3)
|
println(person3)
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
enum JobTitle {
|
enum JobTitle {
|
||||||
manager
|
manager
|
||||||
executive
|
executive
|
||||||
worker
|
worker
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Employee {
|
struct Employee {
|
||||||
mut:
|
mut:
|
||||||
name string
|
name string
|
||||||
family string @[json: '-'] // this field will be skipped
|
family string @[json: '-'] // this field will be skipped
|
||||||
age int
|
age int
|
||||||
salary f32
|
salary f32
|
||||||
title JobTitle @[json: 'ETitle'] // the key for this field will be 'ETitle', not 'title'
|
title JobTitle @[json: 'ETitle'] // the key for this field will be 'ETitle', not 'title'
|
||||||
notes string @[omitempty] // the JSON property is not created if the string is equal to '' (an empty string).
|
notes string @[omitempty] // the JSON property is not created if the string is equal to '' (an empty string).
|
||||||
// TODO: document @[raw]
|
// TODO: document @[raw]
|
||||||
}
|
}
|
||||||
|
|
||||||
x := Employee{'Peter', 'Begins', 28, 95000.5, .worker, ''}
|
x := Employee{'Peter', 'Begins', 28, 95000.5, .worker, ''}
|
||||||
@@ -34,4 +33,3 @@ println(y)
|
|||||||
ss := json.encode(y)
|
ss := json.encode(y)
|
||||||
println('JSON encoding of employee y: ${ss}')
|
println('JSON encoding of employee y: ${ss}')
|
||||||
assert ss == s
|
assert ss == s
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ heroscript := "
|
|||||||
postgresql_client.play(heroscript: heroscript)!
|
postgresql_client.play(heroscript: heroscript)!
|
||||||
|
|
||||||
// Get the configured client
|
// Get the configured client
|
||||||
mut db_client := postgresql_client.get(name: "test")!
|
mut db_client := postgresql_client.get(name: 'test')!
|
||||||
|
|
||||||
|
|
||||||
// Create a new location instance
|
// Create a new location instance
|
||||||
mut loc := location.new(mut db_client, false) or { panic(err) }
|
mut loc := location.new(mut db_client, false) or { panic(err) }
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ heroscript := "
|
|||||||
postgresql_client.play(heroscript: heroscript)!
|
postgresql_client.play(heroscript: heroscript)!
|
||||||
|
|
||||||
// Get the configured client
|
// Get the configured client
|
||||||
mut db_client := postgresql_client.get(name: "test")!
|
mut db_client := postgresql_client.get(name: 'test')!
|
||||||
|
|
||||||
|
|
||||||
// Create a new location instance
|
// Create a new location instance
|
||||||
mut loc := location.new(mut db_client, false) or { panic(err) }
|
mut loc := location.new(mut db_client, false) or { panic(err) }
|
||||||
|
|||||||
@@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
import freeflowuniverse.herolib.installers.infra.gitea as gitea_installer
|
import freeflowuniverse.herolib.installers.infra.gitea as gitea_installer
|
||||||
|
|
||||||
|
mut installer := gitea_installer.get(name: 'test')!
|
||||||
|
|
||||||
mut installer:= gitea_installer.get(name:'test')!
|
// if you want to configure using heroscript
|
||||||
|
gitea_installer.play(
|
||||||
//if you want to configure using heroscript
|
heroscript: "
|
||||||
gitea_installer.play(heroscript:"
|
|
||||||
!!gitea.configure name:test
|
!!gitea.configure name:test
|
||||||
passwd:'something'
|
passwd:'something'
|
||||||
domain: 'docs.info.com'
|
domain: 'docs.info.com'
|
||||||
")!
|
"
|
||||||
|
)!
|
||||||
|
|
||||||
installer.start()!
|
installer.start()!
|
||||||
|
|||||||
@@ -5,18 +5,36 @@ set -e
|
|||||||
os_name="$(uname -s)"
|
os_name="$(uname -s)"
|
||||||
arch_name="$(uname -m)"
|
arch_name="$(uname -m)"
|
||||||
|
|
||||||
|
|
||||||
|
# Base URL for GitHub releases
|
||||||
|
base_url="https://github.com/freeflowuniverse/herolib/releases/download/v1.0.1"
|
||||||
|
|
||||||
# Select the URL based on the platform
|
# Select the URL based on the platform
|
||||||
if [[ "$os_name" == "Linux" && "$arch_name" == "x86_64" ]]; then
|
if [[ "$os_name" == "Linux" && "$arch_name" == "x86_64" ]]; then
|
||||||
url="https://f003.backblazeb2.com/file/threefold/linux-i64/hero"
|
url="$base_url/hero-x86_64-unknown-linux-musl"
|
||||||
|
elif [[ "$os_name" == "Linux" && "$arch_name" == "aarch64" ]]; then
|
||||||
|
url="$base_url/hero-aarch64-unknown-linux-musl"
|
||||||
elif [[ "$os_name" == "Darwin" && "$arch_name" == "arm64" ]]; then
|
elif [[ "$os_name" == "Darwin" && "$arch_name" == "arm64" ]]; then
|
||||||
url="https://f003.backblazeb2.com/file/threefold/macos-arm64/hero"
|
url="$base_url/hero-aarch64-apple-darwin"
|
||||||
# elif [[ "$os_name" == "Darwin" && "$arch_name" == "x86_64" ]]; then
|
elif [[ "$os_name" == "Darwin" && "$arch_name" == "x86_64" ]]; then
|
||||||
# url="https://f003.backblazeb2.com/file/threefold/macos-i64/hero"
|
url="$base_url/hero-x86_64-apple-darwin"
|
||||||
else
|
else
|
||||||
echo "Unsupported platform."
|
echo "Unsupported platform: $os_name $arch_name"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# # Select the URL based on the platform
|
||||||
|
# if [[ "$os_name" == "Linux" && "$arch_name" == "x86_64" ]]; then
|
||||||
|
# url="https://f003.backblazeb2.com/file/threefold/linux-i64/hero"
|
||||||
|
# elif [[ "$os_name" == "Darwin" && "$arch_name" == "arm64" ]]; then
|
||||||
|
# url="https://f003.backblazeb2.com/file/threefold/macos-arm64/hero"
|
||||||
|
# # elif [[ "$os_name" == "Darwin" && "$arch_name" == "x86_64" ]]; then
|
||||||
|
# # url="https://f003.backblazeb2.com/file/threefold/macos-i64/hero"
|
||||||
|
# else
|
||||||
|
# echo "Unsupported platform."
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
|
||||||
# Check for existing hero installations
|
# Check for existing hero installations
|
||||||
existing_hero=$(which hero 2>/dev/null || true)
|
existing_hero=$(which hero 2>/dev/null || true)
|
||||||
if [ ! -z "$existing_hero" ]; then
|
if [ ! -z "$existing_hero" ]; then
|
||||||
|
|||||||
@@ -1,127 +1,112 @@
|
|||||||
|
|
||||||
module mailclient
|
module mailclient
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.base
|
import freeflowuniverse.herolib.core.base
|
||||||
import freeflowuniverse.herolib.core.playbook
|
import freeflowuniverse.herolib.core.playbook
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|
||||||
|
|
||||||
__global (
|
__global (
|
||||||
mailclient_global map[string]&MailClient
|
mailclient_global map[string]&MailClient
|
||||||
mailclient_default string
|
mailclient_default string
|
||||||
)
|
)
|
||||||
|
|
||||||
/////////FACTORY
|
/////////FACTORY
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct ArgsGet{
|
pub struct ArgsGet {
|
||||||
pub mut:
|
pub mut:
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
|
|
||||||
fn args_get (args_ ArgsGet) ArgsGet {
|
fn args_get(args_ ArgsGet) ArgsGet {
|
||||||
mut args:=args_
|
mut args := args_
|
||||||
if args.name == ""{
|
if args.name == '' {
|
||||||
args.name = mailclient_default
|
args.name = mailclient_default
|
||||||
}
|
}
|
||||||
if args.name == ""{
|
if args.name == '' {
|
||||||
args.name = "default"
|
args.name = 'default'
|
||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get(args_ ArgsGet) !&MailClient {
|
pub fn get(args_ ArgsGet) !&MailClient {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
if !(args.name in mailclient_global) {
|
if args.name !in mailclient_global {
|
||||||
if ! config_exists(args){
|
if !config_exists(args) {
|
||||||
config_save(args)!
|
config_save(args)!
|
||||||
}
|
}
|
||||||
config_load(args)!
|
config_load(args)!
|
||||||
}
|
}
|
||||||
return mailclient_global[args.name] or {
|
return mailclient_global[args.name] or {
|
||||||
println(mailclient_global)
|
println(mailclient_global)
|
||||||
//bug if we get here because should be in globals
|
// bug if we get here because should be in globals
|
||||||
panic("could not get config for mailclient with name, is bug:${args.name}")
|
panic('could not get config for mailclient with name, is bug:${args.name}')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pub fn config_exists(args_ ArgsGet) bool {
|
pub fn config_exists(args_ ArgsGet) bool {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut context:=base.context() or { panic("bug") }
|
mut context := base.context() or { panic('bug') }
|
||||||
return context.hero_config_exists("mailclient",args.name)
|
return context.hero_config_exists('mailclient', args.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_load(args_ ArgsGet) ! {
|
pub fn config_load(args_ ArgsGet) ! {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut context:=base.context()!
|
mut context := base.context()!
|
||||||
mut heroscript := context.hero_config_get("mailclient",args.name)!
|
mut heroscript := context.hero_config_get('mailclient', args.name)!
|
||||||
play(heroscript:heroscript)!
|
play(heroscript: heroscript)!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_save(args_ ArgsGet) ! {
|
pub fn config_save(args_ ArgsGet) ! {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut context:=base.context()!
|
mut context := base.context()!
|
||||||
context.hero_config_set("mailclient",args.name,heroscript_default(instance:args.name)!)!
|
context.hero_config_set('mailclient', args.name, heroscript_default(instance: args.name)!)!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn config_delete(args_ ArgsGet) ! {
|
pub fn config_delete(args_ ArgsGet) ! {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut context:=base.context()!
|
mut context := base.context()!
|
||||||
context.hero_config_delete("mailclient",args.name)!
|
context.hero_config_delete('mailclient', args.name)!
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(o MailClient)! {
|
fn set(o MailClient) ! {
|
||||||
mut o2:=obj_init(o)!
|
mut o2 := obj_init(o)!
|
||||||
mailclient_global[o.name] = &o2
|
mailclient_global[o.name] = &o2
|
||||||
mailclient_default = o.name
|
mailclient_default = o.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct PlayArgs {
|
pub struct PlayArgs {
|
||||||
pub mut:
|
pub mut:
|
||||||
heroscript string //if filled in then plbook will be made out of it
|
heroscript string // if filled in then plbook will be made out of it
|
||||||
plbook ?playbook.PlayBook
|
plbook ?playbook.PlayBook
|
||||||
reset bool
|
reset bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn play(args_ PlayArgs) ! {
|
pub fn play(args_ PlayArgs) ! {
|
||||||
|
mut args := args_
|
||||||
|
|
||||||
mut args:=args_
|
if args.heroscript == '' {
|
||||||
|
args.heroscript = heroscript_default()!
|
||||||
if args.heroscript == "" {
|
}
|
||||||
args.heroscript = heroscript_default()!
|
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
|
||||||
}
|
|
||||||
mut plbook := args.plbook or {
|
|
||||||
playbook.new(text: args.heroscript)!
|
|
||||||
}
|
|
||||||
|
|
||||||
mut install_actions := plbook.find(filter: 'mailclient.configure')!
|
|
||||||
if install_actions.len > 0 {
|
|
||||||
for install_action in install_actions {
|
|
||||||
mut p := install_action.params
|
|
||||||
cfg_play(p)!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
mut install_actions := plbook.find(filter: 'mailclient.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 mailclient
|
||||||
|
|
||||||
|
|
||||||
//switch instance to be used for mailclient
|
|
||||||
pub fn switch(name string) {
|
pub fn switch(name string) {
|
||||||
mailclient_default = name
|
mailclient_default = name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helpers
|
||||||
//helpers
|
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct DefaultConfigArgs{
|
pub struct DefaultConfigArgs {
|
||||||
instance string = 'default'
|
instance string = 'default'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
module mailclient
|
module mailclient
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.paramsparser
|
import freeflowuniverse.herolib.data.paramsparser
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@@ -6,7 +7,6 @@ pub const version = '0.0.0'
|
|||||||
const singleton = false
|
const singleton = false
|
||||||
const default = true
|
const default = true
|
||||||
|
|
||||||
|
|
||||||
pub fn heroscript_default(args DefaultConfigArgs) !string {
|
pub fn heroscript_default(args DefaultConfigArgs) !string {
|
||||||
mail_from := os.getenv_opt('MAIL_FROM') or { 'info@example.com' }
|
mail_from := os.getenv_opt('MAIL_FROM') or { 'info@example.com' }
|
||||||
mail_password := os.getenv_opt('MAIL_PASSWORD') or { 'secretpassword' }
|
mail_password := os.getenv_opt('MAIL_PASSWORD') or { 'secretpassword' }
|
||||||
@@ -23,7 +23,7 @@ pub fn heroscript_default(args DefaultConfigArgs) !string {
|
|||||||
mail_username: '${mail_username}'
|
mail_username: '${mail_username}'
|
||||||
"
|
"
|
||||||
|
|
||||||
return heroscript
|
return heroscript
|
||||||
}
|
}
|
||||||
|
|
||||||
@[heap]
|
@[heap]
|
||||||
@@ -40,22 +40,18 @@ pub mut:
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn cfg_play(p paramsparser.Params) ! {
|
fn cfg_play(p paramsparser.Params) ! {
|
||||||
mut mycfg := MailClient{
|
mut mycfg := MailClient{
|
||||||
name: p.get_default('name', 'default')!
|
name: p.get_default('name', 'default')!
|
||||||
mail_from: p.get('mail_from')!
|
mail_from: p.get('mail_from')!
|
||||||
mail_password: p.get('mail_password')!
|
mail_password: p.get('mail_password')!
|
||||||
mail_port: p.get_int_default('mail_port', 465)!
|
mail_port: p.get_int_default('mail_port', 465)!
|
||||||
mail_server: p.get('mail_server')!
|
mail_server: p.get('mail_server')!
|
||||||
mail_username: p.get('mail_username')!
|
mail_username: p.get('mail_username')!
|
||||||
}
|
}
|
||||||
set(mycfg)!
|
set(mycfg)!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn obj_init(obj_ MailClient) !MailClient {
|
||||||
fn obj_init(obj_ MailClient)!MailClient{
|
mut obj := obj_
|
||||||
mut obj:=obj_
|
return obj
|
||||||
return obj
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ pub fn (mut self Context) hero_config_delete(cat string, name string) ! {
|
|||||||
config_file.delete()!
|
config_file.delete()!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn (mut self Context) hero_config_exists(cat string, name string) bool {
|
pub fn (mut self Context) hero_config_exists(cat string, name string) bool {
|
||||||
path := '${os.home_dir()}/hero/context/${self.config.name}/${cat}__${name}.yaml'
|
path := '${os.home_dir()}/hero/context/${self.config.name}/${cat}__${name}.yaml'
|
||||||
return os.exists(path)
|
return os.exists(path)
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ pub fn cmd_docusaurus(mut cmdroot Command) {
|
|||||||
description: 'update your environment the template and the repo you are working on (git pull).'
|
description: 'update your environment the template and the repo you are working on (git pull).'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
cmd_run.add_flag(Flag{
|
cmd_run.add_flag(Flag{
|
||||||
flag: .bool
|
flag: .bool
|
||||||
required: false
|
required: false
|
||||||
@@ -84,29 +83,29 @@ fn cmd_docusaurus_execute(cmd Command) ! {
|
|||||||
// exit(1)
|
// exit(1)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
mut docs := docusaurus.new(update:update)!
|
mut docs := docusaurus.new(update: update)!
|
||||||
|
|
||||||
if build {
|
if build {
|
||||||
// Create a new docusaurus site
|
// Create a new docusaurus site
|
||||||
_ := docs.build(
|
_ := docs.build(
|
||||||
url: url
|
url: url
|
||||||
update:update
|
update: update
|
||||||
)!
|
)!
|
||||||
}
|
}
|
||||||
|
|
||||||
if builddev {
|
if builddev {
|
||||||
// Create a new docusaurus site
|
// Create a new docusaurus site
|
||||||
_ := docs.build_dev(
|
_ := docs.build_dev(
|
||||||
url: url
|
url: url
|
||||||
update:update
|
update: update
|
||||||
)!
|
)!
|
||||||
}
|
}
|
||||||
|
|
||||||
if dev {
|
if dev {
|
||||||
// Create a new docusaurus site
|
// Create a new docusaurus site
|
||||||
_ := docs.dev(
|
_ := docs.dev(
|
||||||
url: url
|
url: url
|
||||||
update:update
|
update: update
|
||||||
)!
|
)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,15 +10,15 @@ import freeflowuniverse.herolib.clients.postgresql_client
|
|||||||
// LocationDB handles all database operations for locations
|
// LocationDB handles all database operations for locations
|
||||||
pub struct LocationDB {
|
pub struct LocationDB {
|
||||||
pub mut:
|
pub mut:
|
||||||
db pg.DB
|
db pg.DB
|
||||||
db_client postgresql_client.PostgresClient
|
db_client postgresql_client.PostgresClient
|
||||||
tmp_dir pathlib.Path
|
tmp_dir pathlib.Path
|
||||||
db_dir pathlib.Path
|
db_dir pathlib.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
// new_location_db creates a new LocationDB instance
|
// new_location_db creates a new LocationDB instance
|
||||||
pub fn new_location_db(mut db_client postgresql_client.PostgresClient, reset bool) !LocationDB {
|
pub fn new_location_db(mut db_client postgresql_client.PostgresClient, reset bool) !LocationDB {
|
||||||
mut db_dir := pathlib.get_dir(path:'${os.home_dir()}/hero/var/db/location.db',create: true)!
|
mut db_dir := pathlib.get_dir(path: '${os.home_dir()}/hero/var/db/location.db', create: true)!
|
||||||
|
|
||||||
// Create locations database if it doesn't exist
|
// Create locations database if it doesn't exist
|
||||||
if !db_client.db_exists('locations')! {
|
if !db_client.db_exists('locations')! {
|
||||||
@@ -32,10 +32,10 @@ pub fn new_location_db(mut db_client postgresql_client.PostgresClient, reset boo
|
|||||||
db := db_client.db()!
|
db := db_client.db()!
|
||||||
|
|
||||||
mut loc_db := LocationDB{
|
mut loc_db := LocationDB{
|
||||||
db: db
|
db: db
|
||||||
db_client: db_client
|
db_client: db_client
|
||||||
tmp_dir: pathlib.get_dir(path: '/tmp/location/',create: true)!
|
tmp_dir: pathlib.get_dir(path: '/tmp/location/', create: true)!
|
||||||
db_dir: db_dir
|
db_dir: db_dir
|
||||||
}
|
}
|
||||||
loc_db.init_tables(reset)!
|
loc_db.init_tables(reset)!
|
||||||
return loc_db
|
return loc_db
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.clients.postgresql_client
|
|||||||
// Location represents the main API for location operations
|
// Location represents the main API for location operations
|
||||||
pub struct Location {
|
pub struct Location {
|
||||||
mut:
|
mut:
|
||||||
db LocationDB
|
db LocationDB
|
||||||
db_client postgresql_client.PostgresClient
|
db_client postgresql_client.PostgresClient
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ mut:
|
|||||||
pub fn new(mut db_client postgresql_client.PostgresClient, reset bool) !Location {
|
pub fn new(mut db_client postgresql_client.PostgresClient, reset bool) !Location {
|
||||||
db := new_location_db(mut db_client, reset)!
|
db := new_location_db(mut db_client, reset)!
|
||||||
return Location{
|
return Location{
|
||||||
db: db
|
db: db
|
||||||
db_client: db_client
|
db_client: db_client
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
module location
|
module location
|
||||||
|
|
||||||
//https://www.geonames.org/export/codes.html
|
// https://www.geonames.org/export/codes.html
|
||||||
|
|
||||||
|
|||||||
@@ -7,27 +7,24 @@ import freeflowuniverse.herolib.osal
|
|||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
import freeflowuniverse.herolib.core.texttools
|
import freeflowuniverse.herolib.core.texttools
|
||||||
|
|
||||||
const (
|
const geonames_url = 'https://download.geonames.org/export/dump'
|
||||||
geonames_url = 'https://download.geonames.org/export/dump'
|
|
||||||
)
|
|
||||||
|
|
||||||
// download_and_import_data downloads and imports GeoNames data
|
// download_and_import_data downloads and imports GeoNames data
|
||||||
pub fn (mut l LocationDB) download_and_import_data(redownload bool) ! {
|
pub fn (mut l LocationDB) download_and_import_data(redownload bool) ! {
|
||||||
// Download country info
|
// Download country info
|
||||||
|
|
||||||
if redownload{
|
if redownload {
|
||||||
l.reset_import_dates()!
|
l.reset_import_dates()!
|
||||||
}
|
}
|
||||||
|
|
||||||
country_file := osal.download(
|
country_file := osal.download(
|
||||||
url: '${geonames_url}/countryInfo.txt'
|
url: '${geonames_url}/countryInfo.txt'
|
||||||
dest: '${l.tmp_dir.path}/country.txt'
|
dest: '${l.tmp_dir.path}/country.txt'
|
||||||
minsize_kb: 10
|
minsize_kb: 10
|
||||||
)!
|
)!
|
||||||
l.import_country_data(country_file.path)!
|
l.import_country_data(country_file.path)!
|
||||||
|
|
||||||
l.import_cities()!
|
l.import_cities()!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset_import_dates sets all country import_dates to 0
|
// reset_import_dates sets all country import_dates to 0
|
||||||
@@ -43,7 +40,7 @@ fn (mut l LocationDB) should_import_cities(iso2 string) !bool {
|
|||||||
console.print_debug('Checking if should import country: ${iso2}')
|
console.print_debug('Checking if should import country: ${iso2}')
|
||||||
|
|
||||||
country := sql l.db {
|
country := sql l.db {
|
||||||
select from Country where iso2 == "${iso2}" limit 1
|
select from Country where iso2 == '${iso2}' limit 1
|
||||||
} or { []Country{} }
|
} or { []Country{} }
|
||||||
|
|
||||||
console.print_debug('SQL query result: ${country.len} records found')
|
console.print_debug('SQL query result: ${country.len} records found')
|
||||||
@@ -59,8 +56,8 @@ fn (mut l LocationDB) should_import_cities(iso2 string) !bool {
|
|||||||
last_import := country[0].import_date
|
last_import := country[0].import_date
|
||||||
time_since_import := now - last_import
|
time_since_import := now - last_import
|
||||||
|
|
||||||
console.print_debug('Last import: ${last_import}, Time since import: ${time_since_import} seconds (${time_since_import/86400} days)')
|
console.print_debug('Last import: ${last_import}, Time since import: ${time_since_import} seconds (${time_since_import / 86400} days)')
|
||||||
should_import := (time_since_import > one_month) || (last_import == 0)
|
should_import := time_since_import > one_month || last_import == 0
|
||||||
console.print_debug('Should import ${iso2}: ${should_import}')
|
console.print_debug('Should import ${iso2}: ${should_import}')
|
||||||
|
|
||||||
return should_import
|
return should_import
|
||||||
@@ -98,32 +95,27 @@ fn (mut l LocationDB) import_country_data(filepath string) ! {
|
|||||||
} or { []Country{} }
|
} or { []Country{} }
|
||||||
|
|
||||||
country := Country{
|
country := Country{
|
||||||
iso2: iso2
|
iso2: iso2
|
||||||
iso3: fields[1]
|
iso3: fields[1]
|
||||||
name: fields[4]
|
name: fields[4]
|
||||||
continent: fields[8]
|
continent: fields[8]
|
||||||
population: fields[7].i64()
|
population: fields[7].i64()
|
||||||
timezone: fields[17]
|
timezone: fields[17]
|
||||||
}
|
}
|
||||||
|
|
||||||
if existing_country.len > 0 {
|
if existing_country.len > 0 {
|
||||||
// Update existing country
|
// Update existing country
|
||||||
sql l.db {
|
sql l.db {
|
||||||
update Country set
|
update Country set iso3 = country.iso3, name = country.name, continent = country.continent,
|
||||||
iso3 = country.iso3,
|
population = country.population, timezone = country.timezone where iso2 == iso2
|
||||||
name = country.name,
|
|
||||||
continent = country.continent,
|
|
||||||
population = country.population,
|
|
||||||
timezone = country.timezone
|
|
||||||
where iso2 == iso2
|
|
||||||
}!
|
}!
|
||||||
//console.print_debug("Updated country: ${country}")
|
// console.print_debug("Updated country: ${country}")
|
||||||
} else {
|
} else {
|
||||||
// Insert new country
|
// Insert new country
|
||||||
sql l.db {
|
sql l.db {
|
||||||
insert country into Country
|
insert country into Country
|
||||||
}!
|
}!
|
||||||
//console.print_debug("Inserted country: ${country}")
|
// console.print_debug("Inserted country: ${country}")
|
||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
if count % 10 == 0 {
|
if count % 10 == 0 {
|
||||||
@@ -158,13 +150,13 @@ fn (mut l LocationDB) import_cities() ! {
|
|||||||
|
|
||||||
// Download and process cities for this country
|
// Download and process cities for this country
|
||||||
cities_file := osal.download(
|
cities_file := osal.download(
|
||||||
url: '${geonames_url}/${iso2}.zip'
|
url: '${geonames_url}/${iso2}.zip'
|
||||||
dest: '${l.tmp_dir.path}/${iso2}.zip'
|
dest: '${l.tmp_dir.path}/${iso2}.zip'
|
||||||
expand_file: '${l.tmp_dir.path}/${iso2}'
|
expand_file: '${l.tmp_dir.path}/${iso2}'
|
||||||
minsize_kb: 2
|
minsize_kb: 2
|
||||||
)!
|
)!
|
||||||
|
|
||||||
l.import_city_data("${l.tmp_dir.path}/${iso2}/${iso2}.txt")!
|
l.import_city_data('${l.tmp_dir.path}/${iso2}/${iso2}.txt')!
|
||||||
|
|
||||||
// Update the country's import date after successful city import
|
// Update the country's import date after successful city import
|
||||||
now := time.now().unix()
|
now := time.now().unix()
|
||||||
@@ -202,8 +194,6 @@ fn (mut l LocationDB) import_city_data(filepath string) ! {
|
|||||||
// timezone : the iana timezone id (see file timeZone.txt) varchar(40)
|
// timezone : the iana timezone id (see file timeZone.txt) varchar(40)
|
||||||
// modification date : date of last modification in yyyy-MM-dd format
|
// modification date : date of last modification in yyyy-MM-dd format
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
l.db.exec('BEGIN TRANSACTION')!
|
l.db.exec('BEGIN TRANSACTION')!
|
||||||
|
|
||||||
mut file := os.open(filepath) or {
|
mut file := os.open(filepath) or {
|
||||||
@@ -212,17 +202,17 @@ fn (mut l LocationDB) import_city_data(filepath string) ! {
|
|||||||
}
|
}
|
||||||
defer { file.close() }
|
defer { file.close() }
|
||||||
|
|
||||||
mut reader := io.new_buffered_reader(reader:file)
|
mut reader := io.new_buffered_reader(reader: file)
|
||||||
defer { reader.free() }
|
defer { reader.free() }
|
||||||
|
|
||||||
mut count := 0
|
mut count := 0
|
||||||
console.print_header('Start import ${filepath}')
|
console.print_header('Start import ${filepath}')
|
||||||
for {
|
for {
|
||||||
line := reader.read_line() or {
|
line := reader.read_line() or {
|
||||||
//console.print_debug('End of file reached')
|
// console.print_debug('End of file reached')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
//console.print_debug(line)
|
// console.print_debug(line)
|
||||||
fields := line.split('\t')
|
fields := line.split('\t')
|
||||||
if fields.len < 12 { // Need at least 12 fields for required data
|
if fields.len < 12 { // Need at least 12 fields for required data
|
||||||
console.print_stderr('fields < 12: ${line}')
|
console.print_stderr('fields < 12: ${line}')
|
||||||
@@ -241,58 +231,45 @@ fn (mut l LocationDB) import_city_data(filepath string) ! {
|
|||||||
} or { []City{} }
|
} or { []City{} }
|
||||||
|
|
||||||
city := City{
|
city := City{
|
||||||
id: geoname_id
|
id: geoname_id
|
||||||
name: name
|
name: name
|
||||||
ascii_name: ascii_name
|
ascii_name: ascii_name
|
||||||
country_iso2: country_iso2
|
country_iso2: country_iso2
|
||||||
postal_code: '' // Not provided in this format
|
postal_code: '' // Not provided in this format
|
||||||
state_name: '' // Will need separate admin codes file
|
state_name: '' // Will need separate admin codes file
|
||||||
state_code: fields[10]
|
state_code: fields[10]
|
||||||
county_name: ''
|
county_name: ''
|
||||||
county_code: fields[11]
|
county_code: fields[11]
|
||||||
community_name: ''
|
community_name: ''
|
||||||
community_code: ''
|
community_code: ''
|
||||||
latitude: fields[4].f64()
|
latitude: fields[4].f64()
|
||||||
longitude: fields[5].f64()
|
longitude: fields[5].f64()
|
||||||
accuracy: 4 // Using geonameid, so accuracy is 4
|
accuracy: 4 // Using geonameid, so accuracy is 4
|
||||||
population: fields[14].i64()
|
population: fields[14].i64()
|
||||||
timezone: fields[17]
|
timezone: fields[17]
|
||||||
feature_class: fields[6]
|
feature_class: fields[6]
|
||||||
feature_code: fields[7]
|
feature_code: fields[7]
|
||||||
search_priority: 0 // Default priority
|
search_priority: 0 // Default priority
|
||||||
}
|
}
|
||||||
|
|
||||||
if existing_city.len > 0 {
|
if existing_city.len > 0 {
|
||||||
// Update existing city
|
// Update existing city
|
||||||
sql l.db {
|
sql l.db {
|
||||||
update City set
|
update City set name = city.name, ascii_name = city.ascii_name, country_iso2 = city.country_iso2,
|
||||||
name = city.name,
|
postal_code = city.postal_code, state_name = city.state_name, state_code = city.state_code,
|
||||||
ascii_name = city.ascii_name,
|
county_name = city.county_name, county_code = city.county_code, community_name = city.community_name,
|
||||||
country_iso2 = city.country_iso2,
|
community_code = city.community_code, latitude = city.latitude, longitude = city.longitude,
|
||||||
postal_code = city.postal_code,
|
accuracy = city.accuracy, population = city.population, timezone = city.timezone,
|
||||||
state_name = city.state_name,
|
feature_class = city.feature_class, feature_code = city.feature_code,
|
||||||
state_code = city.state_code,
|
search_priority = city.search_priority where id == geoname_id
|
||||||
county_name = city.county_name,
|
|
||||||
county_code = city.county_code,
|
|
||||||
community_name = city.community_name,
|
|
||||||
community_code = city.community_code,
|
|
||||||
latitude = city.latitude,
|
|
||||||
longitude = city.longitude,
|
|
||||||
accuracy = city.accuracy,
|
|
||||||
population = city.population,
|
|
||||||
timezone = city.timezone,
|
|
||||||
feature_class = city.feature_class,
|
|
||||||
feature_code = city.feature_code,
|
|
||||||
search_priority = city.search_priority
|
|
||||||
where id == geoname_id
|
|
||||||
}!
|
}!
|
||||||
//console.print_debug("Updated city: ${city}")
|
// console.print_debug("Updated city: ${city}")
|
||||||
} else {
|
} else {
|
||||||
// Insert new city
|
// Insert new city
|
||||||
sql l.db {
|
sql l.db {
|
||||||
insert city into City
|
insert city into City
|
||||||
}!
|
}!
|
||||||
//console.print_debug("Inserted city: ${city}")
|
// console.print_debug("Inserted city: ${city}")
|
||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
// if count % 1000 == 0 {
|
// if count % 1000 == 0 {
|
||||||
@@ -300,7 +277,7 @@ fn (mut l LocationDB) import_city_data(filepath string) ! {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_debug( 'Processed ${count} cities')
|
console.print_debug('Processed ${count} cities')
|
||||||
|
|
||||||
l.db.exec('COMMIT')!
|
l.db.exec('COMMIT')!
|
||||||
console.print_header('Finished importing cities for ${filepath}. Total records: ${count}')
|
console.print_header('Finished importing cities for ${filepath}. Total records: ${count}')
|
||||||
|
|||||||
@@ -2,44 +2,44 @@ module location
|
|||||||
|
|
||||||
pub struct Country {
|
pub struct Country {
|
||||||
pub:
|
pub:
|
||||||
iso2 string @[primary; sql: 'iso2'; max_len: 2; unique; index]
|
iso2 string @[index; max_len: 2; primary; sql: 'iso2'; unique]
|
||||||
name string @[required; unique; index]
|
name string @[index; required; unique]
|
||||||
iso3 string @[required; sql: 'iso3'; max_len: 3; unique; index]
|
iso3 string @[index; max_len: 3; required; sql: 'iso3'; unique]
|
||||||
continent string @[max_len: 2]
|
continent string @[max_len: 2]
|
||||||
population i64
|
population i64
|
||||||
timezone string @[max_len: 40]
|
timezone string @[max_len: 40]
|
||||||
import_date i64 // Epoch timestamp of last import
|
import_date i64 // Epoch timestamp of last import
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct City {
|
pub struct City {
|
||||||
pub:
|
pub:
|
||||||
id int @[unique; index]
|
id int @[index; unique]
|
||||||
name string @[required; max_len: 200; index]
|
name string @[index; max_len: 200; required]
|
||||||
ascii_name string @[required; max_len: 200; index] // Normalized name without special characters
|
ascii_name string @[index; max_len: 200; required] // Normalized name without special characters
|
||||||
country_iso2 string @[required; fkey: 'Country.iso2']
|
country_iso2 string @[fkey: 'Country.iso2'; required]
|
||||||
postal_code string @[max_len: 20; index ] //postal code
|
postal_code string @[index; max_len: 20] // postal code
|
||||||
state_name string @[max_len: 100] // State/Province name
|
state_name string @[max_len: 100] // State/Province name
|
||||||
state_code string @[max_len: 20] // State/Province code
|
state_code string @[max_len: 20] // State/Province code
|
||||||
county_name string @[max_len: 100]
|
county_name string @[max_len: 100]
|
||||||
county_code string @[max_len: 20]
|
county_code string @[max_len: 20]
|
||||||
community_name string @[max_len: 100]
|
community_name string @[max_len: 100]
|
||||||
community_code string @[max_len: 20]
|
community_code string @[max_len: 20]
|
||||||
latitude f64 @[index: 'idx_coords']
|
latitude f64 @[index: 'idx_coords']
|
||||||
longitude f64 @[index: 'idx_coords']
|
longitude f64 @[index: 'idx_coords']
|
||||||
population i64
|
population i64
|
||||||
timezone string @[max_len: 40]
|
timezone string @[max_len: 40]
|
||||||
feature_class string @[max_len: 1] // For filtering (P for populated places)
|
feature_class string @[max_len: 1] // For filtering (P for populated places)
|
||||||
feature_code string @[max_len: 10] // Detailed type (PPL, PPLA, etc.)
|
feature_code string @[max_len: 10] // Detailed type (PPL, PPLA, etc.)
|
||||||
search_priority int
|
search_priority int
|
||||||
accuracy i16 = 1 //1=estimated, 4=geonameid, 6=centroid of addresses or shape
|
accuracy i16 = 1 // 1=estimated, 4=geonameid, 6=centroid of addresses or shape
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct AlternateName {
|
pub struct AlternateName {
|
||||||
pub:
|
pub:
|
||||||
id int @[primary; sql: serial]
|
id int @[primary; sql: serial]
|
||||||
city_id int @[required; fkey: 'City.id']
|
city_id int @[fkey: 'City.id'; required]
|
||||||
name string @[required; max_len: 200; index]
|
name string @[index; max_len: 200; required]
|
||||||
language_code string @[max_len: 2]
|
language_code string @[max_len: 2]
|
||||||
is_preferred bool
|
is_preferred bool
|
||||||
is_short bool
|
is_short bool
|
||||||
}
|
}
|
||||||
@@ -47,9 +47,9 @@ pub:
|
|||||||
// SearchResult represents a location search result with combined city and country info
|
// SearchResult represents a location search result with combined city and country info
|
||||||
pub struct SearchResult {
|
pub struct SearchResult {
|
||||||
pub:
|
pub:
|
||||||
city City
|
city City
|
||||||
country Country
|
country Country
|
||||||
similarity f64 // Search similarity score
|
similarity f64 // Search similarity score
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coordinates represents a geographic point
|
// Coordinates represents a geographic point
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ fn (mut repo GitRepo) load_tags() ! {
|
|||||||
tags_result := repo.exec('git tag --list') or {
|
tags_result := repo.exec('git tag --list') or {
|
||||||
return error('Failed to list tags: ${err}. Please ensure git is installed and repository is accessible.')
|
return error('Failed to list tags: ${err}. Please ensure git is installed and repository is accessible.')
|
||||||
}
|
}
|
||||||
//println(tags_result)
|
// println(tags_result)
|
||||||
for line in tags_result.split('\n') {
|
for line in tags_result.split('\n') {
|
||||||
line_trimmed := line.trim_space()
|
line_trimmed := line.trim_space()
|
||||||
if line_trimmed != '' {
|
if line_trimmed != '' {
|
||||||
parts := line_trimmed.split(' ')
|
parts := line_trimmed.split(' ')
|
||||||
if parts.len < 2 {
|
if parts.len < 2 {
|
||||||
//console.print_debug('Skipping malformed tag line: ${line_trimmed}')
|
// console.print_debug('Skipping malformed tag line: ${line_trimmed}')
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
commit_hash := parts[0].trim_space()
|
commit_hash := parts[0].trim_space()
|
||||||
|
|||||||
@@ -25,22 +25,21 @@ fn installed() !bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn install() ! {
|
fn install() ! {
|
||||||
|
|
||||||
console.print_header('install gitea')
|
console.print_header('install gitea')
|
||||||
baseurl:="https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-${version}"
|
baseurl := 'https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-${version}'
|
||||||
|
|
||||||
mut url := ''
|
mut url := ''
|
||||||
if core.is_linux_arm()! {
|
if core.is_linux_arm()! {
|
||||||
//https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-linux-arm64.xz
|
// https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-linux-arm64.xz
|
||||||
url = '${baseurl}-linux-arm64.xz'
|
url = '${baseurl}-linux-arm64.xz'
|
||||||
} else if core.is_linux_intel()! {
|
} else if core.is_linux_intel()! {
|
||||||
// https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-linux-amd64.xz
|
// https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-linux-amd64.xz
|
||||||
url = '${baseurl}-linux-amd64.xz'
|
url = '${baseurl}-linux-amd64.xz'
|
||||||
} else if core.is_osx_arm()! {
|
} else if core.is_osx_arm()! {
|
||||||
//https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-darwin-10.12-arm64.xz
|
// https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-darwin-10.12-arm64.xz
|
||||||
url = '${baseurl}-darwin-10.12-arm64.xz'
|
url = '${baseurl}-darwin-10.12-arm64.xz'
|
||||||
} else if core.is_osx_intel()! {
|
} else if core.is_osx_intel()! {
|
||||||
//https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-darwin-10.12-amd64.xz
|
// https://github.com/go-gitea/gitea/releases/download/v1.23.2/gitea-1.23.2-darwin-10.12-amd64.xz
|
||||||
url = '${baseurl}-darwin-10.12-amd64.xz'
|
url = '${baseurl}-darwin-10.12-amd64.xz'
|
||||||
} else {
|
} else {
|
||||||
return error('unsported platform')
|
return error('unsported platform')
|
||||||
@@ -104,68 +103,66 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
|||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
// mut res := []zinit.ZProcessNewArgs{}
|
||||||
|
// cfg := get()!
|
||||||
|
// res << zinit.ZProcessNewArgs{
|
||||||
|
// name: 'gitea'
|
||||||
|
// // cmd: 'GITEA_WORK_DIR=${cfg.path} sudo -u git /var/lib/git/gitea web -c /etc/gitea_app.ini'
|
||||||
|
// cmd: '
|
||||||
|
|
||||||
|
// # Variables
|
||||||
|
// GITEA_USER="${cfg.run_user}"
|
||||||
|
// GITEA_HOME="${cfg.path}"
|
||||||
|
// GITEA_BINARY="/usr/local/bin/gitea"
|
||||||
|
// GITEA_CONFIG="/etc/gitea_app.ini"
|
||||||
|
// GITEA_DATA_PATH="\$GITEA_HOME/data"
|
||||||
|
// GITEA_CUSTOM_PATH="\$GITEA_HOME/custom"
|
||||||
|
// GITEA_LOG_PATH="\$GITEA_HOME/log"
|
||||||
|
|
||||||
// mut res := []zinit.ZProcessNewArgs{}
|
// # Ensure the script is run as root
|
||||||
// cfg := get()!
|
// if [[ \$EUID -ne 0 ]]; then
|
||||||
// res << zinit.ZProcessNewArgs{
|
// echo "This script must be run as root."
|
||||||
// name: 'gitea'
|
// exit 1
|
||||||
// // cmd: 'GITEA_WORK_DIR=${cfg.path} sudo -u git /var/lib/git/gitea web -c /etc/gitea_app.ini'
|
// fi
|
||||||
// cmd: '
|
|
||||||
|
|
||||||
// # Variables
|
// echo "Setting up Gitea..."
|
||||||
// GITEA_USER="${cfg.run_user}"
|
|
||||||
// GITEA_HOME="${cfg.path}"
|
|
||||||
// GITEA_BINARY="/usr/local/bin/gitea"
|
|
||||||
// GITEA_CONFIG="/etc/gitea_app.ini"
|
|
||||||
// GITEA_DATA_PATH="\$GITEA_HOME/data"
|
|
||||||
// GITEA_CUSTOM_PATH="\$GITEA_HOME/custom"
|
|
||||||
// GITEA_LOG_PATH="\$GITEA_HOME/log"
|
|
||||||
|
|
||||||
// # Ensure the script is run as root
|
// # Create Gitea user if it doesn\'t exist
|
||||||
// if [[ \$EUID -ne 0 ]]; then
|
// if id -u "\$GITEA_USER" &>/dev/null; then
|
||||||
// echo "This script must be run as root."
|
// echo "User \$GITEA_USER already exists."
|
||||||
// exit 1
|
// else
|
||||||
// fi
|
// echo "Creating Gitea user..."
|
||||||
|
// if ! sudo adduser --system --shell /bin/bash --group --disabled-password --home "/var/lib/\$GITEA_USER" "\$GITEA_USER"; then
|
||||||
|
// echo "Failed to create user \$GITEA_USER."
|
||||||
|
// exit 1
|
||||||
|
// fi
|
||||||
|
// fi
|
||||||
|
|
||||||
// echo "Setting up Gitea..."
|
// # Create necessary directories
|
||||||
|
// echo "Creating directories..."
|
||||||
|
// mkdir -p "\$GITEA_DATA_PATH" "\$GITEA_CUSTOM_PATH" "\$GITEA_LOG_PATH"
|
||||||
|
// chown -R "\$GITEA_USER:\$GITEA_USER" "\$GITEA_HOME"
|
||||||
|
// chmod -R 750 "\$GITEA_HOME"
|
||||||
|
|
||||||
// # Create Gitea user if it doesn\'t exist
|
// chown "\$GITEA_USER:\$GITEA_USER" "\$GITEA_CONFIG"
|
||||||
// if id -u "\$GITEA_USER" &>/dev/null; then
|
// chmod 640 "\$GITEA_CONFIG"
|
||||||
// echo "User \$GITEA_USER already exists."
|
|
||||||
// else
|
|
||||||
// echo "Creating Gitea user..."
|
|
||||||
// if ! sudo adduser --system --shell /bin/bash --group --disabled-password --home "/var/lib/\$GITEA_USER" "\$GITEA_USER"; then
|
|
||||||
// echo "Failed to create user \$GITEA_USER."
|
|
||||||
// exit 1
|
|
||||||
// fi
|
|
||||||
// fi
|
|
||||||
|
|
||||||
// # Create necessary directories
|
// GITEA_WORK_DIR=\$GITEA_HOME sudo -u git gitea web -c \$GITEA_CONFIG
|
||||||
// echo "Creating directories..."
|
// '
|
||||||
// mkdir -p "\$GITEA_DATA_PATH" "\$GITEA_CUSTOM_PATH" "\$GITEA_LOG_PATH"
|
// workdir: cfg.path
|
||||||
// chown -R "\$GITEA_USER:\$GITEA_USER" "\$GITEA_HOME"
|
// }
|
||||||
// chmod -R 750 "\$GITEA_HOME"
|
// res << zinit.ZProcessNewArgs{
|
||||||
|
// name: 'restart_gitea'
|
||||||
// chown "\$GITEA_USER:\$GITEA_USER" "\$GITEA_CONFIG"
|
// cmd: 'sleep 30 && zinit restart gitea && exit 1'
|
||||||
// chmod 640 "\$GITEA_CONFIG"
|
// after: ['gitea']
|
||||||
|
// oneshot: true
|
||||||
// GITEA_WORK_DIR=\$GITEA_HOME sudo -u git gitea web -c \$GITEA_CONFIG
|
// workdir: cfg.path
|
||||||
// '
|
// }
|
||||||
// workdir: cfg.path
|
// return res
|
||||||
// }
|
|
||||||
// res << zinit.ZProcessNewArgs{
|
|
||||||
// name: 'restart_gitea'
|
|
||||||
// cmd: 'sleep 30 && zinit restart gitea && exit 1'
|
|
||||||
// after: ['gitea']
|
|
||||||
// oneshot: true
|
|
||||||
// workdir: cfg.path
|
|
||||||
// }
|
|
||||||
// return res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn running() !bool {
|
fn running() !bool {
|
||||||
//TODO: extend with proper gitea client
|
// TODO: extend with proper gitea client
|
||||||
res := os.execute('curl -fsSL http://localhost:3000 || exit 1')
|
res := os.execute('curl -fsSL http://localhost:3000 || exit 1')
|
||||||
return res.exit_code == 0
|
return res.exit_code == 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,287 +4,277 @@ import freeflowuniverse.herolib.core.base
|
|||||||
import freeflowuniverse.herolib.core.playbook
|
import freeflowuniverse.herolib.core.playbook
|
||||||
import freeflowuniverse.herolib.ui.console
|
import freeflowuniverse.herolib.ui.console
|
||||||
import freeflowuniverse.herolib.data.paramsparser
|
import freeflowuniverse.herolib.data.paramsparser
|
||||||
|
|
||||||
import freeflowuniverse.herolib.sysadmin.startupmanager
|
import freeflowuniverse.herolib.sysadmin.startupmanager
|
||||||
import freeflowuniverse.herolib.osal.zinit
|
import freeflowuniverse.herolib.osal.zinit
|
||||||
import time
|
import time
|
||||||
|
|
||||||
__global (
|
__global (
|
||||||
gitea_global map[string]&GiteaServer
|
gitea_global map[string]&GiteaServer
|
||||||
gitea_default string
|
gitea_default string
|
||||||
)
|
)
|
||||||
|
|
||||||
/////////FACTORY
|
/////////FACTORY
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct ArgsGet{
|
pub struct ArgsGet {
|
||||||
pub mut:
|
pub mut:
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
|
|
||||||
fn args_get (args_ ArgsGet) ArgsGet {
|
fn args_get(args_ ArgsGet) ArgsGet {
|
||||||
mut args:=args_
|
mut args := args_
|
||||||
if args.name == ""{
|
if args.name == '' {
|
||||||
args.name = "default"
|
args.name = 'default'
|
||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get(args_ ArgsGet) !&GiteaServer {
|
pub fn get(args_ ArgsGet) !&GiteaServer {
|
||||||
mut context:=base.context()!
|
mut context := base.context()!
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut obj := GiteaServer{}
|
mut obj := GiteaServer{}
|
||||||
if !(args.name in gitea_global) {
|
if args.name !in gitea_global {
|
||||||
if ! exists(args)!{
|
if !exists(args)! {
|
||||||
set(obj)!
|
set(obj)!
|
||||||
}else{
|
} else {
|
||||||
heroscript := context.hero_config_get("gitea",args.name)!
|
heroscript := context.hero_config_get('gitea', args.name)!
|
||||||
mut obj2:=heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set_in_mem(obj2)!
|
set_in_mem(obj2)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gitea_global[args.name] or {
|
return gitea_global[args.name] or {
|
||||||
println(gitea_global)
|
println(gitea_global)
|
||||||
//bug if we get here because should be in globals
|
// bug if we get here because should be in globals
|
||||||
panic("could not get config for gitea with name, is bug:${args.name}")
|
panic('could not get config for gitea with name, is bug:${args.name}')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//register the config for the future
|
// register the config for the future
|
||||||
pub fn set(o GiteaServer)! {
|
pub fn set(o GiteaServer) ! {
|
||||||
set_in_mem(o)!
|
set_in_mem(o)!
|
||||||
mut context := base.context()!
|
mut context := base.context()!
|
||||||
heroscript := heroscript_dumps(o)!
|
heroscript := heroscript_dumps(o)!
|
||||||
context.hero_config_set("gitea", o.name, heroscript)!
|
context.hero_config_set('gitea', o.name, heroscript)!
|
||||||
}
|
}
|
||||||
|
|
||||||
//does the config exists?
|
// does the config exists?
|
||||||
pub fn exists(args_ ArgsGet) !bool {
|
pub fn exists(args_ ArgsGet) !bool {
|
||||||
mut context := base.context()!
|
mut context := base.context()!
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
return context.hero_config_exists("gitea", args.name)
|
return context.hero_config_exists('gitea', args.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn delete(args_ ArgsGet)! {
|
pub fn delete(args_ ArgsGet) ! {
|
||||||
mut args := args_get(args_)
|
mut args := args_get(args_)
|
||||||
mut context:=base.context()!
|
mut context := base.context()!
|
||||||
context.hero_config_delete("gitea",args.name)!
|
context.hero_config_delete('gitea', args.name)!
|
||||||
if args.name in gitea_global {
|
if args.name in gitea_global {
|
||||||
//del gitea_global[args.name]
|
// del gitea_global[args.name]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//only sets in mem, does not set as config
|
// only sets in mem, does not set as config
|
||||||
fn set_in_mem(o GiteaServer)! {
|
fn set_in_mem(o GiteaServer) ! {
|
||||||
mut o2:=obj_init(o)!
|
mut o2 := obj_init(o)!
|
||||||
gitea_global[o.name] = &o2
|
gitea_global[o.name] = &o2
|
||||||
gitea_default = o.name
|
gitea_default = o.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct PlayArgs {
|
pub struct PlayArgs {
|
||||||
pub mut:
|
pub mut:
|
||||||
heroscript string //if filled in then plbook will be made out of it
|
heroscript string // if filled in then plbook will be made out of it
|
||||||
plbook ?playbook.PlayBook
|
plbook ?playbook.PlayBook
|
||||||
reset bool
|
reset bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn play(args_ PlayArgs) ! {
|
pub fn play(args_ PlayArgs) ! {
|
||||||
|
mut args := args_
|
||||||
|
|
||||||
mut args:=args_
|
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
|
||||||
|
|
||||||
mut plbook := args.plbook or {
|
mut install_actions := plbook.find(filter: 'gitea.configure')!
|
||||||
playbook.new(text: args.heroscript)!
|
if install_actions.len > 0 {
|
||||||
}
|
for install_action in install_actions {
|
||||||
|
heroscript := install_action.heroscript()
|
||||||
|
mut obj := heroscript_loads(heroscript)!
|
||||||
|
set(obj)!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mut install_actions := plbook.find(filter: 'gitea.configure')!
|
mut other_actions := plbook.find(filter: 'gitea.')!
|
||||||
if install_actions.len > 0 {
|
for other_action in other_actions {
|
||||||
for install_action in install_actions {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
heroscript:=install_action.heroscript()
|
mut p := other_action.params
|
||||||
mut obj:=heroscript_loads(heroscript)!
|
reset := p.get_default_false('reset')
|
||||||
set(obj)!
|
if other_action.name == 'destroy' || reset {
|
||||||
}
|
console.print_debug('install action gitea.destroy')
|
||||||
}
|
destroy()!
|
||||||
|
}
|
||||||
mut other_actions := plbook.find(filter: 'gitea.')!
|
if other_action.name == 'install' {
|
||||||
for other_action in other_actions {
|
console.print_debug('install action gitea.install')
|
||||||
if other_action.name in ["destroy","install","build"]{
|
install()!
|
||||||
mut p := other_action.params
|
}
|
||||||
reset:=p.get_default_false("reset")
|
}
|
||||||
if other_action.name == "destroy" || reset{
|
if other_action.name in ['start', 'stop', 'restart'] {
|
||||||
console.print_debug("install action gitea.destroy")
|
mut p := other_action.params
|
||||||
destroy()!
|
name := p.get('name')!
|
||||||
}
|
mut gitea_obj := get(name: name)!
|
||||||
if other_action.name == "install"{
|
console.print_debug('action object:\n${gitea_obj}')
|
||||||
console.print_debug("install action gitea.install")
|
if other_action.name == 'start' {
|
||||||
install()!
|
console.print_debug('install action gitea.${other_action.name}')
|
||||||
}
|
gitea_obj.start()!
|
||||||
}
|
}
|
||||||
if other_action.name in ["start","stop","restart"]{
|
|
||||||
mut p := other_action.params
|
|
||||||
name := p.get('name')!
|
|
||||||
mut gitea_obj:=get(name:name)!
|
|
||||||
console.print_debug("action object:\n${gitea_obj}")
|
|
||||||
if other_action.name == "start"{
|
|
||||||
console.print_debug("install action gitea.${other_action.name}")
|
|
||||||
gitea_obj.start()!
|
|
||||||
}
|
|
||||||
|
|
||||||
if other_action.name == "stop"{
|
|
||||||
console.print_debug("install action gitea.${other_action.name}")
|
|
||||||
gitea_obj.stop()!
|
|
||||||
}
|
|
||||||
if other_action.name == "restart"{
|
|
||||||
console.print_debug("install action gitea.${other_action.name}")
|
|
||||||
gitea_obj.restart()!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if other_action.name == 'stop' {
|
||||||
|
console.print_debug('install action gitea.${other_action.name}')
|
||||||
|
gitea_obj.stop()!
|
||||||
|
}
|
||||||
|
if other_action.name == 'restart' {
|
||||||
|
console.print_debug('install action gitea.${other_action.name}')
|
||||||
|
gitea_obj.restart()!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////# LIVE CYCLE MANAGEMENT FOR INSTALLERS ///////////////////////////////////
|
//////////////////////////# LIVE CYCLE MANAGEMENT FOR INSTALLERS ///////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
fn startupmanager_get(cat zinit.StartupManagerType) !startupmanager.StartupManager {
|
fn startupmanager_get(cat zinit.StartupManagerType) !startupmanager.StartupManager {
|
||||||
// unknown
|
// unknown
|
||||||
// screen
|
// screen
|
||||||
// zinit
|
// zinit
|
||||||
// tmux
|
// tmux
|
||||||
// systemd
|
// systemd
|
||||||
match cat{
|
match cat {
|
||||||
.zinit{
|
.zinit {
|
||||||
console.print_debug("startupmanager: zinit")
|
console.print_debug('startupmanager: zinit')
|
||||||
return startupmanager.get(cat:.zinit)!
|
return startupmanager.get(cat: .zinit)!
|
||||||
}
|
}
|
||||||
.systemd{
|
.systemd {
|
||||||
console.print_debug("startupmanager: systemd")
|
console.print_debug('startupmanager: systemd')
|
||||||
return startupmanager.get(cat:.systemd)!
|
return startupmanager.get(cat: .systemd)!
|
||||||
}else{
|
}
|
||||||
console.print_debug("startupmanager: auto")
|
else {
|
||||||
return startupmanager.get()!
|
console.print_debug('startupmanager: auto')
|
||||||
}
|
return startupmanager.get()!
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//load from disk and make sure is properly intialized
|
// load from disk and make sure is properly intialized
|
||||||
pub fn (mut self GiteaServer) reload() ! {
|
pub fn (mut self GiteaServer) reload() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
self=obj_init(self)!
|
self = obj_init(self)!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) start() ! {
|
pub fn (mut self GiteaServer) start() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
if self.running()!{
|
if self.running()! {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('gitea start')
|
console.print_header('gitea start')
|
||||||
|
|
||||||
if ! installed()!{
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
|
|
||||||
configure()!
|
configure()!
|
||||||
|
|
||||||
start_pre()!
|
start_pre()!
|
||||||
|
|
||||||
for zprocess in startupcmd()!{
|
for zprocess in startupcmd()! {
|
||||||
mut sm:=startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting gitea with ${zprocess.startuptype}...')
|
console.print_debug('starting gitea with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
sm.start(zprocess.name)!
|
sm.start(zprocess.name)!
|
||||||
}
|
}
|
||||||
|
|
||||||
start_post()!
|
start_post()!
|
||||||
|
|
||||||
for _ in 0 .. 50 {
|
|
||||||
if self.running()! {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
time.sleep(100 * time.millisecond)
|
|
||||||
}
|
|
||||||
return error('gitea did not install properly.')
|
|
||||||
|
|
||||||
|
for _ in 0 .. 50 {
|
||||||
|
if self.running()! {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
time.sleep(100 * time.millisecond)
|
||||||
|
}
|
||||||
|
return error('gitea did not install properly.')
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) install_start(args InstallArgs) ! {
|
pub fn (mut self GiteaServer) install_start(args InstallArgs) ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
self.install(args)!
|
self.install(args)!
|
||||||
self.start()!
|
self.start()!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) stop() ! {
|
pub fn (mut self GiteaServer) stop() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
stop_pre()!
|
stop_pre()!
|
||||||
for zprocess in startupcmd()!{
|
for zprocess in startupcmd()! {
|
||||||
mut sm:=startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
sm.stop(zprocess.name)!
|
sm.stop(zprocess.name)!
|
||||||
}
|
}
|
||||||
stop_post()!
|
stop_post()!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) restart() ! {
|
pub fn (mut self GiteaServer) restart() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
self.stop()!
|
self.stop()!
|
||||||
self.start()!
|
self.start()!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) running() !bool {
|
pub fn (mut self GiteaServer) running() !bool {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
|
|
||||||
//walk over the generic processes, if not running return
|
// walk over the generic processes, if not running return
|
||||||
for zprocess in startupcmd()!{
|
for zprocess in startupcmd()! {
|
||||||
mut sm:=startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
r:=sm.running(zprocess.name)!
|
r := sm.running(zprocess.name)!
|
||||||
if r==false{
|
if r == false {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return running()!
|
return running()!
|
||||||
}
|
}
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct InstallArgs{
|
pub struct InstallArgs {
|
||||||
pub mut:
|
pub mut:
|
||||||
reset bool
|
reset bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) install(args InstallArgs) ! {
|
pub fn (mut self GiteaServer) install(args InstallArgs) ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
if args.reset || (!installed()!) {
|
if args.reset || (!installed()!) {
|
||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) build() ! {
|
pub fn (mut self GiteaServer) build() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
build()!
|
build()!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut self GiteaServer) destroy() ! {
|
pub fn (mut self GiteaServer) destroy() ! {
|
||||||
switch(self.name)
|
switch(self.name)
|
||||||
self.stop() or {}
|
self.stop() or {}
|
||||||
destroy()!
|
destroy()!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// switch instance to be used for gitea
|
||||||
|
|
||||||
//switch instance to be used for gitea
|
|
||||||
pub fn switch(name string) {
|
pub fn switch(name string) {
|
||||||
gitea_default = name
|
gitea_default = name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helpers
|
||||||
//helpers
|
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct DefaultConfigArgs{
|
pub struct DefaultConfigArgs {
|
||||||
instance string = 'default'
|
instance string = 'default'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
module gitea
|
module gitea
|
||||||
|
|
||||||
import freeflowuniverse.herolib.data.paramsparser
|
import freeflowuniverse.herolib.data.paramsparser
|
||||||
import freeflowuniverse.herolib.data.encoderhero
|
import freeflowuniverse.herolib.data.encoderhero
|
||||||
import freeflowuniverse.herolib.core.pathlib
|
import freeflowuniverse.herolib.core.pathlib
|
||||||
@@ -16,30 +17,29 @@ const default = false
|
|||||||
@[heap]
|
@[heap]
|
||||||
pub struct GiteaServer {
|
pub struct GiteaServer {
|
||||||
pub mut:
|
pub mut:
|
||||||
name string = 'default'
|
name string = 'default'
|
||||||
path string = '${os.home_dir()}/hero/var/gitea'
|
path string = '${os.home_dir()}/hero/var/gitea'
|
||||||
passwd string
|
passwd string
|
||||||
domain string = "git.test.com"
|
domain string = 'git.test.com'
|
||||||
jwt_secret string = rand.hex(12)
|
jwt_secret string = rand.hex(12)
|
||||||
lfs_jwt_secret string
|
lfs_jwt_secret string
|
||||||
internal_token string
|
internal_token string
|
||||||
secret_key string
|
secret_key string
|
||||||
postgresql_client_name string = "default"
|
postgresql_client_name string = 'default'
|
||||||
mail_client_name string = "default"
|
mail_client_name string = 'default'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn (obj GiteaServer) config_path() string {
|
pub fn (obj GiteaServer) config_path() string {
|
||||||
return '${obj.path}/config.ini'
|
return '${obj.path}/config.ini'
|
||||||
}
|
}
|
||||||
|
|
||||||
//your checking & initialization code if needed
|
// your checking & initialization code if needed
|
||||||
fn obj_init(mycfg_ GiteaServer)!GiteaServer{
|
fn obj_init(mycfg_ GiteaServer) !GiteaServer {
|
||||||
mut mycfg:=mycfg_
|
mut mycfg := mycfg_
|
||||||
return mycfg
|
return mycfg
|
||||||
}
|
}
|
||||||
|
|
||||||
//called before start if done
|
// called before start if done
|
||||||
fn configure() ! {
|
fn configure() ! {
|
||||||
mut server := get()!
|
mut server := get()!
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ fn configure() ! {
|
|||||||
return error('Failed to initialize mail client "${server.mail_client_name}": ${err}')
|
return error('Failed to initialize mail client "${server.mail_client_name}": ${err}')
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: check database exists
|
// TODO: check database exists
|
||||||
if !db_client.db_exists('gitea_${server.name}')! {
|
if !db_client.db_exists('gitea_${server.name}')! {
|
||||||
console.print_header('Creating database gitea_${server.name} for gitea.')
|
console.print_header('Creating database gitea_${server.name} for gitea.')
|
||||||
db_client.db_create('gitea_${server.name}')!
|
db_client.db_create('gitea_${server.name}')!
|
||||||
@@ -85,10 +85,10 @@ fn configure() ! {
|
|||||||
/////////////NORMALLY NO NEED TO TOUCH
|
/////////////NORMALLY NO NEED TO TOUCH
|
||||||
|
|
||||||
pub fn heroscript_dumps(obj GiteaServer) !string {
|
pub fn heroscript_dumps(obj GiteaServer) !string {
|
||||||
return encoderhero.encode[GiteaServer ](obj)!
|
return encoderhero.encode[GiteaServer](obj)!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn heroscript_loads(heroscript string) !GiteaServer {
|
pub fn heroscript_loads(heroscript string) !GiteaServer {
|
||||||
mut obj := encoderhero.decode[GiteaServer](heroscript)!
|
mut obj := encoderhero.decode[GiteaServer](heroscript)!
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ fn testsuite_begin() {
|
|||||||
muttmux := new() or { panic('Cannot create tmux: ${err}') }
|
muttmux := new() or { panic('Cannot create tmux: ${err}') }
|
||||||
|
|
||||||
// reset tmux for tests
|
// reset tmux for tests
|
||||||
is_running := tmux.is_running() or { panic('cannot check if tmux is running: ${err}') }
|
is_running := is_running() or { panic('cannot check if tmux is running: ${err}') }
|
||||||
if is_running {
|
if is_running {
|
||||||
tmux.stop() or { panic('Cannot stop tmux: ${err}') }
|
stop() or { panic('Cannot stop tmux: ${err}') }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,27 +41,21 @@ fn test_window_new() ! {
|
|||||||
|
|
||||||
// tests creating duplicate windows
|
// tests creating duplicate windows
|
||||||
fn test_window_new0() {
|
fn test_window_new0() {
|
||||||
|
installer := get_install()!
|
||||||
|
|
||||||
|
mut tmux := Tmux{
|
||||||
installer := tmux.get_install(
|
|
||||||
|
|
||||||
mut tmux := Tmux {
|
|
||||||
node: node_ssh
|
node: node_ssh
|
||||||
}
|
}
|
||||||
|
|
||||||
window_args := WindowArgs {
|
window_args := WindowArgs{
|
||||||
name: 'TestWindow0'
|
name: 'TestWindow0'
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.print_debug(tmux)
|
// console.print_debug(tmux)
|
||||||
mut window := tmux.window_new(window_args) or {
|
mut window := tmux.window_new(window_args) or { panic("Can't create new window: ${err}") }
|
||||||
panic("Can't create new window: $err")
|
|
||||||
}
|
|
||||||
assert tmux.sessions.keys().contains('main')
|
assert tmux.sessions.keys().contains('main')
|
||||||
mut window_dup := tmux.window_new(window_args) or {
|
mut window_dup := tmux.window_new(window_args) or { panic("Can't create new window: ${err}") }
|
||||||
panic("Can't create new window: $err")
|
console.print_debug(node_ssh.exec('tmux ls') or { panic('fail:${err}') })
|
||||||
}
|
window.delete() or { panic('Cant delete window') }
|
||||||
console.print_debug(node_ssh.exec('tmux ls') or { panic("fail:$err")})
|
|
||||||
window.delete() or { panic("Cant delete window") }
|
|
||||||
// console.print_debug(tmux)
|
// console.print_debug(tmux)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,35 +13,35 @@ import freeflowuniverse.herolib.ui.console
|
|||||||
@[heap]
|
@[heap]
|
||||||
pub struct DocSite {
|
pub struct DocSite {
|
||||||
pub mut:
|
pub mut:
|
||||||
name string
|
name string
|
||||||
url string
|
url string
|
||||||
path_src pathlib.Path
|
path_src pathlib.Path
|
||||||
path_build pathlib.Path
|
path_build pathlib.Path
|
||||||
// path_publish pathlib.Path
|
// path_publish pathlib.Path
|
||||||
args DSiteNewArgs
|
args DSiteNewArgs
|
||||||
errors []SiteError
|
errors []SiteError
|
||||||
config Config
|
config Config
|
||||||
}
|
}
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct DSiteNewArgs {
|
pub struct DSiteNewArgs {
|
||||||
pub mut:
|
pub mut:
|
||||||
name string
|
name string
|
||||||
nameshort string
|
nameshort string
|
||||||
path string
|
path string
|
||||||
url string
|
url string
|
||||||
// publish_path string
|
// publish_path string
|
||||||
build_path string
|
build_path string
|
||||||
production bool
|
production bool
|
||||||
watch_changes bool = true
|
watch_changes bool = true
|
||||||
update bool
|
update bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut f DocusaurusFactory) build_dev(args_ DSiteNewArgs) !&DocSite {
|
pub fn (mut f DocusaurusFactory) build_dev(args_ DSiteNewArgs) !&DocSite {
|
||||||
mut s:=f.add(args_)!
|
mut s := f.add(args_)!
|
||||||
s.generate()!
|
s.generate()!
|
||||||
osal.exec(
|
osal.exec(
|
||||||
cmd: '
|
cmd: '
|
||||||
cd ${s.path_build.path}
|
cd ${s.path_build.path}
|
||||||
bash build_dev.sh
|
bash build_dev.sh
|
||||||
'
|
'
|
||||||
@@ -51,10 +51,10 @@ pub fn (mut f DocusaurusFactory) build_dev(args_ DSiteNewArgs) !&DocSite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut f DocusaurusFactory) build(args_ DSiteNewArgs) !&DocSite {
|
pub fn (mut f DocusaurusFactory) build(args_ DSiteNewArgs) !&DocSite {
|
||||||
mut s:=f.add(args_)!
|
mut s := f.add(args_)!
|
||||||
s.generate()!
|
s.generate()!
|
||||||
osal.exec(
|
osal.exec(
|
||||||
cmd: '
|
cmd: '
|
||||||
cd ${s.path_build.path}
|
cd ${s.path_build.path}
|
||||||
bash build.sh
|
bash build.sh
|
||||||
'
|
'
|
||||||
@@ -64,7 +64,7 @@ pub fn (mut f DocusaurusFactory) build(args_ DSiteNewArgs) !&DocSite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut f DocusaurusFactory) dev(args_ DSiteNewArgs) !&DocSite {
|
pub fn (mut f DocusaurusFactory) dev(args_ DSiteNewArgs) !&DocSite {
|
||||||
mut s:=f.add(args_)!
|
mut s := f.add(args_)!
|
||||||
|
|
||||||
s.clean()!
|
s.clean()!
|
||||||
s.generate()!
|
s.generate()!
|
||||||
@@ -75,11 +75,11 @@ pub fn (mut f DocusaurusFactory) dev(args_ DSiteNewArgs) !&DocSite {
|
|||||||
|
|
||||||
// Add and start a new screen session
|
// Add and start a new screen session
|
||||||
mut scr := sf.add(
|
mut scr := sf.add(
|
||||||
name: screen_name
|
name: screen_name
|
||||||
cmd: '/bin/bash'
|
cmd: '/bin/bash'
|
||||||
start: true
|
start: true
|
||||||
attach: false
|
attach: false
|
||||||
reset: true
|
reset: true
|
||||||
)!
|
)!
|
||||||
|
|
||||||
// Send commands to the screen session
|
// Send commands to the screen session
|
||||||
@@ -95,31 +95,27 @@ pub fn (mut f DocusaurusFactory) dev(args_ DSiteNewArgs) !&DocSite {
|
|||||||
console.print_item(' 3. To list all screens: screen -ls')
|
console.print_item(' 3. To list all screens: screen -ls')
|
||||||
console.print_item('The site content is on::')
|
console.print_item('The site content is on::')
|
||||||
console.print_item(' 1. location of documents: ${s.path_src.path}/docs')
|
console.print_item(' 1. location of documents: ${s.path_src.path}/docs')
|
||||||
if osal.cmd_exists("code"){
|
if osal.cmd_exists('code') {
|
||||||
console.print_item(' 2. We opened above dir in vscode.')
|
console.print_item(' 2. We opened above dir in vscode.')
|
||||||
osal.exec(cmd:'code ${s.path_src.path}/docs')!
|
osal.exec(cmd: 'code ${s.path_src.path}/docs')!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Start the watcher in a separate thread
|
// Start the watcher in a separate thread
|
||||||
//mut tf:=spawn watch_docs(docs_path, s.path_src.path, s.path_build.path)
|
// mut tf:=spawn watch_docs(docs_path, s.path_src.path, s.path_build.path)
|
||||||
//tf.wait()!
|
// tf.wait()!
|
||||||
println("\n")
|
println('\n')
|
||||||
|
|
||||||
if args_.watch_changes {
|
if args_.watch_changes {
|
||||||
docs_path := '${s.path_src.path}/docs'
|
docs_path := '${s.path_src.path}/docs'
|
||||||
watch_docs(docs_path, s.path_src.path, s.path_build.path)!
|
watch_docs(docs_path, s.path_src.path, s.path_build.path)!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
pub fn (mut f DocusaurusFactory) add(args_ DSiteNewArgs) !&DocSite {
|
pub fn (mut f DocusaurusFactory) add(args_ DSiteNewArgs) !&DocSite {
|
||||||
console.print_header(' Docusaurus: ${args_.name}')
|
console.print_header(' Docusaurus: ${args_.name}')
|
||||||
mut args := args_
|
mut args := args_
|
||||||
@@ -130,42 +126,39 @@ pub fn (mut f DocusaurusFactory) add(args_ DSiteNewArgs) !&DocSite {
|
|||||||
// if args.publish_path.len == 0 {
|
// if args.publish_path.len == 0 {
|
||||||
// args.publish_path = '${f.path_publish.path}/${args.name}'
|
// args.publish_path = '${f.path_publish.path}/${args.name}'
|
||||||
|
|
||||||
|
if args.url.len > 0 {
|
||||||
if args.url.len>0{
|
|
||||||
|
|
||||||
mut gs := gittools.new()!
|
mut gs := gittools.new()!
|
||||||
args.path = gs.get_path(url: args.url)!
|
args.path = gs.get_path(url: args.url)!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if args.path.len==0{
|
if args.path.len == 0 {
|
||||||
return error("Can't get path from docusaurus site, its not specified.")
|
return error("Can't get path from docusaurus site, its not specified.")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mut gs := gittools.new()!
|
mut gs := gittools.new()!
|
||||||
mut r := gs.get_repo(url: 'https://github.com/freeflowuniverse/docusaurus_template.git',pull:args.update)!
|
mut r := gs.get_repo(
|
||||||
|
url: 'https://github.com/freeflowuniverse/docusaurus_template.git'
|
||||||
|
pull: args.update
|
||||||
|
)!
|
||||||
mut template_path := r.patho()!
|
mut template_path := r.patho()!
|
||||||
|
|
||||||
// First ensure cfg directory exists in src, if not copy from template
|
// First ensure cfg directory exists in src, if not copy from template
|
||||||
if !os.exists("${args.path}/cfg") {
|
if !os.exists('${args.path}/cfg') {
|
||||||
mut template_cfg := template_path.dir_get("cfg")!
|
mut template_cfg := template_path.dir_get('cfg')!
|
||||||
template_cfg.copy(dest:"${args.path}/cfg")!
|
template_cfg.copy(dest: '${args.path}/cfg')!
|
||||||
}
|
}
|
||||||
|
|
||||||
if !os.exists("${args.path}/docs") {
|
if !os.exists('${args.path}/docs') {
|
||||||
mut template_cfg := template_path.dir_get("docs")!
|
mut template_cfg := template_path.dir_get('docs')!
|
||||||
template_cfg.copy(dest:"${args.path}/docs")!
|
template_cfg.copy(dest: '${args.path}/docs')!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mut myconfig := load_config('${args.path}/cfg')!
|
||||||
|
|
||||||
mut myconfig:=load_config("${args.path}/cfg")!
|
if myconfig.main.name.len == 0 {
|
||||||
|
myconfig.main.name = myconfig.main.base_url.trim_space().trim('/').trim_space()
|
||||||
if myconfig.main.name.len==0{
|
|
||||||
myconfig.main.name = myconfig.main.base_url.trim_space().trim("/").trim_space()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if args.name == '' {
|
if args.name == '' {
|
||||||
args.name = myconfig.main.name
|
args.name = myconfig.main.name
|
||||||
}
|
}
|
||||||
@@ -175,16 +168,14 @@ pub fn (mut f DocusaurusFactory) add(args_ DSiteNewArgs) !&DocSite {
|
|||||||
}
|
}
|
||||||
args.nameshort = texttools.name_fix(args.nameshort)
|
args.nameshort = texttools.name_fix(args.nameshort)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mut ds := DocSite{
|
mut ds := DocSite{
|
||||||
name: args.name
|
name: args.name
|
||||||
url: args.url
|
url: args.url
|
||||||
path_src: pathlib.get_dir(path: args.path, create: false)!
|
path_src: pathlib.get_dir(path: args.path, create: false)!
|
||||||
path_build: f.path_build
|
path_build: f.path_build
|
||||||
// path_publish: pathlib.get_dir(path: args.publish_path, create: true)!
|
// path_publish: pathlib.get_dir(path: args.publish_path, create: true)!
|
||||||
args: args
|
args: args
|
||||||
config:myconfig
|
config: myconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
f.sites << &ds
|
f.sites << &ds
|
||||||
@@ -201,9 +192,9 @@ pub mut:
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut site DocSite) error(args ErrorArgs) {
|
pub fn (mut site DocSite) error(args ErrorArgs) {
|
||||||
// path2 := pathlib.get(args.path)
|
// path2 := pathlib.get(args.path)
|
||||||
e := SiteError{
|
e := SiteError{
|
||||||
path: args.path
|
path: args.path
|
||||||
msg: args.msg
|
msg: args.msg
|
||||||
cat: args.cat
|
cat: args.cat
|
||||||
}
|
}
|
||||||
@@ -222,21 +213,19 @@ pub fn (mut site DocSite) generate() ! {
|
|||||||
// retry: 0
|
// retry: 0
|
||||||
// )!
|
// )!
|
||||||
|
|
||||||
|
|
||||||
// Now copy all directories that exist in src to build
|
// Now copy all directories that exist in src to build
|
||||||
for item in ["src","static","cfg"]{
|
for item in ['src', 'static', 'cfg'] {
|
||||||
if os.exists("${site.path_src.path}/${item}"){
|
if os.exists('${site.path_src.path}/${item}') {
|
||||||
mut aa:= site.path_src.dir_get(item)!
|
mut aa := site.path_src.dir_get(item)!
|
||||||
aa.copy(dest:"${site.path_build.path}/${item}")!
|
aa.copy(dest: '${site.path_build.path}/${item}')!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for item in ["docs"]{
|
for item in ['docs'] {
|
||||||
if os.exists("${site.path_src.path}/${item}"){
|
if os.exists('${site.path_src.path}/${item}') {
|
||||||
mut aa:= site.path_src.dir_get(item)!
|
mut aa := site.path_src.dir_get(item)!
|
||||||
aa.copy(dest:"${site.path_build.path}/${item}",delete:true)!
|
aa.copy(dest: '${site.path_build.path}/${item}', delete: true)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut site DocSite) template_install() ! {
|
fn (mut site DocSite) template_install() ! {
|
||||||
@@ -245,22 +234,26 @@ fn (mut site DocSite) template_install() ! {
|
|||||||
mut r := gs.get_repo(url: 'https://github.com/freeflowuniverse/docusaurus_template.git')!
|
mut r := gs.get_repo(url: 'https://github.com/freeflowuniverse/docusaurus_template.git')!
|
||||||
mut template_path := r.patho()!
|
mut template_path := r.patho()!
|
||||||
|
|
||||||
//always start from template first
|
// always start from template first
|
||||||
for item in ["src","static","cfg"]{
|
for item in ['src', 'static', 'cfg'] {
|
||||||
mut aa:= template_path.dir_get(item)!
|
mut aa := template_path.dir_get(item)!
|
||||||
aa.copy(dest:"${site.path_build.path}/${item}",delete:true)!
|
aa.copy(dest: '${site.path_build.path}/${item}', delete: true)!
|
||||||
}
|
}
|
||||||
|
|
||||||
for item in ['package.json', 'sidebars.ts', 'tsconfig.json','docusaurus.config.ts'] {
|
for item in ['package.json', 'sidebars.ts', 'tsconfig.json', 'docusaurus.config.ts'] {
|
||||||
src_path := os.join_path(template_path.path, item)
|
src_path := os.join_path(template_path.path, item)
|
||||||
dest_path := os.join_path(site.path_build.path, item)
|
dest_path := os.join_path(site.path_build.path, item)
|
||||||
os.cp(src_path, dest_path) or { return error('Failed to copy ${item} to build path: ${err}') }
|
os.cp(src_path, dest_path) or {
|
||||||
|
return error('Failed to copy ${item} to build path: ${err}')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for item in ['.gitignore'] {
|
for item in ['.gitignore'] {
|
||||||
src_path := os.join_path(template_path.path, item)
|
src_path := os.join_path(template_path.path, item)
|
||||||
dest_path := os.join_path(site.path_src.path, item)
|
dest_path := os.join_path(site.path_src.path, item)
|
||||||
os.cp(src_path, dest_path) or { return error('Failed to copy ${item} to source path: ${err}') }
|
os.cp(src_path, dest_path) or {
|
||||||
|
return error('Failed to copy ${item} to source path: ${err}')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg := site.config
|
cfg := site.config
|
||||||
@@ -269,30 +262,27 @@ fn (mut site DocSite) template_install() ! {
|
|||||||
build := $tmpl('templates/build.sh')
|
build := $tmpl('templates/build.sh')
|
||||||
build_dev := $tmpl('templates/build_dev.sh')
|
build_dev := $tmpl('templates/build_dev.sh')
|
||||||
|
|
||||||
mut develop_ := site.path_build.file_get_new("develop.sh")!
|
mut develop_ := site.path_build.file_get_new('develop.sh')!
|
||||||
develop_.template_write(develop,true)!
|
develop_.template_write(develop, true)!
|
||||||
develop_.chmod(0o700)!
|
develop_.chmod(0o700)!
|
||||||
|
|
||||||
mut build_ := site.path_build.file_get_new("build.sh")!
|
mut build_ := site.path_build.file_get_new('build.sh')!
|
||||||
build_.template_write(build,true)!
|
build_.template_write(build, true)!
|
||||||
build_.chmod(0o700)!
|
build_.chmod(0o700)!
|
||||||
|
|
||||||
mut build_dev_ := site.path_build.file_get_new("build_dev.sh")!
|
mut build_dev_ := site.path_build.file_get_new('build_dev.sh')!
|
||||||
build_dev_.template_write(build_dev,true)!
|
build_dev_.template_write(build_dev, true)!
|
||||||
build_dev_.chmod(0o700)!
|
build_dev_.chmod(0o700)!
|
||||||
|
|
||||||
mut develop2_ := site.path_src.file_get_new("develop.sh")!
|
mut develop2_ := site.path_src.file_get_new('develop.sh')!
|
||||||
develop2_.template_write(develop,true)!
|
develop2_.template_write(develop, true)!
|
||||||
develop2_.chmod(0o700)!
|
develop2_.chmod(0o700)!
|
||||||
|
|
||||||
mut build2_ := site.path_src.file_get_new("build.sh")!
|
mut build2_ := site.path_src.file_get_new('build.sh')!
|
||||||
build2_.template_write(build,true)!
|
build2_.template_write(build, true)!
|
||||||
build2_.chmod(0o700)!
|
build2_.chmod(0o700)!
|
||||||
|
|
||||||
mut build_dev2_ := site.path_src.file_get_new("build_dev.sh")!
|
mut build_dev2_ := site.path_src.file_get_new('build_dev.sh')!
|
||||||
build_dev2_.template_write(build_dev,true)!
|
build_dev2_.template_write(build_dev, true)!
|
||||||
build_dev2_.chmod(0o700)!
|
build_dev2_.chmod(0o700)!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ pub mut:
|
|||||||
// publish_path string
|
// publish_path string
|
||||||
build_path string
|
build_path string
|
||||||
production bool
|
production bool
|
||||||
update bool
|
update bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(args_ DocusaurusArgs) !&DocusaurusFactory {
|
pub fn new(args_ DocusaurusArgs) !&DocusaurusFactory {
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ import freeflowuniverse.herolib.installers.web.bun
|
|||||||
fn (mut site DocusaurusFactory) template_install(update bool) ! {
|
fn (mut site DocusaurusFactory) template_install(update bool) ! {
|
||||||
mut gs := gittools.new()!
|
mut gs := gittools.new()!
|
||||||
|
|
||||||
mut r := gs.get_repo(url: 'https://github.com/freeflowuniverse/docusaurus_template.git',pull:update)!
|
mut r := gs.get_repo(
|
||||||
|
url: 'https://github.com/freeflowuniverse/docusaurus_template.git'
|
||||||
|
pull: update
|
||||||
|
)!
|
||||||
mut template_path := r.patho()!
|
mut template_path := r.patho()!
|
||||||
|
|
||||||
for item in ['package.json', 'sidebars.ts', 'tsconfig.json'] {
|
for item in ['package.json', 'sidebars.ts', 'tsconfig.json'] {
|
||||||
|
|||||||
8
manual/create_tag.md
Normal file
8
manual/create_tag.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
## how to tag a version and push
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```
|
||||||
35
release.sh
Executable file
35
release.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to get the latest release tag
|
||||||
|
get_latest_release() {
|
||||||
|
curl --silent "https://api.github.com/repos/freeflowuniverse/herolib/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show current version
|
||||||
|
echo "Current latest release: $(get_latest_release)"
|
||||||
|
|
||||||
|
# Ask for new version
|
||||||
|
read -p "Enter new version (e.g., 1.0.4): " new_version
|
||||||
|
|
||||||
|
# Validate version format
|
||||||
|
if [[ ! $new_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: Version must be in format X.Y.Z (e.g., 1.0.4)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update version in hero.v
|
||||||
|
sed -i.bak "s/version: '[0-9]\+\.[0-9]\+\.[0-9]\+'/version: '$new_version'/" cli/hero.v
|
||||||
|
rm -f cli/hero.v.bak
|
||||||
|
|
||||||
|
# Commit changes
|
||||||
|
git add . -A
|
||||||
|
git commit -m "chore: bump version to $new_version"
|
||||||
|
git pull
|
||||||
|
git push
|
||||||
|
|
||||||
|
# Create and push tag
|
||||||
|
git tag -a "v$new_version" -m "Release version $new_version"
|
||||||
|
git push origin "v$new_version"
|
||||||
|
|
||||||
|
echo "Release v$new_version created and pushed!"
|
||||||
452
vdocs/arrays.md
Normal file
452
vdocs/arrays.md
Normal file
@@ -0,0 +1,452 @@
|
|||||||
|
# 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
|
||||||
32
vdocs/arrays.parallel.md
Normal file
32
vdocs/arrays.parallel.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# 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
|
||||||
124
vdocs/benchmark.md
Normal file
124
vdocs/benchmark.md
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# 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
|
||||||
201
vdocs/bitfield.md
Normal file
201
vdocs/bitfield.md
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
# 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
|
||||||
2572
vdocs/builtin.md
Normal file
2572
vdocs/builtin.md
Normal file
File diff suppressed because it is too large
Load Diff
61
vdocs/builtin.wchar.md
Normal file
61
vdocs/builtin.wchar.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# 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
|
||||||
162
vdocs/cli.md
Normal file
162
vdocs/cli.md
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
# 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
|
||||||
42
vdocs/clipboard.dummy.md
Normal file
42
vdocs/clipboard.dummy.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# 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
|
||||||
66
vdocs/clipboard.md
Normal file
66
vdocs/clipboard.md
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# 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
|
||||||
62
vdocs/clipboard.x11.md
Normal file
62
vdocs/clipboard.x11.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# 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
|
||||||
28
vdocs/compress.deflate.md
Normal file
28
vdocs/compress.deflate.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 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
|
||||||
66
vdocs/compress.gzip.md
Normal file
66
vdocs/compress.gzip.md
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# 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
|
||||||
18
vdocs/compress.md
Normal file
18
vdocs/compress.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# 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
|
||||||
106
vdocs/compress.szip.md
Normal file
106
vdocs/compress.szip.md
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
# 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
|
||||||
28
vdocs/compress.zlib.md
Normal file
28
vdocs/compress.zlib.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 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
|
||||||
148
vdocs/compress.zstd.md
Normal file
148
vdocs/compress.zstd.md
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
# 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
|
||||||
166
vdocs/context.md
Normal file
166
vdocs/context.md
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
# 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
|
||||||
52
vdocs/context.onecontext.md
Normal file
52
vdocs/context.onecontext.md
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# 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
|
||||||
10
vdocs/coroutines.md
Normal file
10
vdocs/coroutines.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# module coroutines
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [sleep](#sleep)
|
||||||
|
|
||||||
|
## sleep
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
32
vdocs/crypto.aes.md
Normal file
32
vdocs/crypto.aes.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# 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
|
||||||
48
vdocs/crypto.bcrypt.md
Normal file
48
vdocs/crypto.bcrypt.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# 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
|
||||||
100
vdocs/crypto.blake2b.md
Normal file
100
vdocs/crypto.blake2b.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# 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
|
||||||
100
vdocs/crypto.blake2s.md
Normal file
100
vdocs/crypto.blake2s.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# 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
|
||||||
50
vdocs/crypto.blake3.md
Normal file
50
vdocs/crypto.blake3.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# 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
|
||||||
36
vdocs/crypto.blowfish.md
Normal file
36
vdocs/crypto.blowfish.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# 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
|
||||||
90
vdocs/crypto.cipher.md
Normal file
90
vdocs/crypto.cipher.md
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
# 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
|
||||||
38
vdocs/crypto.des.md
Normal file
38
vdocs/crypto.des.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# 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
|
||||||
102
vdocs/crypto.ecdsa.md
Normal file
102
vdocs/crypto.ecdsa.md
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
# 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
|
||||||
224
vdocs/crypto.ed25519.internal.edwards25519.md
Normal file
224
vdocs/crypto.ed25519.internal.edwards25519.md
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
# 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
|
||||||
60
vdocs/crypto.ed25519.md
Normal file
60
vdocs/crypto.ed25519.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# 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
|
||||||
14
vdocs/crypto.hmac.md
Normal file
14
vdocs/crypto.hmac.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 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
|
||||||
38
vdocs/crypto.internal.subtle.md
Normal file
38
vdocs/crypto.internal.subtle.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# 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
|
||||||
10
vdocs/crypto.md
Normal file
10
vdocs/crypto.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# module crypto
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [Hash](#Hash)
|
||||||
|
|
||||||
|
## Hash
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
57
vdocs/crypto.md5.md
Normal file
57
vdocs/crypto.md5.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# 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
|
||||||
10
vdocs/crypto.pbkdf2.md
Normal file
10
vdocs/crypto.pbkdf2.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# module crypto.pbkdf2
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [key](#key)
|
||||||
|
|
||||||
|
## key
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
46
vdocs/crypto.pem.md
Normal file
46
vdocs/crypto.pem.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# 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
|
||||||
28
vdocs/crypto.rand.md
Normal file
28
vdocs/crypto.rand.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# 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
|
||||||
24
vdocs/crypto.rc4.md
Normal file
24
vdocs/crypto.rc4.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# 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
|
||||||
16
vdocs/crypto.scrypt.md
Normal file
16
vdocs/crypto.scrypt.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# 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
|
||||||
50
vdocs/crypto.sha1.md
Normal file
50
vdocs/crypto.sha1.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# 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
|
||||||
82
vdocs/crypto.sha256.md
Normal file
82
vdocs/crypto.sha256.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# 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
|
||||||
118
vdocs/crypto.sha3.md
Normal file
118
vdocs/crypto.sha3.md
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
# 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
|
||||||
92
vdocs/crypto.sha512.md
Normal file
92
vdocs/crypto.sha512.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# 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
|
||||||
42
vdocs/datatypes.fsm.md
Normal file
42
vdocs/datatypes.fsm.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# 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
|
||||||
510
vdocs/datatypes.md
Normal file
510
vdocs/datatypes.md
Normal file
@@ -0,0 +1,510 @@
|
|||||||
|
# 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
|
||||||
38
vdocs/db.mssql.md
Normal file
38
vdocs/db.mssql.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# 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
|
||||||
400
vdocs/db.mysql.md
Normal file
400
vdocs/db.mysql.md
Normal file
@@ -0,0 +1,400 @@
|
|||||||
|
# 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
|
||||||
130
vdocs/db.pg.md
Normal file
130
vdocs/db.pg.md
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
# 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
|
||||||
234
vdocs/db.sqlite.md
Normal file
234
vdocs/db.sqlite.md
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
# 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
|
||||||
60
vdocs/dl.loader.md
Normal file
60
vdocs/dl.loader.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# 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
|
||||||
58
vdocs/dl.md
Normal file
58
vdocs/dl.md
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# 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
|
||||||
86
vdocs/dlmalloc.md
Normal file
86
vdocs/dlmalloc.md
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# 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
|
||||||
78
vdocs/encoding.base32.md
Normal file
78
vdocs/encoding.base32.md
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# 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
|
||||||
74
vdocs/encoding.base58.md
Normal file
74
vdocs/encoding.base58.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# module encoding.base58
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [Constants](#Constants)
|
||||||
|
- [decode](#decode)
|
||||||
|
- [decode_bytes](#decode_bytes)
|
||||||
|
- [decode_int](#decode_int)
|
||||||
|
- [decode_int_walpha](#decode_int_walpha)
|
||||||
|
- [decode_walpha](#decode_walpha)
|
||||||
|
- [decode_walpha_bytes](#decode_walpha_bytes)
|
||||||
|
- [encode](#encode)
|
||||||
|
- [encode_bytes](#encode_bytes)
|
||||||
|
- [encode_int](#encode_int)
|
||||||
|
- [encode_int_walpha](#encode_int_walpha)
|
||||||
|
- [encode_walpha](#encode_walpha)
|
||||||
|
- [encode_walpha_bytes](#encode_walpha_bytes)
|
||||||
|
- [new_alphabet](#new_alphabet)
|
||||||
|
- [Alphabet](#Alphabet)
|
||||||
|
- [str](#str)
|
||||||
|
|
||||||
|
## Constants
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_bytes
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_int
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_int_walpha
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_walpha
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_walpha_bytes
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_bytes
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_int
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_int_walpha
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_walpha
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_walpha_bytes
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## new_alphabet
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Alphabet
|
||||||
|
## str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
64
vdocs/encoding.base64.md
Normal file
64
vdocs/encoding.base64.md
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# module encoding.base64
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [decode](#decode)
|
||||||
|
- [decode_in_buffer](#decode_in_buffer)
|
||||||
|
- [decode_in_buffer_bytes](#decode_in_buffer_bytes)
|
||||||
|
- [decode_str](#decode_str)
|
||||||
|
- [encode](#encode)
|
||||||
|
- [encode_in_buffer](#encode_in_buffer)
|
||||||
|
- [encode_str](#encode_str)
|
||||||
|
- [url_decode](#url_decode)
|
||||||
|
- [url_decode_str](#url_decode_str)
|
||||||
|
- [url_encode](#url_encode)
|
||||||
|
- [url_encode_str](#url_encode_str)
|
||||||
|
|
||||||
|
## decode
|
||||||
|
Example
|
||||||
|
```v
|
||||||
|
|
||||||
|
assert base64.decode('ViBpbiBiYXNlIDY0') == 'V in base 64'
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_in_buffer
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_in_buffer_bytes
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode
|
||||||
|
Example
|
||||||
|
```v
|
||||||
|
|
||||||
|
assert base64.encode('V in base 64') == 'ViBpbiBiYXNlIDY0'
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_in_buffer
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## url_decode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## url_decode_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## url_encode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## url_encode_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
226
vdocs/encoding.binary.md
Normal file
226
vdocs/encoding.binary.md
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
# module encoding.binary
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [big_endian_get_u16](#big_endian_get_u16)
|
||||||
|
- [big_endian_get_u32](#big_endian_get_u32)
|
||||||
|
- [big_endian_get_u64](#big_endian_get_u64)
|
||||||
|
- [big_endian_put_u16](#big_endian_put_u16)
|
||||||
|
- [big_endian_put_u16_at](#big_endian_put_u16_at)
|
||||||
|
- [big_endian_put_u16_end](#big_endian_put_u16_end)
|
||||||
|
- [big_endian_put_u16_fixed](#big_endian_put_u16_fixed)
|
||||||
|
- [big_endian_put_u32](#big_endian_put_u32)
|
||||||
|
- [big_endian_put_u32_at](#big_endian_put_u32_at)
|
||||||
|
- [big_endian_put_u32_end](#big_endian_put_u32_end)
|
||||||
|
- [big_endian_put_u32_fixed](#big_endian_put_u32_fixed)
|
||||||
|
- [big_endian_put_u64](#big_endian_put_u64)
|
||||||
|
- [big_endian_put_u64_at](#big_endian_put_u64_at)
|
||||||
|
- [big_endian_put_u64_end](#big_endian_put_u64_end)
|
||||||
|
- [big_endian_put_u64_fixed](#big_endian_put_u64_fixed)
|
||||||
|
- [big_endian_u16](#big_endian_u16)
|
||||||
|
- [big_endian_u16_at](#big_endian_u16_at)
|
||||||
|
- [big_endian_u16_end](#big_endian_u16_end)
|
||||||
|
- [big_endian_u16_fixed](#big_endian_u16_fixed)
|
||||||
|
- [big_endian_u32](#big_endian_u32)
|
||||||
|
- [big_endian_u32_at](#big_endian_u32_at)
|
||||||
|
- [big_endian_u32_end](#big_endian_u32_end)
|
||||||
|
- [big_endian_u32_fixed](#big_endian_u32_fixed)
|
||||||
|
- [big_endian_u64](#big_endian_u64)
|
||||||
|
- [big_endian_u64_at](#big_endian_u64_at)
|
||||||
|
- [big_endian_u64_end](#big_endian_u64_end)
|
||||||
|
- [big_endian_u64_fixed](#big_endian_u64_fixed)
|
||||||
|
- [little_endian_f32_at](#little_endian_f32_at)
|
||||||
|
- [little_endian_get_u16](#little_endian_get_u16)
|
||||||
|
- [little_endian_get_u32](#little_endian_get_u32)
|
||||||
|
- [little_endian_get_u64](#little_endian_get_u64)
|
||||||
|
- [little_endian_put_u16](#little_endian_put_u16)
|
||||||
|
- [little_endian_put_u16_at](#little_endian_put_u16_at)
|
||||||
|
- [little_endian_put_u16_end](#little_endian_put_u16_end)
|
||||||
|
- [little_endian_put_u16_fixed](#little_endian_put_u16_fixed)
|
||||||
|
- [little_endian_put_u32](#little_endian_put_u32)
|
||||||
|
- [little_endian_put_u32_at](#little_endian_put_u32_at)
|
||||||
|
- [little_endian_put_u32_end](#little_endian_put_u32_end)
|
||||||
|
- [little_endian_put_u32_fixed](#little_endian_put_u32_fixed)
|
||||||
|
- [little_endian_put_u64](#little_endian_put_u64)
|
||||||
|
- [little_endian_put_u64_at](#little_endian_put_u64_at)
|
||||||
|
- [little_endian_put_u64_end](#little_endian_put_u64_end)
|
||||||
|
- [little_endian_put_u64_fixed](#little_endian_put_u64_fixed)
|
||||||
|
- [little_endian_u16](#little_endian_u16)
|
||||||
|
- [little_endian_u16_at](#little_endian_u16_at)
|
||||||
|
- [little_endian_u16_end](#little_endian_u16_end)
|
||||||
|
- [little_endian_u16_fixed](#little_endian_u16_fixed)
|
||||||
|
- [little_endian_u32](#little_endian_u32)
|
||||||
|
- [little_endian_u32_at](#little_endian_u32_at)
|
||||||
|
- [little_endian_u32_end](#little_endian_u32_end)
|
||||||
|
- [little_endian_u32_fixed](#little_endian_u32_fixed)
|
||||||
|
- [little_endian_u64](#little_endian_u64)
|
||||||
|
- [little_endian_u64_at](#little_endian_u64_at)
|
||||||
|
- [little_endian_u64_end](#little_endian_u64_end)
|
||||||
|
- [little_endian_u64_fixed](#little_endian_u64_fixed)
|
||||||
|
|
||||||
|
## big_endian_get_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_get_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_get_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u16_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u16_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u16_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u32_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u32_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u32_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u64_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u64_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_put_u64_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u16_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u16_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u16_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u32_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u32_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u32_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u64_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u64_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## big_endian_u64_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_f32_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_get_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_get_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_get_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u16_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u16_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u16_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u32_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u32_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u32_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u64_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u64_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_put_u64_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u16
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u16_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u16_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u16_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u32_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u32_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u32_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u64_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u64_end
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## little_endian_u64_fixed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
144
vdocs/encoding.csv.md
Normal file
144
vdocs/encoding.csv.md
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
# module encoding.csv
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [Constants](#Constants)
|
||||||
|
- [csv_reader](#csv_reader)
|
||||||
|
- [csv_reader_from_string](#csv_reader_from_string)
|
||||||
|
- [csv_sequential_reader](#csv_sequential_reader)
|
||||||
|
- [decode](#decode)
|
||||||
|
- [new_reader](#new_reader)
|
||||||
|
- [new_reader_from_file](#new_reader_from_file)
|
||||||
|
- [new_writer](#new_writer)
|
||||||
|
- [CellValue](#CellValue)
|
||||||
|
- [Reader](#Reader)
|
||||||
|
- [read](#read)
|
||||||
|
- [Writer](#Writer)
|
||||||
|
- [write](#write)
|
||||||
|
- [str](#str)
|
||||||
|
- [ColumType](#ColumType)
|
||||||
|
- [GetCellConfig](#GetCellConfig)
|
||||||
|
- [GetHeaderConf](#GetHeaderConf)
|
||||||
|
- [HeaderItem](#HeaderItem)
|
||||||
|
- [RandomAccessReader](#RandomAccessReader)
|
||||||
|
- [dispose_csv_reader](#dispose_csv_reader)
|
||||||
|
- [map_csv](#map_csv)
|
||||||
|
- [get_row](#get_row)
|
||||||
|
- [get_cell](#get_cell)
|
||||||
|
- [get_cellt](#get_cellt)
|
||||||
|
- [build_header_dict](#build_header_dict)
|
||||||
|
- [rows_count](#rows_count)
|
||||||
|
- [RandomAccessReaderConfig](#RandomAccessReaderConfig)
|
||||||
|
- [ReaderConfig](#ReaderConfig)
|
||||||
|
- [SequentialReader](#SequentialReader)
|
||||||
|
- [dispose_csv_reader](#dispose_csv_reader)
|
||||||
|
- [has_data](#has_data)
|
||||||
|
- [get_next_row](#get_next_row)
|
||||||
|
- [SequentialReaderConfig](#SequentialReaderConfig)
|
||||||
|
- [WriterConfig](#WriterConfig)
|
||||||
|
|
||||||
|
## Constants
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## csv_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## csv_reader_from_string
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## csv_sequential_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## new_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## new_reader_from_file
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## new_writer
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## CellValue
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Reader
|
||||||
|
## read
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Writer
|
||||||
|
## write
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## ColumType
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## GetCellConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## GetHeaderConf
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## HeaderItem
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## RandomAccessReader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## dispose_csv_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## map_csv
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_row
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_cell
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_cellt
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## build_header_dict
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## rows_count
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## RandomAccessReaderConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## ReaderConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## SequentialReader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## dispose_csv_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## has_data
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_next_row
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## SequentialReaderConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## WriterConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
14
vdocs/encoding.hex.md
Normal file
14
vdocs/encoding.hex.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# module encoding.hex
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [decode](#decode)
|
||||||
|
- [encode](#encode)
|
||||||
|
|
||||||
|
## decode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
22
vdocs/encoding.html.md
Normal file
22
vdocs/encoding.html.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# module encoding.html
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [escape](#escape)
|
||||||
|
- [unescape](#unescape)
|
||||||
|
- [EscapeConfig](#EscapeConfig)
|
||||||
|
- [UnescapeConfig](#UnescapeConfig)
|
||||||
|
|
||||||
|
## escape
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unescape
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EscapeConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## UnescapeConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
30
vdocs/encoding.iconv.md
Normal file
30
vdocs/encoding.iconv.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# module encoding.iconv
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [create_utf_string_with_bom](#create_utf_string_with_bom)
|
||||||
|
- [encoding_to_vstring](#encoding_to_vstring)
|
||||||
|
- [read_file_encoding](#read_file_encoding)
|
||||||
|
- [remove_utf_string_with_bom](#remove_utf_string_with_bom)
|
||||||
|
- [vstring_to_encoding](#vstring_to_encoding)
|
||||||
|
- [write_file_encoding](#write_file_encoding)
|
||||||
|
|
||||||
|
## create_utf_string_with_bom
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encoding_to_vstring
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## read_file_encoding
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## remove_utf_string_with_bom
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## vstring_to_encoding
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## write_file_encoding
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
38
vdocs/encoding.leb128.md
Normal file
38
vdocs/encoding.leb128.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# module encoding.leb128
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [decode_i32](#decode_i32)
|
||||||
|
- [decode_i64](#decode_i64)
|
||||||
|
- [decode_u32](#decode_u32)
|
||||||
|
- [decode_u64](#decode_u64)
|
||||||
|
- [encode_i32](#encode_i32)
|
||||||
|
- [encode_i64](#encode_i64)
|
||||||
|
- [encode_u32](#encode_u32)
|
||||||
|
- [encode_u64](#encode_u64)
|
||||||
|
|
||||||
|
## decode_i32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_i64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## decode_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_i32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_i64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_u32
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## encode_u64
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
38
vdocs/encoding.txtar.md
Normal file
38
vdocs/encoding.txtar.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# module encoding.txtar
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [pack](#pack)
|
||||||
|
- [parse](#parse)
|
||||||
|
- [parse_file](#parse_file)
|
||||||
|
- [unpack](#unpack)
|
||||||
|
- [Archive](#Archive)
|
||||||
|
- [str](#str)
|
||||||
|
- [unpack_to](#unpack_to)
|
||||||
|
- [File](#File)
|
||||||
|
|
||||||
|
## pack
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## parse
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## parse_file
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unpack
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Archive
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unpack_to
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## File
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
18
vdocs/encoding.utf8.east_asian.md
Normal file
18
vdocs/encoding.utf8.east_asian.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# module encoding.utf8.east_asian
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [display_width](#display_width)
|
||||||
|
- [east_asian_width_property_at](#east_asian_width_property_at)
|
||||||
|
- [EastAsianWidthProperty](#EastAsianWidthProperty)
|
||||||
|
|
||||||
|
## display_width
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## east_asian_width_property_at
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EastAsianWidthProperty
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
82
vdocs/encoding.utf8.md
Normal file
82
vdocs/encoding.utf8.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# module encoding.utf8
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [get_rune](#get_rune)
|
||||||
|
- [get_uchar](#get_uchar)
|
||||||
|
- [is_control](#is_control)
|
||||||
|
- [is_global_punct](#is_global_punct)
|
||||||
|
- [is_letter](#is_letter)
|
||||||
|
- [is_number](#is_number)
|
||||||
|
- [is_punct](#is_punct)
|
||||||
|
- [is_rune_global_punct](#is_rune_global_punct)
|
||||||
|
- [is_rune_punct](#is_rune_punct)
|
||||||
|
- [is_space](#is_space)
|
||||||
|
- [is_uchar_global_punct](#is_uchar_global_punct)
|
||||||
|
- [is_uchar_punct](#is_uchar_punct)
|
||||||
|
- [len](#len)
|
||||||
|
- [raw_index](#raw_index)
|
||||||
|
- [reverse](#reverse)
|
||||||
|
- [to_lower](#to_lower)
|
||||||
|
- [to_upper](#to_upper)
|
||||||
|
- [validate](#validate)
|
||||||
|
- [validate_str](#validate_str)
|
||||||
|
|
||||||
|
## get_rune
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_uchar
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_control
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_global_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_letter
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_number
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_rune_global_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_rune_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_space
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_uchar_global_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_uchar_punct
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## len
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## raw_index
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## reverse
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## to_lower
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## to_upper
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## validate
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## validate_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
124
vdocs/encoding.xml.md
Normal file
124
vdocs/encoding.xml.md
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# module encoding.xml
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [Constants](#Constants)
|
||||||
|
- [escape_text](#escape_text)
|
||||||
|
- [parse_single_node](#parse_single_node)
|
||||||
|
- [unescape_text](#unescape_text)
|
||||||
|
- [XMLDocument.from_file](#XMLDocument.from_file)
|
||||||
|
- [XMLDocument.from_reader](#XMLDocument.from_reader)
|
||||||
|
- [XMLDocument.from_string](#XMLDocument.from_string)
|
||||||
|
- [DTDListItem](#DTDListItem)
|
||||||
|
- [XMLNodeContents](#XMLNodeContents)
|
||||||
|
- [DTDElement](#DTDElement)
|
||||||
|
- [DTDEntity](#DTDEntity)
|
||||||
|
- [DocumentType](#DocumentType)
|
||||||
|
- [DocumentTypeDefinition](#DocumentTypeDefinition)
|
||||||
|
- [EscapeConfig](#EscapeConfig)
|
||||||
|
- [UnescapeConfig](#UnescapeConfig)
|
||||||
|
- [XMLCData](#XMLCData)
|
||||||
|
- [XMLComment](#XMLComment)
|
||||||
|
- [XMLDocument](#XMLDocument)
|
||||||
|
- [get_element_by_id](#get_element_by_id)
|
||||||
|
- [get_elements_by_attribute](#get_elements_by_attribute)
|
||||||
|
- [get_elements_by_tag](#get_elements_by_tag)
|
||||||
|
- [pretty_str](#pretty_str)
|
||||||
|
- [str](#str)
|
||||||
|
- [validate](#validate)
|
||||||
|
- [XMLNode](#XMLNode)
|
||||||
|
- [get_element_by_id](#get_element_by_id)
|
||||||
|
- [get_elements_by_attribute](#get_elements_by_attribute)
|
||||||
|
- [get_elements_by_tag](#get_elements_by_tag)
|
||||||
|
- [pretty_str](#pretty_str)
|
||||||
|
|
||||||
|
## Constants
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## escape_text
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## parse_single_node
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unescape_text
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLDocument.from_file
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLDocument.from_reader
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLDocument.from_string
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## DTDListItem
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLNodeContents
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## DTDElement
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## DTDEntity
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## DocumentType
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## DocumentTypeDefinition
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EscapeConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## UnescapeConfig
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLCData
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLComment
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLDocument
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_element_by_id
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_elements_by_attribute
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_elements_by_tag
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## pretty_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## validate
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## XMLNode
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_element_by_id
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_elements_by_attribute
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## get_elements_by_tag
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## pretty_str
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
#### Powered by vdoc. Generated on: 7 Feb 2025 12:06:55
|
||||||
78
vdocs/eventbus.md
Normal file
78
vdocs/eventbus.md
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# module eventbus
|
||||||
|
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [new](#new)
|
||||||
|
- [EventBus.new](#EventBus.new)
|
||||||
|
- [EventBus[T]](#EventBus[T])
|
||||||
|
- [publish](#publish)
|
||||||
|
- [clear_all](#clear_all)
|
||||||
|
- [has_subscriber](#has_subscriber)
|
||||||
|
- [EventHandlerFn](#EventHandlerFn)
|
||||||
|
- [Subscriber[T]](#Subscriber[T])
|
||||||
|
- [subscribe](#subscribe)
|
||||||
|
- [subscribe_method](#subscribe_method)
|
||||||
|
- [unsubscribe_method](#unsubscribe_method)
|
||||||
|
- [unsubscribe_receiver](#unsubscribe_receiver)
|
||||||
|
- [subscribe_once](#subscribe_once)
|
||||||
|
- [is_subscribed](#is_subscribed)
|
||||||
|
- [is_subscribed_method](#is_subscribed_method)
|
||||||
|
- [unsubscribe](#unsubscribe)
|
||||||
|
- [EventBus](#EventBus)
|
||||||
|
- [Publisher](#Publisher)
|
||||||
|
- [Subscriber](#Subscriber)
|
||||||
|
|
||||||
|
## new
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EventBus.new
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EventBus[T]
|
||||||
|
## publish
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## clear_all
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## has_subscriber
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EventHandlerFn
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Subscriber[T]
|
||||||
|
## subscribe
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## subscribe_method
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unsubscribe_method
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unsubscribe_receiver
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## subscribe_once
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_subscribed
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## is_subscribed_method
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## unsubscribe
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## EventBus
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Publisher
|
||||||
|
[[Return to contents]](#Contents)
|
||||||
|
|
||||||
|
## Subscriber
|
||||||
|
[[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
Reference in New Issue
Block a user