web

package module
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

README

Weblang language (Go package)

Weblang

Go Reference

Get it from the Snap Store

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.

Go Example

package main

import "webimizer.dev/web/cmd"

func main() {
	cmd.RegisterAndExecute()
}

Weblang debian package

You can install debian weblang package and no need to use this go package directly anymore (this is more easy way):

  1. Add GPG public key:
curl -fsSL https://weblang.dev/deb-repo/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/weblang.gpg
  1. Add deb package to package list:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/weblang.gpg] https://weblang.dev/deb-repo stable main" | sudo tee /etc/apt/sources.list.d/weblang.list  > /dev/null
  1. Update apt list and install weblang package:
sudo apt update && sudo apt install weblang
  1. Run application with command:
weblang run

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

Documentation

Overview

Weblang language implementation main package

Index

Constants

View Source
const Version string = "weblang0.8.6"

Weblang version string

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.24

type Config struct {
	Version string       `yaml:"version"`
	Project Project      `yaml:"project"`
	Config  []ConfigItem `yaml:"config"`
}

Yaml main struct

type ConfigItem added in v0.6.24

type ConfigItem struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

Yaml config array item

type Directories added in v0.6.24

type Directories struct {
	SourceDir   string `yaml:"sourceDir"`
	BytecodeDir string `yaml:"bytecodeDir"`
}

Yaml directories struct

type EventHandler added in v0.4.8

type EventHandler func(e interface{}) error

EventHandler function for server and VM events

type Project added in v0.6.24

type Project struct {
	Name        string      `yaml:"name"`
	Version     string      `yaml:"version"`
	Directories Directories `yaml:"directories"`
}

Yaml project struct

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) GitPreperWebHook added in v0.6.25

func (vm *VM) GitPreperWebHook(gitUrl string, gitUser string, gitToken string, gitLocalDir string, gitWebHook string) error

Clone git repository to gitLocalDir and listen request from webHook url for git changes

func (*VM) InitVM

func (vm *VM) InitVM(configFile string)

Weblang now require configuration file weblang.yml in your project directory to work correctly. Initialize VM environment. Please provide correct configFile (config file name).

func (*VM) StartServer added in v0.3.16

func (vm *VM) StartServer() error

Starts server process in VM environment

Directories

Path Synopsis
Weblang VM environment base struct types such as Function, MmemoryMap, Class and Object.
Weblang VM environment base struct types such as Function, MmemoryMap, Class and Object.
Weblang bytecode main package
Weblang bytecode main package
class
Class struct of Weblang bytecode
Class struct of Weblang bytecode
class/attribute
Class attributes struct of Weblang bytcode
Class attributes struct of Weblang bytcode
generator
Weblang bytecode generator package
Weblang bytecode generator package
instructionset
Instuctionset struct of Weblang bytecode files
Instuctionset struct of Weblang bytecode files
loader
bytcode loader package
bytcode loader package
cmd
Package for subcommandss implementations
Package for subcommandss implementations
run
Run subcommand implementation
Run subcommand implementation
version
Version subcommand implementation
Version subcommand implementation
Http handler controller
Http handler controller
Weblang core packages for Weblang VM runtime environment
Weblang core packages for Weblang VM runtime environment
cms
Weblang Content Management System
Weblang Content Management System
firewall
Weblang firewall package.
Weblang firewall package.
runtime
This is core package for Weblang language.
This is core package for Weblang language.
server
Server implemantation for use in Weblang VM runtime environment
Server implemantation for use in Weblang VM runtime environment
Weblang language parser
Weblang language parser

Jump to

Keyboard shortcuts

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