Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
Sentrie *semver.Constraints `toml:"sentrie" json:"sentrie"`
}
func (*Engine) MarshalJSON ¶
MarshalJSON implements json.Marshaler for Engine to serialize semver.Constraints as string this is necessary because semver.Constraints does not implement json.Marshaler
func (*Engine) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler for Engine to deserialize semver.Constraints from string
type PackFile ¶
type PackFile struct {
SchemaVersion *SentrieSchema `toml:"schema" json:"schema"`
Pack *PackInformation `toml:"pack" json:"pack"`
Permissions *Permissions `toml:"permissions,omitempty" json:"permissions"`
Engine *Engine `toml:"engine,omitempty" json:"engine"`
Metadata map[string]any `toml:"metadata,omitempty" json:"metadata"`
Location string `toml:"-" json:"-"`
}
func NewPackFile ¶
type PackInformation ¶
type PackInformation struct {
Name string `toml:"name" json:"name"`
Version *semver.Version `toml:"version" json:"version"`
Description string `toml:"description,omitempty" json:"description"`
License string `toml:"license,omitempty" json:"license"`
Repository string `toml:"repository,omitempty" json:"repository"`
Authors map[string]string `toml:"authors,omitempty" json:"authors"`
}
type Permissions ¶
type Permissions struct {
FSRead []string `toml:"fs_read,omitempty" json:"fs_read"`
Net []string `toml:"net,omitempty" json:"net"`
Env []string `toml:"env,omitempty" json:"env"`
}
func (*Permissions) CheckEnvAccess ¶
func (p *Permissions) CheckEnvAccess(name string) bool
type SentrieSchema ¶
type SentrieSchema struct {
Version uint64 `toml:"version" json:"version"`
}
Click to show internal directories.
Click to hide internal directories.