web

package module
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Weblang language (Go package)

Weblang

Go Reference

Go-powered new programming language for web development

This is still very early version, so please use only for testing purposes, because it's not production ready yet.

Example

package main

import (
	"log"

	"webimizer.dev/web"
)

func main() {
	vm := web.VM{}
	vm.InitVM("web/src", "web/generated")
	log.Fatal(vm.StartServer())
}

Full example: https://github.com/vaclovas2020/webtest

Documentation

Overview

Weblang language implementation main package

Index

Constants

View Source
const Version string = "v0.4.8"

Weblang version string

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler added in v0.4.8

type EventHandler func(e interface{}) error

EventHandler function for server and VM events

type VM

type VM struct {
	// contains filtered or unexported fields
}

Main VM struct

func (*VM) BeforeStaticFilesInit added in v0.4.8

func (vm *VM) BeforeStaticFilesInit(event EventHandler)

Event before static files server handler initialization

func (*VM) DefineFunc added in v0.2.4

func (vm *VM) DefineFunc(className string, methodName string, handler base.FunctionHandler)

Set handler to specific class method (works with external methods only)

func (*VM) InitVM

func (vm *VM) InitVM(sourceDir string, byteCodeDir string)

Initialize VM environment. Please provide correct sourceDir (directory of Web language source files) and byteCodeDir (directory for bytecode files)

func (*VM) StartServer added in v0.3.16

func (vm *VM) StartServer() error

Starts server process in VM environment

Directories

Path Synopsis
core
firewall
Weblang firewall package.
Weblang firewall package.
runtime
This is core package for Weblang language.
This is core package for Weblang language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL