pufferpanel

package module
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

README

PufferPanel Release Downloads Build

PufferPanel logo

Website | Discord | Documentation | Translations

What is PufferPanel?

PufferPanel is a web-based Game Server Management System. PufferPanel allows you to manage multiple different game servers all from one central location. You can give other users their own servers or allow them to access to your servers.

Installation

Please follow the installation guide for PufferPanel located here.

What's different about PufferPanel?

In addition to being a free and open source project, PufferPanel provides an easy-to-use interface for everyone from individual users to large networks. We strive to create a friendly community, and we would love for you to join us.

Having issues or want to help?

If you need help with PufferPanel, or you'd like to help out, you can contact us on Discord. Check out our Documentation for guides on how to install, update, and manage PufferPanel.

Some Javascript and CSS used within the panel is licensed under a MIT, Apache 2.0, or GPL license. Please check their header files for information.

Some images used within PufferPanel are Copyright (c) their respective owners.

Water Provided By

Development tools provided by JetBrains

Repositories hosted by packagecloud

Documentation

Index

Constants

View Source
const (
	//none scope to allow defining that something doesn't need any specific permission
	ScopeNone = Scope("none")

	//generic
	ScopeOAuth2Auth = Scope("oauth2.auth")

	//server
	ScopeServersAdmin       = Scope("servers.admin")
	ScopeServersView        = Scope("servers.view")
	ScopeServersEdit        = Scope("servers.edit")
	ScopeServersEditAdmin   = Scope("servers.edit.admin")
	ScopeServersEditUsers   = Scope("servers.edit.users")
	ScopeServersCreate      = Scope("servers.create")
	ScopeServersDelete      = Scope("servers.delete")
	ScopeServersInstall     = Scope("servers.install")
	ScopeServersUpdate      = Scope("servers.update")
	ScopeServersConsole     = Scope("servers.console")
	ScopeServersConsoleSend = Scope("servers.console.send")
	ScopeServersStop        = Scope("servers.stop")
	ScopeServersStart       = Scope("servers.start")
	ScopeServersStat        = Scope("servers.stats")
	ScopeServersSFTP        = Scope("servers.sftp")
	ScopeServersFilesGet    = Scope("servers.files.get")
	ScopeServersFilesPut    = Scope("servers.files.put")

	//node
	ScopeNodesView   = Scope("nodes.view")
	ScopeNodesEdit   = Scope("nodes.edit")
	ScopeNodesDeploy = Scope("nodes.deploy")

	//template
	ScopeTemplatesView = Scope("templates.view")
	ScopeTemplatesEdit = Scope("templates.edit")

	//user
	ScopeUsersView = Scope("users.view")
	ScopeUsersEdit = Scope("users.edit")

	ScopeSettings = Scope("panel.settings")
)
View Source
const MaxRecursivePath = 256

Variables

View Source
var (
	Hash    = "unknown"
	Version = "nightly"
	Display string
)
View Source
var Engine *gin.Engine
View Source
var ErrCannotValidateToken = CreateError("could not validate access token", "ErrCannotValidateToken")
View Source
var ErrClientNotFound = CreateError("client not found", "ErrClientNotFound")
View Source
var ErrContainerRunning = CreateError("container already running", "ErrContainerRunning")
View Source
var ErrDatabaseNotAvailable = CreateError("database not available", "ErrDatabaseNotAvailable")
View Source
var ErrDockerNotSupported = CreateError("docker not supported", "ErrDockerNotSupported")
View Source
var ErrEmailNotConfigured = CreateError("email not configured", "ErrEmailNotConfigured")
View Source
var ErrFactoryError = func(operatorName string, err error) *Error {
	return CreateError("factory `${operatorName}` encountered an error: `${err}`", "ErrFactoryError").Metadata(map[string]interface{}{"operatorName": operatorName, "err": err.Error()})
}
View Source
var ErrFieldEqual = func(fieldName1, fieldName2 string) *Error {
	return CreateError("${field1} cannot be equal to ${field2}", "ErrFieldEqual").Metadata(map[string]interface{}{"field1": fieldName1, "field2": fieldName2})
}
View Source
var ErrFieldHasURICharacters = func(fieldName string) *Error {
	return CreateError("${field} must not contain characters which cannot be used in URIs", "ErrFieldHasURICharacters").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldIsInvalidHost = func(fieldName string) *Error {
	return CreateError("${field} must be a valid IP or FQDN", "ErrFieldIsInvalidHost").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldIsInvalidIP = func(fieldName string) *Error {
	return CreateError("${field} must be a valid IP", "ErrFieldIsInvalidIP").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldLength = func(fieldName string, min int, max int) *Error {
	return CreateError("${field} must be between ${min} and ${max} characters", "ErrFieldLength").Metadata(map[string]interface{}{"field": fieldName, "min": min, "max": max})
}
View Source
var ErrFieldMustBePrintable = func(fieldName string) *Error {
	return CreateError("${field} must be printable ascii characters", "ErrFieldMustBePrintable").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldNotBetween = func(fieldName string, min, max int64) *Error {
	return CreateError("${field} must be between ${min} and ${max}", "ErrFieldNotBetween").Metadata(map[string]interface{}{"field": fieldName, "min": min, "max": max})
}
View Source
var ErrFieldNotEmail = func(fieldName string) *Error {
	return CreateError("${field} is not a valid email", "ErrFieldNotEmail").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldNotEqual = func(fieldName1, fieldName2 string) *Error {
	return CreateError("${field1} is not equal to ${field2}", "ErrFieldNotEqual").Metadata(map[string]interface{}{"field1": fieldName1, "field2": fieldName2})
}
View Source
var ErrFieldRequired = func(fieldName string) *Error {
	return CreateError("${field} is required", "ErrFieldRequired").Metadata(map[string]interface{}{"field": fieldName})
}
View Source
var ErrFieldTooLarge = func(fieldName string, value int64) *Error {
	return CreateError("${field} cannot be larger than ${max}", "ErrFieldTooLarge").Metadata(map[string]interface{}{"field": fieldName, "max": value})
}
View Source
var ErrFieldTooSmall = func(fieldName string, value int64) *Error {
	return CreateError("${field} cannot be smaller than ${min}", "ErrFieldTooSmall").Metadata(map[string]interface{}{"field": fieldName, "min": value})
}
View Source
var ErrFileExists = CreateError("file exists where there should be none", "ErrFileExists")
View Source
var ErrFileNotFound = CreateError("file not found", "ErrFileNotFound")
View Source
var ErrIllegalFileAccess = CreateError("invalid file access", "ErrIllegalFileAccess")
View Source
var ErrImageDownloading = CreateError("image downloading", "ErrImageDownloading")
View Source
var ErrInvalidCredentials = CreateError("invalid credentials", "ErrInvalidCredentials")
View Source
var ErrInvalidSession = CreateError("invalid session", "ErrInvalidSession")
View Source
var ErrInvalidTokenState = CreateError("invalid token state", "ErrInvalidTokenState")
View Source
var ErrInvalidUnixTime = CreateError("time provided is not a valid UNIX time", "ErrInvalidUnixTime")
View Source
var ErrKeyNotECDSA = CreateError("key is not ECDSA key", "ErrKeyNotECDSA")
View Source
var ErrKeyNotPEM = CreateError("key is not in PEM format", "ErrKeyNotPEM")
View Source
var ErrLoginNotPermitted = CreateError("login not permitted", "ErrLoginNotPermitted")
View Source
var ErrMissingAccessToken = CreateError("access token not provided", "ErrMissingAccessToken")
View Source
var ErrMissingBinary = func(expected string) *Error {
	return CreateError("missing binary: ${expected}", "ErrMissingBinary").Metadata(map[string]interface{}{"expected": expected})
}
View Source
var ErrMissingFactory = CreateError("missing factory", "ErrMissingFactory")
View Source
var ErrMissingScope = CreateError("missing scope", "ErrMissingScope")
View Source
var ErrNoPermission = CreateError("no permission to perform action", "ErrNoPermission")
View Source
var ErrNoTemplate = func(template string) *Error {
	return CreateError("no template with name ${name}", "ErrNoTemplate").Metadata(map[string]interface{}{"template": template})
}
View Source
var ErrNodeHasServers = CreateError("node has servers associated", "ErrNodeHasServers")
View Source
var ErrNodeInvalid = CreateError("node is invalid", "ErrNodeInvalid")
View Source
var ErrNotBearerToken = CreateError("access token must be a Bearer token", "ErrNotBearerToken")
View Source
var ErrNotImplemented = CreateError("not implemented", "ErrNotImplemented")
View Source
var ErrProcessRunning = CreateError("process already running", "ErrProcessRunning")
View Source
var ErrServerAlreadyExists = CreateError("server already exists", "ErrServerAlreadyExists")
View Source
var ErrServerDisabled = CreateError("server is disabled", "ErrServerDisabled")
View Source
var ErrServerNotFound = CreateError("server not found", "ErrServerNotFound")
View Source
var ErrServerOffline = CreateError("server offline", "ErrServerOffline")
View Source
var ErrServiceInvalidProvider = func(service, provider string) *Error {
	return CreateError("{service} does not support ${provider}", "ErrServiceInvalidProvider").Metadata(map[string]interface{}{"service": service, "provider": provider})
}
View Source
var ErrServiceNotAvailable = CreateError("service not available", "ErrServiceNotAvailable")
View Source
var ErrSessionExpired = CreateError("session expired", "ErrSessionExpired")
View Source
var ErrSettingNotConfigured = func(name string) *Error {
	return CreateError("${setting} is not configured", "ErrSettingNotConfigured").Metadata(map[string]interface{}{"setting": name})
}
View Source
var ErrTaskNotFound = CreateError("task not found", "ErrTaskNotFound")
View Source
var ErrTokenInvalid = CreateError("token is invalid", "ErrTokenInvalid")
View Source
var ErrUnknownError = CreateError("unknown error", "ErrUnknownError")
View Source
var ErrUnsupportedArch = func(actual, expected string) *Error {
	return CreateError("Architecture ${actual} not supported. Supported Architectures: ${expected}", "ErrUnsupportedArch").Metadata(map[string]interface{}{"actual": actual, "expected": expected})
}
View Source
var ErrUnsupportedOS = func(actual, expected string) *Error {
	return CreateError("OS (${actual}) not supported. Supported OS: ${expected}", "ErrUnsupportedOS").Metadata(map[string]interface{}{"actual": actual, "expected": expected})
}
View Source
var ErrUserNotFound = CreateError("user not found", "ErrUserNotFound")

Functions

func Close

func Close(closer io.Closer)

func CloseResponse

func CloseResponse(response *http.Response)

func ContainsScope

func ContainsScope(arr []Scope, value Scope) bool

func ContainsString

func ContainsString(arr []string, value string) bool

func Convert

func Convert(val interface{}, target interface{}) (interface{}, error)

Converts the val parameter to the same type as the target

func CopyFile

func CopyFile(src, dest string) error

func DetermineKernelSupport added in v2.7.0

func DetermineKernelSupport()

func EnsureAccess

func EnsureAccess(source string, prefix string) bool

func ExtractDeb added in v2.6.0

func ExtractDeb(stream io.ReaderAt, directory string) error

func ExtractTar added in v2.6.0

func ExtractTar(stream io.Reader, directory string) error

func ExtractTarGz added in v2.6.0

func ExtractTarGz(gzipStream io.Reader, directory string) error

func ExtractZip added in v2.6.0

func ExtractZip(name, directory string) error

func GenerateRandomString added in v2.4.0

func GenerateRandomString(n int) (string, error)

func GenerateValidationMessage

func GenerateValidationMessage(err error) error

func GetBooleanOrDefault

func GetBooleanOrDefault(data map[string]interface{}, key string, def bool) bool

func GetHostname added in v2.5.0

func GetHostname(requestHost string) string

func GetMapOrNull

func GetMapOrNull(data map[string]interface{}, key string) map[string]interface{}

func GetObjectArrayOrNull

func GetObjectArrayOrNull(data map[string]interface{}, key string) []interface{}

func GetStringArrayOrNull

func GetStringArrayOrNull(data map[string]interface{}, key string) []string

func GetStringOrDefault

func GetStringOrDefault(data map[string]interface{}, key string, def string) string

func Http added in v2.6.0

func Http() *http.Client

func HttpDownloadDeb added in v2.6.0

func HttpDownloadDeb(link, folder string) error

func HttpGet added in v2.6.0

func HttpGet(url string) (*http.Response, error)

func HttpGetTarGz added in v2.6.0

func HttpGetTarGz(url, directory string) error

func HttpGetZip added in v2.6.0

func HttpGetZip(url, directory string) error

func JoinPath

func JoinPath(paths ...string) string

func Recover

func Recover()
func RemoveInvalidSymlinks(files []os.FileInfo, sourceFolder, prefix string) []os.FileInfo

func ReplaceTokens

func ReplaceTokens(msg string, mapping map[string]interface{}) string

func ReplaceTokensInArr

func ReplaceTokensInArr(msg []string, mapping map[string]interface{}) []string

func ReplaceTokensInMap

func ReplaceTokensInMap(msg map[string]string, mapping map[string]interface{}) map[string]string

func SplitArguments

func SplitArguments(source string) (cmd string, arguments []string)

func ToString

func ToString(v interface{}) string

func UnmarshalTo

func UnmarshalTo(source, target interface{}) error

func UseOpenat2 added in v2.7.0

func UseOpenat2() bool

func UserInGroup

func UserInGroup(groups ...string) bool

func Write

func Write(c *Socket, msg messages.Message) error

Types

type BaseEnvironment

type BaseEnvironment struct {
	Environment
	Type              string
	RootDirectory     string             `json:"root"`
	ConsoleBuffer     Cache              `json:"-"`
	WSManager         *Tracker           `json:"-"`
	Wait              *sync.WaitGroup    `json:"-"`
	ExecutionFunction ExecutionFunction  `json:"-"`
	WaitFunction      func() (err error) `json:"-"`
	ServerId          string             `json:"-"`
}

func (*BaseEnvironment) AddListener

func (e *BaseEnvironment) AddListener(ws *Socket)

func (*BaseEnvironment) CreateWrapper

func (e *BaseEnvironment) CreateWrapper() io.Writer

func (*BaseEnvironment) Delete

func (e *BaseEnvironment) Delete() (err error)

func (*BaseEnvironment) DisplayToConsole

func (e *BaseEnvironment) DisplayToConsole(daemon bool, msg string, data ...interface{})

func (*BaseEnvironment) Execute

func (e *BaseEnvironment) Execute(steps ExecutionData) error

func (*BaseEnvironment) ExecuteAsync

func (e *BaseEnvironment) ExecuteAsync(steps ExecutionData) (err error)

func (*BaseEnvironment) GetBase

func (e *BaseEnvironment) GetBase() *BaseEnvironment

func (*BaseEnvironment) GetConsole

func (e *BaseEnvironment) GetConsole() (console []string, epoch int64)

func (*BaseEnvironment) GetConsoleFrom

func (e *BaseEnvironment) GetConsoleFrom(time int64) (console []string, epoch int64)

func (*BaseEnvironment) GetRootDirectory

func (e *BaseEnvironment) GetRootDirectory() string

func (*BaseEnvironment) Log added in v2.6.0

func (e *BaseEnvironment) Log(l *log.Logger, format string, obj ...interface{})

func (*BaseEnvironment) Update

func (e *BaseEnvironment) Update() error

func (*BaseEnvironment) WaitForMainProcess

func (e *BaseEnvironment) WaitForMainProcess() (err error)

type Cache

type Cache interface {
	Read() (cache []string, epoch int64)

	ReadFrom(startTime int64) (cache []string, epoch int64)

	Write(b []byte) (n int, err error)
}

type Claim

type Claim struct {
	jwt.RegisteredClaims
	PanelClaims PanelClaims `json:"pufferpanel,omitempty"`
}

type CreateOperation

type CreateOperation struct {
	OperationArgs        map[string]interface{}
	EnvironmentVariables map[string]string
	DataMap              map[string]interface{}
}

type DaemonRunning added in v2.6.0

type DaemonRunning struct {
	Message string `json:"message"`
}

type Environment

type Environment interface {
	//Executes a command within the environment.
	Execute(steps ExecutionData) error

	//Executes a command within the environment and immediately return
	ExecuteAsync(steps ExecutionData) error

	//Sends a string to the StdIn of the main program process
	ExecuteInMainProcess(cmd string) error

	//Kills the main process, but leaves the environment running.
	Kill() error

	//Creates the environment setting needed to run programs.
	Create() error

	//Deletes the environment.
	Delete() error

	Update() error

	IsRunning() (isRunning bool, err error)

	WaitForMainProcess() error

	WaitForMainProcessFor(timeout time.Duration) error

	GetRootDirectory() string

	GetConsole() (console []string, epoch int64)

	GetConsoleFrom(time int64) (console []string, epoch int64)

	AddListener(ws *Socket)

	GetStats() (*ServerStats, error)

	DisplayToConsole(prefix bool, msg string, data ...interface{})

	SendCode(code int) error

	GetBase() *BaseEnvironment
}

type EnvironmentFactory

type EnvironmentFactory interface {
	Create(id string) Environment

	Key() string
}

type Error

type Error struct {
	Message string                 `json:"msg,omitempty"`
	Code    string                 `json:"code,omitempty"`
	Meta    map[string]interface{} `json:"metadata,omitempty"`
}

func CreateErrMissingScope

func CreateErrMissingScope(scope Scope) *Error

func CreateError

func CreateError(msg, code string) *Error

func FromError

func FromError(err error) *Error

func (*Error) Error

func (ge *Error) Error() string

func (*Error) GetCode

func (ge *Error) GetCode() string

func (*Error) GetMessage

func (ge *Error) GetMessage() string

func (*Error) Is

func (ge *Error) Is(err *Error) bool

func (*Error) Metadata

func (ge *Error) Metadata(metadata map[string]interface{}) *Error

type Execution

type Execution struct {
	Command                 string            `json:"command,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"`
	LegacyRun               string            `json:"program,omitempty"`
	LegacyArguments         []string          `json:"arguments,omitempty"`
	WorkingDirectory        string            `json:"workingDirectory,omitempty"`
}

type ExecutionData

type ExecutionData struct {
	Command          string
	Arguments        []string
	Environment      map[string]string
	WorkingDirectory string
	Callback         func(graceful bool)
}

type ExecutionFunction

type ExecutionFunction func(steps ExecutionData) (err error)

type FileServer added in v2.7.0

type FileServer interface {
	fs.FS
	fs.ReadDirFS
	fs.StatFS

	Prefix() string

	Stat(name string) (fs.FileInfo, error)
	Mkdir(path string, mode os.FileMode) error
	MkdirAll(path string, mode os.FileMode) error
	OpenFile(path string, flags int, mode os.FileMode) (*os.File, error)
	Remove(path string) error
	Rename(source, target string) error
	RemoveAll(path string) error

	Close() error
}

func NewFileServer added in v2.7.0

func NewFileServer(prefix string) (FileServer, error)

type MemoryCache

type MemoryCache struct {
	Cache
	Buffer   []Message
	Capacity int
	Lock     sync.Locker
}

func CreateCache

func CreateCache() *MemoryCache

func (*MemoryCache) Read

func (c *MemoryCache) Read() (msg []string, lastTime int64)

func (*MemoryCache) ReadFrom

func (c *MemoryCache) ReadFrom(startTime int64) (msg []string, lastTime int64)

func (*MemoryCache) Write

func (c *MemoryCache) Write(b []byte) (n int, err error)

type Message

type Message struct {
	// contains filtered or unexported fields
}

type MetadataType

type MetadataType struct {
	Type     string                 `json:"type,omitempty"`
	Metadata map[string]interface{} `json:"-,omitempty"`
}

designed to be overridden

func (*MetadataType) MarshalJSON

func (t *MetadataType) MarshalJSON() ([]byte, error)

func (*MetadataType) ParseMetadata

func (t *MetadataType) ParseMetadata(target interface{}) (err error)

Parses the metadata into the target interface

func (*MetadataType) UnmarshalJSON

func (t *MetadataType) UnmarshalJSON(bs []byte) (err error)

parses a type with this declaration, storing what it needs into metadata and type

type Operation

type Operation interface {
	Run(env Environment) error
}

type OperationFactory

type OperationFactory interface {
	Create(CreateOperation) (Operation, error)

	Key() string
}

type PanelClaims

type PanelClaims struct {
	Scopes map[string][]Scope `json:"scopes,omitempty"`
}

type Requirements added in v2.5.0

type Requirements struct {
	Binaries []string `json:"binaries,omitempty"`
	OS       string   `json:"os,omitempty"`
	Arch     string   `json:"arch,omitempty"`
}

func (Requirements) Test added in v2.5.0

func (r Requirements) Test(server Server) error

type SFTPAuthorization

type SFTPAuthorization interface {
	Validate(username, password string) (perms *ssh.Permissions, err error)
}

type Scope

type Scope string

func (Scope) Matches added in v2.6.0

func (s Scope) Matches(string string) bool

func (Scope) String added in v2.6.0

func (s Scope) String() string

type Scopes added in v2.2.0

type Scopes []Scope

type Server

type Server struct {
	Type
	Variables             map[string]Variable `json:"data,omitempty"`
	Display               string              `json:"display,omitempty"`
	Environment           interface{}         `json:"environment,omitempty"`
	SupportedEnvironments []interface{}       `json:"supportedEnvironments,omitempty"`
	Installation          []interface{}       `json:"install,omitempty"`
	Uninstallation        []interface{}       `json:"uninstall,omitempty"`
	Identifier            string              `json:"id,omitempty"`
	Execution             Execution           `json:"run,omitempty"`
	Tasks                 map[string]Task     `json:"tasks,omitempty"`
	Requirements          Requirements        `json:"requirements,omitempty"`
}

func (*Server) CopyFrom added in v2.3.2

func (s *Server) CopyFrom(replacement *Server)

func (Server) DataToMap added in v2.5.0

func (s Server) DataToMap() map[string]interface{}

type ServerData

type ServerData struct {
	Variables map[string]Variable `json:"data"`
}

type ServerDataAdmin

type ServerDataAdmin struct {
	*Server
}

type ServerIdResponse

type ServerIdResponse struct {
	Id string `json:"id"`
}

type ServerLogs

type ServerLogs struct {
	Epoch int64  `json:"epoch"`
	Logs  string `json:"logs"`
}

type ServerRunning

type ServerRunning struct {
	Running bool `json:"running"`
}

type ServerStats

type ServerStats struct {
	Cpu    float64 `json:"cpu"`
	Memory float64 `json:"memory"`
}

type ServerTasks added in v2.3.2

type ServerTasks struct {
	Tasks map[string]Task `json:"tasks"`
}

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

func Create

func Create(ws *websocket.Conn) *Socket

func (*Socket) Close

func (s *Socket) Close() error

func (*Socket) ReadMessage

func (s *Socket) ReadMessage() (messageType int, p []byte, err error)

func (*Socket) WriteJSON

func (s *Socket) WriteJSON(data interface{}) error

func (*Socket) WriteMessage

func (s *Socket) WriteMessage(data []byte) error

type Task added in v2.3.1

type Task struct {
	Name         string        `json:"name,omitempty" binding:"required"`
	CronSchedule string        `json:"cronSchedule,omitempty"`
	Operations   []interface{} `json:"operations,omitempty" binding:"required"`
}

type Token

type Token struct {
	*jwt.Token
	Claims *Claim
}

func ParseToken

func ParseToken(publicKey *ecdsa.PublicKey, token string) (*Token, error)

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

func CreateTracker

func CreateTracker() *Tracker

func (*Tracker) Register

func (ws *Tracker) Register(conn *Socket)

func (*Tracker) Write

func (ws *Tracker) Write(source []byte) (n int, e error)

func (*Tracker) WriteMessage

func (ws *Tracker) WriteMessage(msg messages.Message) error

type Type

type Type struct {
	Type string `json:"type"`
}

type Variable

type Variable struct {
	Type
	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"`
	Options      []VariableOption `json:"options,omitempty"`
}

type VariableOption

type VariableOption struct {
	Value   interface{} `json:"value"`
	Display string      `json:"display"`
}

Jump to

Keyboard shortcuts

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