Merge pull request #2697 from mtrmac/monorepo-tags

Update to tagged container-libs releases
This commit is contained in:
Miloslav Trmač
2025-09-03 18:19:34 +02:00
committed by GitHub
52 changed files with 1509 additions and 738 deletions

9
go.mod
View File

@@ -17,9 +17,9 @@ require (
github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
go.podman.io/common v0.0.0-20250826054041-6e4bed3c9118
go.podman.io/image/v5 v5.36.1-0.20250820085751-a13b38f45723
go.podman.io/storage v1.59.1-0.20250820085751-a13b38f45723
go.podman.io/common v0.65.0
go.podman.io/image/v5 v5.37.0
go.podman.io/storage v1.60.0
golang.org/x/term v0.34.0
gopkg.in/yaml.v3 v3.0.1
)
@@ -68,7 +68,6 @@ require (
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -108,5 +107,5 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
google.golang.org/grpc v1.72.2 // indirect
google.golang.org/protobuf v1.36.6 // indirect
google.golang.org/protobuf v1.36.8 // indirect
)

42
go.sum
View File

@@ -99,8 +99,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
@@ -149,8 +149,8 @@ github.com/moby/sys/capability v0.4.0 h1:4D4mI6KlNtWMCM1Z/K0i7RV1FkX+DBDHKVJpCnd
github.com/moby/sys/capability v0.4.0/go.mod h1:4g9IK291rVkms3LKCDOoYlnV8xKwoDTpIrNEE35Wq0I=
github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg=
github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4=
github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=
github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU=
github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko=
github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs=
github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
@@ -164,10 +164,10 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.25.1 h1:Fwp6crTREKM+oA6Cz4MsO8RhKQzs2/gOIVOUscMAfZY=
github.com/onsi/ginkgo/v2 v2.25.1/go.mod h1:ppTWQ1dh9KM/F1XgpeRqelR+zHVwV81DGRSDnFxK7Sk=
github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY=
github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o=
github.com/onsi/ginkgo/v2 v2.25.2 h1:hepmgwx1D+llZleKQDMEvy8vIlCxMGt7W5ZxDjIEhsw=
github.com/onsi/ginkgo/v2 v2.25.2/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.2-0.20250724175814-2daaaaf0e7c1 h1:4Fo/qGEjjR6Ugeqb0Ldokiy/VYG4669QIlD0+ZN3jQg=
@@ -268,8 +268,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRND
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
@@ -280,16 +280,18 @@ go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5J
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
go.podman.io/common v0.0.0-20250826054041-6e4bed3c9118 h1:irrh47HeVh6YzKd/sDQPxeu4Tr1Cp3HfQt2l9icrDsg=
go.podman.io/common v0.0.0-20250826054041-6e4bed3c9118/go.mod h1:h7a5Zne6vSHzdYC8m4w+AOtuPGTne1852qc6YgLAwMU=
go.podman.io/image/v5 v5.36.1-0.20250820085751-a13b38f45723 h1:FMz5EojZwmYiWQuEs5fu7Iw870k293OPLmBxOsVBzDk=
go.podman.io/image/v5 v5.36.1-0.20250820085751-a13b38f45723/go.mod h1:IHbL4OPh79ir/Au4i3Z/U1Vcumvw3Lu0dgZjwLaydL0=
go.podman.io/storage v1.59.1-0.20250820085751-a13b38f45723 h1:Yvy8mEjlmlocJETNBKr1PV3BuwhNEKiRj8mFUPjsHWA=
go.podman.io/storage v1.59.1-0.20250820085751-a13b38f45723/go.mod h1:NFVh1MHgSeRrphOpLEeJsWV9F5AqT7ZxbYBFRLe0uJM=
go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.podman.io/common v0.65.0 h1:8JNl25U4VpKDkFHSymSPm4te7ZQHJbfAB/l2FqtmYEg=
go.podman.io/common v0.65.0/go.mod h1:+lJu8KHeoDQsD9HDdiFaMaOUiqPLQnK406WuLnqM7Z0=
go.podman.io/image/v5 v5.37.0 h1:yzgQybwuWIIeK63hu+mQqna/wOh96XD5cpVc6j8Dg5M=
go.podman.io/image/v5 v5.37.0/go.mod h1:+s2Sx5dia/jVeT8tI3r2NAPrARMiDdbEq3QPIQogx3I=
go.podman.io/storage v1.60.0 h1:bWNSrR58nxg39VNFDSx3m0AswbvyzPGOo5XsUfomTao=
go.podman.io/storage v1.60.0/go.mod h1:NK+rsWJVuQeCM7ifv7cxD3abegWxwtW/3OkuSUJJoE4=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -393,8 +395,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8=
google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

View File

@@ -320,7 +320,7 @@ func getUserAndPass(opts *LoginOptions, password, userFromAuthFile string) (user
return strings.TrimSpace(username), password, err
}
// Logout implements a “log out” command with the provided opts and args
// Logout implements a “log out” command with the provided opts and args.
func Logout(systemContext *types.SystemContext, opts *LogoutOptions, args []string) error {
if err := CheckAuthFile(opts.AuthFile); err != nil {
return err
@@ -390,7 +390,7 @@ func Logout(systemContext *types.SystemContext, opts *LogoutOptions, args []stri
}
// defaultRegistryWhenUnspecified returns first registry from search list of registry.conf
// used by login/logout when registry argument is not specified
// used by login/logout when registry argument is not specified.
func defaultRegistryWhenUnspecified(systemContext *types.SystemContext) (string, error) {
registriesFromFile, err := sysregistriesv2.UnqualifiedSearchRegistries(systemContext)
if err != nil {

View File

@@ -9,7 +9,7 @@ import (
// LoginOptions represents common flags in login
// In addition, the caller should probably provide a --tls-verify flag (that affects the provided
// *types.SystemContest)
// *types.SystemContest).
type LoginOptions struct {
// CLI flags managed by the FlagSet returned by GetLoginFlags
// Callers that use GetLoginFlags should not need to touch these values at all; callers that use
@@ -30,7 +30,7 @@ type LoginOptions struct {
NoWriteBack bool // set to true to not write the credentials to the authfile/cred helpers
}
// LogoutOptions represents the results for flags in logout
// LogoutOptions represents the results for flags in logout.
type LogoutOptions struct {
// CLI flags managed by the FlagSet returned by GetLogoutFlags
// Callers that use GetLogoutFlags should not need to touch these values at all; callers that use
@@ -44,7 +44,7 @@ type LogoutOptions struct {
AcceptUnspecifiedRegistry bool // set to true if allows logout with unspecified registry
}
// GetLoginFlags defines and returns login flags for containers tools
// GetLoginFlags defines and returns login flags for containers tools.
func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
fs := pflag.FlagSet{}
fs.StringVar(&flags.AuthFile, "authfile", "", "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
@@ -58,7 +58,7 @@ func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
return &fs
}
// GetLoginFlagsCompletions returns the FlagCompletions for the login flags
// GetLoginFlagsCompletions returns the FlagCompletions for the login flags.
func GetLoginFlagsCompletions() completion.FlagCompletions {
flagCompletion := completion.FlagCompletions{}
flagCompletion["authfile"] = completion.AutocompleteDefault
@@ -69,7 +69,7 @@ func GetLoginFlagsCompletions() completion.FlagCompletions {
return flagCompletion
}
// GetLogoutFlags defines and returns logout flags for containers tools
// GetLogoutFlags defines and returns logout flags for containers tools.
func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
fs := pflag.FlagSet{}
fs.StringVar(&flags.AuthFile, "authfile", "", "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
@@ -78,7 +78,7 @@ func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
return &fs
}
// GetLogoutFlagsCompletions returns the FlagCompletions for the logout flags
// GetLogoutFlagsCompletions returns the FlagCompletions for the logout flags.
func GetLogoutFlagsCompletions() completion.FlagCompletions {
flagCompletion := completion.FlagCompletions{}
flagCompletion["authfile"] = completion.AutocompleteDefault

View File

@@ -127,7 +127,7 @@ func ValidateCapabilities(caps []string) error {
//
// Note that:
// "ALL" in capAdd adds returns known capabilities
// "All" in capDrop returns only the capabilities specified in capAdd
// "All" in capDrop returns only the capabilities specified in capAdd.
func MergeCapabilities(base, adds, drops []string) ([]string, error) {
// Normalize the base capabilities
base, err := NormalizeCapabilities(base)

View File

@@ -10,7 +10,7 @@ import (
"go.podman.io/common/pkg/capabilities"
)
// FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags()
// FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags().
type FlagCompletions map[string]func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
// CompleteCommandFlags - Add completion functions for each flagname in FlagCompletions.
@@ -22,7 +22,7 @@ func CompleteCommandFlags(cmd *cobra.Command, flags FlagCompletions) {
/* Autocomplete Functions for cobra ValidArgsFunction */
// AutocompleteNone - Block the default shell completion (no paths)
// AutocompleteNone - Block the default shell completion (no paths).
func AutocompleteNone(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return nil, cobra.ShellCompDirectiveNoFileComp
}
@@ -61,7 +61,7 @@ func AutocompleteCapabilities(_ *cobra.Command, _ []string, toComplete string) (
return completions, cobra.ShellCompDirectiveNoFileComp
}
// autocompleteSubIDName - autocomplete the names in /etc/subuid or /etc/subgid
// autocompleteSubIDName - autocomplete the names in /etc/subuid or /etc/subgid.
func autocompleteSubIDName(filename string) ([]string, cobra.ShellCompDirective) {
file, err := os.Open(filename)
if err != nil {
@@ -92,7 +92,7 @@ func AutocompleteSubuidName(_ *cobra.Command, _ []string, _ string) ([]string, c
return autocompleteSubIDName("/etc/subuid")
}
// AutocompleteArch - Autocomplete platform supported by container engines
// AutocompletePlatform - Autocomplete platform supported by container engines.
func AutocompletePlatform(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
completions := []string{
"linux/386",
@@ -114,7 +114,7 @@ func AutocompletePlatform(_ *cobra.Command, _ []string, _ string) ([]string, cob
return completions, cobra.ShellCompDirectiveNoFileComp
}
// AutocompleteArch - Autocomplete architectures supported by container engines
// AutocompleteArch - Autocomplete architectures supported by container engines.
func AutocompleteArch(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
completions := []string{
"386",
@@ -134,19 +134,19 @@ func AutocompleteArch(_ *cobra.Command, _ []string, _ string) ([]string, cobra.S
return completions, cobra.ShellCompDirectiveNoFileComp
}
// AutocompleteOS - Autocomplete OS supported by container engines
// AutocompleteOS - Autocomplete OS supported by container engines.
func AutocompleteOS(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
completions := []string{"linux", "windows"}
return completions, cobra.ShellCompDirectiveNoFileComp
}
// AutocompleteJSONFormat - Autocomplete format flag option.
// -> "json"
// -> "json".
func AutocompleteJSONFormat(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return []string{"json"}, cobra.ShellCompDirectiveNoFileComp
}
// AutocompleteOneArg - Autocomplete one random arg
// AutocompleteOneArg - Autocomplete one random arg.
func AutocompleteOneArg(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
if len(args) == 1 {
return nil, cobra.ShellCompDirectiveDefault

View File

@@ -17,7 +17,7 @@ func (ob *OptionalBool) Present() bool {
return ob.present
}
// Present returns the bool's value. Should only be used if Present() is true.
// Value returns the bool's value. Should only be used if Present() is true.
func (ob *OptionalBool) Value() bool {
return ob.value
}
@@ -25,7 +25,7 @@ func (ob *OptionalBool) Value() bool {
// optionalBool is a cli.Generic == flag.Value implementation equivalent to
// the one underlying flag.Bool, except that it records whether the flag has been set.
// This is distinct from optionalBool to (pretend to) force callers to use
// optionalBoolFlag
// optionalBoolFlag.
type optionalBoolValue OptionalBool
// OptionalBoolFlag creates new flag for an optional in the specified flag with
@@ -38,7 +38,7 @@ func OptionalBoolFlag(fs *pflag.FlagSet, p *OptionalBool, name, usage string) *p
}
// WARNING: Do not directly use this method to define optionalBool flag.
// Caller should use optionalBoolFlag
// Caller should use optionalBoolFlag.
func internalNewOptionalBoolValue(p *OptionalBool) pflag.Value {
p.present = false
return (*optionalBoolValue)(p)
@@ -84,7 +84,7 @@ func (os *OptionalString) Present() bool {
return os.present
}
// Present returns the string's value. Should only be used if Present() is true.
// Value returns the string's value. Should only be used if Present() is true.
func (os *OptionalString) Value() string {
return os.value
}
@@ -92,7 +92,7 @@ func (os *OptionalString) Value() string {
// optionalString is a cli.Generic == flag.Value implementation equivalent to
// the one underlying flag.String, except that it records whether the flag has been set.
// This is distinct from optionalString to (pretend to) force callers to use
// newoptionalString
// newoptionalString.
type optionalStringValue OptionalString
// NewOptionalStringValue returns a pflag.Value for the string.
@@ -132,7 +132,7 @@ func (oi *OptionalInt) Present() bool {
return oi.present
}
// Present returns the int's value. Should only be used if Present() is true.
// Value returns the int's value. Should only be used if Present() is true.
func (oi *OptionalInt) Value() int {
return oi.value
}
@@ -140,7 +140,7 @@ func (oi *OptionalInt) Value() int {
// optionalInt is a cli.Generic == flag.Value implementation equivalent to
// the one underlying flag.Int, except that it records whether the flag has been set.
// This is distinct from optionalInt to (pretend to) force callers to use
// newoptionalIntValue
// newoptionalIntValue.
type optionalIntValue OptionalInt
// NewOptionalIntValue returns the pflag.Value of the int.

View File

@@ -119,7 +119,7 @@ func (f *Formatter) Funcs(funcMap template.FuncMap) *Formatter {
return f
}
// Init either resets the given tabwriter with new values or wraps w in tabwriter with given values
// Init either resets the given tabwriter with new values or wraps w in tabwriter with given values.
func (f *Formatter) Init(w io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Formatter {
flags |= tabwriter.StripEscape
@@ -151,12 +151,12 @@ func (f *Formatter) Flush() error {
return f.flusher.Flush()
}
// Writer returns the embedded io.Writer from Formatter
// Writer returns the embedded io.Writer from Formatter.
func (f *Formatter) Writer() io.Writer {
return f.writer
}
// New allocates a new, undefined Formatter with the given name and Writer
// New allocates a new, undefined Formatter with the given name and Writer.
func New(output io.Writer, name string) *Formatter {
f := new(Formatter)

View File

@@ -11,16 +11,16 @@ import (
"go.podman.io/storage/pkg/regexp"
)
// Template embeds template.Template to add functionality to methods
// Template embeds template.Template to add functionality to methods.
type Template struct {
*template.Template
isTable bool
}
// FuncMap is aliased from template.FuncMap
// FuncMap is aliased from template.FuncMap.
type FuncMap template.FuncMap
// tableReplacer will remove 'table ' prefix and clean up tabs
// tableReplacer will remove 'table ' prefix and clean up tabs.
var tableReplacer = strings.NewReplacer(
"table ", "",
`\t`, "\t",
@@ -28,7 +28,7 @@ var tableReplacer = strings.NewReplacer(
`\n`, "\n",
)
// escapedReplacer will clean up escaped characters from CLI
// escapedReplacer will clean up escaped characters from CLI.
var escapedReplacer = strings.NewReplacer(
`\t`, "\t",
`\n`, "\n",
@@ -52,7 +52,7 @@ var DefaultFuncs = FuncMap{
"upper": strings.ToUpper,
}
// NormalizeFormat reads given go template format provided by CLI and munges it into what we need
// NormalizeFormat reads given go template format provided by CLI and munges it into what we need.
func NormalizeFormat(format string) string {
var f string
// two replacers used so we only remove the prefix keyword `table`
@@ -68,7 +68,7 @@ func NormalizeFormat(format string) string {
return f
}
// padWithSpace adds spaces*prefix and spaces*suffix to the input when it is non-empty
// padWithSpace adds spaces*prefix and spaces*suffix to the input when it is non-empty.
func padWithSpace(source string, prefix, suffix int) string {
if source == "" {
return source
@@ -76,7 +76,7 @@ func padWithSpace(source string, prefix, suffix int) string {
return strings.Repeat(" ", prefix) + source + strings.Repeat(" ", suffix)
}
// truncateWithLength truncates the source string up to the length provided by the input
// truncateWithLength truncates the source string up to the length provided by the input.
func truncateWithLength(source string, length int) string {
if len(source) < length {
return source
@@ -124,12 +124,12 @@ func Headers(object any, overrides map[string]string) []map[string]string {
return []map[string]string{headers}
}
// NewTemplate creates a new template object
// NewTemplate creates a new template object.
func NewTemplate(name string) *Template {
return &Template{Template: template.New(name).Funcs(template.FuncMap(DefaultFuncs))}
}
// Parse parses text as a template body for t
// Parse parses text as a template body for t.
func (t *Template) Parse(text string) (*Template, error) {
if strings.HasPrefix(text, "table ") {
t.isTable = true
@@ -155,14 +155,14 @@ func (t *Template) Funcs(funcMap FuncMap) *Template {
return &Template{Template: t.Template.Funcs(template.FuncMap(m)), isTable: t.isTable}
}
// IsTable returns true if format string defines a "table"
// IsTable returns true if format string defines a "table".
func (t *Template) IsTable() bool {
return t.isTable
}
var rangeRegex = regexp.Delayed(`(?s){{\s*range\s*\.\s*}}.*{{\s*end\s*-?\s*}}`)
// EnforceRange ensures that the format string contains a range
// EnforceRange ensures that the format string contains a range.
func EnforceRange(format string) string {
if !rangeRegex.MatchString(format) {
return "{{range .}}" + format + "{{end -}}"
@@ -170,7 +170,7 @@ func EnforceRange(format string) string {
return format
}
// HasTable returns whether the format is a table
// HasTable returns whether the format is a table.
func HasTable(format string) bool {
return strings.HasPrefix(format, "table ")
}

View File

@@ -8,7 +8,7 @@ import (
// {{json .}} is valid and thus not matched to let the template handle it like docker does.
var jsonRegex = regexp.Delayed(`^\s*(json|{{\s*json\.?\s*}})\s*$`)
// JSONFormat test CLI --format string to be a JSON request
// IsJSON check if CLI --format string is a JSON request
//
// if report.IsJSON(cmd.Flag("format").Value.String()) {
// ... process JSON and output

View File

@@ -5,23 +5,23 @@ import (
"text/tabwriter"
)
// Writer aliases tabwriter.Writer to provide Podman defaults
// Writer aliases tabwriter.Writer to provide Podman defaults.
type Writer struct {
*tabwriter.Writer
}
// NewWriter initializes a new report.Writer with given values
// NewWriter initializes a new report.Writer with given values.
func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) (*Writer, error) {
t := tabwriter.NewWriter(output, minwidth, tabwidth, padding, padchar, flags)
return &Writer{t}, nil
}
// NewWriterDefault initializes a new report.Writer with Podman defaults
// NewWriterDefault initializes a new report.Writer with Podman defaults.
func NewWriterDefault(output io.Writer) (*Writer, error) {
return NewWriter(output, 12, 2, 2, ' ', 0)
}
// Flush any output left in buffers
// Flush any output left in buffers.
func (w *Writer) Flush() error {
return w.Writer.Flush()
}

View File

@@ -22,7 +22,7 @@ import (
// systemRegistriesDirPath is the path to registries.d, used for locating lookaside Docker signature storage.
// You can override this at build time with
// -ldflags '-X github.com/containers/image/v5/docker.systemRegistriesDirPath=$your_path'
// -ldflags '-X go.podman.io/image/v5/docker.systemRegistriesDirPath=$your_path'
var systemRegistriesDirPath = builtinRegistriesDirPath
// builtinRegistriesDirPath is the path to registries.d.

View File

@@ -202,7 +202,7 @@ func (m *manifestSchema1) convertToManifestSchema2(_ context.Context, options *t
d = layerDiffIDs[v2Index]
}
layers = append(layers, manifest.Schema2Descriptor{
MediaType: "application/vnd.docker.image.rootfs.diff.tar.gzip",
MediaType: manifest.DockerV2Schema2LayerMediaType,
Size: size,
Digest: m.m.FSLayers[v1Index].BlobSum,
})
@@ -217,7 +217,7 @@ func (m *manifestSchema1) convertToManifestSchema2(_ context.Context, options *t
return nil, err
}
configDescriptor := manifest.Schema2Descriptor{
MediaType: "application/vnd.docker.container.image.v1+json",
MediaType: manifest.DockerV2Schema2ConfigMediaType,
Size: int64(len(configJSON)),
Digest: digest.FromBytes(configJSON),
}

View File

@@ -9,7 +9,7 @@ import (
// unixTempDirForBigFiles is the directory path to store big files on non Windows systems.
// You can override this at build time with
// -ldflags '-X github.com/containers/image/v5/internal/tmpdir.unixTempDirForBigFiles=$your_path'
// -ldflags '-X go.podman.io/image/v5/internal/tmpdir.unixTempDirForBigFiles=$your_path'
var unixTempDirForBigFiles = builtinUnixTempDirForBigFiles
// builtinUnixTempDirForBigFiles is the directory path to store big files.

View File

@@ -25,13 +25,13 @@ import (
// systemRegistriesConfPath is the path to the system-wide registry
// configuration file and is used to add/subtract potential registries for
// obtaining images. You can override this at build time with
// -ldflags '-X github.com/containers/image/v5/sysregistries.systemRegistriesConfPath=$your_path'
// -ldflags '-X go.podman.io/image/v5/sysregistries.systemRegistriesConfPath=$your_path'
var systemRegistriesConfPath = builtinRegistriesConfPath
// systemRegistriesConfDirPath is the path to the system-wide registry
// configuration directory and is used to add/subtract potential registries for
// obtaining images. You can override this at build time with
// -ldflags '-X github.com/containers/image/v5/sysregistries.systemRegistriesConfDirectoryPath=$your_path'
// -ldflags '-X go.podman.io/image/v5/sysregistries.systemRegistriesConfDirectoryPath=$your_path'
var systemRegistriesConfDirPath = builtinRegistriesConfDirPath
// AuthenticationFileHelper is a special key for credential helpers indicating

View File

@@ -5,7 +5,6 @@ package signature
import (
"errors"
"fmt"
"slices"
"strings"
"github.com/opencontainers/go-digest"
@@ -64,15 +63,8 @@ func VerifyImageManifestSignatureUsingKeyIdentityList(unverifiedSignature, unver
if err != nil {
return nil, "", err
}
var matchedKeyIdentity string
sig, err := verifyAndExtractSignature(mech, unverifiedSignature, signatureAcceptanceRules{
validateKeyIdentity: func(keyIdentity string) error {
if !slices.Contains(expectedKeyIdentities, keyIdentity) {
return internal.NewInvalidSignatureError(fmt.Sprintf("Signature by %s does not match expected fingerprints %v", keyIdentity, expectedKeyIdentities))
}
matchedKeyIdentity = keyIdentity
return nil
},
sig, matchedKeyIdentity, err := verifyAndExtractSignature(mech, unverifiedSignature, signatureAcceptanceRules{
acceptedKeyIdentities: expectedKeyIdentities,
validateSignedDockerReference: func(signedDockerReference string) error {
signedRef, err := reference.ParseNormalizedNamed(signedDockerReference)
if err != nil {

View File

@@ -0,0 +1,200 @@
/*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gosequoia.h"
#if defined(GO_SEQUOIA_ENABLE_DLOPEN) && GO_SEQUOIA_ENABLE_DLOPEN
#include <assert.h>
#include <dlfcn.h>
#include <errno.h>
#include <stdlib.h>
/* If SEQUOIA_SONAME is defined, dlopen handle can be automatically
* set; otherwise, the caller needs to call
* go_sequoia_ensure_library with soname determined at run time.
*/
#ifdef SEQUOIA_SONAME
static void
ensure_library (void)
{
if (go_sequoia_ensure_library (SEQUOIA_SONAME, RTLD_LAZY | RTLD_LOCAL) < 0)
abort ();
}
#if defined(GO_SEQUOIA_ENABLE_PTHREAD) && GO_SEQUOIA_ENABLE_PTHREAD
#include <pthread.h>
static pthread_once_t dlopen_once = PTHREAD_ONCE_INIT;
#define ENSURE_LIBRARY pthread_once(&dlopen_once, ensure_library)
#else /* GO_SEQUOIA_ENABLE_PTHREAD */
#define ENSURE_LIBRARY do { \
if (!go_sequoia_dlhandle) \
ensure_library(); \
} while (0)
#endif /* !GO_SEQUOIA_ENABLE_PTHREAD */
#else /* SEQUOIA_SONAME */
#define ENSURE_LIBRARY do {} while (0)
#endif /* !SEQUOIA_SONAME */
static void *go_sequoia_dlhandle;
/* Define redirection symbols */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-macros"
#if (2 <= __GNUC__ || (4 <= __clang_major__))
#define FUNC(ret, name, args, cargs) \
static __typeof__(name)(*go_sequoia_sym_##name);
#else
#define FUNC(ret, name, args, cargs) \
static ret(*go_sequoia_sym_##name)args;
#endif
#define VOID_FUNC FUNC
#include "gosequoiafuncs.h"
#undef VOID_FUNC
#undef FUNC
#pragma GCC diagnostic pop
/* Define redirection wrapper functions */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-macros"
#define FUNC(ret, name, args, cargs) \
ret go_##name args \
{ \
ENSURE_LIBRARY; \
assert (go_sequoia_sym_##name); \
return go_sequoia_sym_##name cargs; \
}
#define VOID_FUNC(ret, name, args, cargs) \
ret go_##name args \
{ \
ENSURE_LIBRARY; \
assert (go_sequoia_sym_##name); \
go_sequoia_sym_##name cargs; \
}
#include "gosequoiafuncs.h"
#undef VOID_FUNC
#undef FUNC
#pragma GCC diagnostic pop
static int
ensure_symbol (const char *name, void **symp)
{
if (!*symp)
{
void *sym = dlsym (go_sequoia_dlhandle, name);
if (!sym)
return -EINVAL;
*symp = sym;
}
return 0;
}
int
go_sequoia_ensure_library (const char *soname, int flags)
{
int err;
if (!go_sequoia_dlhandle)
{
go_sequoia_dlhandle = dlopen (soname, flags);
if (!go_sequoia_dlhandle)
return -EINVAL;
}
#define ENSURE_SYMBOL(name) \
ensure_symbol(#name, (void **)&go_sequoia_sym_##name)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-macros"
#define FUNC(ret, name, args, cargs) \
err = ENSURE_SYMBOL(name); \
if (err < 0) \
{ \
dlclose (go_sequoia_dlhandle); \
go_sequoia_dlhandle = NULL; \
return err; \
}
#define VOID_FUNC FUNC
#include "gosequoiafuncs.h"
#undef VOID_FUNC
#undef FUNC
#pragma GCC diagnostic pop
#undef ENSURE_SYMBOL
return 0;
}
void
go_sequoia_unload_library (void)
{
if (go_sequoia_dlhandle)
{
dlclose (go_sequoia_dlhandle);
go_sequoia_dlhandle = NULL;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-macros"
#define FUNC(ret, name, args, cargs) \
go_sequoia_sym_##name = NULL;
#define VOID_FUNC FUNC
#include "gosequoiafuncs.h"
#undef VOID_FUNC
#undef FUNC
#pragma GCC diagnostic pop
}
unsigned
go_sequoia_is_usable (void)
{
return go_sequoia_dlhandle != NULL;
}
#else /* GO_SEQUOIA_ENABLE_DLOPEN */
int
go_sequoia_ensure_library (const char *soname, int flags)
{
(void) soname;
(void) flags;
return 0;
}
void
go_sequoia_unload_library (void)
{
}
unsigned
go_sequoia_is_usable (void)
{
/* The library is linked at build time, thus always usable */
return 1;
}
#endif /* !GO_SEQUOIA_ENABLE_DLOPEN */

View File

@@ -0,0 +1,54 @@
/*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*/
#ifndef GO_SEQUOIA_H_
#define GO_SEQUOIA_H_
#include <sequoia.h>
#if defined(GO_SEQUOIA_ENABLE_DLOPEN) && GO_SEQUOIA_ENABLE_DLOPEN
#define FUNC(ret, name, args, cargs) \
ret go_##name args;
#define VOID_FUNC FUNC
#include "gosequoiafuncs.h"
#undef VOID_FUNC
#undef FUNC
#define GO_SEQUOIA_FUNC(name) go_##name
#else
#define GO_SEQUOIA_FUNC(name) name
#endif /* GO_SEQUOIA_ENABLE_DLOPEN */
/* Ensure SONAME to be loaded with dlopen FLAGS, and all the necessary
* symbols are resolved.
*
* Returns 0 on success; negative error code otherwise.
*
* Note that this function is NOT thread-safe; when calling it from
* multi-threaded programs, protect it with a locking mechanism.
*/
int go_sequoia_ensure_library (const char *soname, int flags);
/* Unload library and reset symbols.
*
* Note that this function is NOT thread-safe; when calling it from
* multi-threaded programs, protect it with a locking mechanism.
*/
void go_sequoia_unload_library (void);
/* Return 1 if the library is loaded and usable.
*
* Note that this function is NOT thread-safe; when calling it from
* multi-threaded programs, protect it with a locking mechanism.
*/
unsigned go_sequoia_is_usable (void);
#endif /* GO_SEQUOIA_H_ */

View File

@@ -0,0 +1,21 @@
/*
* This file was automatically generated from sequoia.h,
* which is covered by the following license:
* SPDX-License-Identifier: Apache-2.0
*/
VOID_FUNC(void, sequoia_error_free, (struct SequoiaError *err_ptr), (err_ptr))
FUNC(struct SequoiaMechanism *, sequoia_mechanism_new_from_directory, (const char *dir_ptr, struct SequoiaError **err_ptr), (dir_ptr, err_ptr))
FUNC(struct SequoiaMechanism *, sequoia_mechanism_new_ephemeral, (struct SequoiaError **err_ptr), (err_ptr))
VOID_FUNC(void, sequoia_mechanism_free, (struct SequoiaMechanism *mechanism_ptr), (mechanism_ptr))
VOID_FUNC(void, sequoia_signature_free, (struct SequoiaSignature *signature_ptr), (signature_ptr))
FUNC(const uint8_t *, sequoia_signature_get_data, (const struct SequoiaSignature *signature_ptr, size_t *data_len), (signature_ptr, data_len))
VOID_FUNC(void, sequoia_verification_result_free, (struct SequoiaVerificationResult *result_ptr), (result_ptr))
FUNC(const uint8_t *, sequoia_verification_result_get_content, (const struct SequoiaVerificationResult *result_ptr, size_t *data_len), (result_ptr, data_len))
FUNC(const char *, sequoia_verification_result_get_signer, (const struct SequoiaVerificationResult *result_ptr), (result_ptr))
FUNC(struct SequoiaSignature *, sequoia_sign, (struct SequoiaMechanism *mechanism_ptr, const char *key_handle_ptr, const char *password_ptr, const uint8_t *data_ptr, size_t data_len, struct SequoiaError **err_ptr), (mechanism_ptr, key_handle_ptr, password_ptr, data_ptr, data_len, err_ptr))
FUNC(struct SequoiaVerificationResult *, sequoia_verify, (struct SequoiaMechanism *mechanism_ptr, const uint8_t *signature_ptr, size_t signature_len, struct SequoiaError **err_ptr), (mechanism_ptr, signature_ptr, signature_len, err_ptr))
VOID_FUNC(void, sequoia_import_result_free, (struct SequoiaImportResult *result_ptr), (result_ptr))
FUNC(size_t, sequoia_import_result_get_count, (const struct SequoiaImportResult *result_ptr), (result_ptr))
FUNC(const char *, sequoia_import_result_get_content, (const struct SequoiaImportResult *result_ptr, size_t index, struct SequoiaError **err_ptr), (result_ptr, index, err_ptr))
FUNC(struct SequoiaImportResult *, sequoia_import_keys, (struct SequoiaMechanism *mechanism_ptr, const uint8_t *blob_ptr, size_t blob_len, struct SequoiaError **err_ptr), (mechanism_ptr, blob_ptr, blob_len, err_ptr))
FUNC(int, sequoia_set_logger_consumer, (void (*consumer)(enum SequoiaLogLevel, const char *), struct SequoiaError **err_ptr), (consumer, err_ptr))

View File

@@ -0,0 +1,223 @@
//go:build containers_image_sequoia
package sequoia
// #cgo CFLAGS: -I. -DGO_SEQUOIA_ENABLE_DLOPEN=1
// #include "gosequoia.h"
// #include <dlfcn.h>
// #include <limits.h>
// typedef void (*sequoia_logger_consumer_t) (enum SequoiaLogLevel level, char *message);
// extern void sequoia_logrus_logger (enum SequoiaLogLevel level, char *message);
import "C"
import (
"errors"
"fmt"
"path/filepath"
"runtime"
"sync"
"unsafe"
"github.com/sirupsen/logrus"
)
// sequoiaLibraryDir is the path to the directory where libpodman_sequoia is installed,
// if it is not in the platforms default library path.
// You can override this at build time with
// -ldflags '-X go.podman.io/image/v5/signature/sequoia.sequoiaLibraryDir=$your_path'
var sequoiaLibraryDir = ""
type SigningMechanism struct {
mechanism *C.SequoiaMechanism
}
// NewMechanismFromDirectory initializes a mechanism using (user-managed) Sequoia state
// in dir, which can be "" to indicate the default (using $SEQUOIA_HOME or the default home directory location).
func NewMechanismFromDirectory(
dir string,
) (*SigningMechanism, error) {
var cerr *C.SequoiaError
var cDir *C.char
if dir != "" {
cDir = C.CString(dir)
defer C.free(unsafe.Pointer(cDir))
}
cMechanism := C.go_sequoia_mechanism_new_from_directory(cDir, &cerr)
if cMechanism == nil {
defer C.go_sequoia_error_free(cerr)
return nil, errors.New(C.GoString(cerr.message))
}
return &SigningMechanism{
mechanism: cMechanism,
}, nil
}
func NewEphemeralMechanism() (*SigningMechanism, error) {
var cerr *C.SequoiaError
cMechanism := C.go_sequoia_mechanism_new_ephemeral(&cerr)
if cMechanism == nil {
defer C.go_sequoia_error_free(cerr)
return nil, errors.New(C.GoString(cerr.message))
}
return &SigningMechanism{
mechanism: cMechanism,
}, nil
}
func (m *SigningMechanism) SignWithPassphrase(
input []byte,
keyIdentity string,
passphrase string,
) ([]byte, error) {
var cerr *C.SequoiaError
var cPassphrase *C.char
if passphrase == "" {
cPassphrase = nil
} else {
cPassphrase = C.CString(passphrase)
defer C.free(unsafe.Pointer(cPassphrase))
}
cKeyIdentity := C.CString(keyIdentity)
defer C.free(unsafe.Pointer(cKeyIdentity))
sig := C.go_sequoia_sign(
m.mechanism,
cKeyIdentity,
cPassphrase,
(*C.uchar)(unsafe.Pointer(unsafe.SliceData(input))),
C.size_t(len(input)),
&cerr,
)
if sig == nil {
defer C.go_sequoia_error_free(cerr)
return nil, errors.New(C.GoString(cerr.message))
}
defer C.go_sequoia_signature_free(sig)
var size C.size_t
cData := C.go_sequoia_signature_get_data(sig, &size)
if size > C.size_t(C.INT_MAX) {
return nil, errors.New("overflow") // Coverage: This should not reasonably happen, and we dont want to generate gigabytes of input to test this.
}
return C.GoBytes(unsafe.Pointer(cData), C.int(size)), nil
}
func (m *SigningMechanism) Sign(
input []byte,
keyIdentity string,
) ([]byte, error) {
return m.SignWithPassphrase(input, keyIdentity, "")
}
func (m *SigningMechanism) Verify(
unverifiedSignature []byte,
) (contents []byte, keyIdentity string, err error) {
var cerr *C.SequoiaError
result := C.go_sequoia_verify(
m.mechanism,
(*C.uchar)(unsafe.Pointer(unsafe.SliceData(unverifiedSignature))),
C.size_t(len(unverifiedSignature)),
&cerr,
)
if result == nil {
defer C.go_sequoia_error_free(cerr)
return nil, "", errors.New(C.GoString(cerr.message))
}
defer C.go_sequoia_verification_result_free(result)
var size C.size_t
cContent := C.go_sequoia_verification_result_get_content(result, &size)
if size > C.size_t(C.INT_MAX) {
return nil, "", errors.New("overflow") // Coverage: This should not reasonably happen, and we dont want to generate gigabytes of input to test this.
}
contents = C.GoBytes(unsafe.Pointer(cContent), C.int(size))
cSigner := C.go_sequoia_verification_result_get_signer(result)
keyIdentity = C.GoString(cSigner)
return contents, keyIdentity, nil
}
func (m *SigningMechanism) ImportKeys(blob []byte) ([]string, error) {
var cerr *C.SequoiaError
result := C.go_sequoia_import_keys(
m.mechanism,
(*C.uchar)(unsafe.Pointer(unsafe.SliceData(blob))),
C.size_t(len(blob)),
&cerr,
)
if result == nil {
defer C.go_sequoia_error_free(cerr)
return nil, errors.New(C.GoString(cerr.message))
}
defer C.go_sequoia_import_result_free(result)
keyIdentities := []string{}
count := C.go_sequoia_import_result_get_count(result)
for i := C.size_t(0); i < count; i++ {
var cerr *C.SequoiaError
cKeyIdentity := C.go_sequoia_import_result_get_content(result, i, &cerr)
if cerr != nil {
defer C.go_sequoia_error_free(cerr) // Coverage: this can fail only if i is out of range.
return nil, errors.New(C.GoString(cerr.message))
}
keyIdentities = append(keyIdentities, C.GoString(cKeyIdentity))
}
return keyIdentities, nil
}
func (m *SigningMechanism) Close() error {
C.go_sequoia_mechanism_free(m.mechanism)
return nil
}
//export sequoia_logrus_logger
func sequoia_logrus_logger(level C.enum_SequoiaLogLevel, message *C.char) {
var logrusLevel logrus.Level
switch level { // Coverage: We are not in control of whether / how the Rust code chooses to log things.
case C.SEQUOIA_LOG_LEVEL_ERROR:
logrusLevel = logrus.ErrorLevel
case C.SEQUOIA_LOG_LEVEL_WARN:
logrusLevel = logrus.WarnLevel
case C.SEQUOIA_LOG_LEVEL_INFO:
logrusLevel = logrus.InfoLevel
case C.SEQUOIA_LOG_LEVEL_DEBUG:
logrusLevel = logrus.DebugLevel
case C.SEQUOIA_LOG_LEVEL_TRACE:
logrusLevel = logrus.TraceLevel
case C.SEQUOIA_LOG_LEVEL_UNKNOWN:
fallthrough
default:
logrusLevel = logrus.ErrorLevel // Should never happen
}
logrus.StandardLogger().Log(logrusLevel, C.GoString(message))
}
// initOnce should only be called by Init.
func initOnce() error {
var soName string
switch runtime.GOOS {
case "linux":
soName = "libpodman_sequoia.so.0"
case "darwin":
soName = "libpodman_sequoia.dylib"
default:
return fmt.Errorf("Unhandled OS %q in sequoia initialization", runtime.GOOS) // Coverage: This is ~by definition not reached in tests.
}
if sequoiaLibraryDir != "" {
soName = filepath.Join(sequoiaLibraryDir, soName)
}
cSOName := C.CString(soName)
defer C.free(unsafe.Pointer(cSOName))
if C.go_sequoia_ensure_library(cSOName,
C.RTLD_NOW|C.RTLD_GLOBAL) < 0 {
return fmt.Errorf("unable to load %q", soName) // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.
}
var cerr *C.SequoiaError
if C.go_sequoia_set_logger_consumer(C.sequoia_logger_consumer_t(C.sequoia_logrus_logger), &cerr) != 0 {
defer C.go_sequoia_error_free(cerr) // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.
return fmt.Errorf("initializing logging: %s", C.GoString(cerr.message))
}
return nil
}
// Init ensures the libpodman_sequoia library is available.
// It is safe to call from arbitrary goroutines.
var Init = sync.OnceValue(initOnce)

View File

@@ -0,0 +1,85 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef enum SequoiaErrorKind {
SEQUOIA_ERROR_KIND_UNKNOWN,
SEQUOIA_ERROR_KIND_INVALID_ARGUMENT,
SEQUOIA_ERROR_KIND_IO_ERROR,
} SequoiaErrorKind;
typedef enum SequoiaLogLevel {
SEQUOIA_LOG_LEVEL_UNKNOWN,
SEQUOIA_LOG_LEVEL_ERROR,
SEQUOIA_LOG_LEVEL_WARN,
SEQUOIA_LOG_LEVEL_INFO,
SEQUOIA_LOG_LEVEL_DEBUG,
SEQUOIA_LOG_LEVEL_TRACE,
} SequoiaLogLevel;
typedef struct SequoiaImportResult SequoiaImportResult;
typedef struct SequoiaMechanism SequoiaMechanism;
typedef struct SequoiaSignature SequoiaSignature;
typedef struct SequoiaVerificationResult SequoiaVerificationResult;
typedef struct SequoiaError {
enum SequoiaErrorKind kind;
char *message;
} SequoiaError;
void sequoia_error_free(struct SequoiaError *err_ptr);
struct SequoiaMechanism *sequoia_mechanism_new_from_directory(const char *dir_ptr,
struct SequoiaError **err_ptr);
struct SequoiaMechanism *sequoia_mechanism_new_ephemeral(struct SequoiaError **err_ptr);
void sequoia_mechanism_free(struct SequoiaMechanism *mechanism_ptr);
void sequoia_signature_free(struct SequoiaSignature *signature_ptr);
const uint8_t *sequoia_signature_get_data(const struct SequoiaSignature *signature_ptr,
size_t *data_len);
void sequoia_verification_result_free(struct SequoiaVerificationResult *result_ptr);
const uint8_t *sequoia_verification_result_get_content(const struct SequoiaVerificationResult *result_ptr,
size_t *data_len);
const char *sequoia_verification_result_get_signer(const struct SequoiaVerificationResult *result_ptr);
struct SequoiaSignature *sequoia_sign(struct SequoiaMechanism *mechanism_ptr,
const char *key_handle_ptr,
const char *password_ptr,
const uint8_t *data_ptr,
size_t data_len,
struct SequoiaError **err_ptr);
struct SequoiaVerificationResult *sequoia_verify(struct SequoiaMechanism *mechanism_ptr,
const uint8_t *signature_ptr,
size_t signature_len,
struct SequoiaError **err_ptr);
void sequoia_import_result_free(struct SequoiaImportResult *result_ptr);
size_t sequoia_import_result_get_count(const struct SequoiaImportResult *result_ptr);
const char *sequoia_import_result_get_content(const struct SequoiaImportResult *result_ptr,
size_t index,
struct SequoiaError **err_ptr);
struct SequoiaImportResult *sequoia_import_keys(struct SequoiaMechanism *mechanism_ptr,
const uint8_t *blob_ptr,
size_t blob_len,
struct SequoiaError **err_ptr);
int sequoia_set_logger_consumer(void (*consumer)(enum SequoiaLogLevel level, const char *message),
struct SequoiaError **err_ptr);

View File

@@ -27,7 +27,10 @@ type SigningMechanism interface {
// Sign creates a (non-detached) signature of input using keyIdentity.
// Fails with a SigningNotSupportedError if the mechanism does not support signing.
Sign(input []byte, keyIdentity string) ([]byte, error)
// Verify parses unverifiedSignature and returns the content and the signer's identity
// Verify parses unverifiedSignature and returns the content and the signer's identity.
// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity
// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,
// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.
Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error)
// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,
// along with a short identifier of the key used for signing.
@@ -46,6 +49,16 @@ type signingMechanismWithPassphrase interface {
SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error)
}
// signingMechanismWithVerificationIdentityLookup is an internal extension of SigningMechanism.
type signingMechanismWithVerificationIdentityLookup interface {
SigningMechanism
// keyIdentityForVerificationKeyIdentity re-checks the key identity returned by Verify
// if it doesn't match an identity returned by NewEphemeralGPGSigningMechanism, trying to match it.
// (To be more specific, for mechanisms which return a subkey fingerprint from Verify,
// this converts the subkey fingerprint into the corresponding primary key fingerprint.)
keyIdentityForVerificationKeyIdentity(keyIdentity string) (string, error)
}
// SigningNotSupportedError is returned when trying to sign using a mechanism which does not support that.
type SigningNotSupportedError string

View File

@@ -2,6 +2,9 @@
package signature
// This is shared by mechanism_gpgme_only.go and mechanism_sequoia.go; in both situations
// newGPGSigningMechanismInDirectory is implemented using GPGME.
import (
"bytes"
"errors"
@@ -18,6 +21,16 @@ type gpgmeSigningMechanism struct {
ephemeralDir string // If not "", a directory to be removed on Close()
}
// newGPGMESigningMechanism returns a new GPG/OpenPGP signing mechanism for ctx.
// The caller must call .Close() on the returned SigningMechanism; if ephemeralDir is set,
// the .Close() call will remove its contents.
func newGPGMESigningMechanism(ctx *gpgme.Context, ephemeralDir string) signingMechanismWithPassphrase {
return &gpgmeSigningMechanism{
ctx: ctx,
ephemeralDir: ephemeralDir,
}
}
// newGPGSigningMechanismInDirectory returns a new GPG/OpenPGP signing mechanism, using optionalDir if not empty.
// The caller must call .Close() on the returned SigningMechanism.
func newGPGSigningMechanismInDirectory(optionalDir string) (signingMechanismWithPassphrase, error) {
@@ -25,46 +38,7 @@ func newGPGSigningMechanismInDirectory(optionalDir string) (signingMechanismWith
if err != nil {
return nil, err
}
return &gpgmeSigningMechanism{
ctx: ctx,
ephemeralDir: "",
}, nil
}
// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which
// recognizes _only_ public keys from the supplied blobs, and returns the identities
// of these keys.
// The caller must call .Close() on the returned SigningMechanism.
func newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {
dir, err := os.MkdirTemp("", "containers-ephemeral-gpg-")
if err != nil {
return nil, nil, err
}
removeDir := true
defer func() {
if removeDir {
os.RemoveAll(dir)
}
}()
ctx, err := newGPGMEContext(dir)
if err != nil {
return nil, nil, err
}
mech := &gpgmeSigningMechanism{
ctx: ctx,
ephemeralDir: dir,
}
keyIdentities := []string{}
for _, blob := range blobs {
ki, err := mech.importKeysFromBytes(blob)
if err != nil {
return nil, nil, err
}
keyIdentities = append(keyIdentities, ki...)
}
removeDir = false
return mech, keyIdentities, nil
return newGPGMESigningMechanism(ctx, ""), nil
}
// newGPGMEContext returns a new *gpgme.Context, using optionalDir if not empty.
@@ -94,28 +68,6 @@ func (m *gpgmeSigningMechanism) Close() error {
return nil
}
// importKeysFromBytes imports public keys from the supplied blob and returns their identities.
// The blob is assumed to have an appropriate format (the caller is expected to know which one).
// NOTE: This may modify long-term state (e.g. key storage in a directory underlying the mechanism);
// but we do not make this public, it can only be used through newEphemeralGPGSigningMechanism.
func (m *gpgmeSigningMechanism) importKeysFromBytes(blob []byte) ([]string, error) {
inputData, err := gpgme.NewDataBytes(blob)
if err != nil {
return nil, err
}
res, err := m.ctx.Import(inputData)
if err != nil {
return nil, err
}
keyIdentities := []string{}
for _, i := range res.Imports {
if i.Result == nil {
keyIdentities = append(keyIdentities, i.Fingerprint)
}
}
return keyIdentities, nil
}
// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.
func (m *gpgmeSigningMechanism) SupportsSigning() error {
return nil
@@ -169,7 +121,10 @@ func (m *gpgmeSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte,
return m.SignWithPassphrase(input, keyIdentity, "")
}
// Verify parses unverifiedSignature and returns the content and the signer's identity
// Verify parses unverifiedSignature and returns the content and the signer's identity.
// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity
// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,
// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.
func (m *gpgmeSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {
signedBuffer := bytes.Buffer{}
signedData, err := gpgme.NewDataWriter(&signedBuffer)
@@ -196,6 +151,24 @@ func (m *gpgmeSigningMechanism) Verify(unverifiedSignature []byte) (contents []b
return signedBuffer.Bytes(), sig.Fingerprint, nil
}
// keyIdentityForVerificationKeyIdentity re-checks the key identity returned by Verify
// if it doesn't match an identity returned by NewEphemeralGPGSigningMechanism, trying to match it.
// (To be more specific, for mechanisms which return a subkey fingerprint from Verify,
// this converts the subkey fingerprint into the corresponding primary key fingerprint.)
func (m *gpgmeSigningMechanism) keyIdentityForVerificationKeyIdentity(keyIdentity string) (string, error) {
// In theory, if keyIdentity refers to a subkey, the same subkey could be attached to different primary keys;
// in that case, GetKey fails with “ambiguous name”.
// We _could_ handle that, by using KeyList* (GetKey is internally just a helper for KeyList*), but sharing
// a subkey that way is very unexpected, so, for now, prefer the much simpler implementation.
key, err := m.ctx.GetKey(keyIdentity, false)
if err != nil {
return "", err
}
// In theory this value could be nil if (gpg --list-keys --with-colons) misses a "pub:" line
// or a "fpr:" line, but gpg (in recent enough versions) prints that unconditionally. // codespell:ignore fpr
return key.Fingerprint(), nil
}
// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,
// along with a short identifier of the key used for signing.
// WARNING: The short key identifier (which corresponds to "Key ID" for OpenPGP keys)

View File

@@ -0,0 +1,64 @@
//go:build !containers_image_openpgp && !containers_image_sequoia
package signature
import (
"os"
"github.com/proglottis/gpgme"
)
// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which
// recognizes _only_ public keys from the supplied blobs, and returns the identities
// of these keys.
// The caller must call .Close() on the returned SigningMechanism.
func newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {
dir, err := os.MkdirTemp("", "containers-ephemeral-gpg-")
if err != nil {
return nil, nil, err
}
removeDir := true
defer func() {
if removeDir {
os.RemoveAll(dir)
}
}()
ctx, err := newGPGMEContext(dir)
if err != nil {
return nil, nil, err
}
keyIdentities := []string{}
for _, blob := range blobs {
ki, err := importKeysFromBytes(ctx, blob)
if err != nil {
return nil, nil, err
}
keyIdentities = append(keyIdentities, ki...)
}
mech := newGPGMESigningMechanism(ctx, dir)
removeDir = false
return mech, keyIdentities, nil
}
// importKeysFromBytes imports public keys from the supplied blob and returns their identities.
// The blob is assumed to have an appropriate format (the caller is expected to know which one).
// NOTE: This may modify long-term state (e.g. key storage in a directory underlying the mechanism);
// but we do not make this public, it can only be used through newEphemeralGPGSigningMechanism.
func importKeysFromBytes(ctx *gpgme.Context, blob []byte) ([]string, error) {
inputData, err := gpgme.NewDataBytes(blob)
if err != nil {
return nil, err
}
res, err := ctx.Import(inputData)
if err != nil {
return nil, err
}
keyIdentities := []string{}
for _, i := range res.Imports {
if i.Result == nil {
keyIdentities = append(keyIdentities, i.Fingerprint)
}
}
return keyIdentities, nil
}

View File

@@ -112,13 +112,13 @@ func (m *openpgpSigningMechanism) importKeysFromBytes(blob []byte) ([]string, er
// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.
func (m *openpgpSigningMechanism) SupportsSigning() error {
return SigningNotSupportedError("signing is not supported in github.com/containers/image built with the containers_image_openpgp build tag")
return SigningNotSupportedError("signing is not supported in go.podman.io/image built with the containers_image_openpgp build tag")
}
// Sign creates a (non-detached) signature of input using keyIdentity.
// Fails with a SigningNotSupportedError if the mechanism does not support signing.
func (m *openpgpSigningMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {
return nil, SigningNotSupportedError("signing is not supported in github.com/containers/image built with the containers_image_openpgp build tag")
return nil, SigningNotSupportedError("signing is not supported in go.podman.io/image built with the containers_image_openpgp build tag")
}
// Sign creates a (non-detached) signature of input using keyIdentity.
@@ -127,7 +127,10 @@ func (m *openpgpSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte
return m.SignWithPassphrase(input, keyIdentity, "")
}
// Verify parses unverifiedSignature and returns the content and the signer's identity
// Verify parses unverifiedSignature and returns the content and the signer's identity.
// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity
// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,
// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.
func (m *openpgpSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {
md, err := openpgp.ReadMessage(bytes.NewReader(unverifiedSignature), m.keyring, nil, nil)
if err != nil {
@@ -166,7 +169,7 @@ func (m *openpgpSigningMechanism) Verify(unverifiedSignature []byte) (contents [
}
// Uppercase the fingerprint to be compatible with gpgme
return content, strings.ToUpper(fmt.Sprintf("%x", md.SignedBy.PublicKey.Fingerprint)), nil
return content, strings.ToUpper(fmt.Sprintf("%x", md.SignedBy.Entity.PrimaryKey.Fingerprint)), nil
}
// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,

View File

@@ -0,0 +1,84 @@
//go:build containers_image_sequoia
package signature
import (
"go.podman.io/image/v5/signature/internal/sequoia"
)
// A GPG/OpenPGP signing mechanism, implemented using Sequoia and only supporting verification.
// Legacy users who reach newGPGSigningMechanismInDirectory will use GPGME.
// Signing using Sequoia is preferable, but should happen via signature/simplesequoia.NewSigner, not using
// the legacy mechanism API.
type sequoiaEphemeralSigningMechanism struct {
inner *sequoia.SigningMechanism
}
// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which
// recognizes _only_ public keys from the supplied blobs, and returns the identities
// of these keys.
// The caller must call .Close() on the returned SigningMechanism.
func newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {
if err := sequoia.Init(); err != nil {
return nil, nil, err // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.
}
mech, err := sequoia.NewEphemeralMechanism()
if err != nil {
return nil, nil, err
}
keyIdentities := []string{}
for _, blob := range blobs {
ki, err := mech.ImportKeys(blob)
if err != nil {
return nil, nil, err
}
keyIdentities = append(keyIdentities, ki...)
}
return &sequoiaEphemeralSigningMechanism{
inner: mech,
}, keyIdentities, nil
}
func (m *sequoiaEphemeralSigningMechanism) Close() error {
return m.inner.Close()
}
// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.
func (m *sequoiaEphemeralSigningMechanism) SupportsSigning() error {
// This code is externally reachable via NewEphemeralGPGSigningMechanism(), but that API provides no way to
// import or generate a key.
return SigningNotSupportedError("caller error: Attempt to sign using a mechanism created via NewEphemeralGPGSigningMechanism().")
}
// Sign creates a (non-detached) signature of input using keyIdentity and passphrase.
// Fails with a SigningNotSupportedError if the mechanism does not support signing.
func (m *sequoiaEphemeralSigningMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {
// This code is externally reachable via NewEphemeralGPGSigningMechanism(), but that API provides no way to
// import or generate a key.
return nil, SigningNotSupportedError("caller error: Attempt to sign using a mechanism created via NewEphemeralGPGSigningMechanism().")
}
// Sign creates a (non-detached) signature of input using keyIdentity.
// Fails with a SigningNotSupportedError if the mechanism does not support signing.
func (m *sequoiaEphemeralSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {
return m.SignWithPassphrase(input, keyIdentity, "")
}
// Verify parses unverifiedSignature and returns the content and the signer's identity.
// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity
// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,
// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.
func (m *sequoiaEphemeralSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {
return m.inner.Verify(unverifiedSignature)
}
// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,
// along with a short identifier of the key used for signing.
// WARNING: The short key identifier (which corresponds to "Key ID" for OpenPGP keys)
// is NOT the same as a "key identity" used in other calls to this interface, and
// the values may have no recognizable relationship if the public key is not available.
func (m *sequoiaEphemeralSigningMechanism) UntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {
return gpgUntrustedSignatureContents(untrustedSignature)
}

View File

@@ -31,7 +31,7 @@ import (
// systemDefaultPolicyPath is the policy path used for DefaultPolicy().
// You can override this at build time with
// -ldflags '-X github.com/containers/image/v5/signature.systemDefaultPolicyPath=$your_path'
// -ldflags '-X go.podman.io/image/v5/signature.systemDefaultPolicyPath=$your_path'
var systemDefaultPolicyPath = builtinDefaultPolicyPath
// userPolicyFile is the path to the per user policy path.

View File

@@ -6,7 +6,6 @@ import (
"context"
"errors"
"fmt"
"slices"
digest "github.com/opencontainers/go-digest"
"go.podman.io/image/v5/internal/multierr"
@@ -50,15 +49,8 @@ func (pr *prSignedBy) isSignatureAuthorAccepted(ctx context.Context, image priva
return sarRejected, nil, PolicyRequirementError("No public keys imported")
}
signature, err := verifyAndExtractSignature(mech, sig, signatureAcceptanceRules{
validateKeyIdentity: func(keyIdentity string) error {
if slices.Contains(trustedIdentities, keyIdentity) {
return nil
}
// Coverage: We use a private GPG home directory and only import trusted keys, so this should
// not be reachable.
return PolicyRequirementError(fmt.Sprintf("Signature by key %s is not accepted", keyIdentity))
},
signature, _, err := verifyAndExtractSignature(mech, sig, signatureAcceptanceRules{
acceptedKeyIdentities: trustedIdentities,
validateSignedDockerReference: func(ref string) error {
if !pr.SignedIdentity.matchesDockerReference(image, ref) {
return PolicyRequirementError(fmt.Sprintf("Signature for identity %q is not accepted", ref))

View File

@@ -28,9 +28,6 @@ import (
// makeRequest makes a http request to the requested requestPath, and returns the received response.
func (r *rekorClient) makeRequest(ctx context.Context, method, requestPath string, bodyContent any) (*http.Response, error) {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
var body io.Reader
headers := http.Header{}

View File

@@ -8,6 +8,7 @@ import (
"encoding/json"
"errors"
"fmt"
"slices"
"time"
digest "github.com/opencontainers/go-digest"
@@ -207,37 +208,52 @@ func (s untrustedSignature) sign(mech SigningMechanism, keyIdentity string, pass
// because the functions have the same or similar types, so there is a risk of exchanging the functions;
// named members of this struct are more explicit.
type signatureAcceptanceRules struct {
validateKeyIdentity func(string) error
acceptedKeyIdentities []string
validateSignedDockerReference func(string) error
validateSignedDockerManifestDigest func(digest.Digest) error
}
// verifyAndExtractSignature verifies that unverifiedSignature has been signed, and that its principal components
// match expected values, both as specified by rules, and returns it
func verifyAndExtractSignature(mech SigningMechanism, unverifiedSignature []byte, rules signatureAcceptanceRules) (*Signature, error) {
// match expected values, both as specified by rules.
// Returns the signature, and an identity of the key that signed it.
func verifyAndExtractSignature(mech SigningMechanism, unverifiedSignature []byte, rules signatureAcceptanceRules) (*Signature, string, error) {
signed, keyIdentity, err := mech.Verify(unverifiedSignature)
if err != nil {
return nil, err
return nil, "", err
}
if err := rules.validateKeyIdentity(keyIdentity); err != nil {
return nil, err
if !slices.Contains(rules.acceptedKeyIdentities, keyIdentity) {
withLookup, ok := mech.(signingMechanismWithVerificationIdentityLookup)
if !ok {
return nil, "", internal.NewInvalidSignatureError(fmt.Sprintf("signature by key %s is not accepted", keyIdentity))
}
primaryKey, err := withLookup.keyIdentityForVerificationKeyIdentity(keyIdentity)
if err != nil {
// Coverage: This only fails if lookup by keyIdentity fails, but we just found and used that key.
// Or maybe on some unexpected I/O error.
return nil, "", err
}
if !slices.Contains(rules.acceptedKeyIdentities, primaryKey) {
return nil, "", internal.NewInvalidSignatureError(fmt.Sprintf("signature by key %s of %s is not accepted", keyIdentity, primaryKey))
}
keyIdentity = primaryKey
}
var unmatchedSignature untrustedSignature
if err := json.Unmarshal(signed, &unmatchedSignature); err != nil {
return nil, internal.NewInvalidSignatureError(err.Error())
return nil, "", internal.NewInvalidSignatureError(err.Error())
}
if err := rules.validateSignedDockerManifestDigest(unmatchedSignature.untrustedDockerManifestDigest); err != nil {
return nil, err
return nil, "", err
}
if err := rules.validateSignedDockerReference(unmatchedSignature.untrustedDockerReference); err != nil {
return nil, err
return nil, "", err
}
// signatureAcceptanceRules have accepted this value.
return &Signature{
DockerManifestDigest: unmatchedSignature.untrustedDockerManifestDigest,
DockerReference: unmatchedSignature.untrustedDockerReference,
}, nil
}, keyIdentity, nil
}
// GetUntrustedSignatureInformationWithoutVerifying extracts information available in an untrusted signature,

View File

@@ -11,7 +11,7 @@ const (
VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string.
VersionDev = "-dev"
VersionDev = ""
)
// Version is the specification version that the package types support.

View File

@@ -1,212 +0,0 @@
---
# Main collection of env. vars to set for all tasks and scripts.
env:
####
#### Global variables used for all tasks
####
# Overrides default location (/tmp/cirrus) for repo clone
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/storage"
# Shell used to execute all script commands
CIRRUS_SHELL: "/bin/bash"
# Automation script path relative to $CIRRUS_WORKING_DIR)
SCRIPT_BASE: "./contrib/cirrus"
# No need to go crazy, but grab enough to cover most PRs
CIRRUS_CLONE_DEPTH: 50
####
#### Cache-image names to test with (double-quotes around names are critical)
###
FEDORA_NAME: "fedora-42"
DEBIAN_NAME: "debian-13"
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# VM Image built in containers/automation_images
IMAGE_SUFFIX: "c20250422t130822z-f42f41d13"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}"
####
#### Command variables to help avoid duplication
####
# Command to prefix every output line with a timestamp
# (can't do inline awk script, Cirrus-CI or YAML mangles quoting)
_TIMESTAMP: 'awk --file ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk'
_DFCMD: 'df -lhTx tmpfs'
_RAUDITCMD: 'cat /var/log/audit/audit.log'
_UAUDITCMD: 'cat /var/log/kern.log'
_JOURNALCMD: 'journalctl -b'
gcp_credentials: ENCRYPTED[c87717f04fb15499d19a3b3fa0ad2cdedecc047e82967785d101e9bc418e93219f755e662feac8390088a2df1a4d8464]
# Default timeout for each task
timeout_in: 120m
# Default VM to use unless set or modified by task
gce_instance:
image_project: "${IMAGE_PROJECT}"
zone: "us-central1-b" # Required by Cirrus for the time being
cpu: 2
memory: "4Gb"
disk: 200
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
linux_testing: &linux_testing
depends_on:
- lint
gce_instance: # Only need to specify differences from defaults (above)
image_name: "${VM_IMAGE}"
# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_and_test_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/build_and_test.sh |& ${_TIMESTAMP}'
always:
df_script: '${_DFCMD} || true'
rh_audit_log_script: '${_RAUDITCMD} || true'
debian_audit_log_script: '${_UAUDITCMD} || true'
journal_log_script: '${_JOURNALCMD} || true'
fedora_testing_task: &fedora_testing
<<: *linux_testing
alias: fedora_testing
name: &std_test_name "${OS_NAME} ${TEST_DRIVER}"
env:
OS_NAME: "${FEDORA_NAME}"
VM_IMAGE: "${FEDORA_CACHE_IMAGE_NAME}"
# Not all $TEST_DRIVER combinations valid for all $VM_IMAGE types.
matrix: &test_matrix
- env:
TEST_DRIVER: "vfs"
- env:
TEST_DRIVER: "overlay"
- env:
TEST_DRIVER: "overlay-transient"
- env:
TEST_DRIVER: "fuse-overlay"
- env:
TEST_DRIVER: "fuse-overlay-whiteout"
- env:
TEST_DRIVER: "btrfs"
# aufs was dropped between 20.04 and 22.04, can't test it
debian_testing_task: &debian_testing
<<: *linux_testing
alias: debian_testing
name: *std_test_name
env:
OS_NAME: "${DEBIAN_NAME}"
VM_IMAGE: "${DEBIAN_CACHE_IMAGE_NAME}"
# Not all $TEST_DRIVER combinations valid for all $VM_IMAGE types.
matrix:
- env:
TEST_DRIVER: "vfs"
- env:
TEST_DRIVER: "overlay"
- env:
TEST_DRIVER: "fuse-overlay"
- env:
TEST_DRIVER: "fuse-overlay-whiteout"
- env:
TEST_DRIVER: "btrfs"
lint_task:
alias: lint
env:
CIRRUS_WORKING_DIR: "/go/src/github.com/containers/storage"
container:
image: golang
modules_cache:
fingerprint_script: cat go.sum
folder: $GOPATH/pkg/mod
build_script: |
apt-get update
apt-get install -y libbtrfs-dev libsubid-dev
test_script: |
[ -n "${CIRRUS_BASE_SHA}" ] && git fetch origin ${CIRRUS_BASE_SHA} # Make ${CIRRUS_BASE_SHA} resolvable for git-validation
make TAGS=regex_precompile local-validate
make lint
make clean
# Update metadata on VM images referenced by this repository state
meta_task:
alias: meta
container:
image: "quay.io/libpod/imgts:latest"
cpu: 1
memory: 1
env:
# Space-separated list of images used by this repository state
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${DEBIAN_CACHE_IMAGE_NAME}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
GCPJSON: ENCRYPTED[244a93fe8b386b48b96f748342bf741350e43805eee81dd04b45093bdf737e540b993fc735df41f131835fa0f9b65826]
GCPNAME: ENCRYPTED[91cf7aa421858b26b67835978d224b4a5c46afcf52a0f1ec1b69a99b248715dc8e92a1b56fde18e092acf256fa80ae9c]
GCPPROJECT: ENCRYPTED[79b0f7eb5958e25bc7095d5d368fa8d94447a43ffacb9c693de438186e2f767b7efe9563d6954297ae4730220e10aa9c]
CIRRUS_CLONE_DEPTH: 1 # source not used
script: '/usr/local/bin/entrypoint.sh |& ${_TIMESTAMP}'
vendor_task:
alias: vendor
container:
image: golang
modules_cache:
fingerprint_script: cat go.sum
folder: $GOPATH/pkg/mod
build_script: make vendor
test_script: hack/tree_status.sh
cross_task:
alias: cross
container:
image: golang:1.24
build_script: make cross
gofix_task:
alias: gofix
container:
image: golang:1.24
build_script: go fix ./...
test_script: git diff --exit-code
codespell_task:
alias: codespell
container:
image: python
build_script: pip install codespell
test_script: codespell
# Status aggregator for all tests. This task simply ensures a defined
# set of tasks all passed, and allows confirming that based on the status
# of this task.
success_task:
alias: success
# N/B: The prow merge-bot (tide) is sensitized to this exact name, DO NOT CHANGE IT.
# Ref: https://github.com/openshift/release/pull/49820
name: "Total Success"
depends_on:
- lint
- fedora_testing
- debian_testing
- meta
- vendor
- cross
- gofix
- codespell
container:
image: golang:1.24
clone_script: 'mkdir -p "$CIRRUS_WORKING_DIR"' # Source code not needed
script: /bin/true

View File

@@ -1,3 +0,0 @@
[codespell]
skip = ./.git,./vendor,./tests/tools/vendor,AUTHORS
ignore-words-list = afile,flate,prevend,Plack,worl

View File

@@ -1,3 +0,0 @@
## The Containers Storage Project Community Code of Conduct
The Containers Storage project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).

View File

@@ -1,35 +0,0 @@
# Contributing to Containers/Storage
We'd love to have you join the community! [Learn how to contribute](https://github.com/containers/common/blob/main/CONTRIBUTING.md) to the Containers Group Projects.
Please note that the following information is specific to this project:
* We dont typically require 2 LGTMs for this repository.
## Communications
For general questions, or discussions, please use the
IRC group on `irc.freenode.net` called `container-projects`
that has been setup.
For discussions around issues/bugs and features, you can use the github
[issues](https://github.com/containers/storage/issues)
and
[PRs](https://github.com/containers/storage/pulls)
tracking system.
<!--
## Becoming a Maintainer
To become a maintainer you must first be nominated by an existing maintainer.
If a majority (>50%) of maintainers agree then the proposal is adopted and
you will be added to the list.
Removing a maintainer requires at least 75% of the remaining maintainers
approval, or if the person requests to be removed then it is automatic.
Normally, a maintainer will only be removed if they are considered to be
inactive for a long period of time or are viewed as disruptive to the community.
The current list of maintainers can be found in the
[MAINTAINERS](MAINTAINERS) file.
-->

40
vendor/go.podman.io/storage/Makefile generated vendored
View File

@@ -2,7 +2,6 @@
all \
binary \
clean \
codespell \
containers-storage \
cross \
default \
@@ -11,7 +10,6 @@
help \
install \
install.docs \
install.tools \
lint \
local-binary \
local-cross \
@@ -19,12 +17,8 @@
local-test \
local-test-integration \
local-test-unit \
local-validate \
test-integration \
test-unit \
validate \
vendor \
vendor-in-container
test-unit
NATIVETAGS :=
AUTOTAGS := $(shell ./hack/btrfs_tag.sh) $(shell ./hack/libsubid_tag.sh)
@@ -32,12 +26,7 @@ BUILDFLAGS := -tags "$(AUTOTAGS) $(TAGS)" $(FLAGS)
GO ?= go
TESTFLAGS := $(shell $(GO) test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race)
# N/B: This value is managed by Renovate, manual changes are
# possible, as long as they don't disturb the formatting
# (i.e. DO NOT ADD A 'v' prefix!)
GOLANGCI_LINT_VERSION := 2.3.1
default all: local-binary docs local-validate local-cross ## validate all checks, build and cross-build\nbinaries and docs
default all: local-binary docs local-cross ## build and cross-build\nbinaries and docs
clean: ## remove all built files
$(RM) -f containers-storage containers-storage.* docs/*.1 docs/*.5
@@ -45,9 +34,6 @@ clean: ## remove all built files
containers-storage: ## build using gc on the host
$(GO) build -compiler gc $(BUILDFLAGS) ./cmd/containers-storage
codespell:
codespell
binary local-binary: containers-storage
local-gccgo gccgo: ## build using gccgo on the host
@@ -64,7 +50,7 @@ local-cross cross: ## cross build the binaries for arm, darwin, and freebsd
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $(GO) build -compiler gc -tags "$(NATIVETAGS) $(TAGS)" $(FLAGS) -o containers-storage.$${suffix} ./cmd/containers-storage || exit 1 ; \
done
docs: install.tools ## build the docs on the host
docs: ## build the docs on the host
$(MAKE) -C docs docs
local-test: local-binary local-test-unit local-test-integration ## build the binaries and run the tests
@@ -75,27 +61,23 @@ local-test-unit test-unit: local-binary ## run the unit tests on the host (requi
local-test-integration test-integration: local-binary ## run the integration tests on the host (requires\nsuperuser privileges)
@cd tests; ./test_runner.bash
local-validate validate: install.tools ## validate DCO on the host
@./hack/git-validation.sh
install.tools:
$(MAKE) -C tests/tools GOLANGCI_LINT_VERSION=$(GOLANGCI_LINT_VERSION)
install.docs: docs
$(MAKE) -C docs install
install: install.docs
lint: install.tools
tests/tools/build/golangci-lint run --build-tags="$(AUTOTAGS) $(TAGS)"
lint:
golangci-lint run --build-tags="$(AUTOTAGS) $(TAGS)"
help: ## this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-z A-Z_-]+:.*?## / {gsub(" ",",",$$1);gsub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-21s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
vendor-in-container:
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor
.PHONY: tidy-in-container
tidy-in-container:
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy
vendor:
.PHONY: tidy
tidy:
$(GO) mod tidy
$(GO) work vendor
$(GO) mod verify
$(GO) mod edit -toolchain none

View File

@@ -42,5 +42,5 @@ Additionally, the library can store one or more of what it calls *big data* for
images and containers. This is a named chunk of larger data, which is only in
memory when it is being read from or being written to its own disk file.
**[Contributing](CONTRIBUTING.md)**
**[Contributing](../CONTRIBUTING.md)**
Information about contributing to this project.

View File

@@ -1,3 +0,0 @@
## Security and Disclosure Information Policy for the Containers Storage Project
The Containers Storage Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.

View File

@@ -1 +1 @@
1.60.0-dev
1.60.0

View File

@@ -371,7 +371,31 @@ func ConsumeVarint(b []byte) (v uint64, n int) {
func SizeVarint(v uint64) int {
// This computes 1 + (bits.Len64(v)-1)/7.
// 9/64 is a good enough approximation of 1/7
return int(9*uint32(bits.Len64(v))+64) / 64
//
// The Go compiler can translate the bits.LeadingZeros64 call into the LZCNT
// instruction, which is very fast on CPUs from the last few years. The
// specific way of expressing the calculation matches C++ Protobuf, see
// https://godbolt.org/z/4P3h53oM4 for the C++ code and how gcc/clang
// optimize that function for GOAMD64=v1 and GOAMD64=v3 (-march=haswell).
// By OR'ing v with 1, we guarantee that v is never 0, without changing the
// result of SizeVarint. LZCNT is not defined for 0, meaning the compiler
// needs to add extra instructions to handle that case.
//
// The Go compiler currently (go1.24.4) does not make use of this knowledge.
// This opportunity (removing the XOR instruction, which handles the 0 case)
// results in a small (1%) performance win across CPU architectures.
//
// Independently of avoiding the 0 case, we need the v |= 1 line because
// it allows the Go compiler to eliminate an extra XCHGL barrier.
v |= 1
// It would be clearer to write log2value := 63 - uint32(...), but
// writing uint32(...) ^ 63 is much more efficient (-14% ARM, -20% Intel).
// Proof of identity for our value range [0..63]:
// https://go.dev/play/p/Pdn9hEWYakX
log2value := uint32(bits.LeadingZeros64(v)) ^ 63
return int((log2value*9 + (64 + 9)) / 64)
}
// AppendFixed32 appends v to b as a little-endian uint32.

View File

@@ -72,6 +72,9 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
case genid.FeatureSet_EnforceNamingStyle_field_number:
// EnforceNamingStyle is enforced in protoc, languages other than C++
// are not supposed to do anything with this feature.
case genid.FeatureSet_DefaultSymbolVisibility_field_number:
// DefaultSymbolVisibility is enforced in protoc, runtimes should not
// inspect this value.
default:
panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num))
}

View File

@@ -0,0 +1,33 @@
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package filedesc
import "google.golang.org/protobuf/reflect/protoreflect"
// UsePresenceForField reports whether the presence bitmap should be used for
// the specified field.
func UsePresenceForField(fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
// Oneof fields never use the presence bitmap.
//
// Synthetic oneofs are an exception: Those are used to implement proto3
// optional fields and hence should follow non-oneof field semantics.
return false, false
case fd.IsMap():
// Map-typed fields never use the presence bitmap.
return false, false
case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
// Lazy fields always use the presence bitmap (only messages can be lazy).
isLazy := fd.(interface{ IsLazy() bool }).IsLazy()
return isLazy, isLazy
default:
// If the field has presence, use the presence bitmap.
return fd.HasPresence(), false
}
}

View File

@@ -27,6 +27,7 @@ const (
Api_SourceContext_field_name protoreflect.Name = "source_context"
Api_Mixins_field_name protoreflect.Name = "mixins"
Api_Syntax_field_name protoreflect.Name = "syntax"
Api_Edition_field_name protoreflect.Name = "edition"
Api_Name_field_fullname protoreflect.FullName = "google.protobuf.Api.name"
Api_Methods_field_fullname protoreflect.FullName = "google.protobuf.Api.methods"
@@ -35,6 +36,7 @@ const (
Api_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Api.source_context"
Api_Mixins_field_fullname protoreflect.FullName = "google.protobuf.Api.mixins"
Api_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Api.syntax"
Api_Edition_field_fullname protoreflect.FullName = "google.protobuf.Api.edition"
)
// Field numbers for google.protobuf.Api.
@@ -46,6 +48,7 @@ const (
Api_SourceContext_field_number protoreflect.FieldNumber = 5
Api_Mixins_field_number protoreflect.FieldNumber = 6
Api_Syntax_field_number protoreflect.FieldNumber = 7
Api_Edition_field_number protoreflect.FieldNumber = 8
)
// Names for google.protobuf.Method.
@@ -63,6 +66,7 @@ const (
Method_ResponseStreaming_field_name protoreflect.Name = "response_streaming"
Method_Options_field_name protoreflect.Name = "options"
Method_Syntax_field_name protoreflect.Name = "syntax"
Method_Edition_field_name protoreflect.Name = "edition"
Method_Name_field_fullname protoreflect.FullName = "google.protobuf.Method.name"
Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.request_type_url"
@@ -71,6 +75,7 @@ const (
Method_ResponseStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.response_streaming"
Method_Options_field_fullname protoreflect.FullName = "google.protobuf.Method.options"
Method_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Method.syntax"
Method_Edition_field_fullname protoreflect.FullName = "google.protobuf.Method.edition"
)
// Field numbers for google.protobuf.Method.
@@ -82,6 +87,7 @@ const (
Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5
Method_Options_field_number protoreflect.FieldNumber = 6
Method_Syntax_field_number protoreflect.FieldNumber = 7
Method_Edition_field_number protoreflect.FieldNumber = 8
)
// Names for google.protobuf.Mixin.

View File

@@ -34,6 +34,19 @@ const (
Edition_EDITION_MAX_enum_value = 2147483647
)
// Full and short names for google.protobuf.SymbolVisibility.
const (
SymbolVisibility_enum_fullname = "google.protobuf.SymbolVisibility"
SymbolVisibility_enum_name = "SymbolVisibility"
)
// Enum values for google.protobuf.SymbolVisibility.
const (
SymbolVisibility_VISIBILITY_UNSET_enum_value = 0
SymbolVisibility_VISIBILITY_LOCAL_enum_value = 1
SymbolVisibility_VISIBILITY_EXPORT_enum_value = 2
)
// Names for google.protobuf.FileDescriptorSet.
const (
FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet"
@@ -65,6 +78,7 @@ const (
FileDescriptorProto_Dependency_field_name protoreflect.Name = "dependency"
FileDescriptorProto_PublicDependency_field_name protoreflect.Name = "public_dependency"
FileDescriptorProto_WeakDependency_field_name protoreflect.Name = "weak_dependency"
FileDescriptorProto_OptionDependency_field_name protoreflect.Name = "option_dependency"
FileDescriptorProto_MessageType_field_name protoreflect.Name = "message_type"
FileDescriptorProto_EnumType_field_name protoreflect.Name = "enum_type"
FileDescriptorProto_Service_field_name protoreflect.Name = "service"
@@ -79,6 +93,7 @@ const (
FileDescriptorProto_Dependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.dependency"
FileDescriptorProto_PublicDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.public_dependency"
FileDescriptorProto_WeakDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.weak_dependency"
FileDescriptorProto_OptionDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.option_dependency"
FileDescriptorProto_MessageType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.message_type"
FileDescriptorProto_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.enum_type"
FileDescriptorProto_Service_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.service"
@@ -96,6 +111,7 @@ const (
FileDescriptorProto_Dependency_field_number protoreflect.FieldNumber = 3
FileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumber = 10
FileDescriptorProto_WeakDependency_field_number protoreflect.FieldNumber = 11
FileDescriptorProto_OptionDependency_field_number protoreflect.FieldNumber = 15
FileDescriptorProto_MessageType_field_number protoreflect.FieldNumber = 4
FileDescriptorProto_EnumType_field_number protoreflect.FieldNumber = 5
FileDescriptorProto_Service_field_number protoreflect.FieldNumber = 6
@@ -124,6 +140,7 @@ const (
DescriptorProto_Options_field_name protoreflect.Name = "options"
DescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
DescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
DescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
DescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.name"
DescriptorProto_Field_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.field"
@@ -135,6 +152,7 @@ const (
DescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.options"
DescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_range"
DescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_name"
DescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.visibility"
)
// Field numbers for google.protobuf.DescriptorProto.
@@ -149,6 +167,7 @@ const (
DescriptorProto_Options_field_number protoreflect.FieldNumber = 7
DescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 9
DescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 10
DescriptorProto_Visibility_field_number protoreflect.FieldNumber = 11
)
// Names for google.protobuf.DescriptorProto.ExtensionRange.
@@ -388,12 +407,14 @@ const (
EnumDescriptorProto_Options_field_name protoreflect.Name = "options"
EnumDescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
EnumDescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
EnumDescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
EnumDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.name"
EnumDescriptorProto_Value_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.value"
EnumDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.options"
EnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_range"
EnumDescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_name"
EnumDescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.visibility"
)
// Field numbers for google.protobuf.EnumDescriptorProto.
@@ -403,6 +424,7 @@ const (
EnumDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
EnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4
EnumDescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 5
EnumDescriptorProto_Visibility_field_number protoreflect.FieldNumber = 6
)
// Names for google.protobuf.EnumDescriptorProto.EnumReservedRange.
@@ -1008,32 +1030,35 @@ const (
// Field names for google.protobuf.FeatureSet.
const (
FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
FeatureSet_DefaultSymbolVisibility_field_name protoreflect.Name = "default_symbol_visibility"
FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
FeatureSet_DefaultSymbolVisibility_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.default_symbol_visibility"
)
// Field numbers for google.protobuf.FeatureSet.
const (
FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
FeatureSet_DefaultSymbolVisibility_field_number protoreflect.FieldNumber = 8
)
// Full and short names for google.protobuf.FeatureSet.FieldPresence.
@@ -1128,6 +1153,27 @@ const (
FeatureSet_STYLE_LEGACY_enum_value = 2
)
// Names for google.protobuf.FeatureSet.VisibilityFeature.
const (
FeatureSet_VisibilityFeature_message_name protoreflect.Name = "VisibilityFeature"
FeatureSet_VisibilityFeature_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet.VisibilityFeature"
)
// Full and short names for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
const (
FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_fullname = "google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility"
FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_name = "DefaultSymbolVisibility"
)
// Enum values for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
const (
FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN_enum_value = 0
FeatureSet_VisibilityFeature_EXPORT_ALL_enum_value = 1
FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL_enum_value = 2
FeatureSet_VisibilityFeature_LOCAL_ALL_enum_value = 3
FeatureSet_VisibilityFeature_STRICT_enum_value = 4
)
// Names for google.protobuf.FeatureSetDefaults.
const (
FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults"

View File

@@ -11,6 +11,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/encoding/messageset"
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/order"
"google.golang.org/protobuf/reflect/protoreflect"
piface "google.golang.org/protobuf/runtime/protoiface"
@@ -80,7 +81,7 @@ func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInf
// permit us to skip over definitely-unset fields at marshal time.
var hasPresence bool
hasPresence, cf.isLazy = usePresenceForField(si, fd)
hasPresence, cf.isLazy = filedesc.UsePresenceForField(fd)
if hasPresence {
cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd)

View File

@@ -11,6 +11,7 @@ import (
"strings"
"sync/atomic"
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/reflect/protoreflect"
)
@@ -53,7 +54,7 @@ func opaqueInitHook(mi *MessageInfo) bool {
fd := fds.Get(i)
fs := si.fieldsByNumber[fd.Number()]
var fi fieldInfo
usePresence, _ := usePresenceForField(si, fd)
usePresence, _ := filedesc.UsePresenceForField(fd)
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
@@ -343,17 +344,15 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
if p.IsNil() {
return false
}
sp := p.Apply(fieldOffset).AtomicGetPointer()
if sp.IsNil() {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if rv.IsNil() {
return false
}
rv := sp.AsValueOf(fs.Type.Elem())
return rv.Elem().Len() > 0
},
clear: func(p pointer) {
sp := p.Apply(fieldOffset).AtomicGetPointer()
if !sp.IsNil() {
rv := sp.AsValueOf(fs.Type.Elem())
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if !rv.IsNil() {
rv.Elem().Set(reflect.Zero(rv.Type().Elem()))
}
},
@@ -361,11 +360,10 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
if p.IsNil() {
return conv.Zero()
}
sp := p.Apply(fieldOffset).AtomicGetPointer()
if sp.IsNil() {
rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
if rv.IsNil() {
return conv.Zero()
}
rv := sp.AsValueOf(fs.Type.Elem())
if rv.Elem().Len() == 0 {
return conv.Zero()
}
@@ -598,30 +596,3 @@ func (mi *MessageInfo) clearPresent(p pointer, index uint32) {
func (mi *MessageInfo) present(p pointer, index uint32) bool {
return p.Apply(mi.presenceOffset).PresenceInfo().Present(index)
}
// usePresenceForField implements the somewhat intricate logic of when
// the presence bitmap is used for a field. The main logic is that a
// field that is optional or that can be lazy will use the presence
// bit, but for proto2, also maps have a presence bit. It also records
// if the field can ever be lazy, which is true if we have a
// lazyOffset and the field is a message or a slice of messages. A
// field that is lazy will always need a presence bit. Oneofs are not
// lazy and do not use presence, unless they are a synthetic oneof,
// which is a proto3 optional field. For proto3 optionals, we use the
// presence and they can also be lazy when applicable (a message).
func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy()
// Non-oneof scalar fields with explicit field presence use the presence array.
usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic())
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
return false, false
case fd.IsMap():
return false, false
case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
return hasLazyField, hasLazyField
default:
return usesPresenceArray || (hasLazyField && fd.HasPresence()), false
}
}

View File

@@ -32,9 +32,6 @@ func (p presence) toElem(num uint32) (ret *uint32) {
// Present checks for the presence of a specific field number in a presence set.
func (p presence) Present(num uint32) bool {
if p.P == nil {
return false
}
return Export{}.Present(p.toElem(num), num)
}

View File

@@ -52,7 +52,7 @@ import (
const (
Major = 1
Minor = 36
Patch = 6
Patch = 8
PreRelease = ""
)

View File

@@ -21,6 +21,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "public_dependency", nil)
case 11:
b = p.appendRepeatedField(b, "weak_dependency", nil)
case 15:
b = p.appendRepeatedField(b, "option_dependency", nil)
case 4:
b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto)
case 5:
@@ -66,6 +68,8 @@ func (p *SourcePath) appendDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange)
case 10:
b = p.appendRepeatedField(b, "reserved_name", nil)
case 11:
b = p.appendSingularField(b, "visibility", nil)
}
return b
}
@@ -85,6 +89,8 @@ func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange)
case 5:
b = p.appendRepeatedField(b, "reserved_name", nil)
case 6:
b = p.appendSingularField(b, "visibility", nil)
}
return b
}
@@ -400,6 +406,8 @@ func (p *SourcePath) appendFeatureSet(b []byte) []byte {
b = p.appendSingularField(b, "json_format", nil)
case 7:
b = p.appendSingularField(b, "enforce_naming_style", nil)
case 8:
b = p.appendSingularField(b, "default_symbol_visibility", nil)
}
return b
}

View File

@@ -151,6 +151,70 @@ func (Edition) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}
}
// Describes the 'visibility' of a symbol with respect to the proto import
// system. Symbols can only be imported when the visibility rules do not prevent
// it (ex: local symbols cannot be imported). Visibility modifiers can only set
// on `message` and `enum` as they are the only types available to be referenced
// from other files.
type SymbolVisibility int32
const (
SymbolVisibility_VISIBILITY_UNSET SymbolVisibility = 0
SymbolVisibility_VISIBILITY_LOCAL SymbolVisibility = 1
SymbolVisibility_VISIBILITY_EXPORT SymbolVisibility = 2
)
// Enum value maps for SymbolVisibility.
var (
SymbolVisibility_name = map[int32]string{
0: "VISIBILITY_UNSET",
1: "VISIBILITY_LOCAL",
2: "VISIBILITY_EXPORT",
}
SymbolVisibility_value = map[string]int32{
"VISIBILITY_UNSET": 0,
"VISIBILITY_LOCAL": 1,
"VISIBILITY_EXPORT": 2,
}
)
func (x SymbolVisibility) Enum() *SymbolVisibility {
p := new(SymbolVisibility)
*p = x
return p
}
func (x SymbolVisibility) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SymbolVisibility) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
}
func (SymbolVisibility) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[1]
}
func (x SymbolVisibility) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *SymbolVisibility) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = SymbolVisibility(num)
return nil
}
// Deprecated: Use SymbolVisibility.Descriptor instead.
func (SymbolVisibility) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1}
}
// The verification state of the extension range.
type ExtensionRangeOptions_VerificationState int32
@@ -183,11 +247,11 @@ func (x ExtensionRangeOptions_VerificationState) String() string {
}
func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
}
func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[1]
return &file_google_protobuf_descriptor_proto_enumTypes[2]
}
func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber {
@@ -299,11 +363,11 @@ func (x FieldDescriptorProto_Type) String() string {
}
func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
}
func (FieldDescriptorProto_Type) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[2]
return &file_google_protobuf_descriptor_proto_enumTypes[3]
}
func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {
@@ -362,11 +426,11 @@ func (x FieldDescriptorProto_Label) String() string {
}
func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
}
func (FieldDescriptorProto_Label) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[3]
return &file_google_protobuf_descriptor_proto_enumTypes[4]
}
func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {
@@ -423,11 +487,11 @@ func (x FileOptions_OptimizeMode) String() string {
}
func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
}
func (FileOptions_OptimizeMode) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[4]
return &file_google_protobuf_descriptor_proto_enumTypes[5]
}
func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {
@@ -489,11 +553,11 @@ func (x FieldOptions_CType) String() string {
}
func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()
}
func (FieldOptions_CType) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[5]
return &file_google_protobuf_descriptor_proto_enumTypes[6]
}
func (x FieldOptions_CType) Number() protoreflect.EnumNumber {
@@ -551,11 +615,11 @@ func (x FieldOptions_JSType) String() string {
}
func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()
}
func (FieldOptions_JSType) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[6]
return &file_google_protobuf_descriptor_proto_enumTypes[7]
}
func (x FieldOptions_JSType) Number() protoreflect.EnumNumber {
@@ -611,11 +675,11 @@ func (x FieldOptions_OptionRetention) String() string {
}
func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()
}
func (FieldOptions_OptionRetention) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[7]
return &file_google_protobuf_descriptor_proto_enumTypes[8]
}
func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber {
@@ -694,11 +758,11 @@ func (x FieldOptions_OptionTargetType) String() string {
}
func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()
}
func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[8]
return &file_google_protobuf_descriptor_proto_enumTypes[9]
}
func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber {
@@ -756,11 +820,11 @@ func (x MethodOptions_IdempotencyLevel) String() string {
}
func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()
}
func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[9]
return &file_google_protobuf_descriptor_proto_enumTypes[10]
}
func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {
@@ -818,11 +882,11 @@ func (x FeatureSet_FieldPresence) String() string {
}
func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()
}
func (FeatureSet_FieldPresence) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[10]
return &file_google_protobuf_descriptor_proto_enumTypes[11]
}
func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber {
@@ -877,11 +941,11 @@ func (x FeatureSet_EnumType) String() string {
}
func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()
}
func (FeatureSet_EnumType) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[11]
return &file_google_protobuf_descriptor_proto_enumTypes[12]
}
func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber {
@@ -936,11 +1000,11 @@ func (x FeatureSet_RepeatedFieldEncoding) String() string {
}
func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()
}
func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[12]
return &file_google_protobuf_descriptor_proto_enumTypes[13]
}
func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber {
@@ -995,11 +1059,11 @@ func (x FeatureSet_Utf8Validation) String() string {
}
func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()
}
func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[13]
return &file_google_protobuf_descriptor_proto_enumTypes[14]
}
func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber {
@@ -1054,11 +1118,11 @@ func (x FeatureSet_MessageEncoding) String() string {
}
func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()
}
func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[14]
return &file_google_protobuf_descriptor_proto_enumTypes[15]
}
func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber {
@@ -1113,11 +1177,11 @@ func (x FeatureSet_JsonFormat) String() string {
}
func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()
}
func (FeatureSet_JsonFormat) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[15]
return &file_google_protobuf_descriptor_proto_enumTypes[16]
}
func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber {
@@ -1172,11 +1236,11 @@ func (x FeatureSet_EnforceNamingStyle) String() string {
}
func (FeatureSet_EnforceNamingStyle) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[17].Descriptor()
}
func (FeatureSet_EnforceNamingStyle) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[16]
return &file_google_protobuf_descriptor_proto_enumTypes[17]
}
func (x FeatureSet_EnforceNamingStyle) Number() protoreflect.EnumNumber {
@@ -1198,6 +1262,77 @@ func (FeatureSet_EnforceNamingStyle) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 6}
}
type FeatureSet_VisibilityFeature_DefaultSymbolVisibility int32
const (
FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 0
// Default pre-EDITION_2024, all UNSET visibility are export.
FeatureSet_VisibilityFeature_EXPORT_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 1
// All top-level symbols default to export, nested default to local.
FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 2
// All symbols default to local.
FeatureSet_VisibilityFeature_LOCAL_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 3
// All symbols local by default. Nested types cannot be exported.
// With special case caveat for message { enum {} reserved 1 to max; }
// This is the recommended setting for new protos.
FeatureSet_VisibilityFeature_STRICT FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 4
)
// Enum value maps for FeatureSet_VisibilityFeature_DefaultSymbolVisibility.
var (
FeatureSet_VisibilityFeature_DefaultSymbolVisibility_name = map[int32]string{
0: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
1: "EXPORT_ALL",
2: "EXPORT_TOP_LEVEL",
3: "LOCAL_ALL",
4: "STRICT",
}
FeatureSet_VisibilityFeature_DefaultSymbolVisibility_value = map[string]int32{
"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0,
"EXPORT_ALL": 1,
"EXPORT_TOP_LEVEL": 2,
"LOCAL_ALL": 3,
"STRICT": 4,
}
)
func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Enum() *FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
p := new(FeatureSet_VisibilityFeature_DefaultSymbolVisibility)
*p = x
return p
}
func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[18].Descriptor()
}
func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[18]
}
func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *FeatureSet_VisibilityFeature_DefaultSymbolVisibility) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = FeatureSet_VisibilityFeature_DefaultSymbolVisibility(num)
return nil
}
// Deprecated: Use FeatureSet_VisibilityFeature_DefaultSymbolVisibility.Descriptor instead.
func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0, 0}
}
// Represents the identified object's effect on the element in the original
// .proto file.
type GeneratedCodeInfo_Annotation_Semantic int32
@@ -1236,11 +1371,11 @@ func (x GeneratedCodeInfo_Annotation_Semantic) String() string {
}
func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor {
return file_google_protobuf_descriptor_proto_enumTypes[17].Descriptor()
return file_google_protobuf_descriptor_proto_enumTypes[19].Descriptor()
}
func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType {
return &file_google_protobuf_descriptor_proto_enumTypes[17]
return &file_google_protobuf_descriptor_proto_enumTypes[19]
}
func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber {
@@ -1321,6 +1456,9 @@ type FileDescriptorProto struct {
// Indexes of the weak imported files in the dependency list.
// For Google-internal migration only. Do not use.
WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"`
// Names of files imported by this file purely for the purpose of providing
// option extensions. These are excluded from the dependency list above.
OptionDependency []string `protobuf:"bytes,15,rep,name=option_dependency,json=optionDependency" json:"option_dependency,omitempty"`
// All top-level definitions in this file.
MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"`
EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
@@ -1414,6 +1552,13 @@ func (x *FileDescriptorProto) GetWeakDependency() []int32 {
return nil
}
func (x *FileDescriptorProto) GetOptionDependency() []string {
if x != nil {
return x.OptionDependency
}
return nil
}
func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto {
if x != nil {
return x.MessageType
@@ -1484,7 +1629,9 @@ type DescriptorProto struct {
ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved field names, which may not be used by fields in the same message.
// A given name may only be reserved once.
ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
// Support for `export` and `local` keywords on enums.
Visibility *SymbolVisibility `protobuf:"varint,11,opt,name=visibility,enum=google.protobuf.SymbolVisibility" json:"visibility,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1589,6 +1736,13 @@ func (x *DescriptorProto) GetReservedName() []string {
return nil
}
func (x *DescriptorProto) GetVisibility() SymbolVisibility {
if x != nil && x.Visibility != nil {
return *x.Visibility
}
return SymbolVisibility_VISIBILITY_UNSET
}
type ExtensionRangeOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The parser stores options it doesn't recognize here. See above.
@@ -1901,7 +2055,9 @@ type EnumDescriptorProto struct {
ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved enum value names, which may not be reused. A given name may only
// be reserved once.
ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
// Support for `export` and `local` keywords on enums.
Visibility *SymbolVisibility `protobuf:"varint,6,opt,name=visibility,enum=google.protobuf.SymbolVisibility" json:"visibility,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1971,6 +2127,13 @@ func (x *EnumDescriptorProto) GetReservedName() []string {
return nil
}
func (x *EnumDescriptorProto) GetVisibility() SymbolVisibility {
if x != nil && x.Visibility != nil {
return *x.Visibility
}
return SymbolVisibility_VISIBILITY_UNSET
}
// Describes a value within an enum.
type EnumValueDescriptorProto struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -2710,7 +2873,10 @@ type FieldOptions struct {
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
// DEPRECATED. DO NOT USE!
// For Google-internal migration only. Do not use.
//
// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
// Indicate that the field value should not be printed out when using debug
// formats, e.g. when the field contains sensitive credentials.
@@ -2814,6 +2980,7 @@ func (x *FieldOptions) GetDeprecated() bool {
return Default_FieldOptions_Deprecated
}
// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
func (x *FieldOptions) GetWeak() bool {
if x != nil && x.Weak != nil {
return *x.Weak
@@ -3392,17 +3559,18 @@ func (x *UninterpretedOption) GetAggregateValue() string {
// be designed and implemented to handle this, hopefully before we ever hit a
// conflict here.
type FeatureSet struct {
state protoimpl.MessageState `protogen:"open.v1"`
FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"`
EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"`
RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"`
Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"`
MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"`
JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"`
EnforceNamingStyle *FeatureSet_EnforceNamingStyle `protobuf:"varint,7,opt,name=enforce_naming_style,json=enforceNamingStyle,enum=google.protobuf.FeatureSet_EnforceNamingStyle" json:"enforce_naming_style,omitempty"`
extensionFields protoimpl.ExtensionFields
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"`
EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"`
RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"`
Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"`
MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"`
JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"`
EnforceNamingStyle *FeatureSet_EnforceNamingStyle `protobuf:"varint,7,opt,name=enforce_naming_style,json=enforceNamingStyle,enum=google.protobuf.FeatureSet_EnforceNamingStyle" json:"enforce_naming_style,omitempty"`
DefaultSymbolVisibility *FeatureSet_VisibilityFeature_DefaultSymbolVisibility `protobuf:"varint,8,opt,name=default_symbol_visibility,json=defaultSymbolVisibility,enum=google.protobuf.FeatureSet_VisibilityFeature_DefaultSymbolVisibility" json:"default_symbol_visibility,omitempty"`
extensionFields protoimpl.ExtensionFields
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FeatureSet) Reset() {
@@ -3484,6 +3652,13 @@ func (x *FeatureSet) GetEnforceNamingStyle() FeatureSet_EnforceNamingStyle {
return FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN
}
func (x *FeatureSet) GetDefaultSymbolVisibility() FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
if x != nil && x.DefaultSymbolVisibility != nil {
return *x.DefaultSymbolVisibility
}
return FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN
}
// A compiled specification for the defaults of a set of features. These
// messages are generated from FeatureSet extensions and can be used to seed
// feature resolution. The resolution with this object becomes a simple search
@@ -4144,6 +4319,42 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool {
return false
}
type FeatureSet_VisibilityFeature struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FeatureSet_VisibilityFeature) Reset() {
*x = FeatureSet_VisibilityFeature{}
mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FeatureSet_VisibilityFeature) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FeatureSet_VisibilityFeature) ProtoMessage() {}
func (x *FeatureSet_VisibilityFeature) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FeatureSet_VisibilityFeature.ProtoReflect.Descriptor instead.
func (*FeatureSet_VisibilityFeature) Descriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}
}
// A map from every known edition with a unique set of defaults to its
// defaults. Not all editions may be contained here. For a given edition,
// the defaults at the closest matching edition ordered at or before it should
@@ -4161,7 +4372,7 @@ type FeatureSetDefaults_FeatureSetEditionDefault struct {
func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() {
*x = FeatureSetDefaults_FeatureSetEditionDefault{}
mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4173,7 +4384,7 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string {
func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {}
func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4309,7 +4520,7 @@ type SourceCodeInfo_Location struct {
func (x *SourceCodeInfo_Location) Reset() {
*x = SourceCodeInfo_Location{}
mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4321,7 +4532,7 @@ func (x *SourceCodeInfo_Location) String() string {
func (*SourceCodeInfo_Location) ProtoMessage() {}
func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4393,7 +4604,7 @@ type GeneratedCodeInfo_Annotation struct {
func (x *GeneratedCodeInfo_Annotation) Reset() {
*x = GeneratedCodeInfo_Annotation{}
mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
mi := &file_google_protobuf_descriptor_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4405,7 +4616,7 @@ func (x *GeneratedCodeInfo_Annotation) String() string {
func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
mi := &file_google_protobuf_descriptor_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4462,7 +4673,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\n" +
" google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"[\n" +
"\x11FileDescriptorSet\x128\n" +
"\x04file\x18\x01 \x03(\v2$.google.protobuf.FileDescriptorProtoR\x04file*\f\b\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\x98\x05\n" +
"\x04file\x18\x01 \x03(\v2$.google.protobuf.FileDescriptorProtoR\x04file*\f\b\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\xc5\x05\n" +
"\x13FileDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
"\apackage\x18\x02 \x01(\tR\apackage\x12\x1e\n" +
@@ -4471,7 +4682,8 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"dependency\x12+\n" +
"\x11public_dependency\x18\n" +
" \x03(\x05R\x10publicDependency\x12'\n" +
"\x0fweak_dependency\x18\v \x03(\x05R\x0eweakDependency\x12C\n" +
"\x0fweak_dependency\x18\v \x03(\x05R\x0eweakDependency\x12+\n" +
"\x11option_dependency\x18\x0f \x03(\tR\x10optionDependency\x12C\n" +
"\fmessage_type\x18\x04 \x03(\v2 .google.protobuf.DescriptorProtoR\vmessageType\x12A\n" +
"\tenum_type\x18\x05 \x03(\v2$.google.protobuf.EnumDescriptorProtoR\benumType\x12A\n" +
"\aservice\x18\x06 \x03(\v2'.google.protobuf.ServiceDescriptorProtoR\aservice\x12C\n" +
@@ -4479,7 +4691,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\aoptions\x18\b \x01(\v2\x1c.google.protobuf.FileOptionsR\aoptions\x12I\n" +
"\x10source_code_info\x18\t \x01(\v2\x1f.google.protobuf.SourceCodeInfoR\x0esourceCodeInfo\x12\x16\n" +
"\x06syntax\x18\f \x01(\tR\x06syntax\x122\n" +
"\aedition\x18\x0e \x01(\x0e2\x18.google.protobuf.EditionR\aedition\"\xb9\x06\n" +
"\aedition\x18\x0e \x01(\x0e2\x18.google.protobuf.EditionR\aedition\"\xfc\x06\n" +
"\x0fDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12;\n" +
"\x05field\x18\x02 \x03(\v2%.google.protobuf.FieldDescriptorProtoR\x05field\x12C\n" +
@@ -4493,7 +4705,10 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\aoptions\x18\a \x01(\v2\x1f.google.protobuf.MessageOptionsR\aoptions\x12U\n" +
"\x0ereserved_range\x18\t \x03(\v2..google.protobuf.DescriptorProto.ReservedRangeR\rreservedRange\x12#\n" +
"\rreserved_name\x18\n" +
" \x03(\tR\freservedName\x1az\n" +
" \x03(\tR\freservedName\x12A\n" +
"\n" +
"visibility\x18\v \x01(\x0e2!.google.protobuf.SymbolVisibilityR\n" +
"visibility\x1az\n" +
"\x0eExtensionRange\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
"\x03end\x18\x02 \x01(\x05R\x03end\x12@\n" +
@@ -4562,13 +4777,16 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0eLABEL_REQUIRED\x10\x02\"c\n" +
"\x14OneofDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x127\n" +
"\aoptions\x18\x02 \x01(\v2\x1d.google.protobuf.OneofOptionsR\aoptions\"\xe3\x02\n" +
"\aoptions\x18\x02 \x01(\v2\x1d.google.protobuf.OneofOptionsR\aoptions\"\xa6\x03\n" +
"\x13EnumDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12?\n" +
"\x05value\x18\x02 \x03(\v2).google.protobuf.EnumValueDescriptorProtoR\x05value\x126\n" +
"\aoptions\x18\x03 \x01(\v2\x1c.google.protobuf.EnumOptionsR\aoptions\x12]\n" +
"\x0ereserved_range\x18\x04 \x03(\v26.google.protobuf.EnumDescriptorProto.EnumReservedRangeR\rreservedRange\x12#\n" +
"\rreserved_name\x18\x05 \x03(\tR\freservedName\x1a;\n" +
"\rreserved_name\x18\x05 \x03(\tR\freservedName\x12A\n" +
"\n" +
"visibility\x18\x06 \x01(\x0e2!.google.protobuf.SymbolVisibilityR\n" +
"visibility\x1a;\n" +
"\x11EnumReservedRange\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
"\x03end\x18\x02 \x01(\x05R\x03end\"\x83\x01\n" +
@@ -4629,7 +4847,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"&deprecated_legacy_json_field_conflicts\x18\v \x01(\bB\x02\x18\x01R\"deprecatedLegacyJsonFieldConflicts\x127\n" +
"\bfeatures\x18\f \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" +
"\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" +
"\"\x9d\r\n" +
"\"\xa1\r\n" +
"\fFieldOptions\x12A\n" +
"\x05ctype\x18\x01 \x01(\x0e2#.google.protobuf.FieldOptions.CType:\x06STRINGR\x05ctype\x12\x16\n" +
"\x06packed\x18\x02 \x01(\bR\x06packed\x12G\n" +
@@ -4638,9 +4856,9 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0funverified_lazy\x18\x0f \x01(\b:\x05falseR\x0eunverifiedLazy\x12%\n" +
"\n" +
"deprecated\x18\x03 \x01(\b:\x05falseR\n" +
"deprecated\x12\x19\n" +
"deprecated\x12\x1d\n" +
"\x04weak\x18\n" +
" \x01(\b:\x05falseR\x04weak\x12(\n" +
" \x01(\b:\x05falseB\x02\x18\x01R\x04weak\x12(\n" +
"\fdebug_redact\x18\x10 \x01(\b:\x05falseR\vdebugRedact\x12K\n" +
"\tretention\x18\x11 \x01(\x0e2-.google.protobuf.FieldOptions.OptionRetentionR\tretention\x12H\n" +
"\atargets\x18\x13 \x03(\x0e2..google.protobuf.FieldOptions.OptionTargetTypeR\atargets\x12W\n" +
@@ -4728,7 +4946,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0faggregate_value\x18\b \x01(\tR\x0eaggregateValue\x1aJ\n" +
"\bNamePart\x12\x1b\n" +
"\tname_part\x18\x01 \x02(\tR\bnamePart\x12!\n" +
"\fis_extension\x18\x02 \x02(\bR\visExtension\"\xae\f\n" +
"\fis_extension\x18\x02 \x02(\bR\visExtension\"\x8e\x0f\n" +
"\n" +
"FeatureSet\x12\x91\x01\n" +
"\x0efield_presence\x18\x01 \x01(\x0e2).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\bEXPLICIT\x18\x84\a\xa2\x01\r\x12\bIMPLICIT\x18\xe7\a\xa2\x01\r\x12\bEXPLICIT\x18\xe8\a\xb2\x01\x03\b\xe8\aR\rfieldPresence\x12l\n" +
@@ -4739,7 +4957,18 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\vjson_format\x18\x06 \x01(\x0e2&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\a\xa2\x01\n" +
"\x12\x05ALLOW\x18\xe7\a\xb2\x01\x03\b\xe8\aR\n" +
"jsonFormat\x12\xab\x01\n" +
"\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\"\\\n" +
"\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\x12\xb9\x01\n" +
"\x19default_symbol_visibility\x18\b \x01(\x0e2E.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\n" +
"EXPORT_ALL\x18\x84\a\xa2\x01\x15\x12\x10EXPORT_TOP_LEVEL\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x17defaultSymbolVisibility\x1a\xa1\x01\n" +
"\x11VisibilityFeature\"\x81\x01\n" +
"\x17DefaultSymbolVisibility\x12%\n" +
"!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\x10\x00\x12\x0e\n" +
"\n" +
"EXPORT_ALL\x10\x01\x12\x14\n" +
"\x10EXPORT_TOP_LEVEL\x10\x02\x12\r\n" +
"\tLOCAL_ALL\x10\x03\x12\n" +
"\n" +
"\x06STRICT\x10\x04J\b\b\x01\x10\x80\x80\x80\x80\x02\"\\\n" +
"\rFieldPresence\x12\x1a\n" +
"\x16FIELD_PRESENCE_UNKNOWN\x10\x00\x12\f\n" +
"\bEXPLICIT\x10\x01\x12\f\n" +
@@ -4817,7 +5046,11 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x17EDITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n" +
"\x17EDITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n" +
"\x17EDITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n" +
"\vEDITION_MAX\x10\xff\xff\xff\xff\aB~\n" +
"\vEDITION_MAX\x10\xff\xff\xff\xff\a*U\n" +
"\x10SymbolVisibility\x12\x14\n" +
"\x10VISIBILITY_UNSET\x10\x00\x12\x14\n" +
"\x10VISIBILITY_LOCAL\x10\x01\x12\x15\n" +
"\x11VISIBILITY_EXPORT\x10\x02B~\n" +
"\x13com.google.protobufB\x10DescriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection"
var (
@@ -4832,145 +5065,151 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte {
return file_google_protobuf_descriptor_proto_rawDescData
}
var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 18)
var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 20)
var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
var file_google_protobuf_descriptor_proto_goTypes = []any{
(Edition)(0), // 0: google.protobuf.Edition
(ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState
(FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type
(FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label
(FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode
(FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType
(FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType
(FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention
(FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType
(MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel
(FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence
(FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType
(FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding
(FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation
(FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding
(FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat
(FeatureSet_EnforceNamingStyle)(0), // 16: google.protobuf.FeatureSet.EnforceNamingStyle
(GeneratedCodeInfo_Annotation_Semantic)(0), // 17: google.protobuf.GeneratedCodeInfo.Annotation.Semantic
(*FileDescriptorSet)(nil), // 18: google.protobuf.FileDescriptorSet
(*FileDescriptorProto)(nil), // 19: google.protobuf.FileDescriptorProto
(*DescriptorProto)(nil), // 20: google.protobuf.DescriptorProto
(*ExtensionRangeOptions)(nil), // 21: google.protobuf.ExtensionRangeOptions
(*FieldDescriptorProto)(nil), // 22: google.protobuf.FieldDescriptorProto
(*OneofDescriptorProto)(nil), // 23: google.protobuf.OneofDescriptorProto
(*EnumDescriptorProto)(nil), // 24: google.protobuf.EnumDescriptorProto
(*EnumValueDescriptorProto)(nil), // 25: google.protobuf.EnumValueDescriptorProto
(*ServiceDescriptorProto)(nil), // 26: google.protobuf.ServiceDescriptorProto
(*MethodDescriptorProto)(nil), // 27: google.protobuf.MethodDescriptorProto
(*FileOptions)(nil), // 28: google.protobuf.FileOptions
(*MessageOptions)(nil), // 29: google.protobuf.MessageOptions
(*FieldOptions)(nil), // 30: google.protobuf.FieldOptions
(*OneofOptions)(nil), // 31: google.protobuf.OneofOptions
(*EnumOptions)(nil), // 32: google.protobuf.EnumOptions
(*EnumValueOptions)(nil), // 33: google.protobuf.EnumValueOptions
(*ServiceOptions)(nil), // 34: google.protobuf.ServiceOptions
(*MethodOptions)(nil), // 35: google.protobuf.MethodOptions
(*UninterpretedOption)(nil), // 36: google.protobuf.UninterpretedOption
(*FeatureSet)(nil), // 37: google.protobuf.FeatureSet
(*FeatureSetDefaults)(nil), // 38: google.protobuf.FeatureSetDefaults
(*SourceCodeInfo)(nil), // 39: google.protobuf.SourceCodeInfo
(*GeneratedCodeInfo)(nil), // 40: google.protobuf.GeneratedCodeInfo
(*DescriptorProto_ExtensionRange)(nil), // 41: google.protobuf.DescriptorProto.ExtensionRange
(*DescriptorProto_ReservedRange)(nil), // 42: google.protobuf.DescriptorProto.ReservedRange
(*ExtensionRangeOptions_Declaration)(nil), // 43: google.protobuf.ExtensionRangeOptions.Declaration
(*EnumDescriptorProto_EnumReservedRange)(nil), // 44: google.protobuf.EnumDescriptorProto.EnumReservedRange
(*FieldOptions_EditionDefault)(nil), // 45: google.protobuf.FieldOptions.EditionDefault
(*FieldOptions_FeatureSupport)(nil), // 46: google.protobuf.FieldOptions.FeatureSupport
(*UninterpretedOption_NamePart)(nil), // 47: google.protobuf.UninterpretedOption.NamePart
(*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 48: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
(*SourceCodeInfo_Location)(nil), // 49: google.protobuf.SourceCodeInfo.Location
(*GeneratedCodeInfo_Annotation)(nil), // 50: google.protobuf.GeneratedCodeInfo.Annotation
(Edition)(0), // 0: google.protobuf.Edition
(SymbolVisibility)(0), // 1: google.protobuf.SymbolVisibility
(ExtensionRangeOptions_VerificationState)(0), // 2: google.protobuf.ExtensionRangeOptions.VerificationState
(FieldDescriptorProto_Type)(0), // 3: google.protobuf.FieldDescriptorProto.Type
(FieldDescriptorProto_Label)(0), // 4: google.protobuf.FieldDescriptorProto.Label
(FileOptions_OptimizeMode)(0), // 5: google.protobuf.FileOptions.OptimizeMode
(FieldOptions_CType)(0), // 6: google.protobuf.FieldOptions.CType
(FieldOptions_JSType)(0), // 7: google.protobuf.FieldOptions.JSType
(FieldOptions_OptionRetention)(0), // 8: google.protobuf.FieldOptions.OptionRetention
(FieldOptions_OptionTargetType)(0), // 9: google.protobuf.FieldOptions.OptionTargetType
(MethodOptions_IdempotencyLevel)(0), // 10: google.protobuf.MethodOptions.IdempotencyLevel
(FeatureSet_FieldPresence)(0), // 11: google.protobuf.FeatureSet.FieldPresence
(FeatureSet_EnumType)(0), // 12: google.protobuf.FeatureSet.EnumType
(FeatureSet_RepeatedFieldEncoding)(0), // 13: google.protobuf.FeatureSet.RepeatedFieldEncoding
(FeatureSet_Utf8Validation)(0), // 14: google.protobuf.FeatureSet.Utf8Validation
(FeatureSet_MessageEncoding)(0), // 15: google.protobuf.FeatureSet.MessageEncoding
(FeatureSet_JsonFormat)(0), // 16: google.protobuf.FeatureSet.JsonFormat
(FeatureSet_EnforceNamingStyle)(0), // 17: google.protobuf.FeatureSet.EnforceNamingStyle
(FeatureSet_VisibilityFeature_DefaultSymbolVisibility)(0), // 18: google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility
(GeneratedCodeInfo_Annotation_Semantic)(0), // 19: google.protobuf.GeneratedCodeInfo.Annotation.Semantic
(*FileDescriptorSet)(nil), // 20: google.protobuf.FileDescriptorSet
(*FileDescriptorProto)(nil), // 21: google.protobuf.FileDescriptorProto
(*DescriptorProto)(nil), // 22: google.protobuf.DescriptorProto
(*ExtensionRangeOptions)(nil), // 23: google.protobuf.ExtensionRangeOptions
(*FieldDescriptorProto)(nil), // 24: google.protobuf.FieldDescriptorProto
(*OneofDescriptorProto)(nil), // 25: google.protobuf.OneofDescriptorProto
(*EnumDescriptorProto)(nil), // 26: google.protobuf.EnumDescriptorProto
(*EnumValueDescriptorProto)(nil), // 27: google.protobuf.EnumValueDescriptorProto
(*ServiceDescriptorProto)(nil), // 28: google.protobuf.ServiceDescriptorProto
(*MethodDescriptorProto)(nil), // 29: google.protobuf.MethodDescriptorProto
(*FileOptions)(nil), // 30: google.protobuf.FileOptions
(*MessageOptions)(nil), // 31: google.protobuf.MessageOptions
(*FieldOptions)(nil), // 32: google.protobuf.FieldOptions
(*OneofOptions)(nil), // 33: google.protobuf.OneofOptions
(*EnumOptions)(nil), // 34: google.protobuf.EnumOptions
(*EnumValueOptions)(nil), // 35: google.protobuf.EnumValueOptions
(*ServiceOptions)(nil), // 36: google.protobuf.ServiceOptions
(*MethodOptions)(nil), // 37: google.protobuf.MethodOptions
(*UninterpretedOption)(nil), // 38: google.protobuf.UninterpretedOption
(*FeatureSet)(nil), // 39: google.protobuf.FeatureSet
(*FeatureSetDefaults)(nil), // 40: google.protobuf.FeatureSetDefaults
(*SourceCodeInfo)(nil), // 41: google.protobuf.SourceCodeInfo
(*GeneratedCodeInfo)(nil), // 42: google.protobuf.GeneratedCodeInfo
(*DescriptorProto_ExtensionRange)(nil), // 43: google.protobuf.DescriptorProto.ExtensionRange
(*DescriptorProto_ReservedRange)(nil), // 44: google.protobuf.DescriptorProto.ReservedRange
(*ExtensionRangeOptions_Declaration)(nil), // 45: google.protobuf.ExtensionRangeOptions.Declaration
(*EnumDescriptorProto_EnumReservedRange)(nil), // 46: google.protobuf.EnumDescriptorProto.EnumReservedRange
(*FieldOptions_EditionDefault)(nil), // 47: google.protobuf.FieldOptions.EditionDefault
(*FieldOptions_FeatureSupport)(nil), // 48: google.protobuf.FieldOptions.FeatureSupport
(*UninterpretedOption_NamePart)(nil), // 49: google.protobuf.UninterpretedOption.NamePart
(*FeatureSet_VisibilityFeature)(nil), // 50: google.protobuf.FeatureSet.VisibilityFeature
(*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 51: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
(*SourceCodeInfo_Location)(nil), // 52: google.protobuf.SourceCodeInfo.Location
(*GeneratedCodeInfo_Annotation)(nil), // 53: google.protobuf.GeneratedCodeInfo.Annotation
}
var file_google_protobuf_descriptor_proto_depIdxs = []int32{
19, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
20, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
24, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
26, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
22, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
28, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
39, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
21, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
22, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
26, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
28, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
24, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
30, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
41, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition
22, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
22, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
20, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
24, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
41, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
23, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
29, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
42, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
36, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
43, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration
37, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet
1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState
3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
30, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
31, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
25, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
32, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
44, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
33, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
27, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
34, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
35, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
37, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet
36, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
37, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet
36, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention
8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType
45, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault
37, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet
46, // 42: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
36, // 43: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
37, // 44: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet
36, // 45: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
37, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet
36, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
37, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet
46, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
36, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
37, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet
36, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
37, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet
36, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
47, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence
11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType
12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding
13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation
14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding
15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat
16, // 63: google.protobuf.FeatureSet.enforce_naming_style:type_name -> google.protobuf.FeatureSet.EnforceNamingStyle
48, // 64: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
0, // 65: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition
0, // 66: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition
49, // 67: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
50, // 68: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
21, // 69: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
0, // 70: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition
0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition
0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition
0, // 73: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition
0, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition
37, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet
37, // 76: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet
17, // 77: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic
78, // [78:78] is the sub-list for method output_type
78, // [78:78] is the sub-list for method input_type
78, // [78:78] is the sub-list for extension type_name
78, // [78:78] is the sub-list for extension extendee
0, // [0:78] is the sub-list for field type_name
24, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
24, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
22, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
26, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
43, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
25, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
31, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
44, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
1, // 16: google.protobuf.DescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility
38, // 17: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
45, // 18: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration
39, // 19: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet
2, // 20: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState
4, // 21: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
3, // 22: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
32, // 23: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
33, // 24: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
27, // 25: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
34, // 26: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
46, // 27: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
1, // 28: google.protobuf.EnumDescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility
35, // 29: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
29, // 30: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
36, // 31: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
37, // 32: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
5, // 33: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
39, // 34: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet
38, // 35: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
39, // 36: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet
38, // 37: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
6, // 38: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
7, // 39: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
8, // 40: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention
9, // 41: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType
47, // 42: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault
39, // 43: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet
48, // 44: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
38, // 45: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
39, // 46: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet
38, // 47: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
39, // 48: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet
38, // 49: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
39, // 50: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet
48, // 51: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
38, // 52: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
39, // 53: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet
38, // 54: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
10, // 55: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
39, // 56: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet
38, // 57: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
49, // 58: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
11, // 59: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence
12, // 60: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType
13, // 61: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding
14, // 62: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation
15, // 63: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding
16, // 64: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat
17, // 65: google.protobuf.FeatureSet.enforce_naming_style:type_name -> google.protobuf.FeatureSet.EnforceNamingStyle
18, // 66: google.protobuf.FeatureSet.default_symbol_visibility:type_name -> google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility
51, // 67: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
0, // 68: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition
0, // 69: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition
52, // 70: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
53, // 71: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
23, // 72: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
0, // 73: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition
0, // 74: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition
0, // 75: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition
0, // 76: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition
0, // 77: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition
39, // 78: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet
39, // 79: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet
19, // 80: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic
81, // [81:81] is the sub-list for method output_type
81, // [81:81] is the sub-list for method input_type
81, // [81:81] is the sub-list for extension type_name
81, // [81:81] is the sub-list for extension extendee
0, // [0:81] is the sub-list for field type_name
}
func init() { file_google_protobuf_descriptor_proto_init() }
@@ -4983,8 +5222,8 @@ func file_google_protobuf_descriptor_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)),
NumEnums: 18,
NumMessages: 33,
NumEnums: 20,
NumMessages: 34,
NumExtensions: 0,
NumServices: 0,
},

13
vendor/modules.txt vendored
View File

@@ -205,8 +205,6 @@ github.com/moby/sys/capability
# github.com/moby/sys/mountinfo v0.7.2
## explicit; go 1.17
github.com/moby/sys/mountinfo
# github.com/moby/sys/sequential v0.5.0
## explicit; go 1.17
# github.com/moby/sys/user v0.4.0
## explicit; go 1.17
github.com/moby/sys/user
@@ -359,7 +357,7 @@ go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
go.opentelemetry.io/otel/trace/internal/telemetry
go.opentelemetry.io/otel/trace/noop
# go.podman.io/common v0.0.0-20250826054041-6e4bed3c9118
# go.podman.io/common v0.65.0
## explicit; go 1.23.3
go.podman.io/common/pkg/auth
go.podman.io/common/pkg/capabilities
@@ -369,7 +367,7 @@ go.podman.io/common/pkg/password
go.podman.io/common/pkg/report
go.podman.io/common/pkg/report/camelcase
go.podman.io/common/pkg/retry
# go.podman.io/image/v5 v5.36.1-0.20250820085751-a13b38f45723
# go.podman.io/image/v5 v5.37.0
## explicit; go 1.23.3
go.podman.io/image/v5/copy
go.podman.io/image/v5/directory
@@ -427,6 +425,7 @@ go.podman.io/image/v5/pkg/tlsclientconfig
go.podman.io/image/v5/sif
go.podman.io/image/v5/signature
go.podman.io/image/v5/signature/internal
go.podman.io/image/v5/signature/internal/sequoia
go.podman.io/image/v5/signature/signer
go.podman.io/image/v5/signature/sigstore
go.podman.io/image/v5/signature/sigstore/fulcio
@@ -439,7 +438,7 @@ go.podman.io/image/v5/transports
go.podman.io/image/v5/transports/alltransports
go.podman.io/image/v5/types
go.podman.io/image/v5/version
# go.podman.io/storage v1.59.1-0.20250820085751-a13b38f45723
# go.podman.io/storage v1.60.0
## explicit; go 1.23.3
go.podman.io/storage
go.podman.io/storage/drivers
@@ -622,8 +621,8 @@ google.golang.org/grpc/serviceconfig
google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
# google.golang.org/protobuf v1.36.6
## explicit; go 1.22
# google.golang.org/protobuf v1.36.8
## explicit; go 1.23
google.golang.org/protobuf/encoding/protojson
google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/encoding/protowire