page

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PageMenu     = "/menu"
	PageTunnel   = "/tunnel"
	PageNewFile  = "/tunnel/file/create"
	PageNewHTTP  = "/tunnel/http/create"
	PageNewTCP   = "/tunnel/tcp/create"
	PageNewUDP   = "/tunnel/udp/create"
	PageEditFile = "/tunnel/file/edit"
	PageEditHTTP = "/tunnel/http/edit"
	PageEditTCP  = "/tunnel/tcp/edit"
	PageEditUDP  = "/tunnel/udp/edit"

	PageEntryPoint        = "/entrypoint"
	PageNewTCPEntryPoint  = "/entrypoint/tcp/create"
	PageEditTCPEntryPoint = "/entrypoint/tcp/edit"
	PageNewUDPEntryPoint  = "/entrypoint/udp/create"
	PageEditUDPEntryPoint = "/entrypoint/udp/edit"

	PageAbout = "/about"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type OverflowAction

type OverflowAction string
const (
	OverflowActionAbout OverflowAction = "about"
)

type Page

type Page interface {
	Init(opts ...PageOption)
	Layout(gtx layout.Context, th *material.Theme) layout.Dimensions
}

func NewAboutPage

func NewAboutPage(r *Router) Page

func NewEntryPointPage added in v0.2.0

func NewEntryPointPage(r *Router) Page

func NewFileAddPage

func NewFileAddPage(r *Router) Page

func NewFileEditPage

func NewFileEditPage(r *Router) Page

func NewHTTPAddPage

func NewHTTPAddPage(r *Router) Page

func NewHTTPEditPage

func NewHTTPEditPage(r *Router) Page

func NewMenuPage

func NewMenuPage(r *Router) Page

func NewTCPAddPage

func NewTCPAddPage(r *Router) Page

func NewTCPEditPage

func NewTCPEditPage(r *Router) Page

func NewTCPEntryPointAddPage added in v0.2.0

func NewTCPEntryPointAddPage(r *Router) Page

func NewTCPEntryPointEditPage added in v0.2.0

func NewTCPEntryPointEditPage(r *Router) Page

func NewTunnelPage

func NewTunnelPage(r *Router) Page

func NewUDPAddPage

func NewUDPAddPage(r *Router) Page

func NewUDPEditPage

func NewUDPEditPage(r *Router) Page

func NewUDPEntryPointAddPage added in v0.2.0

func NewUDPEntryPointAddPage(r *Router) Page

func NewUDPEntryPointEditPage added in v0.2.0

func NewUDPEntryPointEditPage(r *Router) Page

type PageOption

type PageOption func(*PageOptions)

func IDPageOption

func IDPageOption(id string) PageOption

type PageOptions

type PageOptions struct {
	ID string
}

type Route

type Route struct {
	Path string
	ID   string
}

type Router

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

func NewRouter

func NewRouter() *Router

func (*Router) Layout

func (r *Router) Layout(gtx layout.Context, th *material.Theme) layout.Dimensions

func (*Router) Register

func (r *Router) Register(path string, page Page)

func (*Router) SwitchTo

func (r *Router) SwitchTo(route Route)

Jump to

Keyboard shortcuts

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