clients.stellar #
Stellar Client
see examples/clients/b2_kristof.vsh for example
mut cl:=stellar.get(instance:'test')!
// cl.config_delete()!
mut cfg:=cl.config()!
if cfg.secret==''{
// will ask questions if not filled in yet
cl.config_interactive()!
}
println(cfg)
//will now change programatically
cfg.description='this is my main key'
//will now save the config
cl.config_save()!
//we will now see how the description has been overwritten
println(cfg)
fn get #
fn get(args play.PlayArgs) !StellarClient[Config]
get instance of our client params: . instance string = "default". playargs ?PlayArgs (defines how to get session and/or context)
fn heroplay #
fn heroplay(args play.PLayBookAddArgs) !
run heroscript starting from path, text or giturl
!!stellarclient.define
name:'tf_write_1'
description:'ThreeFold Read Write Repo 1
secret:'...'
path string
text string
git_url string
```
fn new #
fn new(args StellarGetArgs)
fn (StellarClient[Config]) config_interactive #
fn (mut self StellarClient[Config]) config_interactive() !
struct Config #
struct Config {
play.ConfigBase
pub mut:
configtype string = 'stellarclient' // needs to be defined
keyname string
secret string
description string
}
struct Person #
struct Person {
name string
age int
is_member bool
skills []string
}
struct StellarClient #
struct StellarClient[T] {
play.BaseConfig[T]
pub mut:
py python.PythonEnv
}
struct StellarGetArgs #
@[params]
struct StellarGetArgs {
pub mut:
instance string
reset bool
}