apps.biz.erpnext #
erpnext
To get started
import incubaid.herolib.installers.something.erpnext as erpnext_installer
heroscript:='
!!erpnext.configure name:'test'
password: '1234'
port: 7701
!!erpnext.start name:'test' reset:1
'
erpnext_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= erpnext_installer.get()!
//installer.start(reset:true)!
example heroscript
!!erpnext.configure
homedir: '/home/user/erpnext'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '0.0.0'
fn delete #
fn delete(args ArgsGet) !
fn exists #
fn exists(args ArgsGet) !bool
does the config exists?
fn get #
fn get(args ArgsGet) !&ERPNext
fn heroscript_loads #
fn heroscript_loads(heroscript string) !ERPNext
///////////NORMALLY NO NEED TO TOUCH
fn list #
fn list(args ArgsList) ![]&ERPNext
if fromdb set: load from filesystem, and not from mem, will also reset what is in mem
fn new #
fn new(args ArgsGet) !&ERPNext
fn play #
fn play(mut plbook PlayBook) !
fn set #
fn set(o ERPNext) !
register the config for the future
fn switch #
fn switch(name string)
switch instance to be used for erpnext
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string = 'default'
fromdb bool // will load from filesystem
create bool // default will not create if not exist
}
///////FACTORY
struct ArgsList #
@[params]
struct ArgsList {
pub mut:
fromdb bool // will load from filesystem
}
struct ERPNext #
@[heap]
struct ERPNext {
pub mut:
name string = 'default'
homedir string
configpath string
username string
password string @[secret]
title string
host string
port int
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (ERPNext) build #
fn (mut self ERPNext) build() !
fn (ERPNext) destroy #
fn (mut self ERPNext) destroy() !
fn (ERPNext) install #
fn (mut self ERPNext) install(args InstallArgs) !
fn (ERPNext) install_start #
fn (mut self ERPNext) install_start(args InstallArgs) !
fn (ERPNext) reload #
fn (mut self ERPNext) reload() !
load from disk and make sure is properly intialized
fn (ERPNext) restart #
fn (mut self ERPNext) restart() !
fn (ERPNext) running #
fn (mut self ERPNext) running() !bool
fn (ERPNext) start #
fn (mut self ERPNext) start() !
fn (ERPNext) stop #
fn (mut self ERPNext) stop() !
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}