Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBaseDir = "/var/lib/elchi/waf" ArchiveURL = "https://archive.elchi.io/index.json" DefaultArch = "wasm-amd64" DownloadTimeout = 300 // 5 minutes )
Constants
Variables ¶
This section is empty.
Functions ¶
func NewPermissionManager ¶
func NewPermissionManager() *common.PermissionManager
Types ¶
type ArchiveResponse ¶
type ArchiveResponse struct {
CorozaReleases []common.ArchiveRelease `json:"coroza_releases"`
}
ArchiveResponse represents the full response from archive API
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader() *Downloader
func (*Downloader) DownloadBinary ¶
DownloadBinary downloads a WASM binary for the given version and architecture
func (*Downloader) GetAvailableVersions ¶
func (d *Downloader) GetAvailableVersions(ctx context.Context) (*ArchiveResponse, error)
GetAvailableVersions fetches available WAF versions from archive API
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetDownloadedVersions ¶
GetDownloadedVersions returns list of locally downloaded WAF versions
func (*Manager) ProcessWafVersionCommand ¶
func (m *Manager) ProcessWafVersionCommand(ctx context.Context, request *client.RequestWafVersion) *client.ResponseWafVersion
ProcessWafVersionCommand handles the WAF version command
Click to show internal directories.
Click to hide internal directories.