From 8d26cb41ee8165fa2c1b8dbab07cd93f33ee426f Mon Sep 17 00:00:00 2001 From: Tzrlk Date: Wed, 14 Aug 2024 13:15:03 +1200 Subject: [PATCH 1/3] Splitting generated client and types. --- .gitignore | 3 - .../templates/additional-properties.go.tmpl | 76 +++ internal/idmc/templates/imports.go.tmpl | 53 +++ internal/idmc/templates/inline.go.tmpl | 91 ++++ internal/idmc/templates/typedef.go.tmpl | 8 + .../union-and-additional-properties.go.tmpl | 74 +++ internal/idmc/templates/union.go.tmpl | 144 ++++++ internal/idmc/v2/api.go | 3 +- internal/idmc/v2/client.gen.go | 414 +---------------- internal/idmc/v2/codegen.yml | 22 +- internal/idmc/v2/types.gen.go | 439 ++++++++++++++++++ internal/idmc/v3/api.go | 3 +- internal/idmc/v3/client.gen.go | 384 +-------------- internal/idmc/v3/codegen.yml | 20 +- internal/idmc/v3/types.gen.go | 399 ++++++++++++++++ 15 files changed, 1315 insertions(+), 818 deletions(-) create mode 100644 internal/idmc/templates/additional-properties.go.tmpl create mode 100644 internal/idmc/templates/imports.go.tmpl create mode 100644 internal/idmc/templates/inline.go.tmpl create mode 100644 internal/idmc/templates/typedef.go.tmpl create mode 100644 internal/idmc/templates/union-and-additional-properties.go.tmpl create mode 100644 internal/idmc/templates/union.go.tmpl create mode 100644 internal/idmc/v2/types.gen.go create mode 100644 internal/idmc/v3/types.gen.go diff --git a/.gitignore b/.gitignore index 5144841..b9212b5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ dist/ *.dll *.exe -# Keep windows files with windows line endings -*.winfile eol=crlf - # Mac .DS_Store diff --git a/internal/idmc/templates/additional-properties.go.tmpl b/internal/idmc/templates/additional-properties.go.tmpl new file mode 100644 index 0000000..a48b6e6 --- /dev/null +++ b/internal/idmc/templates/additional-properties.go.tmpl @@ -0,0 +1,76 @@ +// ///////// + +{{range .Types}}{{$addType := .Schema.AdditionalPropertiesType.TypeDecl}} + +// Getter for additional properties for {{.TypeName}}. Returns the specified +// element and whether it was found +func (a {{.TypeName}}) Get(fieldName string) (value {{$addType}}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for {{.TypeName}} +func (a *{{.TypeName}}) Set(fieldName string, value {{$addType}}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]{{$addType}}) + } + a.AdditionalProperties[fieldName] = value +} + +{{if eq 0 (len .Schema.UnionElements) -}} +// Override default JSON handling for {{.TypeName}} to handle AdditionalProperties +func (a *{{.TypeName}}) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } +{{range .Schema.Properties}} + if raw, found := object["{{.JsonFieldName}}"]; found { + err = json.Unmarshal(raw, &a.{{.GoFieldName}}) + if err != nil { + return fmt.Errorf("error reading '{{.JsonFieldName}}': %w", err) + } + delete(object, "{{.JsonFieldName}}") + } +{{end}} + if len(object) != 0 { + a.AdditionalProperties = make(map[string]{{$addType}}) + for fieldName, fieldBuf := range object { + var fieldVal {{$addType}} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for {{.TypeName}} to handle AdditionalProperties +func (a {{.TypeName}}) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) +{{range .Schema.Properties}} +{{if not .Required}}if a.{{.GoFieldName}} != nil { {{end}} + object["{{.JsonFieldName}}"], err = json.Marshal(a.{{.GoFieldName}}) + if err != nil { + return nil, fmt.Errorf("error marshaling '{{.JsonFieldName}}': %w", err) + } +{{if not .Required}} }{{end}} +{{end}} + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} +{{end}} +{{end}} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/templates/imports.go.tmpl b/internal/idmc/templates/imports.go.tmpl new file mode 100644 index 0000000..2193345 --- /dev/null +++ b/internal/idmc/templates/imports.go.tmpl @@ -0,0 +1,53 @@ +{{- if opts.Generate.StdHTTPServer }}//go:build go1.22 +{{- end }} +// /////////////////////// + +// Package {{.PackageName}} provides primitives to interact with the openapi HTTP API. +// +// Code generated by {{.ModuleName}} version {{.Version}} DO NOT EDIT. +package {{.PackageName}} + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "gopkg.in/yaml.v2" + "io" + "os" + "mime" + "mime/multipart" + "net/http" + "net/url" + "path" + "strings" + "time" + + "github.com/oapi-codegen/runtime" + "github.com/oapi-codegen/nullable" + strictecho "github.com/oapi-codegen/runtime/strictmiddleware/echo" + strictgin "github.com/oapi-codegen/runtime/strictmiddleware/gin" + strictiris "github.com/oapi-codegen/runtime/strictmiddleware/iris" + strictnethttp "github.com/oapi-codegen/runtime/strictmiddleware/nethttp" + openapi_types "github.com/oapi-codegen/runtime/types" + "github.com/getkin/kin-openapi/openapi3" + "github.com/go-chi/chi/v5" + "github.com/labstack/echo/v4" + "github.com/gin-gonic/gin" + "github.com/gofiber/fiber/v2" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/core/router" + "github.com/gorilla/mux" + {{- range .ExternalImports}} + {{ . }} + {{- end}} + {{- range .AdditionalImports}} + {{.Alias}} "{{.Package}}" + {{- end}} +) + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/templates/inline.go.tmpl b/internal/idmc/templates/inline.go.tmpl new file mode 100644 index 0000000..bf201e6 --- /dev/null +++ b/internal/idmc/templates/inline.go.tmpl @@ -0,0 +1,91 @@ +// //////////////////////// + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ +{{range .SpecParts}} + "{{.}}",{{end}} +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %w", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %w", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + res := make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + {{ if .ImportMapping }} + pathPrefix := path.Dir(pathToFile) + {{ end }} + {{ range $key, $value := .ImportMapping }} + for rawPath, rawFunc := range {{ $value.Name }}.PathToRawSpec(path.Join(pathPrefix, "{{ $key }}")) { + if _, ok := res[rawPath]; ok { + // it is not possible to compare functions in golang, so always overwrite the old value + } + res[rawPath] = rawFunc + } + {{- end }} + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + resolvePath := PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + pathToFile := url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/templates/typedef.go.tmpl b/internal/idmc/templates/typedef.go.tmpl new file mode 100644 index 0000000..dd80d26 --- /dev/null +++ b/internal/idmc/templates/typedef.go.tmpl @@ -0,0 +1,8 @@ +// /////////////////////// + +{{range .Types}} +{{ if .Schema.Description }}{{ toGoComment .Schema.Description .TypeName }}{{ else }}// {{.TypeName}} defines model for {{.JsonName}}.{{ end }} +type {{.TypeName}} {{if .IsAlias }}={{end}} {{.Schema.TypeDecl}} +{{end}} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/templates/union-and-additional-properties.go.tmpl b/internal/idmc/templates/union-and-additional-properties.go.tmpl new file mode 100644 index 0000000..253b5de --- /dev/null +++ b/internal/idmc/templates/union-and-additional-properties.go.tmpl @@ -0,0 +1,74 @@ +{{range .Types}} + +{{$addType := .Schema.AdditionalPropertiesType.TypeDecl}} +{{$typeName := .TypeName -}} +{{$discriminator := .Schema.Discriminator}} +{{$properties := .Schema.Properties -}} + +// Override default JSON handling for {{.TypeName}} to handle AdditionalProperties and union +func (a *{{.TypeName}}) UnmarshalJSON(b []byte) error { + err := a.union.UnmarshalJSON(b) + if err != nil { + return err + } + object := make(map[string]json.RawMessage) + err = json.Unmarshal(b, &object) + if err != nil { + return err + } +{{range .Schema.Properties}} + if raw, found := object["{{.JsonFieldName}}"]; found { + err = json.Unmarshal(raw, &a.{{.GoFieldName}}) + if err != nil { + return fmt.Errorf("error reading '{{.JsonFieldName}}': %w", err) + } + delete(object, "{{.JsonFieldName}}") + } +{{end}} + if len(object) != 0 { + a.AdditionalProperties = make(map[string]{{$addType}}) + for fieldName, fieldBuf := range object { + var fieldVal {{$addType}} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for {{.TypeName}} to handle AdditionalProperties and union +func (a {{.TypeName}}) MarshalJSON() ([]byte, error) { + var err error + b, err := a.union.MarshalJSON() + if err != nil { + return nil, err + } + object := make(map[string]json.RawMessage) + if a.union != nil { + err = json.Unmarshal(b, &object) + if err != nil { + return nil, err + } + } +{{range .Schema.Properties}} +{{if not .Required}}if a.{{.GoFieldName}} != nil { {{end}} + object["{{.JsonFieldName}}"], err = json.Marshal(a.{{.GoFieldName}}) + if err != nil { + return nil, fmt.Errorf("error marshaling '{{.JsonFieldName}}': %w", err) + } +{{if not .Required}} }{{end}} +{{end}} + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} +{{end}} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/templates/union.go.tmpl b/internal/idmc/templates/union.go.tmpl new file mode 100644 index 0000000..4405567 --- /dev/null +++ b/internal/idmc/templates/union.go.tmpl @@ -0,0 +1,144 @@ +// ///////////////////////// + +{{range .Types}} + {{$typeName := .TypeName -}} + {{$discriminator := .Schema.Discriminator}} + {{$properties := .Schema.Properties -}} + {{range .Schema.UnionElements}} + {{$element := . -}} + // As{{ .Method }} returns the union data inside the {{$typeName}} as a {{.}} + func (t {{$typeName}}) As{{ .Method }}() ({{.}}, error) { + var body {{.}} + err := json.Unmarshal(t.union, &body) + return body, err + } + + // From{{ .Method }} overwrites any union data inside the {{$typeName}} as the provided {{.}} + func (t *{{$typeName}}) From{{ .Method }} (v {{.}}) error { + {{if $discriminator -}} + {{range $value, $type := $discriminator.Mapping -}} + {{if eq $type $element -}} + {{$hasProperty := false -}} + {{range $properties -}} + {{if eq .GoFieldName $discriminator.PropertyName -}} + t.{{$discriminator.PropertyName}} = "{{$value}}" + {{$hasProperty = true -}} + {{end -}} + {{end -}} + {{if not $hasProperty}}v.{{$discriminator.PropertyName}} = "{{$value}}"{{end}} + {{end -}} + {{end -}} + {{end -}} + b, err := json.Marshal(v) + t.union = b + return err + } + + // Merge{{ .Method }} performs a merge with any union data inside the {{$typeName}}, using the provided {{.}} + func (t *{{$typeName}}) Merge{{ .Method }} (v {{.}}) error { + {{if $discriminator -}} + {{range $value, $type := $discriminator.Mapping -}} + {{if eq $type $element -}} + {{$hasProperty := false -}} + {{range $properties -}} + {{if eq .GoFieldName $discriminator.PropertyName -}} + t.{{$discriminator.PropertyName}} = "{{$value}}" + {{$hasProperty = true -}} + {{end -}} + {{end -}} + {{if not $hasProperty}}v.{{$discriminator.PropertyName}} = "{{$value}}"{{end}} + {{end -}} + {{end -}} + {{end -}} + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err + } + {{end}} + + {{if $discriminator}} + func (t {{.TypeName}}) Discriminator() (string, error) { + var discriminator struct { + Discriminator string {{$discriminator.JSONTag}} + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err + } + + {{if ne 0 (len $discriminator.Mapping)}} + func (t {{.TypeName}}) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator{ + {{range $value, $type := $discriminator.Mapping -}} + case "{{$value}}": + return t.As{{$type}}() + {{end -}} + default: + return nil, errors.New("unknown discriminator value: "+discriminator) + } + } + {{end}} + {{end}} + + {{if not .Schema.HasAdditionalProperties}} + + func (t {{.TypeName}}) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + {{if ne 0 (len .Schema.Properties) -}} + if err != nil { + return nil, err + } + object := make(map[string]json.RawMessage) + if t.union != nil { + err = json.Unmarshal(b, &object) + if err != nil { + return nil, err + } + } + {{range .Schema.Properties}} + {{if not .Required}}if t.{{.GoFieldName}} != nil { {{end}} + object["{{.JsonFieldName}}"], err = json.Marshal(t.{{.GoFieldName}}) + if err != nil { + return nil, fmt.Errorf("error marshaling '{{.JsonFieldName}}': %w", err) + } + {{if not .Required}} }{{end}} + {{end -}} + b, err = json.Marshal(object) + {{end -}} + return b, err + } + + func (t *{{.TypeName}}) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + {{if ne 0 (len .Schema.Properties) -}} + if err != nil { + return err + } + object := make(map[string]json.RawMessage) + err = json.Unmarshal(b, &object) + if err != nil { + return err + } + {{range .Schema.Properties}} + if raw, found := object["{{.JsonFieldName}}"]; found { + err = json.Unmarshal(raw, &t.{{.GoFieldName}}) + if err != nil { + return fmt.Errorf("error reading '{{.JsonFieldName}}': %w", err) + } + } + {{end}} + {{end -}} + return err + } + {{end}} +{{end}} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/v2/api.go b/internal/idmc/v2/api.go index 368209f..1719048 100644 --- a/internal/idmc/v2/api.go +++ b/internal/idmc/v2/api.go @@ -8,7 +8,8 @@ import ( ) //go:generate -command oapi-codegen go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -//go:generate oapi-codegen -config ./codegen.yml ./openapi.yml +//go:generate oapi-codegen -config ./codegen.yml -generate types -o ./types.gen.go ./openapi.yml +//go:generate oapi-codegen -config ./codegen.yml -generate client -o ./client.gen.go ./openapi.yml type IdmcAdminV2Api struct { Client ClientWithResponses diff --git a/internal/idmc/v2/client.gen.go b/internal/idmc/v2/client.gen.go index 32465d8..02592e8 100644 --- a/internal/idmc/v2/client.gen.go +++ b/internal/idmc/v2/client.gen.go @@ -1,3 +1,5 @@ +// /////////////////////// + // Package v2 provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. @@ -14,423 +16,11 @@ import ( "strings" common "terraform-provider-idmc/internal/idmc/common" - externalRef1 "terraform-provider-idmc/internal/idmc/v3" "github.com/oapi-codegen/runtime" ) -// ///////////////////// - -// ////////////////////////////////////////////////////////////// -// ///////////////////// - -// Defines values for ApiErrorResponseBodyType. -const ( - ApiErrorResponseBodyTypeError ApiErrorResponseBodyType = "error" -) - -// Defines values for GetAgentInstallerInfoResponseBodyType. -const ( - GetAgentInstallerInfoResponseBodyTypeAgentInstallerInfo GetAgentInstallerInfoResponseBodyType = "agentInstallerInfo" -) - -// Defines values for LoginRequestBodyType. -const ( - LoginRequestBodyTypeLogin LoginRequestBodyType = "login" -) - -// Defines values for RuntimeEnvironmentType. -const ( - RuntimeEnvironmentTypeRuntimeEnvironment RuntimeEnvironmentType = "runtimeEnvironment" -) - -// Defines values for RuntimeEnvironmentDataMinimalType. -const ( - RuntimeEnvironmentDataMinimalTypeRuntimeEnvironment RuntimeEnvironmentDataMinimalType = "runtimeEnvironment" -) - -// Defines values for UpdateRuntimeEnvironmentRequestBodyType. -const ( - UpdateRuntimeEnvironmentRequestBodyTypeRuntimeEnvironment UpdateRuntimeEnvironmentRequestBodyType = "runtimeEnvironment" -) - -// ////////////////////////////////////////////////////////////// - -// ApiErrorResponse defines model for apiErrorResponse. -type ApiErrorResponse struct { - union json.RawMessage -} - -// ApiErrorResponseBody When the REST API encounters an error, it returns a REST API error object. -type ApiErrorResponseBody struct { - Type ApiErrorResponseBodyType `json:"@type"` - - // Code The internal error code. - Code string `json:"code"` - - // Description The error message. - Description string `json:"description"` - - // StatusCode The http status code of the response. - StatusCode int `json:"statusCode"` -} - -// ApiErrorResponseBodyType defines model for ApiErrorResponseBody.Type. -type ApiErrorResponseBodyType string - -// GetAgentInstallerInfoResponseBody defines model for getAgentInstallerInfoResponseBody. -type GetAgentInstallerInfoResponseBody struct { - Type *GetAgentInstallerInfoResponseBodyType `json:"@type,omitempty"` - - // ChecksumDownloadUrl The url for a checksum file that can be used to verify the installation. - ChecksumDownloadUrl *string `json:"checksumDownloadUrl,omitempty"` - - // DownloadUrl The url to use for downloading the current secure agent version. - DownloadUrl *string `json:"downloadUrl,omitempty"` - - // InstallToken The short-lived token to use when registering a secure agent with the environment. - InstallToken *string `json:"installToken,omitempty"` -} - -// GetAgentInstallerInfoResponseBodyType defines model for GetAgentInstallerInfoResponseBody.Type. -type GetAgentInstallerInfoResponseBodyType string - -// LoginRequestBody defines model for loginRequestBody. -type LoginRequestBody struct { - Type *LoginRequestBodyType `json:"@type,omitempty"` - - // Password Informatica Intelligent Cloud Services password. - Password string `json:"password"` - - // Username Informatica Intelligent Cloud Services user name for the organization that you want to log in to. - Username string `json:"username"` -} - -// LoginRequestBodyType defines model for LoginRequestBody.Type. -type LoginRequestBodyType string - -// LoginResponseBody defines model for loginResponseBody. -type LoginResponseBody struct { - // CreateTime When the user account was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy Informatica Intelligent Cloud Services user who created the user account. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the user. - Description *string `json:"description,omitempty"` - - // Emails Email address to be notified when the user changes the account password. - Emails *string `json:"emails,omitempty"` - - // FirstName First name for the user account. - FirstName *string `json:"firstName,omitempty"` - - // ForceChangePassword Determines if the user must reset the password after the user logs in for the first time. Includes the following values: - // True. The user must reset the password. - // False. The user is not forced to reset the password. - ForceChangePassword *bool `json:"forceChangePassword,omitempty"` - - // IcSessionId Informatica Intelligent Cloud Services session ID for version 2 REST API session. - // Use in most version 2 REST API request headers. - IcSessionId *string `json:"icSessionId,omitempty"` - - // Id User ID. - Id *string `json:"id,omitempty"` - - // LastName Last name for the user account. - LastName *string `json:"lastName,omitempty"` - - // Name Informatica Intelligent Cloud Services user name. - Name *string `json:"name,omitempty"` - - // OrgId ID of the organization the user belongs to. 22 characters. - // NOTE: Organizations that were created in legacy Informatica Cloud might have an - // organization ID of 6 characters. - OrgId *string `json:"orgId,omitempty"` - - // OrgUuid Unique identifier for the organization. - OrgUuid *string `json:"orgUuid,omitempty"` - - // Password Salesforce user password. Included when user is configured to authenticate through Salesforce. - Password *string `json:"password,omitempty"` - - // Phone Phone number for the user. - Phone *string `json:"phone,omitempty"` - - // Roles Object that includes a role object for each role assigned to the user. - Roles *struct { - // Description Role description. - Description *string `json:"description,omitempty"` - - // Name Role name. Returns one of the following codes: - // Service Consumer - // Designer - // Admin - Name *string `json:"name,omitempty"` - } `json:"roles,omitempty"` - - // SecurityAnswer Answer to the security question. - SecurityAnswer *string `json:"securityAnswer,omitempty"` - - // SecurityQuestion Security question. Returns one of the following codes: - // SPOUSE_MEETING_CITY - // FIRST_JOB_CITY - // CHILDHOOD_FRIEND - // MOTHER_MAIDEN_NAME - // PET_NAME - // CHILDHOOD_NICKNAME - // CUSTOM_QUESTION:"" - SecurityQuestion *string `json:"securityQuestion,omitempty"` - - // ServerUrl Informatica Intelligent Cloud Services URL for the organization the user belongs - // to. Use the serverUrl as a base for most version 2 REST API resource URIs. - ServerUrl *string `json:"serverUrl,omitempty"` - - // SfUsername Salesforce user name. Included when user is configured to authenticate through Salesforce. - SfUsername *string `json:"sfUsername,omitempty"` - - // SpiUrl This field is no longer applicable and has been deprecated. - // Deprecated: - SpiUrl *string `json:"spiUrl,omitempty"` - - // Timezone Time zone of the user. Time zone honors Daylight Saving Time. - // For more information, see Time zone codes. - Timezone *string `json:"timezone,omitempty"` - - // Title Title of the user. - Title *string `json:"title,omitempty"` - - // UpdateTime When the user account was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy Informatica Intelligent Cloud Services user who last updated the user account. - UpdatedBy *string `json:"updatedBy,omitempty"` - - // UuId Unique identifier for the user. - UuId *string `json:"uuId,omitempty"` -} - -// RuntimeEnvironment defines model for runtimeEnvironment. -type RuntimeEnvironment struct { - Type *RuntimeEnvironmentType `json:"@type,omitempty"` - - // Agents Agents assigned to the Secure Agent group. - Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` - - // CreateTime Date and time the Secure Agent group was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy User who created the Secure Agent group. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the Secure Agent group. - Description *string `json:"description,omitempty"` - - // FederatedId Global unique identifier. - FederatedId *string `json:"federatedId,omitempty"` - - // Id Secure Agent group ID. - Id *string `json:"id,omitempty"` - - // IsShared Whether the Secure Agent group can be shared with sub-organizations. - IsShared *bool `json:"isShared,omitempty"` - - // Name Secure Agent group name. - Name string `json:"name"` - - // OrgId Organization ID. - OrgId *string `json:"orgId,omitempty"` - - // ServerlessConfig Attribute that defines serverless runtime environment properties. - ServerlessConfig *map[string]interface{} `json:"serverlessConfig,omitempty"` - - // UpdateTime Date and time that the Secure Agent group was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy User who last updated the Secure Agent group. - UpdatedBy *string `json:"updatedBy,omitempty"` -} - -// RuntimeEnvironmentType defines model for RuntimeEnvironment.Type. -type RuntimeEnvironmentType string - -// RuntimeEnvironmentAgent An agent assigned to a Secure Agent group. -type RuntimeEnvironmentAgent struct { - // Id Agent ID. - Id *string `json:"id,omitempty"` - - // OrgId Organization ID. - OrgId *string `json:"orgId,omitempty"` -} - -// RuntimeEnvironmentDataBulk defines model for runtimeEnvironmentDataBulk. -type RuntimeEnvironmentDataBulk struct { - // Agents Agents assigned to the Secure Agent group. - Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` - - // CreateTime Date and time the Secure Agent group was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy User who created the Secure Agent group. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the Secure Agent group. - Description *string `json:"description,omitempty"` - - // FederatedId Global unique identifier. - FederatedId *string `json:"federatedId,omitempty"` - - // Id Secure Agent group ID. - Id *string `json:"id,omitempty"` - - // Name Secure Agent group name. - Name *string `json:"name,omitempty"` - - // OrgId Organization ID. - OrgId *string `json:"orgId,omitempty"` - - // ServerlessConfig Attribute that defines serverless runtime environment properties. - ServerlessConfig *map[string]interface{} `json:"serverlessConfig,omitempty"` - - // UpdateTime Date and time that the Secure Agent group was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy User who last updated the Secure Agent group. - UpdatedBy *string `json:"updatedBy,omitempty"` -} - -// RuntimeEnvironmentDataMinimal defines model for runtimeEnvironmentDataMinimal. -type RuntimeEnvironmentDataMinimal struct { - Type *RuntimeEnvironmentDataMinimalType `json:"@type,omitempty"` - - // IsShared Whether the Secure Agent group can be shared with sub-organizations. - IsShared *bool `json:"isShared,omitempty"` - - // Name Name of the Secure Agent group. - Name string `json:"name"` -} - -// RuntimeEnvironmentDataMinimalType defines model for RuntimeEnvironmentDataMinimal.Type. -type RuntimeEnvironmentDataMinimalType string - -// UpdateRuntimeEnvironmentRequestBody defines model for updateRuntimeEnvironmentRequestBody. -type UpdateRuntimeEnvironmentRequestBody struct { - Type *UpdateRuntimeEnvironmentRequestBodyType `json:"@type,omitempty"` - - // Agents Agents assigned to the Secure Agent group. - Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` - - // IsShared Whether the Secure Agent group can be shared with sub-organizations. - IsShared *bool `json:"isShared,omitempty"` - - // Name Name of the Secure Agent group. - Name string `json:"name"` -} - -// UpdateRuntimeEnvironmentRequestBodyType defines model for UpdateRuntimeEnvironmentRequestBody.Type. -type UpdateRuntimeEnvironmentRequestBodyType string - -// N400 defines model for 400. -type N400 = ApiErrorResponse - -// N401 defines model for 401. -type N401 = ApiErrorResponse - -// N403 defines model for 403. -type N403 = ApiErrorResponse - -// N404 defines model for 404. -type N404 = ApiErrorResponse - -// N500 defines model for 500. -type N500 = ApiErrorResponse - -// N502 defines model for 502. -type N502 = ApiErrorResponse - -// N503 defines model for 503. -type N503 = ApiErrorResponse - -// /////////////////// - -// ////////////////////////////////////////////////////////////// - -// //////////////// - -// CreateRuntimeEnvironmentJSONRequestBody defines body for CreateRuntimeEnvironment for application/json ContentType. -type CreateRuntimeEnvironmentJSONRequestBody = RuntimeEnvironmentDataMinimal - -// UpdateRuntimeEnvironmentJSONRequestBody defines body for UpdateRuntimeEnvironment for application/json ContentType. -type UpdateRuntimeEnvironmentJSONRequestBody = UpdateRuntimeEnvironmentRequestBody - -// LoginJSONRequestBody defines body for Login for application/json ContentType. -type LoginJSONRequestBody = LoginRequestBody - // ////////////////////////////////////////////////////////////// - -// AsApiErrorResponseBody returns the union data inside the ApiErrorResponse as a ApiErrorResponseBody -func (t ApiErrorResponse) AsApiErrorResponseBody() (ApiErrorResponseBody, error) { - var body ApiErrorResponseBody - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromApiErrorResponseBody overwrites any union data inside the ApiErrorResponse as the provided ApiErrorResponseBody -func (t *ApiErrorResponse) FromApiErrorResponseBody(v ApiErrorResponseBody) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeApiErrorResponseBody performs a merge with any union data inside the ApiErrorResponse, using the provided ApiErrorResponseBody -func (t *ApiErrorResponse) MergeApiErrorResponseBody(v ApiErrorResponseBody) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsExternalRef1ApiErrorResponseBody returns the union data inside the ApiErrorResponse as a externalRef1.ApiErrorResponseBody -func (t ApiErrorResponse) AsExternalRef1ApiErrorResponseBody() (externalRef1.ApiErrorResponseBody, error) { - var body externalRef1.ApiErrorResponseBody - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromExternalRef1ApiErrorResponseBody overwrites any union data inside the ApiErrorResponse as the provided externalRef1.ApiErrorResponseBody -func (t *ApiErrorResponse) FromExternalRef1ApiErrorResponseBody(v externalRef1.ApiErrorResponseBody) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeExternalRef1ApiErrorResponseBody performs a merge with any union data inside the ApiErrorResponse, using the provided externalRef1.ApiErrorResponseBody -func (t *ApiErrorResponse) MergeExternalRef1ApiErrorResponseBody(v externalRef1.ApiErrorResponseBody) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t ApiErrorResponse) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *ApiErrorResponse) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - // //////////////////////// // Client which conforms to the OpenAPI3 specification for this service. diff --git a/internal/idmc/v2/codegen.yml b/internal/idmc/v2/codegen.yml index eb55f10..a1b3815 100644 --- a/internal/idmc/v2/codegen.yml +++ b/internal/idmc/v2/codegen.yml @@ -1,10 +1,6 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json --- -output: ./client.gen.go package: v2 -generate: - client: true - models: true compatibility: always-prefix-enum-values: true additional-imports: @@ -13,11 +9,17 @@ additional-imports: output-options: nullable-type: true user-templates: # https://github.com/oapi-codegen/oapi-codegen/tree/main/pkg/codegen/templates - client-with-responses.tmpl: ../templates/client-with-responses.go.tmpl - client.tmpl: ../templates/client.go.tmpl - constants.tmpl: ../templates/constants.go.tmpl - param-types.tmpl: ../templates/param-types.go.tmpl - request-bodies.tmpl: ../templates/request-bodies.go.tmpl + additional-properties.tmpl: ../templates/additional-properties.go.tmpl + client.tmpl: ../templates/client.go.tmpl + client-with-responses.tmpl: ../templates/client-with-responses.go.tmpl + constants.tmpl: ../templates/constants.go.tmpl + imports.tmpl: ../templates/imports.go.tmpl + inline.tmpl: ../templates/inline.go.tmpl + param-types.tmpl: ../templates/param-types.go.tmpl + request-bodies.tmpl: ../templates/request-bodies.go.tmpl + typedef.tmpl: ../templates/typedef.go.tmpl + union.tmpl: ../templates/union.go.tmpl + union-and-additional-properties.tmpl: ../templates/union-and-additional-properties.go.tmpl import-mapping: ../common/openapi.yml: terraform-provider-idmc/internal/idmc/common - ../v3/openapi.yml: terraform-provider-idmc/internal/idmc/v3 + ../v3/openapi.yml: terraform-provider-idmc/internal/idmc/v3 diff --git a/internal/idmc/v2/types.gen.go b/internal/idmc/v2/types.gen.go new file mode 100644 index 0000000..c189f4d --- /dev/null +++ b/internal/idmc/v2/types.gen.go @@ -0,0 +1,439 @@ +// /////////////////////// + +// Package v2 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +package v2 + +import ( + "encoding/json" + + externalRef1 "terraform-provider-idmc/internal/idmc/v3" + + "github.com/oapi-codegen/runtime" +) + +// ////////////////////////////////////////////////////////////// +// ///////////////////// + +// ////////////////////////////////////////////////////////////// +// ///////////////////// + +// Defines values for ApiErrorResponseBodyType. +const ( + ApiErrorResponseBodyTypeError ApiErrorResponseBodyType = "error" +) + +// Defines values for GetAgentInstallerInfoResponseBodyType. +const ( + GetAgentInstallerInfoResponseBodyTypeAgentInstallerInfo GetAgentInstallerInfoResponseBodyType = "agentInstallerInfo" +) + +// Defines values for LoginRequestBodyType. +const ( + LoginRequestBodyTypeLogin LoginRequestBodyType = "login" +) + +// Defines values for RuntimeEnvironmentType. +const ( + RuntimeEnvironmentTypeRuntimeEnvironment RuntimeEnvironmentType = "runtimeEnvironment" +) + +// Defines values for RuntimeEnvironmentDataMinimalType. +const ( + RuntimeEnvironmentDataMinimalTypeRuntimeEnvironment RuntimeEnvironmentDataMinimalType = "runtimeEnvironment" +) + +// Defines values for UpdateRuntimeEnvironmentRequestBodyType. +const ( + UpdateRuntimeEnvironmentRequestBodyTypeRuntimeEnvironment UpdateRuntimeEnvironmentRequestBodyType = "runtimeEnvironment" +) + +// ////////////////////////////////////////////////////////////// +// /////////////////////// + +// ApiErrorResponse defines model for apiErrorResponse. +type ApiErrorResponse struct { + union json.RawMessage +} + +// ApiErrorResponseBody When the REST API encounters an error, it returns a REST API error object. +type ApiErrorResponseBody struct { + Type ApiErrorResponseBodyType `json:"@type"` + + // Code The internal error code. + Code string `json:"code"` + + // Description The error message. + Description string `json:"description"` + + // StatusCode The http status code of the response. + StatusCode int `json:"statusCode"` +} + +// ApiErrorResponseBodyType defines model for ApiErrorResponseBody.Type. +type ApiErrorResponseBodyType string + +// GetAgentInstallerInfoResponseBody defines model for getAgentInstallerInfoResponseBody. +type GetAgentInstallerInfoResponseBody struct { + Type *GetAgentInstallerInfoResponseBodyType `json:"@type,omitempty"` + + // ChecksumDownloadUrl The url for a checksum file that can be used to verify the installation. + ChecksumDownloadUrl *string `json:"checksumDownloadUrl,omitempty"` + + // DownloadUrl The url to use for downloading the current secure agent version. + DownloadUrl *string `json:"downloadUrl,omitempty"` + + // InstallToken The short-lived token to use when registering a secure agent with the environment. + InstallToken *string `json:"installToken,omitempty"` +} + +// GetAgentInstallerInfoResponseBodyType defines model for GetAgentInstallerInfoResponseBody.Type. +type GetAgentInstallerInfoResponseBodyType string + +// LoginRequestBody defines model for loginRequestBody. +type LoginRequestBody struct { + Type *LoginRequestBodyType `json:"@type,omitempty"` + + // Password Informatica Intelligent Cloud Services password. + Password string `json:"password"` + + // Username Informatica Intelligent Cloud Services user name for the organization that you want to log in to. + Username string `json:"username"` +} + +// LoginRequestBodyType defines model for LoginRequestBody.Type. +type LoginRequestBodyType string + +// LoginResponseBody defines model for loginResponseBody. +type LoginResponseBody struct { + // CreateTime When the user account was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy Informatica Intelligent Cloud Services user who created the user account. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the user. + Description *string `json:"description,omitempty"` + + // Emails Email address to be notified when the user changes the account password. + Emails *string `json:"emails,omitempty"` + + // FirstName First name for the user account. + FirstName *string `json:"firstName,omitempty"` + + // ForceChangePassword Determines if the user must reset the password after the user logs in for the first time. Includes the following values: + // True. The user must reset the password. + // False. The user is not forced to reset the password. + ForceChangePassword *bool `json:"forceChangePassword,omitempty"` + + // IcSessionId Informatica Intelligent Cloud Services session ID for version 2 REST API session. + // Use in most version 2 REST API request headers. + IcSessionId *string `json:"icSessionId,omitempty"` + + // Id User ID. + Id *string `json:"id,omitempty"` + + // LastName Last name for the user account. + LastName *string `json:"lastName,omitempty"` + + // Name Informatica Intelligent Cloud Services user name. + Name *string `json:"name,omitempty"` + + // OrgId ID of the organization the user belongs to. 22 characters. + // NOTE: Organizations that were created in legacy Informatica Cloud might have an + // organization ID of 6 characters. + OrgId *string `json:"orgId,omitempty"` + + // OrgUuid Unique identifier for the organization. + OrgUuid *string `json:"orgUuid,omitempty"` + + // Password Salesforce user password. Included when user is configured to authenticate through Salesforce. + Password *string `json:"password,omitempty"` + + // Phone Phone number for the user. + Phone *string `json:"phone,omitempty"` + + // Roles Object that includes a role object for each role assigned to the user. + Roles *struct { + // Description Role description. + Description *string `json:"description,omitempty"` + + // Name Role name. Returns one of the following codes: + // Service Consumer + // Designer + // Admin + Name *string `json:"name,omitempty"` + } `json:"roles,omitempty"` + + // SecurityAnswer Answer to the security question. + SecurityAnswer *string `json:"securityAnswer,omitempty"` + + // SecurityQuestion Security question. Returns one of the following codes: + // SPOUSE_MEETING_CITY + // FIRST_JOB_CITY + // CHILDHOOD_FRIEND + // MOTHER_MAIDEN_NAME + // PET_NAME + // CHILDHOOD_NICKNAME + // CUSTOM_QUESTION:"" + SecurityQuestion *string `json:"securityQuestion,omitempty"` + + // ServerUrl Informatica Intelligent Cloud Services URL for the organization the user belongs + // to. Use the serverUrl as a base for most version 2 REST API resource URIs. + ServerUrl *string `json:"serverUrl,omitempty"` + + // SfUsername Salesforce user name. Included when user is configured to authenticate through Salesforce. + SfUsername *string `json:"sfUsername,omitempty"` + + // SpiUrl This field is no longer applicable and has been deprecated. + // Deprecated: + SpiUrl *string `json:"spiUrl,omitempty"` + + // Timezone Time zone of the user. Time zone honors Daylight Saving Time. + // For more information, see Time zone codes. + Timezone *string `json:"timezone,omitempty"` + + // Title Title of the user. + Title *string `json:"title,omitempty"` + + // UpdateTime When the user account was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy Informatica Intelligent Cloud Services user who last updated the user account. + UpdatedBy *string `json:"updatedBy,omitempty"` + + // UuId Unique identifier for the user. + UuId *string `json:"uuId,omitempty"` +} + +// RuntimeEnvironment defines model for runtimeEnvironment. +type RuntimeEnvironment struct { + Type *RuntimeEnvironmentType `json:"@type,omitempty"` + + // Agents Agents assigned to the Secure Agent group. + Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` + + // CreateTime Date and time the Secure Agent group was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy User who created the Secure Agent group. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the Secure Agent group. + Description *string `json:"description,omitempty"` + + // FederatedId Global unique identifier. + FederatedId *string `json:"federatedId,omitempty"` + + // Id Secure Agent group ID. + Id *string `json:"id,omitempty"` + + // IsShared Whether the Secure Agent group can be shared with sub-organizations. + IsShared *bool `json:"isShared,omitempty"` + + // Name Secure Agent group name. + Name string `json:"name"` + + // OrgId Organization ID. + OrgId *string `json:"orgId,omitempty"` + + // ServerlessConfig Attribute that defines serverless runtime environment properties. + ServerlessConfig *map[string]interface{} `json:"serverlessConfig,omitempty"` + + // UpdateTime Date and time that the Secure Agent group was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy User who last updated the Secure Agent group. + UpdatedBy *string `json:"updatedBy,omitempty"` +} + +// RuntimeEnvironmentType defines model for RuntimeEnvironment.Type. +type RuntimeEnvironmentType string + +// RuntimeEnvironmentAgent An agent assigned to a Secure Agent group. +type RuntimeEnvironmentAgent struct { + // Id Agent ID. + Id *string `json:"id,omitempty"` + + // OrgId Organization ID. + OrgId *string `json:"orgId,omitempty"` +} + +// RuntimeEnvironmentDataBulk defines model for runtimeEnvironmentDataBulk. +type RuntimeEnvironmentDataBulk struct { + // Agents Agents assigned to the Secure Agent group. + Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` + + // CreateTime Date and time the Secure Agent group was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy User who created the Secure Agent group. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the Secure Agent group. + Description *string `json:"description,omitempty"` + + // FederatedId Global unique identifier. + FederatedId *string `json:"federatedId,omitempty"` + + // Id Secure Agent group ID. + Id *string `json:"id,omitempty"` + + // Name Secure Agent group name. + Name *string `json:"name,omitempty"` + + // OrgId Organization ID. + OrgId *string `json:"orgId,omitempty"` + + // ServerlessConfig Attribute that defines serverless runtime environment properties. + ServerlessConfig *map[string]interface{} `json:"serverlessConfig,omitempty"` + + // UpdateTime Date and time that the Secure Agent group was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy User who last updated the Secure Agent group. + UpdatedBy *string `json:"updatedBy,omitempty"` +} + +// RuntimeEnvironmentDataMinimal defines model for runtimeEnvironmentDataMinimal. +type RuntimeEnvironmentDataMinimal struct { + Type *RuntimeEnvironmentDataMinimalType `json:"@type,omitempty"` + + // IsShared Whether the Secure Agent group can be shared with sub-organizations. + IsShared *bool `json:"isShared,omitempty"` + + // Name Name of the Secure Agent group. + Name string `json:"name"` +} + +// RuntimeEnvironmentDataMinimalType defines model for RuntimeEnvironmentDataMinimal.Type. +type RuntimeEnvironmentDataMinimalType string + +// UpdateRuntimeEnvironmentRequestBody defines model for updateRuntimeEnvironmentRequestBody. +type UpdateRuntimeEnvironmentRequestBody struct { + Type *UpdateRuntimeEnvironmentRequestBodyType `json:"@type,omitempty"` + + // Agents Agents assigned to the Secure Agent group. + Agents *[]RuntimeEnvironmentAgent `json:"agents,omitempty"` + + // IsShared Whether the Secure Agent group can be shared with sub-organizations. + IsShared *bool `json:"isShared,omitempty"` + + // Name Name of the Secure Agent group. + Name string `json:"name"` +} + +// UpdateRuntimeEnvironmentRequestBodyType defines model for UpdateRuntimeEnvironmentRequestBody.Type. +type UpdateRuntimeEnvironmentRequestBodyType string + +// N400 defines model for 400. +type N400 = ApiErrorResponse + +// N401 defines model for 401. +type N401 = ApiErrorResponse + +// N403 defines model for 403. +type N403 = ApiErrorResponse + +// N404 defines model for 404. +type N404 = ApiErrorResponse + +// N500 defines model for 500. +type N500 = ApiErrorResponse + +// N502 defines model for 502. +type N502 = ApiErrorResponse + +// N503 defines model for 503. +type N503 = ApiErrorResponse + +// ////////////////////////////////////////////////////////////// +// /////////////////// + +// ////////////////////////////////////////////////////////////// + +// //////////////// + +// CreateRuntimeEnvironmentJSONRequestBody defines body for CreateRuntimeEnvironment for application/json ContentType. +type CreateRuntimeEnvironmentJSONRequestBody = RuntimeEnvironmentDataMinimal + +// UpdateRuntimeEnvironmentJSONRequestBody defines body for UpdateRuntimeEnvironment for application/json ContentType. +type UpdateRuntimeEnvironmentJSONRequestBody = UpdateRuntimeEnvironmentRequestBody + +// LoginJSONRequestBody defines body for Login for application/json ContentType. +type LoginJSONRequestBody = LoginRequestBody + +// ////////////////////////////////////////////////////////////// + +// ///////// + +// ////////////////////////////////////////////////////////////// +// ///////// + +// ////////////////////////////////////////////////////////////// +// ///////////////////////// + +// AsApiErrorResponseBody returns the union data inside the ApiErrorResponse as a ApiErrorResponseBody +func (t ApiErrorResponse) AsApiErrorResponseBody() (ApiErrorResponseBody, error) { + var body ApiErrorResponseBody + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromApiErrorResponseBody overwrites any union data inside the ApiErrorResponse as the provided ApiErrorResponseBody +func (t *ApiErrorResponse) FromApiErrorResponseBody(v ApiErrorResponseBody) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeApiErrorResponseBody performs a merge with any union data inside the ApiErrorResponse, using the provided ApiErrorResponseBody +func (t *ApiErrorResponse) MergeApiErrorResponseBody(v ApiErrorResponseBody) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsExternalRef1ApiErrorResponseBody returns the union data inside the ApiErrorResponse as a externalRef1.ApiErrorResponseBody +func (t ApiErrorResponse) AsExternalRef1ApiErrorResponseBody() (externalRef1.ApiErrorResponseBody, error) { + var body externalRef1.ApiErrorResponseBody + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromExternalRef1ApiErrorResponseBody overwrites any union data inside the ApiErrorResponse as the provided externalRef1.ApiErrorResponseBody +func (t *ApiErrorResponse) FromExternalRef1ApiErrorResponseBody(v externalRef1.ApiErrorResponseBody) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeExternalRef1ApiErrorResponseBody performs a merge with any union data inside the ApiErrorResponse, using the provided externalRef1.ApiErrorResponseBody +func (t *ApiErrorResponse) MergeExternalRef1ApiErrorResponseBody(v externalRef1.ApiErrorResponseBody) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t ApiErrorResponse) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *ApiErrorResponse) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// ////////////////////////////////////////////////////////////// diff --git a/internal/idmc/v3/api.go b/internal/idmc/v3/api.go index a01327f..e0d374e 100644 --- a/internal/idmc/v3/api.go +++ b/internal/idmc/v3/api.go @@ -10,7 +10,8 @@ import ( ) //go:generate -command oapi-codegen go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -//go:generate oapi-codegen -config ./codegen.yml ./openapi.yml +//go:generate oapi-codegen -config ./codegen.yml -generate types -o ./types.gen.go ./openapi.yml +//go:generate oapi-codegen -config ./codegen.yml -generate client -o ./client.gen.go ./openapi.yml type IdmcAdminV3Api struct { Client ClientWithResponses diff --git a/internal/idmc/v3/client.gen.go b/internal/idmc/v3/client.gen.go index bd5f3f1..1d3a164 100644 --- a/internal/idmc/v3/client.gen.go +++ b/internal/idmc/v3/client.gen.go @@ -1,3 +1,5 @@ +// /////////////////////// + // Package v3 provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. @@ -18,389 +20,7 @@ import ( "github.com/oapi-codegen/runtime" ) -// ///////////////////// - -// ////////////////////////////////////////////////////////////// -// ///////////////////// - -// Defines values for LoginResponseBodyUserInfoStatus. -const ( - LoginResponseBodyUserInfoStatusActive LoginResponseBodyUserInfoStatus = "Active" - LoginResponseBodyUserInfoStatusInactive LoginResponseBodyUserInfoStatus = "Inactive" -) - -// Defines values for RolePrivilegeItemStatus. -const ( - RolePrivilegeItemStatusDefault RolePrivilegeItemStatus = "Default" - RolePrivilegeItemStatusDisabled RolePrivilegeItemStatus = "Disabled" - RolePrivilegeItemStatusEnabled RolePrivilegeItemStatus = "Enabled" - RolePrivilegeItemStatusUnassigned RolePrivilegeItemStatus = "Unassigned" -) - -// Defines values for RoleStatus. -const ( - RoleStatusDisabled RoleStatus = "Disabled" - RoleStatusEnabled RoleStatus = "Enabled" -) - -// Defines values for GetRolesParamsExpand. -const ( - GetRolesParamsExpandPrivileges GetRolesParamsExpand = "privileges" -) - -// ////////////////////////////////////////////////////////////// - -// ApiError defines model for apiError. -type ApiError struct { - Code string `json:"code"` - DebugMessage *string `json:"debugMessage,omitempty"` - Details *[]ApiErrorDetail `json:"details,omitempty"` - Message string `json:"message"` - RequestId string `json:"requestId"` -} - -// ApiErrorDetail defines model for apiErrorDetail. -type ApiErrorDetail struct { - Code string `json:"code"` - DebugMessage *string `json:"debugMessage,omitempty"` - Message string `json:"message"` -} - -// ApiErrorResponseBody When the REST API encounters an error, it returns a REST API error object. -type ApiErrorResponseBody struct { - Error ApiError `json:"error"` -} - -// CreateRoleRequestBody defines model for createRoleRequestBody. -type CreateRoleRequestBody struct { - // Description Description of the role. - Description *string `json:"description,omitempty"` - - // Name Name of the role. - Name *string `json:"name,omitempty"` - - // Privileges IDs of the privileges to assign to the role. - // A role must have at least one privilege assigned to it. - Privileges *[]string `json:"privileges,omitempty"` -} - -// CreateRoleResponseBody defines model for createRoleResponseBody. -type CreateRoleResponseBody struct { - // CreateTime Date and time the role was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy User who created the role. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the role. - Description *string `json:"description,omitempty"` - - // DisplayDescription Description displayed in the user interface. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // DisplayName Role name displayed in the user interface. - DisplayName *string `json:"displayName,omitempty"` - - // Id Role ID. - Id *string `json:"id,omitempty"` - - // OrgId ID of the organization the role belongs to. - OrgId *string `json:"orgId,omitempty"` - Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` - - // RoleName Name of the role. - RoleName *string `json:"roleName,omitempty"` - - // Status Whether the organization's license to use the role is valid or has expired. - Status *RoleStatus `json:"status,omitempty"` - - // SystemRole Whether the role is a system-defined role. - SystemRole *bool `json:"systemRole,omitempty"` - - // UpdateTime Date and time the role was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy User who last updated the role. - UpdatedBy *string `json:"updatedBy,omitempty"` -} - -// GetRolesResponseBody defines model for getRolesResponseBody. -type GetRolesResponseBody = []GetRolesResponseBodyItem - -// GetRolesResponseBodyItem defines model for getRolesResponseBodyItem. -type GetRolesResponseBodyItem struct { - // CreateTime Date and time the role was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy User who created the role. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the role. - Description *string `json:"description,omitempty"` - - // DisplayDescription Description displayed in the user interface. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // DisplayName Role name displayed in the user interface. - DisplayName *string `json:"displayName,omitempty"` - - // Id Role ID. - Id *string `json:"id,omitempty"` - - // OrgId ID of the organization the role belongs to. - OrgId *string `json:"orgId,omitempty"` - Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` - - // RoleName Name of the role. - RoleName *string `json:"roleName,omitempty"` - - // Status Whether the organization's license to use the role is valid or has expired. - Status *RoleStatus `json:"status,omitempty"` - - // SystemRole Whether the role is a system-defined role. - SystemRole *bool `json:"systemRole,omitempty"` - - // UpdateTime Date and time the role was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy User who last updated the role. - UpdatedBy *string `json:"updatedBy,omitempty"` -} - -// LoginRequestBody defines model for loginRequestBody. -type LoginRequestBody struct { - // Password Informatica Intelligent Cloud Services password. - Password string `json:"password"` - - // Username Informatica Intelligent Cloud Services user name for the organization that you want to log in to. - Username string `json:"username"` -} - -// LoginResponseBody defines model for loginResponseBody. -type LoginResponseBody struct { - // Products Subscribed Informatica products. - Products *[]LoginResponseBodyProduct `json:"products,omitempty"` - UserInfo *LoginResponseBodyUserInfo `json:"userInfo,omitempty"` -} - -// LoginResponseBodyProduct defines model for loginResponseBodyProduct. -type LoginResponseBodyProduct struct { - // BaseApiUrl Base API URL for the product. Use in REST API requests. - BaseApiUrl *string `json:"baseApiUrl,omitempty"` - - // Name Product name. - Name *string `json:"name,omitempty"` -} - -// LoginResponseBodyUserInfo defines model for loginResponseBodyUserInfo. -type LoginResponseBodyUserInfo struct { - // Groups User group information for the user. - Groups *map[string]interface{} `json:"groups,omitempty"` - - // Id User ID. - Id *string `json:"id,omitempty"` - - // Name User name. - Name *string `json:"name,omitempty"` - - // OrgId ID of the organization the user belongs to. - OrgId *string `json:"orgId,omitempty"` - - // OrgName Organization name. - OrgName *string `json:"orgName,omitempty"` - - // ParentOrgId Organization ID for the parent. - ParentOrgId *string `json:"parentOrgId,omitempty"` - - // SessionId REST API session ID for the current session. Use in most REST API request headers. - SessionId *string `json:"sessionId,omitempty"` - - // Status Status of the user. - Status *LoginResponseBodyUserInfoStatus `json:"status,omitempty"` -} - -// LoginResponseBodyUserInfoStatus Status of the user. -type LoginResponseBodyUserInfoStatus string - -// RoleInfo defines model for roleInfo. -type RoleInfo struct { - // CreateTime Date and time the role was created. - CreateTime *string `json:"createTime,omitempty"` - - // CreatedBy User who created the role. - CreatedBy *string `json:"createdBy,omitempty"` - - // Description Description of the role. - Description *string `json:"description,omitempty"` - - // DisplayDescription Description displayed in the user interface. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // DisplayName Role name displayed in the user interface. - DisplayName *string `json:"displayName,omitempty"` - - // Id Role ID. - Id *string `json:"id,omitempty"` - - // OrgId ID of the organization the role belongs to. - OrgId *string `json:"orgId,omitempty"` - - // RoleName Name of the role. - RoleName *string `json:"roleName,omitempty"` - - // Status Whether the organization's license to use the role is valid or has expired. - Status *RoleStatus `json:"status,omitempty"` - - // SystemRole Whether the role is a system-defined role. - SystemRole *bool `json:"systemRole,omitempty"` - - // UpdateTime Date and time the role was last updated. - UpdateTime *string `json:"updateTime,omitempty"` - - // UpdatedBy User who last updated the role. - UpdatedBy *string `json:"updatedBy,omitempty"` -} - -// RolePrivilegeItem defines model for rolePrivilegeItem. -type RolePrivilegeItem struct { - // Description Description of the privilege. - Description *string `json:"description,omitempty"` - - // Id Privilege ID. - Id string `json:"id"` - - // Name Name of the privilege. - Name string `json:"name"` - - // Service The Informatica Intelligent Cloud Services service that applies to the privilege. - Service string `json:"service"` - - // Status Status of the privilege. Returns one of the following values: - // * Enabled: License to use the privilege is valid. - // * Disabled: License to use the privilege has expired. - // * Unassigned: No license to use this privilege. - // * Default: Privilege included by default. - Status RolePrivilegeItemStatus `json:"status"` -} - -// RolePrivilegeItemStatus Status of the privilege. Returns one of the following values: -// * Enabled: License to use the privilege is valid. -// * Disabled: License to use the privilege has expired. -// * Unassigned: No license to use this privilege. -// * Default: Privilege included by default. -type RolePrivilegeItemStatus string - -// RoleStatus Whether the organization's license to use the role is valid or has expired. -type RoleStatus string - -// UpdateRoleRequestBody defines model for updateRoleRequestBody. -type UpdateRoleRequestBody struct { - // Privileges IDs of the privileges to assign to the role. - // A role must have at least one privilege assigned to it. - Privileges []string `json:"privileges"` -} - -// WithPrivilegeItems defines model for withPrivilegeItems. -type WithPrivilegeItems struct { - Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` -} - -// WithPrivilegeRefs defines model for withPrivilegeRefs. -type WithPrivilegeRefs struct { - // Privileges IDs of the privileges to assign to the role. - // A role must have at least one privilege assigned to it. - Privileges *[]string `json:"privileges,omitempty"` -} - -// HeaderSession defines model for headerSession. -type HeaderSession = string - -// PathRole defines model for pathRole. -type PathRole = string - -// N204 When the REST API encounters an error, it returns a REST API error object. -type N204 = ApiErrorResponseBody - -// N400 When the REST API encounters an error, it returns a REST API error object. -type N400 = ApiErrorResponseBody - -// N401 When the REST API encounters an error, it returns a REST API error object. -type N401 = ApiErrorResponseBody - -// N403 When the REST API encounters an error, it returns a REST API error object. -type N403 = ApiErrorResponseBody - -// N404 When the REST API encounters an error, it returns a REST API error object. -type N404 = ApiErrorResponseBody - -// N500 When the REST API encounters an error, it returns a REST API error object. -type N500 = ApiErrorResponseBody - -// N502 When the REST API encounters an error, it returns a REST API error object. -type N502 = ApiErrorResponseBody - -// N503 When the REST API encounters an error, it returns a REST API error object. -type N503 = ApiErrorResponseBody - -// RolePrivileges defines model for rolePrivileges. -type RolePrivileges = UpdateRoleRequestBody - -// /////////////////// - -// ListPrivilegesParams defines parameters for ListPrivileges. -type ListPrivilegesParams struct { - // Q The query string used to filter results. - Q *string `json:"q,omitempty"` -} - -// GetRolesParams defines parameters for GetRoles. -type GetRolesParams struct { - // Q Query filter. You can filter using one of the following fields: - // * roleId. Unique identifier for the role. - // * roleName. Name of the role. - Q *string `form:"q,omitempty" json:"q,omitempty"` - - // Expand Returns the privileges associated with the role specified in the query filter. - Expand *GetRolesParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` - INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` -} - -// GetRolesParamsExpand defines parameters for GetRoles. -type GetRolesParamsExpand string - -// DeleteRoleParams defines parameters for DeleteRole. -type DeleteRoleParams struct { - INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` -} - -// AddRolePrivilegesParams defines parameters for AddRolePrivileges. -type AddRolePrivilegesParams struct { - INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` -} - -// RemoveRolePrivilegesParams defines parameters for RemoveRolePrivileges. -type RemoveRolePrivilegesParams struct { - INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` -} - // ////////////////////////////////////////////////////////////// - -// //////////////// - -// LoginJSONRequestBody defines body for Login for application/json ContentType. -type LoginJSONRequestBody = LoginRequestBody - -// CreateRoleJSONRequestBody defines body for CreateRole for application/json ContentType. -type CreateRoleJSONRequestBody = CreateRoleRequestBody - -// AddRolePrivilegesJSONRequestBody defines body for AddRolePrivileges for application/json ContentType. -type AddRolePrivilegesJSONRequestBody = UpdateRoleRequestBody - -// RemoveRolePrivilegesJSONRequestBody defines body for RemoveRolePrivileges for application/json ContentType. -type RemoveRolePrivilegesJSONRequestBody = UpdateRoleRequestBody - -// ////////////////////////////////////////////////////////////// - // //////////////////////// // Client which conforms to the OpenAPI3 specification for this service. diff --git a/internal/idmc/v3/codegen.yml b/internal/idmc/v3/codegen.yml index abe436e..7078d65 100644 --- a/internal/idmc/v3/codegen.yml +++ b/internal/idmc/v3/codegen.yml @@ -1,10 +1,6 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json --- -output: ./client.gen.go package: v3 -generate: - client: true - models: true compatibility: always-prefix-enum-values: true additional-imports: @@ -13,10 +9,16 @@ additional-imports: output-options: nullable-type: true user-templates: # https://github.com/oapi-codegen/oapi-codegen/tree/main/pkg/codegen/templates - client-with-responses.tmpl: ../templates/client-with-responses.go.tmpl - client.tmpl: ../templates/client.go.tmpl - constants.tmpl: ../templates/constants.go.tmpl - param-types.tmpl: ../templates/param-types.go.tmpl - request-bodies.tmpl: ../templates/request-bodies.go.tmpl + additional-properties.tmpl: ../templates/additional-properties.go.tmpl + client.tmpl: ../templates/client.go.tmpl + client-with-responses.tmpl: ../templates/client-with-responses.go.tmpl + constants.tmpl: ../templates/constants.go.tmpl + imports.tmpl: ../templates/imports.go.tmpl + inline.tmpl: ../templates/inline.go.tmpl + param-types.tmpl: ../templates/param-types.go.tmpl + request-bodies.tmpl: ../templates/request-bodies.go.tmpl + typedef.tmpl: ../templates/typedef.go.tmpl + union.tmpl: ../templates/union.go.tmpl + union-and-additional-properties.tmpl: ../templates/union-and-additional-properties.go.tmpl import-mapping: ../common/openapi.yml: terraform-provider-idmc/internal/idmc/common diff --git a/internal/idmc/v3/types.gen.go b/internal/idmc/v3/types.gen.go new file mode 100644 index 0000000..7b6822e --- /dev/null +++ b/internal/idmc/v3/types.gen.go @@ -0,0 +1,399 @@ +// /////////////////////// + +// Package v3 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +package v3 + +// ////////////////////////////////////////////////////////////// +// ///////////////////// + +// ////////////////////////////////////////////////////////////// +// ///////////////////// + +// Defines values for LoginResponseBodyUserInfoStatus. +const ( + LoginResponseBodyUserInfoStatusActive LoginResponseBodyUserInfoStatus = "Active" + LoginResponseBodyUserInfoStatusInactive LoginResponseBodyUserInfoStatus = "Inactive" +) + +// Defines values for RolePrivilegeItemStatus. +const ( + RolePrivilegeItemStatusDefault RolePrivilegeItemStatus = "Default" + RolePrivilegeItemStatusDisabled RolePrivilegeItemStatus = "Disabled" + RolePrivilegeItemStatusEnabled RolePrivilegeItemStatus = "Enabled" + RolePrivilegeItemStatusUnassigned RolePrivilegeItemStatus = "Unassigned" +) + +// Defines values for RoleStatus. +const ( + RoleStatusDisabled RoleStatus = "Disabled" + RoleStatusEnabled RoleStatus = "Enabled" +) + +// Defines values for GetRolesParamsExpand. +const ( + GetRolesParamsExpandPrivileges GetRolesParamsExpand = "privileges" +) + +// ////////////////////////////////////////////////////////////// +// /////////////////////// + +// ApiError defines model for apiError. +type ApiError struct { + Code string `json:"code"` + DebugMessage *string `json:"debugMessage,omitempty"` + Details *[]ApiErrorDetail `json:"details,omitempty"` + Message string `json:"message"` + RequestId string `json:"requestId"` +} + +// ApiErrorDetail defines model for apiErrorDetail. +type ApiErrorDetail struct { + Code string `json:"code"` + DebugMessage *string `json:"debugMessage,omitempty"` + Message string `json:"message"` +} + +// ApiErrorResponseBody When the REST API encounters an error, it returns a REST API error object. +type ApiErrorResponseBody struct { + Error ApiError `json:"error"` +} + +// CreateRoleRequestBody defines model for createRoleRequestBody. +type CreateRoleRequestBody struct { + // Description Description of the role. + Description *string `json:"description,omitempty"` + + // Name Name of the role. + Name *string `json:"name,omitempty"` + + // Privileges IDs of the privileges to assign to the role. + // A role must have at least one privilege assigned to it. + Privileges *[]string `json:"privileges,omitempty"` +} + +// CreateRoleResponseBody defines model for createRoleResponseBody. +type CreateRoleResponseBody struct { + // CreateTime Date and time the role was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy User who created the role. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the role. + Description *string `json:"description,omitempty"` + + // DisplayDescription Description displayed in the user interface. + DisplayDescription *string `json:"displayDescription,omitempty"` + + // DisplayName Role name displayed in the user interface. + DisplayName *string `json:"displayName,omitempty"` + + // Id Role ID. + Id *string `json:"id,omitempty"` + + // OrgId ID of the organization the role belongs to. + OrgId *string `json:"orgId,omitempty"` + Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` + + // RoleName Name of the role. + RoleName *string `json:"roleName,omitempty"` + + // Status Whether the organization's license to use the role is valid or has expired. + Status *RoleStatus `json:"status,omitempty"` + + // SystemRole Whether the role is a system-defined role. + SystemRole *bool `json:"systemRole,omitempty"` + + // UpdateTime Date and time the role was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy User who last updated the role. + UpdatedBy *string `json:"updatedBy,omitempty"` +} + +// GetRolesResponseBody defines model for getRolesResponseBody. +type GetRolesResponseBody = []GetRolesResponseBodyItem + +// GetRolesResponseBodyItem defines model for getRolesResponseBodyItem. +type GetRolesResponseBodyItem struct { + // CreateTime Date and time the role was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy User who created the role. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the role. + Description *string `json:"description,omitempty"` + + // DisplayDescription Description displayed in the user interface. + DisplayDescription *string `json:"displayDescription,omitempty"` + + // DisplayName Role name displayed in the user interface. + DisplayName *string `json:"displayName,omitempty"` + + // Id Role ID. + Id *string `json:"id,omitempty"` + + // OrgId ID of the organization the role belongs to. + OrgId *string `json:"orgId,omitempty"` + Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` + + // RoleName Name of the role. + RoleName *string `json:"roleName,omitempty"` + + // Status Whether the organization's license to use the role is valid or has expired. + Status *RoleStatus `json:"status,omitempty"` + + // SystemRole Whether the role is a system-defined role. + SystemRole *bool `json:"systemRole,omitempty"` + + // UpdateTime Date and time the role was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy User who last updated the role. + UpdatedBy *string `json:"updatedBy,omitempty"` +} + +// LoginRequestBody defines model for loginRequestBody. +type LoginRequestBody struct { + // Password Informatica Intelligent Cloud Services password. + Password string `json:"password"` + + // Username Informatica Intelligent Cloud Services user name for the organization that you want to log in to. + Username string `json:"username"` +} + +// LoginResponseBody defines model for loginResponseBody. +type LoginResponseBody struct { + // Products Subscribed Informatica products. + Products *[]LoginResponseBodyProduct `json:"products,omitempty"` + UserInfo *LoginResponseBodyUserInfo `json:"userInfo,omitempty"` +} + +// LoginResponseBodyProduct defines model for loginResponseBodyProduct. +type LoginResponseBodyProduct struct { + // BaseApiUrl Base API URL for the product. Use in REST API requests. + BaseApiUrl *string `json:"baseApiUrl,omitempty"` + + // Name Product name. + Name *string `json:"name,omitempty"` +} + +// LoginResponseBodyUserInfo defines model for loginResponseBodyUserInfo. +type LoginResponseBodyUserInfo struct { + // Groups User group information for the user. + Groups *map[string]interface{} `json:"groups,omitempty"` + + // Id User ID. + Id *string `json:"id,omitempty"` + + // Name User name. + Name *string `json:"name,omitempty"` + + // OrgId ID of the organization the user belongs to. + OrgId *string `json:"orgId,omitempty"` + + // OrgName Organization name. + OrgName *string `json:"orgName,omitempty"` + + // ParentOrgId Organization ID for the parent. + ParentOrgId *string `json:"parentOrgId,omitempty"` + + // SessionId REST API session ID for the current session. Use in most REST API request headers. + SessionId *string `json:"sessionId,omitempty"` + + // Status Status of the user. + Status *LoginResponseBodyUserInfoStatus `json:"status,omitempty"` +} + +// LoginResponseBodyUserInfoStatus Status of the user. +type LoginResponseBodyUserInfoStatus string + +// RoleInfo defines model for roleInfo. +type RoleInfo struct { + // CreateTime Date and time the role was created. + CreateTime *string `json:"createTime,omitempty"` + + // CreatedBy User who created the role. + CreatedBy *string `json:"createdBy,omitempty"` + + // Description Description of the role. + Description *string `json:"description,omitempty"` + + // DisplayDescription Description displayed in the user interface. + DisplayDescription *string `json:"displayDescription,omitempty"` + + // DisplayName Role name displayed in the user interface. + DisplayName *string `json:"displayName,omitempty"` + + // Id Role ID. + Id *string `json:"id,omitempty"` + + // OrgId ID of the organization the role belongs to. + OrgId *string `json:"orgId,omitempty"` + + // RoleName Name of the role. + RoleName *string `json:"roleName,omitempty"` + + // Status Whether the organization's license to use the role is valid or has expired. + Status *RoleStatus `json:"status,omitempty"` + + // SystemRole Whether the role is a system-defined role. + SystemRole *bool `json:"systemRole,omitempty"` + + // UpdateTime Date and time the role was last updated. + UpdateTime *string `json:"updateTime,omitempty"` + + // UpdatedBy User who last updated the role. + UpdatedBy *string `json:"updatedBy,omitempty"` +} + +// RolePrivilegeItem defines model for rolePrivilegeItem. +type RolePrivilegeItem struct { + // Description Description of the privilege. + Description *string `json:"description,omitempty"` + + // Id Privilege ID. + Id string `json:"id"` + + // Name Name of the privilege. + Name string `json:"name"` + + // Service The Informatica Intelligent Cloud Services service that applies to the privilege. + Service string `json:"service"` + + // Status Status of the privilege. Returns one of the following values: + // * Enabled: License to use the privilege is valid. + // * Disabled: License to use the privilege has expired. + // * Unassigned: No license to use this privilege. + // * Default: Privilege included by default. + Status RolePrivilegeItemStatus `json:"status"` +} + +// RolePrivilegeItemStatus Status of the privilege. Returns one of the following values: +// * Enabled: License to use the privilege is valid. +// * Disabled: License to use the privilege has expired. +// * Unassigned: No license to use this privilege. +// * Default: Privilege included by default. +type RolePrivilegeItemStatus string + +// RoleStatus Whether the organization's license to use the role is valid or has expired. +type RoleStatus string + +// UpdateRoleRequestBody defines model for updateRoleRequestBody. +type UpdateRoleRequestBody struct { + // Privileges IDs of the privileges to assign to the role. + // A role must have at least one privilege assigned to it. + Privileges []string `json:"privileges"` +} + +// WithPrivilegeItems defines model for withPrivilegeItems. +type WithPrivilegeItems struct { + Privileges *[]RolePrivilegeItem `json:"privileges,omitempty"` +} + +// WithPrivilegeRefs defines model for withPrivilegeRefs. +type WithPrivilegeRefs struct { + // Privileges IDs of the privileges to assign to the role. + // A role must have at least one privilege assigned to it. + Privileges *[]string `json:"privileges,omitempty"` +} + +// HeaderSession defines model for headerSession. +type HeaderSession = string + +// PathRole defines model for pathRole. +type PathRole = string + +// N204 When the REST API encounters an error, it returns a REST API error object. +type N204 = ApiErrorResponseBody + +// N400 When the REST API encounters an error, it returns a REST API error object. +type N400 = ApiErrorResponseBody + +// N401 When the REST API encounters an error, it returns a REST API error object. +type N401 = ApiErrorResponseBody + +// N403 When the REST API encounters an error, it returns a REST API error object. +type N403 = ApiErrorResponseBody + +// N404 When the REST API encounters an error, it returns a REST API error object. +type N404 = ApiErrorResponseBody + +// N500 When the REST API encounters an error, it returns a REST API error object. +type N500 = ApiErrorResponseBody + +// N502 When the REST API encounters an error, it returns a REST API error object. +type N502 = ApiErrorResponseBody + +// N503 When the REST API encounters an error, it returns a REST API error object. +type N503 = ApiErrorResponseBody + +// RolePrivileges defines model for rolePrivileges. +type RolePrivileges = UpdateRoleRequestBody + +// ////////////////////////////////////////////////////////////// +// /////////////////// + +// ListPrivilegesParams defines parameters for ListPrivileges. +type ListPrivilegesParams struct { + // Q The query string used to filter results. + Q *string `json:"q,omitempty"` +} + +// GetRolesParams defines parameters for GetRoles. +type GetRolesParams struct { + // Q Query filter. You can filter using one of the following fields: + // * roleId. Unique identifier for the role. + // * roleName. Name of the role. + Q *string `form:"q,omitempty" json:"q,omitempty"` + + // Expand Returns the privileges associated with the role specified in the query filter. + Expand *GetRolesParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` + INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` +} + +// GetRolesParamsExpand defines parameters for GetRoles. +type GetRolesParamsExpand string + +// DeleteRoleParams defines parameters for DeleteRole. +type DeleteRoleParams struct { + INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` +} + +// AddRolePrivilegesParams defines parameters for AddRolePrivileges. +type AddRolePrivilegesParams struct { + INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` +} + +// RemoveRolePrivilegesParams defines parameters for RemoveRolePrivileges. +type RemoveRolePrivilegesParams struct { + INFASESSIONID HeaderSession `json:"INFA-SESSION-ID"` +} + +// ////////////////////////////////////////////////////////////// + +// //////////////// + +// LoginJSONRequestBody defines body for Login for application/json ContentType. +type LoginJSONRequestBody = LoginRequestBody + +// CreateRoleJSONRequestBody defines body for CreateRole for application/json ContentType. +type CreateRoleJSONRequestBody = CreateRoleRequestBody + +// AddRolePrivilegesJSONRequestBody defines body for AddRolePrivileges for application/json ContentType. +type AddRolePrivilegesJSONRequestBody = UpdateRoleRequestBody + +// RemoveRolePrivilegesJSONRequestBody defines body for RemoveRolePrivileges for application/json ContentType. +type RemoveRolePrivilegesJSONRequestBody = UpdateRoleRequestBody + +// ////////////////////////////////////////////////////////////// + +// ///////// + +// ////////////////////////////////////////////////////////////// +// ///////// + +// ////////////////////////////////////////////////////////////// From b45edb84b3288fa0531d8200cac59c24713882e5 Mon Sep 17 00:00:00 2001 From: Tzrlk Date: Wed, 14 Aug 2024 14:33:59 +1200 Subject: [PATCH 2/3] #15 Improved docs rendering a bit. --- Makefile | 37 +++++++++-------------------- docs/data-sources/role_list.md | 12 ++++++++-- internal/provider/role_list_data.go | 9 ++++++- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index 6a72eb1..5b8e9ca 100644 --- a/Makefile +++ b/Makefile @@ -246,38 +246,23 @@ $(addsuffix local_override.tf,${TF_SRC_DIRS}): %/local_override.tf: \ ################################################################################ #: Generate documentation. -docs: \ - docs/* +docs: ${DOC_OUT_FILES} .PHONY: docs -docs/*: \ - docs/data-sources/* \ - docs/resources/* \ - docs/functions/* - -# Define relationships between docs and their source files (actually pointless). -docs/index.md: \ - examples/provider/provider.tf \ - internal/provider/provider.go \ - templates/index.md.tmpl -docs/data-sources/%: \ - examples/data-sources/idmc_$$(basename %)/data-source.tf \ - internal/provider/$$(basename %).go -docs/resources/%: \ - examples/resources/idmc_$$(basename %)/resource.tf \ - internal/provider/$$(basename %).go -docs/functions/%: \ - examples/functions/$$(basename %)/function.tf \ - internal/provider/$$(basename %).go - -docs/index.md docs/data-sources/* docs/resources/* docs/functions/* &: \ +DOC_OUT_TPLS := $(wildcard templates/*.md.tmpl) +DOC_OUT_FILES := $(sort \ + docs/index.md \ + $(addsuffix .md,$(patsubst examples/data-sources/idmc_%,docs/data-sources/%,${TF_SRC_DIRS_DAT})) \ + $(addsuffix .md,$(patsubst examples/resources/idmc_%,docs/resources/%,${TF_SRC_DIRS_DAT})) \ + $(addsuffix .md,$(patsubst examples/functions/idmc_%,docs/functions/%,${TF_SRC_DIRS_DAT})) \ +) + +${DOC_OUT_FILES} &: \ ${GO_SRC_FILES} \ ${TF_SRC_FILES} \ + ${DOC_OUT_TPLS} \ | .build/ ${CMD_TFPLUGINDOCS} \ generate \ --provider-name idmc \ --website-temp-dir .build/tfplugindocs -# --providers-schema ??? (need to generate first) - -# TODO: Use the examples as an indication of what documentation is going to be generated. diff --git a/docs/data-sources/role_list.md b/docs/data-sources/role_list.md index 041e4c7..247a4ce 100644 --- a/docs/data-sources/role_list.md +++ b/docs/data-sources/role_list.md @@ -4,12 +4,20 @@ page_title: "idmc_role_list Data Source - idmc" subcategory: "" description: |- - https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html + Will fetch a list of all roles in the organisation. Uses [the role details fetching API][getting-role-details] under the covers. + + While privilege information is available when fetching singular entries, the full list does not include it. + + [getting-role-details]: https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html --- # idmc_role_list (Data Source) -https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html +Will fetch a list of all roles in the organisation. Uses [the role details fetching API][getting-role-details] under the covers. + +While privilege information is available when fetching singular entries, the full list does not include it. + +[getting-role-details]: https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html ## Example Usage diff --git a/internal/provider/role_list_data.go b/internal/provider/role_list_data.go index a713cab..882104d 100644 --- a/internal/provider/role_list_data.go +++ b/internal/provider/role_list_data.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" + "strings" "terraform-provider-idmc/internal/idmc/v3" . "github.com/hashicorp/terraform-plugin-framework/datasource" @@ -34,7 +35,13 @@ func (d *RoleListDataSource) Metadata(_ context.Context, req MetadataRequest, re func (d *RoleListDataSource) Schema(_ context.Context, _ SchemaRequest, resp *SchemaResponse) { resp.Schema = schema.Schema{ - Description: "https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html", + MarkdownDescription: strings.TrimSpace(` +Will fetch a list of all roles in the organisation. Uses [the role details fetching API][getting-role-details] under the covers. + +While privilege information is available when fetching singular entries, the full list does not include it. + +[getting-role-details]: https://docs.informatica.com/integration-cloud/data-integration/current-version/rest-api-reference/platform-rest-api-version-3-resources/roles/getting-role-details.html +`), Attributes: map[string]schema.Attribute{ "roles": schema.ListNestedAttribute{ Description: "The query results", From 7a67b0f170c6b29d147343302f3d29516c66b74e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:50:54 +0000 Subject: [PATCH 3/3] Bump github.com/golangci/golangci-lint from 1.59.1 to 1.60.1 Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.59.1 to 1.60.1. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.59.1...v1.60.1) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 52 ++++++++++++++-------------- go.sum | 106 +++++++++++++++++++++++++++------------------------------ 2 files changed, 76 insertions(+), 82 deletions(-) diff --git a/go.mod b/go.mod index 58db310..b4bac60 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,11 @@ module terraform-provider-idmc go 1.22 - toolchain go1.22.5 require ( github.com/brianvoe/gofakeit/v7 v7.0.4 - github.com/golangci/golangci-lint v1.59.1 + github.com/golangci/golangci-lint v1.60.1 github.com/hashicorp/terraform-plugin-docs v0.19.4 github.com/hashicorp/terraform-plugin-framework v1.11.0 github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 @@ -26,11 +25,11 @@ require ( github.com/Abirdcfly/dupword v0.0.14 // indirect github.com/Antonboom/errname v0.1.13 // indirect github.com/Antonboom/nilnil v0.1.9 // indirect - github.com/Antonboom/testifylint v1.3.1 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect - github.com/Crocmagnon/fatcontext v0.2.2 // indirect + github.com/Antonboom/testifylint v1.4.3 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect + github.com/Crocmagnon/fatcontext v0.4.0 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect @@ -51,7 +50,7 @@ require ( github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect - github.com/bombsimon/wsl/v4 v4.2.1 // indirect + github.com/bombsimon/wsl/v4 v4.4.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect github.com/butuzov/ireturn v0.3.0 // indirect @@ -88,7 +87,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect @@ -128,7 +127,7 @@ require ( github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/jjti/go-spancheck v0.6.1 // indirect + github.com/jjti/go-spancheck v0.6.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect @@ -152,14 +151,14 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mgechev/revive v1.3.7 // indirect + github.com/mgechev/revive v1.3.9 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/moricho/tparallel v0.3.1 // indirect + github.com/moricho/tparallel v0.3.2 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect @@ -170,7 +169,7 @@ require ( github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.5.2 // indirect + github.com/polyfloyd/go-errorlint v1.6.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -181,23 +180,23 @@ require ( github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/ryancurrah/gomodguard v1.3.2 // indirect + github.com/ryancurrah/gomodguard v1.3.3 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.26.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/tenv v1.7.1 // indirect + github.com/sivchari/tenv v1.10.0 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.12.0 // indirect @@ -206,7 +205,6 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tetafro/godot v1.4.16 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect @@ -215,7 +213,7 @@ require ( github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect - github.com/uudashr/gocognit v1.1.2 // indirect + github.com/uudashr/gocognit v1.1.3 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect @@ -227,27 +225,27 @@ require ( github.com/zclconf/go-cty v1.14.4 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect go-simpler.org/musttag v0.12.2 // indirect - go-simpler.org/sloglint v0.7.1 // indirect + go-simpler.org/sloglint v0.7.2 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/tools v0.24.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.34.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.7 // indirect + honnef.co/go/tools v0.5.0 // indirect mvdan.cc/gofumpt v0.6.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect ) diff --git a/go.sum b/go.sum index 85e9ee2..702dedc 100644 --- a/go.sum +++ b/go.sum @@ -45,18 +45,18 @@ github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHO github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= -github.com/Antonboom/testifylint v1.3.1 h1:Uam4q1Q+2b6H7gvk9RQFw6jyVDdpzIirFOOrbs14eG4= -github.com/Antonboom/testifylint v1.3.1/go.mod h1:NV0hTlteCkViPW9mSR4wEMfwp+Hs1T3dY60bkvSfhpM= +github.com/Antonboom/testifylint v1.4.3 h1:ohMt6AHuHgttaQ1xb6SSnxCeK4/rnK7KKzbvs7DmEck= +github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Crocmagnon/fatcontext v0.2.2 h1:OrFlsDdOj9hW/oBEJBNSuH7QWf+E9WPVHw+x52bXVbk= -github.com/Crocmagnon/fatcontext v0.2.2/go.mod h1:WSn/c/+MMNiD8Pri0ahRj0o9jVpeowzavOQplBJw6u0= +github.com/Crocmagnon/fatcontext v0.4.0 h1:4ykozu23YHA0JB6+thiuEv7iT6xq995qS1vcuWZq0tg= +github.com/Crocmagnon/fatcontext v0.4.0/go.mod h1:ZtWrXkgyfsYPzS6K3O88va6t2GEglG93vnII/F94WC0= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -115,8 +115,8 @@ github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkAp github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= -github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLdw= +github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= @@ -151,7 +151,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -241,8 +241,8 @@ github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80 github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -279,8 +279,8 @@ github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9 github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.59.1 h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks= -github.com/golangci/golangci-lint v1.59.1/go.mod h1:jX5Oif4C7P0j9++YB2MMJmoNrb01NJ8ITqKWNLewThg= +github.com/golangci/golangci-lint v1.60.1 h1:DRKNqNTQRLBJZ1il5u4fvgLQCjQc7QFs0DbhksJtVJE= +github.com/golangci/golangci-lint v1.60.1/go.mod h1:jDIPN1rYaIA+ijp9OZcUmUCoQOtZ76pOlFbi15FlLJY= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= @@ -412,8 +412,8 @@ github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjz github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jjti/go-spancheck v0.6.1 h1:ZK/wE5Kyi1VX3PJpUO2oEgeoI4FWOUm7Shb2Gbv5obI= -github.com/jjti/go-spancheck v0.6.1/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8= +github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= +github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -490,8 +490,8 @@ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/Qd github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= -github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= +github.com/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A= +github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -511,8 +511,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= -github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= @@ -556,8 +556,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.5.2 h1:SJhVik3Umsjh7mte1vE0fVZ5T1gznasQG3PV7U5xFdA= -github.com/polyfloyd/go-errorlint v1.5.2/go.mod h1:sH1QC1pxxi0fFecsVIzBmxtrgd9IF/SkJpA6wqyKAJs= +github.com/polyfloyd/go-errorlint v1.6.0 h1:tftWV9DE7txiFzPpztTAwyoRLKNj9gpVm2cg8/OwcYY= +github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPPHF+Id4vIPvDqVw= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= @@ -598,8 +598,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3IXxM18= -github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o= +github.com/ryancurrah/gomodguard v1.3.3 h1:eiSQdJVNr9KTNxY2Niij8UReSwR8Xrte3exBrAZfqpg= +github.com/ryancurrah/gomodguard v1.3.3/go.mod h1:rsKQjj4l3LXe8N344Ow7agAy5p9yjsWOtRzUMYmA0QY= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= @@ -608,8 +608,8 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6Ng github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.26.0 h1:LONR2hNVKxRmzIrZR0PhSF3mhCAzvnr+DcUiHgREfXE= -github.com/sashamelentyev/usestdlibvars v1.26.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= +github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= +github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= @@ -628,8 +628,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sivchari/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0= +github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= @@ -641,8 +641,8 @@ github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNo github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -673,8 +673,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= @@ -697,8 +695,8 @@ github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81v github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= -github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= -github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= +github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= +github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= @@ -732,8 +730,8 @@ go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= -go-simpler.org/sloglint v0.7.1 h1:qlGLiqHbN5islOxjeLXoPtUdZXb669RW+BDQ+xOSNoU= -go-simpler.org/sloglint v0.7.1/go.mod h1:OlaVDRh/FKKd4X4sIMbsz8st97vomydceL146Fthh/c= +go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= +go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -760,8 +758,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -806,8 +804,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -846,8 +844,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -867,8 +865,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -918,7 +916,6 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -927,8 +924,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -945,8 +942,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1005,14 +1002,13 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1126,8 +1122,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= -honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +honnef.co/go/tools v0.5.0 h1:29uoiIormS3Z6R+t56STz/oI4v+mB51TSmEOdJPgRnE= +honnef.co/go/tools v0.5.0/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U=