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 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 UnmarshalTo(source, target interface{}) error
- type Cache
- type Claim
- type Error
- type Execution
- type MemoryCache
- type Message
- type MetadataType
- type PanelClaims
- type Server
- type Template
- type Token
- type Type
- type Variable
- type VariableOption
Constants ¶
View Source
const MaxRecursivePath = 256
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
func Convert ¶
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 UnmarshalTo ¶ added in v4.0.3
func UnmarshalTo(source, target interface{}) error
Types ¶
type Claim ¶
type Claim struct { jwt.StandardClaims PanelClaims PanelClaims `json:"pufferpanel,omitempty"` }
type Error ¶
type Error struct { Message string `json:"msg,omitempty"` Code string `json:"code,omitempty"` Meta map[string]interface{} `json:"metadata,omitempty"` // contains filtered or unexported fields }
func CreateError ¶
func (*Error) GetMessage ¶
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 []interface{} `json:"pre,omitempty"` PostExecution []interface{} `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 MetadataType ¶ added in v4.0.3
type MetadataType struct { Type string `json:"type,omitempty"` Metadata map[string]interface{} `json:"-,omitempty"` }
designed to be overridden
func (*MetadataType) MarshalJSON ¶ added in v4.0.3
func (t *MetadataType) MarshalJSON() ([]byte, error)
func (*MetadataType) ParseMetadata ¶ added in v4.0.3
func (t *MetadataType) ParseMetadata(target interface{}) (err error)
Parses the metadata into the target interface
func (*MetadataType) UnmarshalJSON ¶ added in v4.0.3
func (t *MetadataType) UnmarshalJSON(bs []byte) (err error)
parses a type with this declaration, storing what it needs into metadata and type
type PanelClaims ¶
type Server ¶
type Server struct { Variables map[string]Variable `json:"data,omitempty"` Display string `json:"display,omitempty"` Environment interface{} `json:"environment,omitempty"` Installation []interface{} `json:"install,omitempty"` Uninstallation []interface{} `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 []interface{} `json:"supportedEnvironments,omitEmpty"` }
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 ¶
type VariableOption struct { Value interface{} `json:"value"` Display string `json:"display"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.