Repo

public class Repo

Repo is a class that wraps a golang repo object

Should not be used on its own

  • Class constructor using url passed as parameter as repo path

    Throws

    RepoError: If the opening of the repo failed

    Declaration

    Swift

    public init(_ url: URL) throws

    Parameters

    url

    The path of the repo

  • Returns True if the repo is initialized

    Throws

    RepoError: If the checking failed

    Declaration

    Swift

    public static func isInitialized(_ url: URL) -> Bool

    Parameters

    url

    The path of the repo

    Return Value

    True, if the repo is initialized

  • Initializes the repo using the path and the config passed as parameters

    Throws

    RepoError: If the initialization of the repo failed

    Declaration

    Swift

    public static func initialize(_ url: URL, _ config: Config) throws

    Parameters

    url

    The path of the repo

    config

    The config of the repo

  • Gets the config of the repo

    Throws

    RepoError: If the getting of the config failed

    Declaration

    Swift

    public func getConfig() throws -> Config
  • Sets the config of the repo

    Throws

    RepoError: If the setting of the config failed

    Declaration

    Swift

    public func setConfig(_ config: Config) throws

    Parameters

    config

    The config to set