Dateien hochladen nach „TestDir“

This commit is contained in:
Devel user for SPP 2019-05-13 10:22:19 +02:00
parent c846517fd3
commit b0823b74ae

30
TestDir/Permission.swift Normal file
View File

@ -0,0 +1,30 @@
//
// Permission.swift
// Gitea Client
//
// Created by Johann Neuhauser on 13.05.19.
// Copyright © 2019 Johann Neuhauser. All rights reserved.
//
import Foundation
struct Permission : Codable {
let admin : Bool?
let pull : Bool?
let push : Bool?
enum CodingKeys: String, CodingKey {
case admin = "admin"
case pull = "pull"
case push = "push"
}
init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
admin = try values.decodeIfPresent(Bool.self, forKey: .admin)
pull = try values.decodeIfPresent(Bool.self, forKey: .pull)
push = try values.decodeIfPresent(Bool.self, forKey: .push)
}
}