Skip to content

installers.db.meilisearch_installer #

meilisearch

To get started



import incubaid.herolib.installers.db.meilisearch as meilisearchinstaller

heroscript:='
!!meilisearch.configure name:'test'
    masterkey: '1234'
    port: 7701

'

meilisearchinstaller.play(heroscript=heroscript)!

//or we can call the default and do a start with reset
//mut installer:= meilisearch_installer.get()!
//installer.start(reset:true)!

example heroscript

!!meilisearch.configure
    name:'default'
    path: '{HOME}/hero/var/meilisearch/default'
    masterkey: ''
    host: 'localhost'
    port: 7700
    production: 0

Constants #

const version = '1.11.3'

fn delete #

fn delete(args ArgsGet) !

fn exists #

fn exists(args ArgsGet) !bool

does the config exists?

fn get #

fn get(args ArgsGet) !&MeilisearchInstaller

fn heroscript_dumps #

fn heroscript_dumps(obj MeilisearchInstaller) !string

///////////NORMALLY NO NEED TO TOUCH

fn heroscript_loads #

fn heroscript_loads(heroscript string) !MeilisearchInstaller

fn list #

fn list(args ArgsList) ![]&MeilisearchInstaller

if fromdb set: load from filesystem, and not from mem, will also reset what is in mem

fn new #

fn new(args ArgsGet) !&MeilisearchInstaller

fn play #

fn play(mut plbook PlayBook) !

fn set #

fn set(o MeilisearchInstaller) !

register the config for the future

fn switch #

fn switch(name string)

switch instance to be used for meilisearch_installer

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 InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset bool
}

struct MeilisearchInstaller #

@[heap]
struct MeilisearchInstaller {
pub mut:
	name       string = 'default'
	path       string = '/tmp/meilisearch'
	masterkey  string @[secret]
	host       string = 'localhost'
	port       int    = 7700
	production bool
}

THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED

fn (MeilisearchInstaller) build #

fn (mut self MeilisearchInstaller) build() !

fn (MeilisearchInstaller) destroy #

fn (mut self MeilisearchInstaller) destroy() !

fn (MeilisearchInstaller) install #

fn (mut self MeilisearchInstaller) install(args InstallArgs) !

fn (MeilisearchInstaller) install_start #

fn (mut self MeilisearchInstaller) install_start(args InstallArgs) !

fn (MeilisearchInstaller) reload #

fn (mut self MeilisearchInstaller) reload() !

load from disk and make sure is properly intialized

fn (MeilisearchInstaller) restart #

fn (mut self MeilisearchInstaller) restart() !

fn (MeilisearchInstaller) running #

fn (mut self MeilisearchInstaller) running() !bool

fn (MeilisearchInstaller) start #

fn (mut self MeilisearchInstaller) start() !

fn (MeilisearchInstaller) stop #

fn (mut self MeilisearchInstaller) stop() !