types

package
v1.8.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluginTypes = []Type{
	PageApp,
}

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Time   int64  `json:"time,omitempty"`
	Repo   string `json:"repo,omitempty"`
	Branch string `json:"branch,omitempty"`
	Hash   string `json:"hash,omitempty"`
}

type Class

type Class string
const (
	Core     Class = "core"
	External Class = "external"
)

type Dependencies

type Dependencies struct {
	VelaUXDependency string       `json:"velauxDependency"`
	VelaUXVersion    string       `json:"velauxVersion"`
	Plugins          []Dependency `json:"plugins"`
}

type Dependency

type Dependency struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	Name    string `json:"name"`
	Version string `json:"version"`
}
type Header struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

Header describes an HTTP header that is forwarded with the proxied request for a plugin route

type Includes

type Includes struct {
	Name         string      `json:"name"`
	Label        string      `json:"label"`
	To           string      `json:"to"`
	Type         string      `json:"type"`
	Icon         string      `json:"icon"`
	Workspace    Workspace   `json:"workspace"`
	Permission   *Permission `json:"permission,omitempty"`
	RelatedRoute []string    `json:"relatedRoute"`
	Catalog      string      `json:"catalog,omitempty"`
}

type Info

type Info struct {
	Author      InfoLink      `json:"author"`
	Description string        `json:"description"`
	Links       []InfoLink    `json:"links"`
	Logos       Logos         `json:"logos"`
	Build       BuildInfo     `json:"build"`
	Screenshots []Screenshots `json:"screenshots"`
	Version     string        `json:"version"`
	Updated     string        `json:"updated"`
}
type InfoLink struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type JSONData

type JSONData struct {
	ID           string       `json:"id"`
	Type         Type         `json:"type"`
	Name         string       `json:"name"`
	Info         Info         `json:"info"`
	Dependencies Dependencies `json:"dependencies"`
	Includes     []*Includes  `json:"includes"`
	Category     string       `json:"category"`
	HideFromList bool         `json:"hideFromList,omitempty"`
	Preload      bool         `json:"preload"`
	Backend      bool         `json:"backend"`
	Routes       []*Route     `json:"routes"`
}

JSONData represents the plugin's plugin.json

type JWTTokenAuth

type JWTTokenAuth struct {
	Url    string            `json:"url"`
	Scopes []string          `json:"scopes"`
	Params map[string]string `json:"params"`
}

JWTTokenAuth struct is both for normal Token Auth and JWT Token Auth with an uploaded JWT file.

type Logos

type Logos struct {
	Small string `json:"small"`
	Large string `json:"large"`
}

type Permission

type Permission struct {
	Resources []string `json:"resource"`
	Actions   []string `json:"actions"`
}

type Plugin

type Plugin struct {
	JSONData
	PluginDir     string
	Class         Class
	DefaultNavURL string
	Pinned        bool
	Children      []*Plugin
	// SystemJS fields
	Module  string
	BaseURL string
}

func (*Plugin) IsCorePlugin

func (p *Plugin) IsCorePlugin() bool

func (*Plugin) IsExternalPlugin

func (p *Plugin) IsExternalPlugin() bool

func (*Plugin) IsPageApp

func (p *Plugin) IsPageApp() bool

func (*Plugin) PluginID

func (p *Plugin) PluginID() string

func (*Plugin) StaticRoute

func (p *Plugin) StaticRoute() *StaticRoute

type PluginSource

type PluginSource struct {
	Class Class
	Paths []string
}

type Route

type Route struct {
	Path         string          `json:"path"`
	Method       string          `json:"method"`
	URL          string          `json:"url"`
	URLParams    []URLParam      `json:"urlParams"`
	Headers      []Header        `json:"headers"`
	AuthType     string          `json:"authType"`
	TokenAuth    *JWTTokenAuth   `json:"tokenAuth"`
	JwtTokenAuth *JWTTokenAuth   `json:"jwtTokenAuth"`
	Body         json.RawMessage `json:"body"`
}

Route describes a plugin route that is defined in the plugin.json file for a plugin.

type Screenshots

type Screenshots struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

type StaticRoute

type StaticRoute struct {
	PluginID  string
	Directory string
}

type Type

type Type string
const (
	PageApp Type = "page-app"
)

func (Type) IsValid

func (pt Type) IsValid() bool

type URLParam

type URLParam struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

URLParam describes query string parameters for a url in a plugin route

type Workspace

type Workspace struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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