-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to latest dependencies (#874)
bumping knative.dev/pkg 15e6cdf...339c22b: > 339c22b Add AuthenticatableType duck type (# 3056) Signed-off-by: Knative Automation <automation@knative.team>
- Loading branch information
1 parent
23ec42b
commit 5206966
Showing
8 changed files
with
355 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
Copyright 2019 The Knative Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package ptr holds utilities for taking pointer references to values. | ||
package ptr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
Copyright 2019 The Knative Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package ptr | ||
|
||
import "time" | ||
|
||
// Int32 is a helper for turning integers into pointers for use in | ||
// API types that want *int32. | ||
func Int32(i int32) *int32 { | ||
return &i | ||
} | ||
|
||
// Int64 is a helper for turning integers into pointers for use in | ||
// API types that want *int64. | ||
func Int64(i int64) *int64 { | ||
return &i | ||
} | ||
|
||
// Float32 is a helper for turning floats into pointers for use in | ||
// API types that want *float32. | ||
func Float32(f float32) *float32 { | ||
return &f | ||
} | ||
|
||
// Float64 is a helper for turning floats into pointers for use in | ||
// API types that want *float64. | ||
func Float64(f float64) *float64 { | ||
return &f | ||
} | ||
|
||
// Bool is a helper for turning bools into pointers for use in | ||
// API types that want *bool. | ||
func Bool(b bool) *bool { | ||
return &b | ||
} | ||
|
||
// String is a helper for turning strings into pointers for use in | ||
// API types that want *string. | ||
func String(s string) *string { | ||
return &s | ||
} | ||
|
||
// Duration is a helper for turning time.Duration into pointers for use in | ||
// API types that want *time.Duration. | ||
func Duration(t time.Duration) *time.Duration { | ||
return &t | ||
} | ||
|
||
// Time is a helper for turning a const time.Time into a pointer for use in | ||
// API types that want *time.Duration. | ||
func Time(t time.Time) *time.Time { | ||
return &t | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* | ||
Copyright 2021 The Knative Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package ptr | ||
|
||
import "time" | ||
|
||
// Int32Value is a helper for turning pointers to integers into values for use | ||
// in API types that want int32. | ||
func Int32Value(i *int32) int32 { | ||
if i == nil { | ||
return 0 | ||
} | ||
return *i | ||
} | ||
|
||
// Int64Value is a helper for turning pointers to integers into values for use | ||
// in API types that want int64. | ||
func Int64Value(i *int64) int64 { | ||
if i == nil { | ||
return 0 | ||
} | ||
return *i | ||
} | ||
|
||
// Float32Value is a helper for turning pointers to floats into values for use | ||
// in API types that want float32. | ||
func Float32Value(f *float32) float32 { | ||
if f == nil { | ||
return 0 | ||
} | ||
return *f | ||
} | ||
|
||
// Float64Value is a helper for turning pointers to floats into values for use | ||
// in API types that want float64. | ||
func Float64Value(f *float64) float64 { | ||
if f == nil { | ||
return 0 | ||
} | ||
return *f | ||
} | ||
|
||
// BoolValue is a helper for turning pointers to bools into values for use in | ||
// API types that want bool. | ||
func BoolValue(b *bool) bool { | ||
if b == nil { | ||
return false | ||
} | ||
return *b | ||
} | ||
|
||
// StringValue is a helper for turning pointers to strings into values for use | ||
// in API types that want string. | ||
func StringValue(s *string) string { | ||
if s == nil { | ||
return "" | ||
} | ||
return *s | ||
} | ||
|
||
// DurationValue is a helper for turning *time.Duration into values for use in | ||
// API types that want time.Duration. | ||
func DurationValue(t *time.Duration) time.Duration { | ||
if t == nil { | ||
return 0 | ||
} | ||
return *t | ||
} | ||
|
||
// TimeValue is a helper for turning *time.Time into values for use in API | ||
// types that want API types that want time.Time. | ||
func TimeValue(t *time.Time) time.Time { | ||
if t == nil { | ||
return time.Time{} | ||
} | ||
return *t | ||
} |
Oops, something went wrong.