mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-22 05:01:26 +00:00
ad0f7a5305
Upgrade to Go 1.20.5, Hydra v2 SDK, rules-go v0.44.2 (with proper resolves), protobuf v25.3 and mass upgrade of Go dependencies.
22 lines
723 B
Go
22 lines
723 B
Go
package restful
|
|
|
|
// Copyright 2021 Ernest Micklei. All rights reserved.
|
|
// Use of this source code is governed by a license
|
|
// that can be found in the LICENSE file.
|
|
|
|
// ExtensionProperties provides storage of vendor extensions for entities
|
|
type ExtensionProperties struct {
|
|
// Extensions vendor extensions used to describe extra functionality
|
|
// (https://swagger.io/docs/specification/2-0/swagger-extensions/)
|
|
Extensions map[string]interface{}
|
|
}
|
|
|
|
// AddExtension adds or updates a key=value pair to the extension map.
|
|
func (ep *ExtensionProperties) AddExtension(key string, value interface{}) {
|
|
if ep.Extensions == nil {
|
|
ep.Extensions = map[string]interface{}{key: value}
|
|
} else {
|
|
ep.Extensions[key] = value
|
|
}
|
|
}
|