Dateien hochladen nach „TestDir“
This commit is contained in:
parent
c846517fd3
commit
b0823b74ae
30
TestDir/Permission.swift
Normal file
30
TestDir/Permission.swift
Normal 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)
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user