gim

package module
v0.0.0-...-4431fa3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 15 Imported by: 0

README

gim

Gim is a proof of concept tool that use imba, go, gin and parcel to make static pages based on filesystem routing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	BuildBrowserScripts(workspace *Workspace, format bool) error
}

type Config

type Config struct {
	PagesFolder  string
	PublicFolder string
	GimFolder    string

	DistPublicFolder  string
	DistBrowserFolder string
	TemplateHTMLName  string

	ImbacCommand  string
	ParcelCommand string
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type Gim

type Gim struct {
	Workspace *Workspace

	Router  Router
	Builder Builder
	Printer Printer
	// contains filtered or unexported fields
}

func NewDefaultGim

func NewDefaultGim() (*Gim, error)

func NewGim

func NewGim(w *Workspace, router Router, builder Builder, printer Printer) (*Gim, error)

func (*Gim) Run

func (g *Gim) Run() error

type GinRouter

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

func NewGinRouter

func NewGinRouter() *GinRouter

func (*GinRouter) DefineRoutes

func (r *GinRouter) DefineRoutes(wSpace *Workspace, tableRoutes map[string]string, parent string, routes routesTree) error

func (*GinRouter) MountStatics

func (r *GinRouter) MountStatics(wSpace *Workspace) error

func (*GinRouter) Run

func (r *GinRouter) Run(port int) error

type ParcelBuilder

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

func NewParcelBuilder

func NewParcelBuilder(parcelBinaryLocation ...string) *ParcelBuilder

func (*ParcelBuilder) BuildBrowserScripts

func (p *ParcelBuilder) BuildBrowserScripts(wSpace *Workspace, format bool) error

type Printer

type Printer interface {
	ShowLoading(title string)
	HideLoading()
}

type Router

type Router interface {
	MountStatics(workspace *Workspace) error
	DefineRoutes(workspace *Workspace, tableRoutes map[string]string, parent string, routes routesTree) error
	Run(port int) error
}

type SpinnerPrinter

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

func NewSpinnerPrinter

func NewSpinnerPrinter() *SpinnerPrinter

func (*SpinnerPrinter) HideLoading

func (sp *SpinnerPrinter) HideLoading()

func (*SpinnerPrinter) ShowLoading

func (sp *SpinnerPrinter) ShowLoading(title string)

type Workspace

type Workspace struct {
	Path   string
	Config *Config
}

func NewWorkspace

func NewWorkspace(path string, conf *Config) *Workspace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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