parse(_:)
Returns the state of the resource from the output of the shell command.
static func parse(_ output: Data) throws -> Dpkg?
Parameters
- output
The string output of the shell command.
Throws
Any errors parsing the output.
Returns the state of the resource from the output of the shell command.
static func parse(_ output: Data) throws -> Dpkg?
s6Formic4DpkgV5parseyACSg20FoundationEssentials4DataVKFZ
What are these?7UHH8
The string output of the shell command.
Any errors parsing the output.
import Formic
๐ Swift library to support IT Automation tasks. ๐ ๐
struct Dpkg
A debian package resource.
@frozen struct Data
static var collectionInquiry: (any Command) { get }
static func collectionParse(_ output: Data) throws -> [Dpkg]
static func namedInquiry(_ name: String) -> (any Command)
static func query(state: DebianPackageDeclaration, from host: RemoteHost, logger: Logger?) async throws -> (Dpkg?, Date)
Queries and returns the state of the resource identified by a declaration you provide.
static func resolve(state: DebianPackageDeclaration, on host: RemoteHost, logger: Logger?) async throws -> Bool
let architecture: String
The architecture the package supports.
let description: String
The description of the package.
let desiredState: DesiredState
The desired state code of this resource from the Dpkg system.
let errCode: ErrCode
The error code of this resource from the Dpkg system.
var inquiry: (any Command) { get }
let name: String
The name of the package.
let statusCode: StatusCode
The status code of this resource from the Dpkg system.
let version: String
The version of the package.
struct DebianPackageDeclaration
The declaration for a Debian package resource.
enum DesiredState
The desired state code from the Dpkg system.
enum ErrCode
The error code from the Dpkg system.
enum StatusCode
The status code from the Dpkg system.