Documentation ¶
Index ¶
- Constants
- Variables
- func ApiErrorName(code api.ErrorCode) string
- func AppendStyles(s string)
- func ArrangeParams[T any](params map[string]T) []string
- func ArrangeServices(services []api.ListServicesEntry)
- func Dispatch(event interface{}, receivers ...SubscriberID)
- func DispatcherUnsubscribe(id SubscriberID)
- func Fetch(url string, init *FetchInit, then func(response *FetchResponse), ...)
- func FetchQuery(url string, r interface{}, then func(r *api.Query), catch func(err string))
- func FetchQueryWithSocket(r *api.Query, then func(r *api.Query), catch func(err string))
- func FormatMultilineText(text string) (content []vecty.MarkupOrChild)
- func GetLocation() (path string)
- func HTTPUrl(path string) string
- func If(cond bool, children ...vecty.ComponentOrHTML) vecty.List
- func LocalStorageClear()
- func LocalStorageGet(key string) (string, bool)
- func LocalStorageRemove(key string)
- func LocalStorageSet(key, value string)
- func ParamDefaultValue(pi *api.ParamInfoEntry) string
- func Query(useSocket bool, r *api.Query, then func(*api.Query), catch func(err string))
- func QueryToString(q interface{}) (string, error)
- func ReleaseJSFunc(fn *js.Func) bool
- func SafeJSDestroy(v *js.Value, fn func(v *js.Value))
- func SafeJSOperation(v *js.Value, fn func(v *js.Value))
- func SafeJSValue(v *js.Value, fn func(v *js.Value) js.Value) js.Value
- func SessionStorageClear()
- func SessionStorageGet(key string) (string, bool)
- func SessionStorageRemove(key string)
- func SessionStorageSet(key, value string)
- func SetLocation(url string)
- func StringToQuery(s string) (*api.Query, error)
- func Stylesheet() string
- func ToRoute(route PageRoute) bool
- func WebSocketUrl() string
- type CachedQuery
- type Classes
- type FetchError
- type FetchInit
- type FetchResponse
- type Keyable
- type MainSocketError
- type MainSocketMessage
- type MainSocketOpened
- type MainSocketTimeout
- type PageRoute
- type Parameter
- type ParameterBoolData
- type ParameterEnumData
- type ParameterEnumOption
- type ParameterIntData
- type Parameters
- func (params Parameters) AppendAvailable(transport *api.ProtocolTransportInfoEntry) (Parameters, bool)
- func (params Parameters) AvailableNames(transport *api.ProtocolTransportInfoEntry) []string
- func (params Parameters) ChangeValue(index int, value string) bool
- func (params Parameters) FirstAvailable(transport *api.ProtocolTransportInfoEntry) (string, *api.ParamInfoEntry)
- func (params Parameters) RawParams() api.RawParamValues
- func (params Parameters) Remove(index int) (Parameters, bool)
- func (params Parameters) Replace(index int, name string, transport *api.ProtocolTransportInfoEntry) bool
- func (params Parameters) ToRender(transport *api.ProtocolTransportInfoEntry) ([]*RenderParameter, bool)
- type ProtocolsInfoWrapper
- type ProtocolsWrapper
- func (pw *ProtocolsWrapper) ProtocolAndTransport(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocol *api.ProtocolInfoEntry, transport *api.ProtocolTransportInfoEntry)
- func (pw *ProtocolsWrapper) ProtocolAndTransportFullNames(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocolName, transportName string)
- func (pw *ProtocolsWrapper) ProtocolAndTransportNames(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocolName, transportName string)
- type RenderParameter
- type ServiceEntryData
- func (sed *ServiceEntryData) ChangeProtocol(protocols []*api.ProtocolInfoEntry, index int) bool
- func (sed *ServiceEntryData) ChangeTransport(protocols *ProtocolsWrapper, index int) bool
- func (sed *ServiceEntryData) ProtocolAndTransport(protocols *ProtocolsWrapper) (*api.ProtocolInfoEntry, *api.ProtocolTransportInfoEntry)
- func (sed *ServiceEntryData) ValidateEntryAndAlias(services []api.ListServicesEntry, protocols *ProtocolsWrapper) (entryMessage, aliasMessage string)
- type SharedSocket
- type SubscriberFn
- type SubscriberID
- type Timeout
- type WebSocket
Constants ¶
View Source
const ( ProtocolViewRoute = PageRoute(iota) ServicesViewRoute MessagesViewRoute DiscoveryViewRoute ConfigViewRoute LogViewRoute NotFoundRoute )
Variables ¶
View Source
var Console = newJsConsole()
Functions ¶
func ApiErrorName ¶
func AppendStyles ¶
func AppendStyles(s string)
func ArrangeParams ¶
func ArrangeServices ¶
func ArrangeServices(services []api.ListServicesEntry)
func Fetch ¶
func Fetch(url string, init *FetchInit, then func(response *FetchResponse), catch func(err *FetchError))
func FetchQuery ¶
func FetchQueryWithSocket ¶
func FormatMultilineText ¶
func FormatMultilineText(text string) (content []vecty.MarkupOrChild)
func GetLocation ¶
func GetLocation() (path string)
func If ¶
func If(cond bool, children ...vecty.ComponentOrHTML) vecty.List
If returns nil if cond is false, otherwise it returns the given children. fixes return type of vecty.If
func LocalStorageClear ¶
func LocalStorageClear()
func LocalStorageGet ¶
func LocalStorageRemove ¶
func LocalStorageRemove(key string)
func LocalStorageSet ¶
func LocalStorageSet(key, value string)
func ParamDefaultValue ¶
func ParamDefaultValue(pi *api.ParamInfoEntry) string
func QueryToString ¶
func ReleaseJSFunc ¶
func SessionStorageClear ¶
func SessionStorageClear()
func SessionStorageGet ¶
func SessionStorageRemove ¶
func SessionStorageRemove(key string)
func SessionStorageSet ¶
func SessionStorageSet(key, value string)
func SetLocation ¶
func SetLocation(url string)
func Stylesheet ¶
func Stylesheet() string
func WebSocketUrl ¶
func WebSocketUrl() string
Types ¶
type CachedQuery ¶
type Classes ¶
type Classes struct {
Classes []string
}
func (*Classes) ApplyClasses ¶
func (*Classes) WithClasses ¶
type FetchError ¶
func (*FetchError) Error ¶
func (fe *FetchError) Error() string
type FetchResponse ¶
type MainSocketError ¶
type MainSocketError string
type MainSocketMessage ¶
type MainSocketOpened ¶
type MainSocketOpened struct{}
type MainSocketTimeout ¶
type MainSocketTimeout uint
type ParameterBoolData ¶
type ParameterBoolData struct {
BoolValue bool
}
type ParameterEnumData ¶
type ParameterEnumData struct {
Options []ParameterEnumOption
}
type ParameterEnumOption ¶
type ParameterIntData ¶
type Parameters ¶
type Parameters []Parameter
func (Parameters) AppendAvailable ¶
func (params Parameters) AppendAvailable(transport *api.ProtocolTransportInfoEntry) (Parameters, bool)
func (Parameters) AvailableNames ¶
func (params Parameters) AvailableNames(transport *api.ProtocolTransportInfoEntry) []string
func (Parameters) ChangeValue ¶
func (params Parameters) ChangeValue(index int, value string) bool
func (Parameters) FirstAvailable ¶
func (params Parameters) FirstAvailable(transport *api.ProtocolTransportInfoEntry) (string, *api.ParamInfoEntry)
func (Parameters) RawParams ¶
func (params Parameters) RawParams() api.RawParamValues
func (Parameters) Remove ¶
func (params Parameters) Remove(index int) (Parameters, bool)
func (Parameters) Replace ¶
func (params Parameters) Replace(index int, name string, transport *api.ProtocolTransportInfoEntry) bool
func (Parameters) ToRender ¶
func (params Parameters) ToRender(transport *api.ProtocolTransportInfoEntry) ([]*RenderParameter, bool)
type ProtocolsInfoWrapper ¶
type ProtocolsInfoWrapper struct { Info *api.ProtocolInfoEntry // contains filtered or unexported fields }
type ProtocolsWrapper ¶
type ProtocolsWrapper struct { Protocols []*api.ProtocolInfoEntry // contains filtered or unexported fields }
func NewProtocolsWrapper ¶
func NewProtocolsWrapper(protocols *api.ProtocolInfoResult) *ProtocolsWrapper
func (*ProtocolsWrapper) ProtocolAndTransport ¶
func (pw *ProtocolsWrapper) ProtocolAndTransport(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocol *api.ProtocolInfoEntry, transport *api.ProtocolTransportInfoEntry)
func (*ProtocolsWrapper) ProtocolAndTransportFullNames ¶
func (pw *ProtocolsWrapper) ProtocolAndTransportFullNames(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocolName, transportName string)
func (*ProtocolsWrapper) ProtocolAndTransportNames ¶
func (pw *ProtocolsWrapper) ProtocolAndTransportNames(protocolID api.ProtocolIdentifier, transportID api.TransportIdentifier) (protocolName, transportName string)
type RenderParameter ¶
type ServiceEntryData ¶
type ServiceEntryData struct { api.ServiceKey Alias string Params Parameters }
func NewServiceEntryData ¶
func NewServiceEntryData(protocols []*api.ProtocolInfoEntry) *ServiceEntryData
func (*ServiceEntryData) ChangeProtocol ¶
func (sed *ServiceEntryData) ChangeProtocol(protocols []*api.ProtocolInfoEntry, index int) bool
func (*ServiceEntryData) ChangeTransport ¶
func (sed *ServiceEntryData) ChangeTransport(protocols *ProtocolsWrapper, index int) bool
func (*ServiceEntryData) ProtocolAndTransport ¶
func (sed *ServiceEntryData) ProtocolAndTransport(protocols *ProtocolsWrapper) (*api.ProtocolInfoEntry, *api.ProtocolTransportInfoEntry)
func (*ServiceEntryData) ValidateEntryAndAlias ¶
func (sed *ServiceEntryData) ValidateEntryAndAlias(services []api.ListServicesEntry, protocols *ProtocolsWrapper) (entryMessage, aliasMessage string)
type SharedSocket ¶
type SharedSocket struct {
// contains filtered or unexported fields
}
func MainSocket ¶
func MainSocket() *SharedSocket
func (*SharedSocket) SendWithTimeout ¶
type SubscriberFn ¶
type SubscriberFn func(event interface{})
subscriberFn function signature for the subscriber
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func NewWebSocket ¶
Click to show internal directories.
Click to hide internal directories.