web

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StaticAssets embed.FS
View Source
var StaticAssetsPrefix, _ = fs.Sub(StaticAssets, "static/assets")
View Source
var StaticBuild embed.FS
View Source
var StaticBuildPrefix, _ = fs.Sub(StaticBuild, "static/build")

Functions

func ActionData

func ActionData(action kodex.ActionConfig, onUpdate func(ChangeInfo, string)) ElementFunction

func ActionDetails

func ActionDetails(project kodex.Project, onUpdate func(ChangeInfo, string)) func(c Context, actionId, tab string) Element

func ActionEditor

func ActionEditor(action kodex.ActionConfig, onUpdate func(ChangeInfo, string)) ElementFunction

func ActionTest

func ActionTest(actionConfig kodex.ActionConfig, onUpdate func(ChangeInfo, string)) ElementFunction

func Actions

func Actions(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func AddBreadcrumb

func AddBreadcrumb(c Context, title string, path string)

func AnyDiff

func AnyDiff(c Context, newValue, oldValue any, path []string) Element

func AppContent

func AppContent(c Context) Element

func AppNavbar

func AppNavbar(c Context) Element

func AppServer

func AppServer(controller api.Controller) (*gospel.Server, error)

Returns the app server for the Kodex UI

func AuthorizedContent

func AuthorizedContent(c Context) Element
func Breadcrumbs(c Context) Element

func ChangeRequestDetails

func ChangeRequestDetails(project kodex.Project) func(c Context, changeRequestId, tab string) Element

func ChangeRequestList

func ChangeRequestList(project kodex.Project) ElementFunction

func ChangeRequests

func ChangeRequests(project kodex.Project) ElementFunction

func Changes

func Changes(changeRequest api.ChangeRequest) Element

func ConfigActionsList

func ConfigActionsList(config kodex.Config, onUpdate func(ChangeInfo, string)) ElementFunction

func ConfigSettings

func ConfigSettings(config kodex.Config, onUpdate func(ChangeInfo, string)) func(c Context) Element

func DeleteFieldNotice

func DeleteFieldNotice(c Context, form *forms.Form, field *forms.Field, path []string, onUpdate func(ChangeInfo, string)) Element

func Discussion

func Discussion(changeRequest api.ChangeRequest) Element
func Dropdown(c Context, id, icon string, items []Element) Element

func Field

func Field(c Context, form *forms.Form, field *forms.Field, path []string, onUpdate func(ChangeInfo, string)) Element

func FormEditor

func FormEditor(c Context, actionConfig kodex.ActionConfig, onUpdate func(ChangeInfo, string)) Element

func FormFields

func FormFields(c Context, form *forms.Form, onUpdate func(ChangeInfo, string), path []string) Element

func FromTo

func FromTo(newValue, oldValue any) Element

func HumanDuration

func HumanDuration(d time.Duration) string

func InMemoryController

func InMemoryController(c Context) (api.Controller, error)

func IsActionValidator added in v0.1.4

func IsActionValidator(c Context, validator *actions.IsAction, onUpdate func(ChangeInfo, string), path []string) Element

func IsListValidator

func IsListValidator(c Context, validator *forms.IsList, onUpdate func(ChangeInfo, string), path []string) Element

func ItemDiff

func ItemDiff(c Context, newItem, oldItem *kodex.Item) Element

func KipMenu

func KipMenu(c Context) Element

func Kodex

func Kodex(c Context) Element

func Login

func Login(c Context) Element

func Logout

func Logout(c Context) Element

func MainContent

func MainContent(c Context) Element

func MainTitle

func MainTitle(c Context) string

func MakeProject

func MakeProject(controller api.Controller, name string, org *api.UserOrganization) (kodex.Project, error)

func MapDiff

func MapDiff(c Context, newMap, oldMap map[string]any, path []string) Element

func MapValue

func MapValue(c Context, key string, newValue, oldValue any, path []string) Element
func MenuItems(c Context) Element

func MergeRequestNotice

func MergeRequestNotice(c Context, project kodex.Project, changeRequest api.ChangeRequest) *HTMLElement
func NavItem(c Context) Element
func Navbar(c Context) Element

func NewAction

func NewAction(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func NewChangeRequest

func NewChangeRequest(project kodex.Project) ElementFunction

func NewConfigAction

func NewConfigAction(config kodex.Config, onUpdate func(ChangeInfo, string)) ElementFunction

func NewField

func NewField(c Context, form *forms.Form, path []string, onUpdate func(ChangeInfo, string)) Element

func NewProject

func NewProject() ElementFunction

func NewStream

func NewStream(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func NewStreamConfig

func NewStreamConfig(stream kodex.Stream, onUpdate func(ChangeInfo, string)) ElementFunction

func NewValidator

func NewValidator(c Context, create func(validator forms.Validator) int, path []string, onUpdate func(ChangeInfo, string)) Element

func NotFound

func NotFound(c Context) Element

func NotFoundRedirect

func NotFoundRedirect(c Context) Element

func ProjectDetails

func ProjectDetails(c Context, projectId string, tab string) Element

func Projects

func Projects(c Context) Element

func PseudonymizeValidator added in v0.1.4

func PseudonymizeValidator(c Context, validator *actions.IsAction, action *actions.PseudonymizeTransformation, onUpdate func(ChangeInfo, string), path []string) Element

func Root

func Root(controller api.Controller, plugins []WebPlugin) (func(c Context) Element, error)

func SetApiUser

func SetApiUser(c gospel.Context, user api.User)

func SetController

func SetController(c gospel.Context, controller api.Controller)

func SetExternalUser

func SetExternalUser(c gospel.Context, user *api.ExternalUser)

func SetFormAction

func SetFormAction(c Context, action *actions.FormAction)

func SetPlugins

func SetPlugins(c gospel.Context, plugins []WebPlugin)

func SetUserProvider

func SetUserProvider(c gospel.Context, userProvider api.UserProvider)

func Settings

func Settings(project, realProject kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func SettingsTab

func SettingsTab(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction
func Sidebar(c Context) Element

func SliceDiff

func SliceDiff(c Context, newValue, oldValue []any, path []string) Element

func StreamConfigDetails

func StreamConfigDetails(stream kodex.Stream, onUpdate func(ChangeInfo, string)) func(c Context, configId, tab string) Element

func StreamConfigs

func StreamConfigs(stream kodex.Stream, onUpdate func(ChangeInfo, string)) ElementFunction

func StreamConfigsList

func StreamConfigsList(stream kodex.Stream, onUpdate func(ChangeInfo, string)) ElementFunction

func StreamDetails

func StreamDetails(project kodex.Project, onUpdate func(ChangeInfo, string)) func(c Context, streamId, tab string) Element

func Streams

func Streams(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func StreamsList

func StreamsList(project kodex.Project, onUpdate func(ChangeInfo, string)) ElementFunction

func SwitchValidator

func SwitchValidator(c Context, validator *forms.Switch, onUpdate func(ChangeInfo, string), path []string) Element

func TestWithItem

func TestWithItem(c Context, actionConfig kodex.ActionConfig, item int) Element

func TokenLogin

func TokenLogin(c Context) Element

func UseApiUser

func UseApiUser(c gospel.Context) api.User

func UseController

func UseController(c gospel.Context) api.Controller

func UseDefaultOrganization

func UseDefaultOrganization(c gospel.Context) *api.UserOrganization

func UseExternalUser

func UseExternalUser(c gospel.Context) *api.ExternalUser

func UseFormAction

func UseFormAction(c Context) *actions.FormAction

func UseUserProvider

func UseUserProvider(c gospel.Context) api.UserProvider

func UserNavbar

func UserNavbar(c Context) Element

func ValidatorDetails

func ValidatorDetails(c Context, validator forms.Validator, index, length int, update func(validator forms.Validator) error, move func(fromIndex, toIndex int) error, path []string, onUpdate func(ChangeInfo, string)) Element

func ValidatorEditor

func ValidatorEditor(c Context, update func(validator forms.Validator) error, validator forms.Validator, path []string, onUpdate func(ChangeInfo, string)) Element

func Validators

func Validators(c Context, validators []forms.Validator, path []string, onUpdate func(ChangeInfo, string)) Element

func ValidatorsActions

func ValidatorsActions(c Context, validators []forms.Validator, create func(validator forms.Validator) int, update func(index int, validator forms.Validator) error, move func(fromIndex, toIndex int) error, path []string, onUpdate func(ChangeInfo, string)) Element

func WithSidebar

func WithSidebar(sidebar Element, content Element) ElementFunction

Types

type AppLinkPlugin

type AppLinkPlugin interface {
	AppLink() (string, string, string)
}
type Breadcrumb struct {
	Title string
	Path  string
}

type ChangeInfo

type ChangeInfo struct {
	Description string
	Data        any
}

type UserProviderPlugin

type UserProviderPlugin interface {
	LoginPath() string
}

type WebPlugin

type WebPlugin interface {
	MainRoutes(gospel.Context) []*gospel.RouteConfig
}

func GetPlugins

func GetPlugins(controller api.Controller) ([]WebPlugin, error)

Returns all requested web plugins

func UsePlugins

func UsePlugins(c gospel.Context) []WebPlugin

type WebPluginMaker

type WebPluginMaker interface {
	InitializeWebPlugin(controller api.Controller) (WebPlugin, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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