This section is empty.


This section is empty.


func GetEnvOrDefault

func GetEnvOrDefault(key string, defaultValue string) string

Get an environment variable or return the default value

func InArray

func InArray(val interface{}, array interface{}) (exists bool, index int)

Check if a given value exists in the given array

func Inertia

func Inertia(v interface{}) template.HTML

func JsonEncode

func JsonEncode(v interface{}) template.JS

func JsonEncodeRaw

func JsonEncodeRaw(v interface{}) string

func MergeMaps

func MergeMaps(a map[string]interface{}, b map[string]interface{}) map[string]interface{}

Merge two maps, overriding existing keys from b --> a into a new map

func Mix

func Mix(path string, manifestPath ...string) template.HTML

func WalkRecursive

func WalkRecursive(values map[string]interface{}, fn func(interface{}))

Iterate over a given map recursively and call the given func on every value


type Ziggy

type Ziggy struct {
	BaseDomain   string                `json:"baseDomain"`
	BasePort     int                   `json:"basePort"`
	BaseProtocol string                `json:"baseProtocol"`
	BaseUrl      string                `json:"baseUrl"`
	Group        string                `json:"group"`
	Routes       map[string]ZiggyRoute `json:"namedRoutes"`
} base struct to export compatible Echo routes

func NewZiggy

func NewZiggy(echo *echo.Echo, page map[string]interface{}) Ziggy

type ZiggyRoute

type ZiggyRoute struct {
	Uri     string   `json:"uri"`
	Methods []string `json:"methods"`
	Domain  string   `json:"domain"`

A single route