LANCommander/LANCommander.Server.Services/Models/Module.cs
Pat Hartl f87756243e Add support for defining PowerShell modules
Adds a new section "Scripting" in the server UI where PowerShell modules can be defined. These can be used for defining a library of functions that can be used in any script. These modules are automatically synced to the launcher and imported upon script execution.
2026-06-28 23:02:35 -05:00

28 lines
706 B
C#

using System;
using System.Collections.Generic;
namespace LANCommander.Server.Models
{
public enum FunctionVisibility
{
Public,
Private
}
public class ModuleFunction
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; }
public FunctionVisibility Visibility { get; set; } = FunctionVisibility.Public;
public string Content { get; set; }
}
public class Module
{
public string Name { get; set; }
public string Manifest { get; set; }
public List<ModuleFunction> Functions { get; set; } = new();
}
public record VerbGroup(string Name, IReadOnlyList<string> Verbs);
}