workspace

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRelationData added in v0.2.11

func GetRelationData(req *cutil.WorkspaceRequest, m *model.Model, data []any, sourceKey string, as *app.State) ([]*util.OrderedMap[any], error)

func ProjectMenu

func ProjectMenu(as *app.State, prj *project.View) (menu.Items, error)

func SourceMenuModel

func SourceMenuModel(m *model.Model, path string) *menu.Item

func SourceMenuPackage

func SourceMenuPackage(mp *model.Package, path string) menu.Items

func ToMenu

func ToMenu(as *app.State, path string, a action.Actions, view *project.View) (menu.Items, error)

Types

type Result

type Result struct {
	Title       string      `json:"title"`
	Redirect    string      `json:"redirect,omitempty"`
	Breadcrumbs []string    `json:"bc"`
	Data        any         `json:"data"`
	Page        layout.Page `json:"page"`
}

func ActionHandler

func ActionHandler(req *cutil.WorkspaceRequest, act *action.Action, as *app.State) (*Result, error)

func ErrResult

func ErrResult(req *cutil.WorkspaceRequest, act *action.Action, err error) (*Result, error)

func NewResult

func NewResult(title string, bc []string, req *cutil.WorkspaceRequest, act *action.Action, data any, page layout.Page) *Result

func RedirectResult

func RedirectResult(flashMessage string, redir string) *Result

Jump to

Keyboard shortcuts

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