Public should not be used in an app since it declares public to additional modules. However, an app is one module. Some structs/ classes need to be left public to conform to CoreData's generation. Signed-off-by: kingbri <bdashore3@proton.me>
39 lines
810 B
Swift
39 lines
810 B
Swift
//
|
|
// PluginModels.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 1/11/23.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct PluginListJson: Codable {
|
|
let name: String
|
|
let author: String
|
|
var sources: [SourceJson]?
|
|
var actions: [ActionJson]?
|
|
}
|
|
|
|
// Color: Hex value
|
|
public struct PluginTagJson: Codable, Hashable, Sendable {
|
|
let name: String
|
|
let colorHex: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case name
|
|
case colorHex = "color"
|
|
}
|
|
}
|
|
|
|
extension PluginManager {
|
|
enum PluginManagerError: Error {
|
|
case ListAddition(description: String)
|
|
case ActionAddition(description: String)
|
|
case PluginFetch(description: String)
|
|
}
|
|
|
|
struct AvailablePlugins {
|
|
let availableSources: [SourceJson]
|
|
let availableActions: [ActionJson]
|
|
}
|
|
}
|