diff --git a/lib/apps/biz/erpnext/erpnext_factory_.v b/lib/apps/biz/erpnext/erpnext_factory_.v index acb81464..c95e2d70 100644 --- a/lib/apps/biz/erpnext/erpnext_factory_.v +++ b/lib/apps/biz/erpnext/erpnext_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&ERPNext { data := r.hget('context:erpnext', args.name)! if data.len == 0 { print_backtrace() - return error('ERPNext with name: ${args.name} does not exist, prob bug.') + return error('ERPNext with name: erpnext does not exist, prob bug.') } mut obj := json.decode(ERPNext, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&ERPNext { new(args)! } else { print_backtrace() - return error("ERPNext with name '${args.name}' does not exist") + return error("ERPNext with name 'erpnext' does not exist") } } return get(name: args.name)! // no longer from db nor create } return erpnext_global[args.name] or { print_backtrace() - return error('could not get config for erpnext with name:${args.name}') + return error('could not get config for erpnext with name:erpnext') } } diff --git a/lib/clients/giteaclient/giteaclient_factory_.v b/lib/clients/giteaclient/giteaclient_factory_.v index 8cea5b54..840c5f2b 100644 --- a/lib/clients/giteaclient/giteaclient_factory_.v +++ b/lib/clients/giteaclient/giteaclient_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&GiteaClient { data := r.hget('context:giteaclient', args.name)! if data.len == 0 { print_backtrace() - return error('GiteaClient with name: ${args.name} does not exist, prob bug.') + return error('GiteaClient with name: giteaclient does not exist, prob bug.') } mut obj := json.decode(GiteaClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&GiteaClient { new(args)! } else { print_backtrace() - return error("GiteaClient with name '${args.name}' does not exist") + return error("GiteaClient with name 'giteaclient' does not exist") } } return get(name: args.name)! // no longer from db nor create } return giteaclient_global[args.name] or { print_backtrace() - return error('could not get config for giteaclient with name:${args.name}') + return error('could not get config for giteaclient with name:giteaclient') } } diff --git a/lib/clients/ipapi/ipapi_factory_.v b/lib/clients/ipapi/ipapi_factory_.v index 2eab46d3..475fb156 100644 --- a/lib/clients/ipapi/ipapi_factory_.v +++ b/lib/clients/ipapi/ipapi_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&IPApi { data := r.hget('context:ipapi', args.name)! if data.len == 0 { print_backtrace() - return error('IPApi with name: ${args.name} does not exist, prob bug.') + return error('IPApi with name: ipapi does not exist, prob bug.') } mut obj := json.decode(IPApi, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&IPApi { new(args)! } else { print_backtrace() - return error("IPApi with name '${args.name}' does not exist") + return error("IPApi with name 'ipapi' does not exist") } } return get(name: args.name)! // no longer from db nor create } return ipapi_global[args.name] or { print_backtrace() - return error('could not get config for ipapi with name:${args.name}') + return error('could not get config for ipapi with name:ipapi') } } diff --git a/lib/clients/jina/jina_factory_.v b/lib/clients/jina/jina_factory_.v index e26d5a64..9fbc17b8 100644 --- a/lib/clients/jina/jina_factory_.v +++ b/lib/clients/jina/jina_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&Jina { data := r.hget('context:jina', args.name)! if data.len == 0 { print_backtrace() - return error('Jina with name: ${args.name} does not exist, prob bug.') + return error('Jina with name: jina does not exist, prob bug.') } mut obj := json.decode(Jina, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&Jina { new(args)! } else { print_backtrace() - return error("Jina with name '${args.name}' does not exist") + return error("Jina with name 'jina' does not exist") } } return get(name: args.name)! // no longer from db nor create } return jina_global[args.name] or { print_backtrace() - return error('could not get config for jina with name:${args.name}') + return error('could not get config for jina with name:jina') } } diff --git a/lib/clients/mailclient/mailclient_factory_.v b/lib/clients/mailclient/mailclient_factory_.v index 86bde0f7..8c906b87 100644 --- a/lib/clients/mailclient/mailclient_factory_.v +++ b/lib/clients/mailclient/mailclient_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&MailClient { data := r.hget('context:mailclient', args.name)! if data.len == 0 { print_backtrace() - return error('MailClient with name: ${args.name} does not exist, prob bug.') + return error('MailClient with name: mailclient does not exist, prob bug.') } mut obj := json.decode(MailClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&MailClient { new(args)! } else { print_backtrace() - return error("MailClient with name '${args.name}' does not exist") + return error("MailClient with name 'mailclient' does not exist") } } return get(name: args.name)! // no longer from db nor create } return mailclient_global[args.name] or { print_backtrace() - return error('could not get config for mailclient with name:${args.name}') + return error('could not get config for mailclient with name:mailclient') } } diff --git a/lib/clients/meilisearch/meilisearch_factory_.v b/lib/clients/meilisearch/meilisearch_factory_.v index 9f24034e..edba0702 100644 --- a/lib/clients/meilisearch/meilisearch_factory_.v +++ b/lib/clients/meilisearch/meilisearch_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&MeilisearchClient { data := r.hget('context:meilisearch', args.name)! if data.len == 0 { print_backtrace() - return error('MeilisearchClient with name: ${args.name} does not exist, prob bug.') + return error('MeilisearchClient with name: meilisearch does not exist, prob bug.') } mut obj := json.decode(MeilisearchClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&MeilisearchClient { new(args)! } else { print_backtrace() - return error("MeilisearchClient with name '${args.name}' does not exist") + return error("MeilisearchClient with name 'meilisearch' does not exist") } } return get(name: args.name)! // no longer from db nor create } return meilisearch_global[args.name] or { print_backtrace() - return error('could not get config for meilisearch with name:${args.name}') + return error('could not get config for meilisearch with name:meilisearch') } } diff --git a/lib/clients/mycelium/mycelium_factory_.v b/lib/clients/mycelium/mycelium_factory_.v index 1dd3fbc5..d3ede4c1 100644 --- a/lib/clients/mycelium/mycelium_factory_.v +++ b/lib/clients/mycelium/mycelium_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&Mycelium { data := r.hget('context:mycelium', args.name)! if data.len == 0 { print_backtrace() - return error('Mycelium with name: ${args.name} does not exist, prob bug.') + return error('Mycelium with name: mycelium does not exist, prob bug.') } mut obj := json.decode(Mycelium, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&Mycelium { new(args)! } else { print_backtrace() - return error("Mycelium with name '${args.name}' does not exist") + return error("Mycelium with name 'mycelium' does not exist") } } return get(name: args.name)! // no longer from db nor create } return mycelium_global[args.name] or { print_backtrace() - return error('could not get config for mycelium with name:${args.name}') + return error('could not get config for mycelium with name:mycelium') } } diff --git a/lib/clients/mycelium_rpc/mycelium_rpc_factory_.v b/lib/clients/mycelium_rpc/mycelium_rpc_factory_.v index 20afb670..0cfc94c7 100644 --- a/lib/clients/mycelium_rpc/mycelium_rpc_factory_.v +++ b/lib/clients/mycelium_rpc/mycelium_rpc_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&MyceliumRPC { data := r.hget('context:mycelium_rpc', args.name)! if data.len == 0 { print_backtrace() - return error('MyceliumRPC with name: ${args.name} does not exist, prob bug.') + return error('MyceliumRPC with name: mycelium_rpc does not exist, prob bug.') } mut obj := json.decode(MyceliumRPC, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&MyceliumRPC { new(args)! } else { print_backtrace() - return error("MyceliumRPC with name '${args.name}' does not exist") + return error("MyceliumRPC with name 'mycelium_rpc' does not exist") } } return get(name: args.name)! // no longer from db nor create } return mycelium_rpc_global[args.name] or { print_backtrace() - return error('could not get config for mycelium_rpc with name:${args.name}') + return error('could not get config for mycelium_rpc with name:mycelium_rpc') } } diff --git a/lib/clients/openai/openai_factory_.v b/lib/clients/openai/openai_factory_.v index 1c255d44..e24c132a 100644 --- a/lib/clients/openai/openai_factory_.v +++ b/lib/clients/openai/openai_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&OpenAI { data := r.hget('context:openai', args.name)! if data.len == 0 { print_backtrace() - return error('OpenAI with name: ${args.name} does not exist, prob bug.') + return error('OpenAI with name: openai does not exist, prob bug.') } mut obj := json.decode(OpenAI, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&OpenAI { new(args)! } else { print_backtrace() - return error("OpenAI with name '${args.name}' does not exist") + return error("OpenAI with name 'openai' does not exist") } } return get(name: args.name)! // no longer from db nor create } return openai_global[args.name] or { print_backtrace() - return error('could not get config for openai with name:${args.name}') + return error('could not get config for openai with name:openai') } } diff --git a/lib/clients/openrouter/openrouter_factory_.v b/lib/clients/openrouter/openrouter_factory_.v index 1af759f2..2fcfd829 100644 --- a/lib/clients/openrouter/openrouter_factory_.v +++ b/lib/clients/openrouter/openrouter_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&OpenRouter { data := r.hget('context:openrouter', args.name)! if data.len == 0 { print_backtrace() - return error('OpenRouter with name: ${args.name} does not exist, prob bug.') + return error('OpenRouter with name: openrouter does not exist, prob bug.') } mut obj := json.decode(OpenRouter, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&OpenRouter { new(args)! } else { print_backtrace() - return error("OpenRouter with name '${args.name}' does not exist") + return error("OpenRouter with name 'openrouter' does not exist") } } return get(name: args.name)! // no longer from db nor create } return openrouter_global[args.name] or { print_backtrace() - return error('could not get config for openrouter with name:${args.name}') + return error('could not get config for openrouter with name:openrouter') } } diff --git a/lib/clients/postgresql_client/postgresql_client_factory_.v b/lib/clients/postgresql_client/postgresql_client_factory_.v index 4e0452ab..7daa898c 100644 --- a/lib/clients/postgresql_client/postgresql_client_factory_.v +++ b/lib/clients/postgresql_client/postgresql_client_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&PostgresqlClient { data := r.hget('context:postgresql_client', args.name)! if data.len == 0 { print_backtrace() - return error('PostgresqlClient with name: ${args.name} does not exist, prob bug.') + return error('PostgresqlClient with name: postgresql_client does not exist, prob bug.') } mut obj := json.decode(PostgresqlClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&PostgresqlClient { new(args)! } else { print_backtrace() - return error("PostgresqlClient with name '${args.name}' does not exist") + return error("PostgresqlClient with name 'postgresql_client' does not exist") } } return get(name: args.name)! // no longer from db nor create } return postgresql_client_global[args.name] or { print_backtrace() - return error('could not get config for postgresql_client with name:${args.name}') + return error('could not get config for postgresql_client with name:postgresql_client') } } diff --git a/lib/clients/qdrant/qdrant_factory_.v b/lib/clients/qdrant/qdrant_factory_.v index c7ccf5d8..f00cf534 100644 --- a/lib/clients/qdrant/qdrant_factory_.v +++ b/lib/clients/qdrant/qdrant_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&QDrantClient { data := r.hget('context:qdrant', args.name)! if data.len == 0 { print_backtrace() - return error('QDrantClient with name: ${args.name} does not exist, prob bug.') + return error('QDrantClient with name: qdrant does not exist, prob bug.') } mut obj := json.decode(QDrantClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&QDrantClient { new(args)! } else { print_backtrace() - return error("QDrantClient with name '${args.name}' does not exist") + return error("QDrantClient with name 'qdrant' does not exist") } } return get(name: args.name)! // no longer from db nor create } return qdrant_global[args.name] or { print_backtrace() - return error('could not get config for qdrant with name:${args.name}') + return error('could not get config for qdrant with name:qdrant') } } diff --git a/lib/clients/rclone/config.v b/lib/clients/rclone/config.v deleted file mode 100644 index f026b06f..00000000 --- a/lib/clients/rclone/config.v +++ /dev/null @@ -1,44 +0,0 @@ -module rclone - -import incubaid.herolib.core.playbook -import incubaid.herolib.core.texttools -import os - -const configfile = '${os.home_dir()}/.config/rclone/rclone.conf' - -// will look for personal configuration file in ~/hero/config . -// this file is in heroscript format and will have all required info to configure rclone -//``` -// !!config.s3server_define -// name:'tf_write_1' -// description:'ThreeFold Read Write Repo 1 -// keyid:'003e2a7be6357fb0000000001' -// keyname:'tfrw' -// appkey:'K003UsdrYOZou2ulBHA8p4KLa/dL2n4' -// url:'' -//``` -pub fn configure() ! { - mut plbook := playbook.new( - path: configfile - // actor_filter: ['config'] - // action_filter: [ - // 's3server_define', - // ] - )! - - actions := plbook.find(filter: 'config.s3server_define')! - mut out := '' - for action in actions { - mut name := action.params.get_default('name', '')! - mut descr := action.params.get_default('descr', '')! - mut config := ' - [${name}] - type = b2 - account = e2a7be6357fb - hard_delete = true - key = 003b79a6ae62cd7cb04477834a24e007e7afc601ba - ' - config = texttools.dedent(config) - out += '\n${config}\n' - } -} diff --git a/lib/clients/rclone/readme.v.md b/lib/clients/rclone/readme.v.md deleted file mode 100644 index 9c7995b7..00000000 --- a/lib/clients/rclone/readme.v.md +++ /dev/null @@ -1,68 +0,0 @@ -# RCloneClient Module - -This module provides a V language interface to RCloneClient, a command line program to manage files on cloud storage. - -## Features - -- Mount/unmount remote storage -- Upload files and directories -- Download files and directories -- List remote contents -- Configuration management through heroscript format - -## Prerequisites - -RCloneClient must be installed on your system. Visit for installation instructions. - -## Usage - -```v -import incubaid.herolib.osal.core.rclone - -fn main() { - // Create a new RCloneClient instance - mut rc := rclone.new('my_remote') or { panic(err) } - - // Upload a directory - rc.upload('./local_dir', 'backup/remote_dir') or { panic(err) } - - // Download a directory - rc.download('backup/remote_dir', './downloaded_dir') or { panic(err) } - - // Mount a remote - rc.mount('backup', './mounted_backup') or { panic(err) } - - // List contents - content := rc.list('backup') or { panic(err) } - println(content) - - // Unmount when done - rc.unmount('./mounted_backup') or { panic(err) } -} -``` - -## Configuration - -Configuration is managed through heroscript format in `~/hero/config`. Example configuration: - -```heroscript -!!config.s3server_define - name:'my_remote' - description:'My Remote Storage' - keyid:'your_key_id' - keyname:'your_key_name' - appkey:'your_app_key' - url:'your_url' -``` - -The configuration will be automatically loaded and applied when creating a new RCloneClient instance. - -## Testing - -To run the tests: - -```bash -vtest ~/code/github/incubaid/herolib/lib/osal/rclone/rclone_test.v -``` - -Note: Some tests are commented out as they require an actual rclone configuration and remote to work with. They serve as examples of how to use the RCloneClient module. diff --git a/lib/clients/rclone/.heroscript b/lib/clients/rcloneclient/.heroscript similarity index 74% rename from lib/clients/rclone/.heroscript rename to lib/clients/rcloneclient/.heroscript index 29957e85..6a30cc09 100644 --- a/lib/clients/rclone/.heroscript +++ b/lib/clients/rcloneclient/.heroscript @@ -1,6 +1,6 @@ !!hero_code.generate_client - name:'rclone' + name:'rcloneclient' classname:'RCloneClient' singleton:1 default:1 diff --git a/lib/clients/rcloneclient/config.v b/lib/clients/rcloneclient/config.v new file mode 100644 index 00000000..5df6a85f --- /dev/null +++ b/lib/clients/rcloneclient/config.v @@ -0,0 +1,44 @@ +module rcloneclient + +import incubaid.herolib.core.playbook +import incubaid.herolib.core.texttools +import os + +// const configfile = '${os.home_dir()}/.config/rclone/rclone.conf' + +// // will look for personal configuration file in ~/hero/config . +// // this file is in heroscript format and will have all required info to configure rclone +// //``` +// // !!config.s3server_define +// // name:'tf_write_1' +// // description:'ThreeFold Read Write Repo 1 +// // keyid:'003e2a7be6357fb0000000001' +// // keyname:'tfrw' +// // appkey:'K003UsdrYOZou2ulBHA8p4KLa/dL2n4' +// // url:'' +// //``` +// pub fn configure() ! { +// mut plbook := playbook.new( +// path: configfile +// // actor_filter: ['config'] +// // action_filter: [ +// // 's3server_define', +// // ] +// )! + +// actions := plbook.find(filter: 'config.s3server_define')! +// mut out := '' +// for action in actions { +// mut name := action.params.get_default('name', '')! +// mut descr := action.params.get_default('descr', '')! +// mut config := ' +// [${name}] +// type = b2 +// account = e2a7be6357fb +// hard_delete = true +// key = 003b79a6ae62cd7cb04477834a24e007e7afc601ba +// ' +// config = texttools.dedent(config) +// out += '\n${config}\n' +// } +// } diff --git a/lib/clients/rclone/rclone_test.v b/lib/clients/rcloneclient/rclone_test.v similarity index 97% rename from lib/clients/rclone/rclone_test.v rename to lib/clients/rcloneclient/rclone_test.v index 41d45f95..5da6b0b6 100644 --- a/lib/clients/rclone/rclone_test.v +++ b/lib/clients/rcloneclient/rclone_test.v @@ -1,4 +1,4 @@ -module rclone +module rcloneclient fn test_rclone_new() { rclone := new('test_remote') or { panic(err) } diff --git a/lib/clients/rclone/rclone.v b/lib/clients/rcloneclient/rcloneclient.v similarity index 99% rename from lib/clients/rclone/rclone.v rename to lib/clients/rcloneclient/rcloneclient.v index e4469273..5b1f5977 100644 --- a/lib/clients/rclone/rclone.v +++ b/lib/clients/rcloneclient/rcloneclient.v @@ -1,4 +1,4 @@ -module rclone +module rcloneclient import os diff --git a/lib/clients/rclone/rclone_factory_.v b/lib/clients/rcloneclient/rcloneclient_factory_.v similarity index 66% rename from lib/clients/rclone/rclone_factory_.v rename to lib/clients/rcloneclient/rcloneclient_factory_.v index b0a06d45..e09240fc 100644 --- a/lib/clients/rclone/rclone_factory_.v +++ b/lib/clients/rcloneclient/rcloneclient_factory_.v @@ -1,4 +1,4 @@ -module rclone +module rcloneclient import incubaid.herolib.core.base import incubaid.herolib.core.playbook { PlayBook } @@ -6,8 +6,8 @@ import incubaid.herolib.ui.console import json __global ( - rclone_global map[string]&RCloneClient - rclone_default string + rcloneclient_global map[string]&RCloneClient + rcloneclient_default string ) /////////FACTORY @@ -30,14 +30,14 @@ pub fn new(args ArgsGet) !&RCloneClient { pub fn get(args ArgsGet) !&RCloneClient { mut context := base.context()! - rclone_default = args.name - if args.fromdb || args.name !in rclone_global { + rcloneclient_default = args.name + if args.fromdb || args.name !in rcloneclient_global { mut r := context.redis()! - if r.hexists('context:rclone', args.name)! { - data := r.hget('context:rclone', args.name)! + if r.hexists('context:rcloneclient', args.name)! { + data := r.hget('context:rcloneclient', args.name)! if data.len == 0 { print_backtrace() - return error('RCloneClient with name: ${args.name} does not exist, prob bug.') + return error('RCloneClient with name: rcloneclient does not exist, prob bug.') } mut obj := json.decode(RCloneClient, data)! set_in_mem(obj)! @@ -46,37 +46,37 @@ pub fn get(args ArgsGet) !&RCloneClient { new(args)! } else { print_backtrace() - return error("RCloneClient with name '${args.name}' does not exist") + return error("RCloneClient with name 'rcloneclient' does not exist") } } return get(name: args.name)! // no longer from db nor create } - return rclone_global[args.name] or { + return rcloneclient_global[args.name] or { print_backtrace() - return error('could not get config for rclone with name:${args.name}') + return error('could not get config for rcloneclient with name:rcloneclient') } } // register the config for the future pub fn set(o RCloneClient) ! { mut o2 := set_in_mem(o)! - rclone_default = o2.name + rcloneclient_default = o2.name mut context := base.context()! mut r := context.redis()! - r.hset('context:rclone', o2.name, json.encode(o2))! + r.hset('context:rcloneclient', o2.name, json.encode(o2))! } // does the config exists? pub fn exists(args ArgsGet) !bool { mut context := base.context()! mut r := context.redis()! - return r.hexists('context:rclone', args.name)! + return r.hexists('context:rcloneclient', args.name)! } pub fn delete(args ArgsGet) ! { mut context := base.context()! mut r := context.redis()! - r.hdel('context:rclone', args.name)! + r.hdel('context:rcloneclient', args.name)! } @[params] @@ -91,12 +91,12 @@ pub fn list(args ArgsList) ![]&RCloneClient { mut context := base.context()! if args.fromdb { // reset what is in mem - rclone_global = map[string]&RCloneClient{} - rclone_default = '' + rcloneclient_global = map[string]&RCloneClient{} + rcloneclient_default = '' } if args.fromdb { mut r := context.redis()! - mut l := r.hkeys('context:rclone')! + mut l := r.hkeys('context:rcloneclient')! for name in l { res << get(name: name, fromdb: true)! @@ -104,7 +104,7 @@ pub fn list(args ArgsList) ![]&RCloneClient { return res } else { // load from memory - for _, client in rclone_global { + for _, client in rcloneclient_global { res << client } } @@ -114,16 +114,16 @@ pub fn list(args ArgsList) ![]&RCloneClient { // only sets in mem, does not set as config fn set_in_mem(o RCloneClient) !RCloneClient { mut o2 := obj_init(o)! - rclone_global[o2.name] = &o2 - rclone_default = o2.name + rcloneclient_global[o2.name] = &o2 + rcloneclient_default = o2.name return o2 } pub fn play(mut plbook PlayBook) ! { - if !plbook.exists(filter: 'rclone.') { + if !plbook.exists(filter: 'rcloneclient.') { return } - mut install_actions := plbook.find(filter: 'rclone.configure')! + mut install_actions := plbook.find(filter: 'rcloneclient.configure')! if install_actions.len > 0 { for mut install_action in install_actions { heroscript := install_action.heroscript() @@ -134,6 +134,6 @@ pub fn play(mut plbook PlayBook) ! { } } -// switch instance to be used for rclone +// switch instance to be used for rcloneclient pub fn switch(name string) { } diff --git a/lib/clients/rclone/rclone_model.v b/lib/clients/rcloneclient/rcloneclient_model.v similarity index 99% rename from lib/clients/rclone/rclone_model.v rename to lib/clients/rcloneclient/rcloneclient_model.v index b693fa68..0e7bc8b6 100644 --- a/lib/clients/rclone/rclone_model.v +++ b/lib/clients/rcloneclient/rcloneclient_model.v @@ -1,4 +1,4 @@ -module rclone +module rcloneclient import incubaid.herolib.data.paramsparser import incubaid.herolib.data.encoderhero diff --git a/lib/clients/rclone/readme.md b/lib/clients/rcloneclient/readme.md similarity index 100% rename from lib/clients/rclone/readme.md rename to lib/clients/rcloneclient/readme.md diff --git a/lib/clients/runpod/runpod_factory_.v b/lib/clients/runpod/runpod_factory_.v index 8adf1c20..e9977edb 100644 --- a/lib/clients/runpod/runpod_factory_.v +++ b/lib/clients/runpod/runpod_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&RunPod { data := r.hget('context:runpod', args.name)! if data.len == 0 { print_backtrace() - return error('RunPod with name: ${args.name} does not exist, prob bug.') + return error('RunPod with name: runpod does not exist, prob bug.') } mut obj := json.decode(RunPod, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&RunPod { new(args)! } else { print_backtrace() - return error("RunPod with name '${args.name}' does not exist") + return error("RunPod with name 'runpod' does not exist") } } return get(name: args.name)! // no longer from db nor create } return runpod_global[args.name] or { print_backtrace() - return error('could not get config for runpod with name:${args.name}') + return error('could not get config for runpod with name:runpod') } } diff --git a/lib/clients/sendgrid/sendgrid_factory_.v b/lib/clients/sendgrid/sendgrid_factory_.v index 3b253910..fe3d2dfa 100644 --- a/lib/clients/sendgrid/sendgrid_factory_.v +++ b/lib/clients/sendgrid/sendgrid_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&SendGrid { data := r.hget('context:sendgrid', args.name)! if data.len == 0 { print_backtrace() - return error('SendGrid with name: ${args.name} does not exist, prob bug.') + return error('SendGrid with name: sendgrid does not exist, prob bug.') } mut obj := json.decode(SendGrid, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&SendGrid { new(args)! } else { print_backtrace() - return error("SendGrid with name '${args.name}' does not exist") + return error("SendGrid with name 'sendgrid' does not exist") } } return get(name: args.name)! // no longer from db nor create } return sendgrid_global[args.name] or { print_backtrace() - return error('could not get config for sendgrid with name:${args.name}') + return error('could not get config for sendgrid with name:sendgrid') } } diff --git a/lib/clients/vastai/vastai_factory_.v b/lib/clients/vastai/vastai_factory_.v index 3a187158..c1390d8d 100644 --- a/lib/clients/vastai/vastai_factory_.v +++ b/lib/clients/vastai/vastai_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&VastAI { data := r.hget('context:vastai', args.name)! if data.len == 0 { print_backtrace() - return error('VastAI with name: ${args.name} does not exist, prob bug.') + return error('VastAI with name: vastai does not exist, prob bug.') } mut obj := json.decode(VastAI, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&VastAI { new(args)! } else { print_backtrace() - return error("VastAI with name '${args.name}' does not exist") + return error("VastAI with name 'vastai' does not exist") } } return get(name: args.name)! // no longer from db nor create } return vastai_global[args.name] or { print_backtrace() - return error('could not get config for vastai with name:${args.name}') + return error('could not get config for vastai with name:vastai') } } diff --git a/lib/clients/wireguard/wireguard_factory_.v b/lib/clients/wireguard/wireguard_factory_.v index e74cc9fe..a5198606 100644 --- a/lib/clients/wireguard/wireguard_factory_.v +++ b/lib/clients/wireguard/wireguard_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&WireGuard { data := r.hget('context:wireguard', args.name)! if data.len == 0 { print_backtrace() - return error('WireGuard with name: ${args.name} does not exist, prob bug.') + return error('WireGuard with name: wireguard does not exist, prob bug.') } mut obj := json.decode(WireGuard, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&WireGuard { new(args)! } else { print_backtrace() - return error("WireGuard with name '${args.name}' does not exist") + return error("WireGuard with name 'wireguard' does not exist") } } return get(name: args.name)! // no longer from db nor create } return wireguard_global[args.name] or { print_backtrace() - return error('could not get config for wireguard with name:${args.name}') + return error('could not get config for wireguard with name:wireguard') } } diff --git a/lib/clients/zerodb_client/zerodb_client_factory_.v b/lib/clients/zerodb_client/zerodb_client_factory_.v index ca46e17b..651d65a7 100644 --- a/lib/clients/zerodb_client/zerodb_client_factory_.v +++ b/lib/clients/zerodb_client/zerodb_client_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&ZeroDBClient { data := r.hget('context:zerodb_client', args.name)! if data.len == 0 { print_backtrace() - return error('ZeroDBClient with name: ${args.name} does not exist, prob bug.') + return error('ZeroDBClient with name: zerodb_client does not exist, prob bug.') } mut obj := json.decode(ZeroDBClient, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&ZeroDBClient { new(args)! } else { print_backtrace() - return error("ZeroDBClient with name '${args.name}' does not exist") + return error("ZeroDBClient with name 'zerodb_client' does not exist") } } return get(name: args.name)! // no longer from db nor create } return zerodb_client_global[args.name] or { print_backtrace() - return error('could not get config for zerodb_client with name:${args.name}') + return error('could not get config for zerodb_client with name:zerodb_client') } } diff --git a/lib/clients/zinit/zinit_factory_.v b/lib/clients/zinit/zinit_factory_.v index e2e60d66..402eb3b0 100644 --- a/lib/clients/zinit/zinit_factory_.v +++ b/lib/clients/zinit/zinit_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&ZinitRPC { data := r.hget('context:zinit', args.name)! if data.len == 0 { print_backtrace() - return error('ZinitRPC with name: ${args.name} does not exist, prob bug.') + return error('ZinitRPC with name: zinit does not exist, prob bug.') } mut obj := json.decode(ZinitRPC, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&ZinitRPC { new(args)! } else { print_backtrace() - return error("ZinitRPC with name '${args.name}' does not exist") + return error("ZinitRPC with name 'zinit' does not exist") } } return get(name: args.name)! // no longer from db nor create } return zinit_global[args.name] or { print_backtrace() - return error('could not get config for zinit with name:${args.name}') + return error('could not get config for zinit with name:zinit') } } diff --git a/lib/core/playcmds/play_all.v b/lib/core/playcmds/play_all.v index 8b16a183..b3dfcd85 100644 --- a/lib/core/playcmds/play_all.v +++ b/lib/core/playcmds/play_all.v @@ -13,7 +13,7 @@ import incubaid.herolib.clients.openai import incubaid.herolib.clients.openrouter import incubaid.herolib.clients.postgresql_client import incubaid.herolib.clients.qdrant -import incubaid.herolib.clients.rclone +import incubaid.herolib.clients.rcloneclient import incubaid.herolib.clients.runpod import incubaid.herolib.clients.sendgrid import incubaid.herolib.clients.vastai @@ -69,7 +69,7 @@ pub fn run_all(args_ PlayArgs) ! { openrouter.play(mut plbook)! postgresql_client.play(mut plbook)! qdrant.play(mut plbook)! - rclone.play(mut plbook)! + rcloneclient.play(mut plbook)! runpod.play(mut plbook)! sendgrid.play(mut plbook)! vastai.play(mut plbook)! diff --git a/lib/develop/heroprompt/heroprompt_factory_.v b/lib/develop/heroprompt/heroprompt_factory_.v index 1733b01c..7b12dd25 100644 --- a/lib/develop/heroprompt/heroprompt_factory_.v +++ b/lib/develop/heroprompt/heroprompt_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&Workspace { data := r.hget('context:heroprompt', args.name)! if data.len == 0 { print_backtrace() - return error('Workspace with name: ${args.name} does not exist, prob bug.') + return error('Workspace with name: heroprompt does not exist, prob bug.') } mut obj := json.decode(Workspace, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&Workspace { new(args)! } else { print_backtrace() - return error("Workspace with name '${args.name}' does not exist") + return error("Workspace with name 'heroprompt' does not exist") } } return get(name: args.name)! // no longer from db nor create } return heroprompt_global[args.name] or { print_backtrace() - return error('could not get config for heroprompt with name:${args.name}') + return error('could not get config for heroprompt with name:heroprompt') } } diff --git a/lib/installers/db/cometbft/cometbft_factory_.v b/lib/installers/db/cometbft/cometbft_factory_.v index fc362065..739e7b2e 100644 --- a/lib/installers/db/cometbft/cometbft_factory_.v +++ b/lib/installers/db/cometbft/cometbft_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&CometBFT { data := r.hget('context:cometbft', args.name)! if data.len == 0 { print_backtrace() - return error('CometBFT with name: ${args.name} does not exist, prob bug.') + return error('CometBFT with name: cometbft does not exist, prob bug.') } mut obj := json.decode(CometBFT, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&CometBFT { new(args)! } else { print_backtrace() - return error("CometBFT with name '${args.name}' does not exist") + return error("CometBFT with name 'cometbft' does not exist") } } return get(name: args.name)! // no longer from db nor create } return cometbft_global[args.name] or { print_backtrace() - return error('could not get config for cometbft with name:${args.name}') + return error('could not get config for cometbft with name:cometbft') } } diff --git a/lib/installers/db/meilisearch_installer/meilisearch_installer_factory_.v b/lib/installers/db/meilisearch_installer/meilisearch_installer_factory_.v index ff600107..5a69a5e3 100644 --- a/lib/installers/db/meilisearch_installer/meilisearch_installer_factory_.v +++ b/lib/installers/db/meilisearch_installer/meilisearch_installer_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller { data := r.hget('context:meilisearch_installer', args.name)! if data.len == 0 { print_backtrace() - return error('MeilisearchInstaller with name: ${args.name} does not exist, prob bug.') + return error('MeilisearchInstaller with name: meilisearch_installer does not exist, prob bug.') } mut obj := json.decode(MeilisearchInstaller, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller { new(args)! } else { print_backtrace() - return error("MeilisearchInstaller with name '${args.name}' does not exist") + return error("MeilisearchInstaller with name 'meilisearch_installer' does not exist") } } return get(name: args.name)! // no longer from db nor create } return meilisearch_installer_global[args.name] or { print_backtrace() - return error('could not get config for meilisearch_installer with name:${args.name}') + return error('could not get config for meilisearch_installer with name:meilisearch_installer') } } diff --git a/lib/installers/db/postgresql/postgresql_factory_.v b/lib/installers/db/postgresql/postgresql_factory_.v index d63b2bd1..38a3e36b 100644 --- a/lib/installers/db/postgresql/postgresql_factory_.v +++ b/lib/installers/db/postgresql/postgresql_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&Postgresql { data := r.hget('context:postgresql', args.name)! if data.len == 0 { print_backtrace() - return error('Postgresql with name: ${args.name} does not exist, prob bug.') + return error('Postgresql with name: postgresql does not exist, prob bug.') } mut obj := json.decode(Postgresql, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&Postgresql { new(args)! } else { print_backtrace() - return error("Postgresql with name '${args.name}' does not exist") + return error("Postgresql with name 'postgresql' does not exist") } } return get(name: args.name)! // no longer from db nor create } return postgresql_global[args.name] or { print_backtrace() - return error('could not get config for postgresql with name:${args.name}') + return error('could not get config for postgresql with name:postgresql') } } diff --git a/lib/installers/db/qdrant_installer/qdrant_installer_factory_.v b/lib/installers/db/qdrant_installer/qdrant_installer_factory_.v index f736e7a6..d0ff1411 100644 --- a/lib/installers/db/qdrant_installer/qdrant_installer_factory_.v +++ b/lib/installers/db/qdrant_installer/qdrant_installer_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&QDrant { data := r.hget('context:qdrant_installer', args.name)! if data.len == 0 { print_backtrace() - return error('QDrant with name: ${args.name} does not exist, prob bug.') + return error('QDrant with name: qdrant_installer does not exist, prob bug.') } mut obj := json.decode(QDrant, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&QDrant { new(args)! } else { print_backtrace() - return error("QDrant with name '${args.name}' does not exist") + return error("QDrant with name 'qdrant_installer' does not exist") } } return get(name: args.name)! // no longer from db nor create } return qdrant_installer_global[args.name] or { print_backtrace() - return error('could not get config for qdrant_installer with name:${args.name}') + return error('could not get config for qdrant_installer with name:qdrant_installer') } } diff --git a/lib/installers/db/zerodb/zerodb_factory_.v b/lib/installers/db/zerodb/zerodb_factory_.v index 504984f8..ff70ffd8 100644 --- a/lib/installers/db/zerodb/zerodb_factory_.v +++ b/lib/installers/db/zerodb/zerodb_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&ZeroDB { data := r.hget('context:zerodb', args.name)! if data.len == 0 { print_backtrace() - return error('ZeroDB with name: ${args.name} does not exist, prob bug.') + return error('ZeroDB with name: zerodb does not exist, prob bug.') } mut obj := json.decode(ZeroDB, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&ZeroDB { new(args)! } else { print_backtrace() - return error("ZeroDB with name '${args.name}' does not exist") + return error("ZeroDB with name 'zerodb' does not exist") } } return get(name: args.name)! // no longer from db nor create } return zerodb_global[args.name] or { print_backtrace() - return error('could not get config for zerodb with name:${args.name}') + return error('could not get config for zerodb with name:zerodb') } } diff --git a/lib/installers/infra/coredns/coredns_factory_.v b/lib/installers/infra/coredns/coredns_factory_.v index 4ddf15fe..358510a1 100644 --- a/lib/installers/infra/coredns/coredns_factory_.v +++ b/lib/installers/infra/coredns/coredns_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&CoreDNS { data := r.hget('context:coredns', args.name)! if data.len == 0 { print_backtrace() - return error('CoreDNS with name: ${args.name} does not exist, prob bug.') + return error('CoreDNS with name: coredns does not exist, prob bug.') } mut obj := json.decode(CoreDNS, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&CoreDNS { new(args)! } else { print_backtrace() - return error("CoreDNS with name '${args.name}' does not exist") + return error("CoreDNS with name 'coredns' does not exist") } } return get(name: args.name)! // no longer from db nor create } return coredns_global[args.name] or { print_backtrace() - return error('could not get config for coredns with name:${args.name}') + return error('could not get config for coredns with name:coredns') } } diff --git a/lib/installers/infra/gitea/gitea_factory_.v b/lib/installers/infra/gitea/gitea_factory_.v index 6ff9ba0b..2230501e 100644 --- a/lib/installers/infra/gitea/gitea_factory_.v +++ b/lib/installers/infra/gitea/gitea_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&GiteaServer { data := r.hget('context:gitea', args.name)! if data.len == 0 { print_backtrace() - return error('GiteaServer with name: ${args.name} does not exist, prob bug.') + return error('GiteaServer with name: gitea does not exist, prob bug.') } mut obj := json.decode(GiteaServer, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&GiteaServer { new(args)! } else { print_backtrace() - return error("GiteaServer with name '${args.name}' does not exist") + return error("GiteaServer with name 'gitea' does not exist") } } return get(name: args.name)! // no longer from db nor create } return gitea_global[args.name] or { print_backtrace() - return error('could not get config for gitea with name:${args.name}') + return error('could not get config for gitea with name:gitea') } } diff --git a/lib/installers/infra/livekit/livekit_factory_.v b/lib/installers/infra/livekit/livekit_factory_.v index 08a8b096..9e10021b 100644 --- a/lib/installers/infra/livekit/livekit_factory_.v +++ b/lib/installers/infra/livekit/livekit_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&LivekitServer { data := r.hget('context:livekit', args.name)! if data.len == 0 { print_backtrace() - return error('LivekitServer with name: ${args.name} does not exist, prob bug.') + return error('LivekitServer with name: livekit does not exist, prob bug.') } mut obj := json.decode(LivekitServer, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&LivekitServer { new(args)! } else { print_backtrace() - return error("LivekitServer with name '${args.name}' does not exist") + return error("LivekitServer with name 'livekit' does not exist") } } return get(name: args.name)! // no longer from db nor create } return livekit_global[args.name] or { print_backtrace() - return error('could not get config for livekit with name:${args.name}') + return error('could not get config for livekit with name:livekit') } } diff --git a/lib/installers/infra/zinit_installer/zinit_installer_factory_.v b/lib/installers/infra/zinit_installer/zinit_installer_factory_.v index aabfeabd..7273351a 100644 --- a/lib/installers/infra/zinit_installer/zinit_installer_factory_.v +++ b/lib/installers/infra/zinit_installer/zinit_installer_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'zinit_installer.configure')! if install_actions.len > 0 { - return error("can't configure zinit_installer:${args.name}, because no configuration allowed for this installer.") + return error("can't configure zinit_installer, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'zinit_installer.')! for mut other_action in other_actions { diff --git a/lib/installers/lang/golang/golang_factory_.v b/lib/installers/lang/golang/golang_factory_.v index 2796e786..f655d4f8 100644 --- a/lib/installers/lang/golang/golang_factory_.v +++ b/lib/installers/lang/golang/golang_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'golang.configure')! if install_actions.len > 0 { - return error("can't configure golang:${args.name}, because no configuration allowed for this installer.") + return error("can't configure golang, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'golang.')! for mut other_action in other_actions { diff --git a/lib/installers/lang/nodejs/nodejs_factory_.v b/lib/installers/lang/nodejs/nodejs_factory_.v index 6d3e0eb6..03a5a717 100644 --- a/lib/installers/lang/nodejs/nodejs_factory_.v +++ b/lib/installers/lang/nodejs/nodejs_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'nodejs.configure')! if install_actions.len > 0 { - return error("can't configure nodejs:${args.name}, because no configuration allowed for this installer.") + return error("can't configure nodejs, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'nodejs.')! for mut other_action in other_actions { diff --git a/lib/installers/lang/python/python_factory_.v b/lib/installers/lang/python/python_factory_.v index 9b3308fc..ca7b5bef 100644 --- a/lib/installers/lang/python/python_factory_.v +++ b/lib/installers/lang/python/python_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'python.configure')! if install_actions.len > 0 { - return error("can't configure python:${args.name}, because no configuration allowed for this installer.") + return error("can't configure python, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'python.')! for mut other_action in other_actions { diff --git a/lib/installers/lang/rust/rust_factory_.v b/lib/installers/lang/rust/rust_factory_.v index b0bbd204..b48ec26f 100644 --- a/lib/installers/lang/rust/rust_factory_.v +++ b/lib/installers/lang/rust/rust_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'rust.configure')! if install_actions.len > 0 { - return error("can't configure rust:${args.name}, because no configuration allowed for this installer.") + return error("can't configure rust, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'rust.')! for mut other_action in other_actions { diff --git a/lib/installers/net/mycelium_installer/mycelium_installer_factory_.v b/lib/installers/net/mycelium_installer/mycelium_installer_factory_.v index cb3bdd50..5f33d7a6 100644 --- a/lib/installers/net/mycelium_installer/mycelium_installer_factory_.v +++ b/lib/installers/net/mycelium_installer/mycelium_installer_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&MyceliumInstaller { data := r.hget('context:mycelium_installer', args.name)! if data.len == 0 { print_backtrace() - return error('MyceliumInstaller with name: ${args.name} does not exist, prob bug.') + return error('MyceliumInstaller with name: mycelium_installer does not exist, prob bug.') } mut obj := json.decode(MyceliumInstaller, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&MyceliumInstaller { new(args)! } else { print_backtrace() - return error("MyceliumInstaller with name '${args.name}' does not exist") + return error("MyceliumInstaller with name 'mycelium_installer' does not exist") } } return get(name: args.name)! // no longer from db nor create } return mycelium_installer_global[args.name] or { print_backtrace() - return error('could not get config for mycelium_installer with name:${args.name}') + return error('could not get config for mycelium_installer with name:mycelium_installer') } } diff --git a/lib/installers/net/wireguard_installer/wireguard_installer_factory_.v b/lib/installers/net/wireguard_installer/wireguard_installer_factory_.v index 9d6d79fa..d1063958 100644 --- a/lib/installers/net/wireguard_installer/wireguard_installer_factory_.v +++ b/lib/installers/net/wireguard_installer/wireguard_installer_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'wireguard_installer.configure')! if install_actions.len > 0 { - return error("can't configure wireguard_installer:${args.name}, because no configuration allowed for this installer.") + return error("can't configure wireguard_installer, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'wireguard_installer.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/actrunner/actrunner_factory_.v b/lib/installers/sysadmintools/actrunner/actrunner_factory_.v index 8770a31c..5e2b7802 100644 --- a/lib/installers/sysadmintools/actrunner/actrunner_factory_.v +++ b/lib/installers/sysadmintools/actrunner/actrunner_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'actrunner.configure')! if install_actions.len > 0 { - return error("can't configure actrunner:${args.name}, because no configuration allowed for this installer.") + return error("can't configure actrunner, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'actrunner.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/b2/b2_factory_.v b/lib/installers/sysadmintools/b2/b2_factory_.v index f844ddef..56a9f239 100644 --- a/lib/installers/sysadmintools/b2/b2_factory_.v +++ b/lib/installers/sysadmintools/b2/b2_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'b2.configure')! if install_actions.len > 0 { - return error("can't configure b2:${args.name}, because no configuration allowed for this installer.") + return error("can't configure b2, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'b2.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/fungistor/fungistor_factory_.v b/lib/installers/sysadmintools/fungistor/fungistor_factory_.v index f3ff9cbe..650cf2ab 100644 --- a/lib/installers/sysadmintools/fungistor/fungistor_factory_.v +++ b/lib/installers/sysadmintools/fungistor/fungistor_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'fungistor.configure')! if install_actions.len > 0 { - return error("can't configure fungistor:${args.name}, because no configuration allowed for this installer.") + return error("can't configure fungistor, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'fungistor.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/garage_s3/garage_s3_factory_.v b/lib/installers/sysadmintools/garage_s3/garage_s3_factory_.v index 77a9d57d..97e2a370 100644 --- a/lib/installers/sysadmintools/garage_s3/garage_s3_factory_.v +++ b/lib/installers/sysadmintools/garage_s3/garage_s3_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&GarageS3 { data := r.hget('context:garage_s3', args.name)! if data.len == 0 { print_backtrace() - return error('GarageS3 with name: ${args.name} does not exist, prob bug.') + return error('GarageS3 with name: garage_s3 does not exist, prob bug.') } mut obj := json.decode(GarageS3, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&GarageS3 { new(args)! } else { print_backtrace() - return error("GarageS3 with name '${args.name}' does not exist") + return error("GarageS3 with name 'garage_s3' does not exist") } } return get(name: args.name)! // no longer from db nor create } return garage_s3_global[args.name] or { print_backtrace() - return error('could not get config for garage_s3 with name:${args.name}') + return error('could not get config for garage_s3 with name:garage_s3') } } diff --git a/lib/installers/sysadmintools/grafana/grafana_factory_.v b/lib/installers/sysadmintools/grafana/grafana_factory_.v index 93c8d7a3..cb17300f 100644 --- a/lib/installers/sysadmintools/grafana/grafana_factory_.v +++ b/lib/installers/sysadmintools/grafana/grafana_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'grafana.configure')! if install_actions.len > 0 { - return error("can't configure grafana:${args.name}, because no configuration allowed for this installer.") + return error("can't configure grafana, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'grafana.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/prometheus/prometheus_factory_.v b/lib/installers/sysadmintools/prometheus/prometheus_factory_.v index 4d3ba14b..80ec24b8 100644 --- a/lib/installers/sysadmintools/prometheus/prometheus_factory_.v +++ b/lib/installers/sysadmintools/prometheus/prometheus_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'prometheus.configure')! if install_actions.len > 0 { - return error("can't configure prometheus:${args.name}, because no configuration allowed for this installer.") + return error("can't configure prometheus, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'prometheus.')! for mut other_action in other_actions { diff --git a/lib/installers/sysadmintools/rclone/rclone_factory_.v b/lib/installers/sysadmintools/rclone/rclone_factory_.v index a1d23e44..3ea3903d 100644 --- a/lib/installers/sysadmintools/rclone/rclone_factory_.v +++ b/lib/installers/sysadmintools/rclone/rclone_factory_.v @@ -38,7 +38,7 @@ pub fn get(args ArgsGet) !&RClone { data := r.hget('context:rclone', args.name)! if data.len == 0 { print_backtrace() - return error('RClone with name: ${args.name} does not exist, prob bug.') + return error('RClone with name: rclone does not exist, prob bug.') } mut obj := json.decode(RClone, data)! set_in_mem(obj)! @@ -47,14 +47,14 @@ pub fn get(args ArgsGet) !&RClone { new(args)! } else { print_backtrace() - return error("RClone with name '${args.name}' does not exist") + return error("RClone with name 'rclone' does not exist") } } return get(name: args.name)! // no longer from db nor create } return rclone_global[args.name] or { print_backtrace() - return error('could not get config for rclone with name:${args.name}') + return error('could not get config for rclone with name:rclone') } } diff --git a/lib/installers/sysadmintools/restic/restic_factory_.v b/lib/installers/sysadmintools/restic/restic_factory_.v index 28d2bba7..ee634a39 100644 --- a/lib/installers/sysadmintools/restic/restic_factory_.v +++ b/lib/installers/sysadmintools/restic/restic_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'restic.configure')! if install_actions.len > 0 { - return error("can't configure restic:${args.name}, because no configuration allowed for this installer.") + return error("can't configure restic, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'restic.')! for mut other_action in other_actions { diff --git a/lib/installers/threefold/griddriver/griddriver_factory_.v b/lib/installers/threefold/griddriver/griddriver_factory_.v index 4cf2f998..a2321cd1 100644 --- a/lib/installers/threefold/griddriver/griddriver_factory_.v +++ b/lib/installers/threefold/griddriver/griddriver_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'griddriver.configure')! if install_actions.len > 0 { - return error("can't configure griddriver:${args.name}, because no configuration allowed for this installer.") + return error("can't configure griddriver, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'griddriver.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/cloudhypervisor/cloudhypervisor_factory_.v b/lib/installers/virt/cloudhypervisor/cloudhypervisor_factory_.v index b9684603..42c7f705 100644 --- a/lib/installers/virt/cloudhypervisor/cloudhypervisor_factory_.v +++ b/lib/installers/virt/cloudhypervisor/cloudhypervisor_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'cloudhypervisor.configure')! if install_actions.len > 0 { - return error("can't configure cloudhypervisor:${args.name}, because no configuration allowed for this installer.") + return error("can't configure cloudhypervisor, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'cloudhypervisor.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/docker/docker_factory_.v b/lib/installers/virt/docker/docker_factory_.v index 5774c48c..757c2309 100644 --- a/lib/installers/virt/docker/docker_factory_.v +++ b/lib/installers/virt/docker/docker_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'docker.configure')! if install_actions.len > 0 { - return error("can't configure docker:${args.name}, because no configuration allowed for this installer.") + return error("can't configure docker, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'docker.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/herorunner/herorunner_factory_.v b/lib/installers/virt/herorunner/herorunner_factory_.v index 007cf393..daf72af6 100644 --- a/lib/installers/virt/herorunner/herorunner_factory_.v +++ b/lib/installers/virt/herorunner/herorunner_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'herorunner.configure')! if install_actions.len > 0 { - return error("can't configure herorunner:${args.name}, because no configuration allowed for this installer.") + return error("can't configure herorunner, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'herorunner.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/lima/lima_factory_.v b/lib/installers/virt/lima/lima_factory_.v index 9a50a925..e7aab6d8 100644 --- a/lib/installers/virt/lima/lima_factory_.v +++ b/lib/installers/virt/lima/lima_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&LimaInstaller { data := r.hget('context:lima', args.name)! if data.len == 0 { print_backtrace() - return error('LimaInstaller with name: ${args.name} does not exist, prob bug.') + return error('LimaInstaller with name: lima does not exist, prob bug.') } mut obj := json.decode(LimaInstaller, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&LimaInstaller { new(args)! } else { print_backtrace() - return error("LimaInstaller with name '${args.name}' does not exist") + return error("LimaInstaller with name 'lima' does not exist") } } return get(name: args.name)! // no longer from db nor create } return lima_global[args.name] or { print_backtrace() - return error('could not get config for lima with name:${args.name}') + return error('could not get config for lima with name:lima') } } diff --git a/lib/installers/virt/pacman/pacman_factory_.v b/lib/installers/virt/pacman/pacman_factory_.v index 430f538f..276b4beb 100644 --- a/lib/installers/virt/pacman/pacman_factory_.v +++ b/lib/installers/virt/pacman/pacman_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'pacman.configure')! if install_actions.len > 0 { - return error("can't configure pacman:${args.name}, because no configuration allowed for this installer.") + return error("can't configure pacman, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'pacman.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/podman/podman_factory_.v b/lib/installers/virt/podman/podman_factory_.v index c0f70675..49557ac8 100644 --- a/lib/installers/virt/podman/podman_factory_.v +++ b/lib/installers/virt/podman/podman_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'podman.configure')! if install_actions.len > 0 { - return error("can't configure podman:${args.name}, because no configuration allowed for this installer.") + return error("can't configure podman, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'podman.')! for mut other_action in other_actions { diff --git a/lib/installers/virt/youki/youki_factory_.v b/lib/installers/virt/youki/youki_factory_.v index 9f2aa1d1..129f8945 100644 --- a/lib/installers/virt/youki/youki_factory_.v +++ b/lib/installers/virt/youki/youki_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'youki.configure')! if install_actions.len > 0 { - return error("can't configure youki:${args.name}, because no configuration allowed for this installer.") + return error("can't configure youki, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'youki.')! for mut other_action in other_actions { diff --git a/lib/installers/web/bun/bun_factory_.v b/lib/installers/web/bun/bun_factory_.v index c84f4957..438939c7 100644 --- a/lib/installers/web/bun/bun_factory_.v +++ b/lib/installers/web/bun/bun_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'bun.configure')! if install_actions.len > 0 { - return error("can't configure bun:${args.name}, because no configuration allowed for this installer.") + return error("can't configure bun, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'bun.')! for mut other_action in other_actions { diff --git a/lib/installers/web/lighttpd/lighttpd_factory_.v b/lib/installers/web/lighttpd/lighttpd_factory_.v index 72ccc18f..402d6bcd 100644 --- a/lib/installers/web/lighttpd/lighttpd_factory_.v +++ b/lib/installers/web/lighttpd/lighttpd_factory_.v @@ -33,7 +33,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'lighttpd.configure')! if install_actions.len > 0 { - return error("can't configure lighttpd:${args.name}, because no configuration allowed for this installer.") + return error("can't configure lighttpd, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'lighttpd.')! for mut other_action in other_actions { diff --git a/lib/installers/web/tailwind/tailwind_factory_.v b/lib/installers/web/tailwind/tailwind_factory_.v index f0930af8..36bcb4fa 100644 --- a/lib/installers/web/tailwind/tailwind_factory_.v +++ b/lib/installers/web/tailwind/tailwind_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'tailwind.configure')! if install_actions.len > 0 { - return error("can't configure tailwind:${args.name}, because no configuration allowed for this installer.") + return error("can't configure tailwind, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'tailwind.')! for mut other_action in other_actions { diff --git a/lib/installers/web/tailwind4/tailwind4_factory_.v b/lib/installers/web/tailwind4/tailwind4_factory_.v index c2b9ffc6..996d831e 100644 --- a/lib/installers/web/tailwind4/tailwind4_factory_.v +++ b/lib/installers/web/tailwind4/tailwind4_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'tailwind4.configure')! if install_actions.len > 0 { - return error("can't configure tailwind4:${args.name}, because no configuration allowed for this installer.") + return error("can't configure tailwind4, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'tailwind4.')! for mut other_action in other_actions { diff --git a/lib/installers/web/traefik/traefik_factory_.v b/lib/installers/web/traefik/traefik_factory_.v index fb90ddce..cdf266ac 100644 --- a/lib/installers/web/traefik/traefik_factory_.v +++ b/lib/installers/web/traefik/traefik_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&TraefikServer { data := r.hget('context:traefik', args.name)! if data.len == 0 { print_backtrace() - return error('TraefikServer with name: ${args.name} does not exist, prob bug.') + return error('TraefikServer with name: traefik does not exist, prob bug.') } mut obj := json.decode(TraefikServer, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&TraefikServer { new(args)! } else { print_backtrace() - return error("TraefikServer with name '${args.name}' does not exist") + return error("TraefikServer with name 'traefik' does not exist") } } return get(name: args.name)! // no longer from db nor create } return traefik_global[args.name] or { print_backtrace() - return error('could not get config for traefik with name:${args.name}') + return error('could not get config for traefik with name:traefik') } } diff --git a/lib/installers/web/zola/zola_factory_.v b/lib/installers/web/zola/zola_factory_.v index 0c8a7732..ae06e84b 100644 --- a/lib/installers/web/zola/zola_factory_.v +++ b/lib/installers/web/zola/zola_factory_.v @@ -32,7 +32,7 @@ pub fn play(mut plbook PlayBook) ! { } mut install_actions := plbook.find(filter: 'zola.configure')! if install_actions.len > 0 { - return error("can't configure zola:${args.name}, because no configuration allowed for this installer.") + return error("can't configure zola, because no configuration allowed for this installer.") } mut other_actions := plbook.find(filter: 'zola.')! for mut other_action in other_actions { diff --git a/lib/threefold/grid3/deployer/deployer_factory_.v b/lib/threefold/grid3/deployer/deployer_factory_.v index 78194464..99b3f920 100644 --- a/lib/threefold/grid3/deployer/deployer_factory_.v +++ b/lib/threefold/grid3/deployer/deployer_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&TFGridDeployer { data := r.hget('context:deployer', args.name)! if data.len == 0 { print_backtrace() - return error('TFGridDeployer with name: ${args.name} does not exist, prob bug.') + return error('TFGridDeployer with name: deployer does not exist, prob bug.') } mut obj := json.decode(TFGridDeployer, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&TFGridDeployer { new(args)! } else { print_backtrace() - return error("TFGridDeployer with name '${args.name}' does not exist") + return error("TFGridDeployer with name 'deployer' does not exist") } } return get(name: args.name)! // no longer from db nor create } return deployer_global[args.name] or { print_backtrace() - return error('could not get config for deployer with name:${args.name}') + return error('could not get config for deployer with name:deployer') } } diff --git a/lib/virt/hetznermanager/hetznermanager_factory_.v b/lib/virt/hetznermanager/hetznermanager_factory_.v index 31684e1e..8c6bdf9c 100644 --- a/lib/virt/hetznermanager/hetznermanager_factory_.v +++ b/lib/virt/hetznermanager/hetznermanager_factory_.v @@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&HetznerManager { data := r.hget('context:hetznermanager', args.name)! if data.len == 0 { print_backtrace() - return error('HetznerManager with name: ${args.name} does not exist, prob bug.') + return error('HetznerManager with name: hetznermanager does not exist, prob bug.') } mut obj := json.decode(HetznerManager, data)! set_in_mem(obj)! @@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&HetznerManager { new(args)! } else { print_backtrace() - return error("HetznerManager with name '${args.name}' does not exist") + return error("HetznerManager with name 'hetznermanager' does not exist") } } return get(name: args.name)! // no longer from db nor create } return hetznermanager_global[args.name] or { print_backtrace() - return error('could not get config for hetznermanager with name:${args.name}') + return error('could not get config for hetznermanager with name:hetznermanager') } } diff --git a/lib/virt/kubernetes/kubernetes_factory_.v b/lib/virt/kubernetes/kubernetes_factory_.v index 67005a02..6b8da751 100644 --- a/lib/virt/kubernetes/kubernetes_factory_.v +++ b/lib/virt/kubernetes/kubernetes_factory_.v @@ -39,7 +39,7 @@ pub fn get(args ArgsGet) !&KubeClient { data := r.hget('context:kubernetes', args.name)! if data.len == 0 { print_backtrace() - return error('KubeClient with name: ${args.name} does not exist, prob bug.') + return error('KubeClient with name: kubernetes does not exist, prob bug.') } mut obj := json.decode(KubeClient, data)! set_in_mem(obj)! @@ -48,14 +48,14 @@ pub fn get(args ArgsGet) !&KubeClient { new(args)! } else { print_backtrace() - return error("KubeClient with name '${args.name}' does not exist") + return error("KubeClient with name 'kubernetes' does not exist") } } return get(name: args.name)! // no longer from db nor create } return kubernetes_global[args.name] or { print_backtrace() - return error('could not get config for kubernetes with name:${args.name}') + return error('could not get config for kubernetes with name:kubernetes') } }