Ferrite-backup/Ferrite/Models/PluginModels.swift
kingbri 4512318e8f Ferrite: Add actions, plugins, and tags
Plugins are now a unified format for both sources and actions. Actions
dictate what to do with a link and can now be added through a plugin
JSON file.

Backups have also been versioned to improve performance and add action
support.

Tags are used to give small amounts of information before a user
installs a plugin.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-08 12:09:37 -05:00

32 lines
613 B
Swift

//
// PluginModels.swift
// Ferrite
//
// Created by Brian Dashore on 1/11/23.
//
import Foundation
public struct PluginListJson: Codable {
let name: String
let author: String
var sources: [SourceJson]?
var actions: [ActionJson]?
}
// Color: Hex value
public struct PluginTagJson: Codable, Hashable, Sendable {
public let name: String
public let colorHex: String?
enum CodingKeys: String, CodingKey {
case name
case colorHex = "color"
}
}
extension PluginManager {
enum PluginManagerError: Error {
case ListAddition(description: String)
}
}