resource

package
v0.0.0-...-e289d49 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Name     string            `json:"name,omitempty" yaml:"name,omitempty"`         // filename pattern of the resource
	Platform string            `json:"platform,omitempty" yaml:"platform,omitempty"` // target platform, if empty the resource is always used but if this is set and does not match the runtime OS, the resource is ignored
	Version  string            `json:"version,omitempty" yaml:"version,omitempty"`   // which server version this resource belongs to
	Archive  bool              `json:"archive,omitempty" yaml:"archive,omitempty"`   // is this resource an archive file or just a single file?
	Includes []string          `json:"includes,omitempty" yaml:"includes,omitempty"` // if archive: paths to directories containing .inc files for the compiler
	Plugins  []string          `json:"plugins,omitempty" yaml:"plugins,omitempty"`   // if archive: paths to plugin binaries, either .so or .dll
	Files    map[string]string `json:"files,omitempty" yaml:"files,omitempty"`       // if archive: path-to-path map of any other files, keys are paths inside the archive and values are extraction paths relative to the sampctl working directory
}

Resource represents a resource associated with a package nolint:lll

func (Resource) Path

func (res Resource) Path(repo string) (path string)

Path returns a file path for a resource based on a hash of the label nolint

func (Resource) Validate

func (res Resource) Validate() (err error)

Validate checks for missing fields

Jump to

Keyboard shortcuts

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