Documentation ¶
Index ¶
- Constants
- func Close(closer io.Closer)
- func ContainsScope(arr []scope.Scope, value scope.Scope) bool
- func ContainsString(arr []string, value string) bool
- func ContainsValue(arr []string, value string) booldeprecated
- func Convert(val interface{}, target interface{}) (interface{}, error)
- func CopyFile(src, dest string) error
- func EnsureAccess(source string, prefix string) bool
- func GetBooleanOrDefault(data map[string]interface{}, key string, def bool) bool
- func GetMapOrNull(data map[string]interface{}, key string) map[string]interface{}
- func GetObjectArrayOrNull(data map[string]interface{}, key string) []interface{}
- func GetStringArrayOrNull(data map[string]interface{}, key string) []string
- func GetStringOrDefault(data map[string]interface{}, key string, def string) string
- func JoinPath(paths ...string) string
- func RemoveInvalidSymlinks(files []os.FileInfo, sourceFolder, prefix string) []os.FileInfo
- func ReplaceTokens(msg string, mapping map[string]interface{}) string
- func ReplaceTokensInArr(msg []string, mapping map[string]interface{}) []string
- func ReplaceTokensInMap(msg map[string]string, mapping map[string]interface{}) map[string]string
- func ToString(v interface{}) string
- func ToStringArray(element interface{}) []string
- type Cache
- type Claim
- type Error
- type Execution
- type MemoryCache
- type Message
- type PanelClaims
- type Server
- type Template
- type Token
- type TypeWithMetadata
- type Variable
- type VariableOption
Constants ¶
View Source
const MaxRecursivePath = 256
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶ added in v3.0.3
func ContainsValue
deprecated
func Convert ¶ added in v3.0.7
func Convert(val interface{}, target interface{}) (interface{}, error)
Converts the val parameter to the same type as the target
func EnsureAccess ¶
func GetBooleanOrDefault ¶
func GetMapOrNull ¶
func GetObjectArrayOrNull ¶
func GetStringArrayOrNull ¶
func GetStringOrDefault ¶
func RemoveInvalidSymlinks ¶
func ReplaceTokens ¶
func ReplaceTokensInArr ¶
func ReplaceTokensInMap ¶
func ToStringArray ¶
func ToStringArray(element interface{}) []string
DEPRECATED: Use conversion library
Types ¶
type Claim ¶ added in v3.0.2
type Claim struct { jwt.StandardClaims PanelClaims PanelClaims `json:"pufferpanel,omitempty"` }
type Error ¶
type Error interface { error GetMessage() string GetCode() string Is(Error) bool Metadata(metadata map[string]interface{}) Error }
func CreateError ¶
type Execution ¶
type Execution struct { Arguments []string `json:"arguments,omitempty"` ProgramName string `json:"program,omitempty"` StopCommand string `json:"stop,omitempty"` Disabled bool `json:"disabled,omitempty"` AutoStart bool `json:"autostart,omitempty"` AutoRestartFromCrash bool `json:"autorecover,omitempty"` AutoRestartFromGraceful bool `json:"autorestart,omitempty"` PreExecution []TypeWithMetadata `json:"pre,omitempty"` PostExecution []TypeWithMetadata `json:"post,omitempty"` StopCode int `json:"stopCode,omitempty"` EnvironmentVariables map[string]string `json:"environmentVars,omitempty"` }
type MemoryCache ¶
func (*MemoryCache) Read ¶
func (c *MemoryCache) Read() (msg []string, lastTime int64)
type PanelClaims ¶ added in v3.0.2
type Server ¶
type Server struct { Variables map[string]Variable `json:"data,omitempty"` Display string `json:"display,omitempty"` Environment TypeWithMetadata `json:"environment,omitempty"` Installation []TypeWithMetadata `json:"install,omitempty"` Uninstallation []TypeWithMetadata `json:"uninstall,omitempty"` Type string `json:"type,omitempty"` Identifier string `json:"id,omitempty"` Execution Execution `json:"run,omitempty"` }
type Template ¶
type Template struct { Server SupportedEnvironments []TypeWithMetadata `json:"supportedEnvironments,omitEmpty"` }
type TypeWithMetadata ¶
type TypeWithMetadata struct { Type string `json:"type,omitempty"` Metadata map[string]interface{} }
designed to be overridden
func (*TypeWithMetadata) ParseMetadata ¶ added in v3.0.7
func (t *TypeWithMetadata) ParseMetadata(target interface{}) (err error)
Parses the metadata into the target interface
func (*TypeWithMetadata) UnmarshalJSON ¶ added in v3.0.7
func (t *TypeWithMetadata) UnmarshalJSON(bs []byte) (err error)
parses a type with this declaration, storing what it needs into metadata and type
type Variable ¶
type Variable struct { Description string `json:"desc,omitempty"` Display string `json:"display,omitempty"` Internal bool `json:"internal,omitempty"` Required bool `json:"required,omitempty"` Value interface{} `json:"value,omitempty"` UserEditable bool `json:"userEdit,omitempty"` Type string `json:"type,omitempty"` Options []VariableOption `json:"options,omitempty"` }
type VariableOption ¶ added in v3.0.7
Source Files ¶
Click to show internal directories.
Click to hide internal directories.