Skip to content

Commit

Permalink
Make GroupVersionResource and its friends Hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
iabudiab committed Jan 29, 2023
1 parent 7f748ae commit f3096f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.7.2

- Make `GroupVersionResource` and its friends Hashable

## 0.7.1

- Fix UnstructuredResource's `metadata` encoding
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

## Overview

`SwiftkubeModel` is a zero-dependency Swift package for Kuberente API objects.
`SwiftkubeModel` is a zero-dependency Swift package for Kubernetes API objects.

- [x] Model structs for all Kuberentes objects
- [x] Model structs for all Kubernetes objects
- [x] `Codable` support
- [x] Closure-based builders for convenient object composition
- [x] Type-erased wrappers for Kubernetes resources
Expand Down
6 changes: 3 additions & 3 deletions Sources/Model/GroupVersionKind.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
///
/// GroupVersionKind unambiguously identifies a kind.
///
public struct GroupVersionKind: Equatable {
public struct GroupVersionKind: Hashable {
/// The group of the resource.
public let group: String
/// The version of the resource.
Expand Down Expand Up @@ -119,7 +119,7 @@ public struct GroupVersionKind: Equatable {
///
/// GroupKind specifies a Group and a Kind, but does not force a version.
/// This is useful for identifying concepts during lookup stages without having partially valid types.
public struct GroupKind {
public struct GroupKind: Hashable {
/// The group of the resource.
public let group: String
/// The kind of the resource.
Expand All @@ -138,7 +138,7 @@ public struct GroupKind {
///
/// GroupVersion contains the Group and the Version, which uniquely identifies the API.
///
public struct GroupVersion {
public struct GroupVersion: Hashable {
/// The group of the resource.
public let group: String
/// The version of the resource.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Model/GroupVersionResource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
///
/// GroupVersionResource unambiguously identifies a resource.
///
public struct GroupVersionResource: Equatable {
public struct GroupVersionResource: Hashable {
/// The group of the resource.
public let group: String
/// The version of the resource.
Expand Down

0 comments on commit f3096f4

Please sign in to comment.