You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: file_aws_credentials.go
    path of file: ./repos/gotosocial/vendor/github.com/minio/minio-go/v7/pkg/credentials
    
    the code of the file until where you have to start completion: /*
 * MinIO Go Library for Amazon S3 Compatible Cloud Storage
 * Copyright 2017 MinIO, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package credentials

import (
	"encoding/json"
	"errors"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"

	ini "gopkg.in/ini.v1"
)

// A externalProcessCredentials stores the output of a credential_process
type externalProcessCredentials struct {
	Vers
    
func (p *FileAWSCredentials) Retrieve() (Value, error) {
	if p.Filename == "" {
		p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE")
		if p.Filename == "" {
			homeDir, err := os.UserHomeDir()
			if err != nil {
				return Value{}, err
			}
			p.Filename = filepath.Join(homeDir, ".aws", "credentials")
		}
	}
	if p.Profile == "" {
		p.Profile = os.Getenv("AWS_PROFILE")
		if p.Profile == "" {
			p.Profile = "default"
		}
	}

	p.retrieved = false

	iniProfile, err := loadProfile(p.Filename, p.Profile)
	if err != nil {
		return Value{}, err
	}

	// Default to empty string if not found.
	id := iniProfile.Key("aws_access_key_id")
	// Default to empty string if not found.
	secret := iniProfile.Key("aws_secret_access_key")
	// Default to empty string if not found.
	token := iniProfile.Key("aws_session_token")

	// If credential_process is defined, obtain credentials by executing
	// the external process
	credentialProcess := strings.TrimSpace(iniProfile.Key("credential_process").String())
	if credentialProcess != "" {
		args := strings.Fields(credentialProcess)
		if len(args) <= 1 {
			return Value{}, errors.New("invalid credential process args")
		}
		cmd := exec.Command(args[0], args[1:]...)
		out, err := cmd.Output()
		if err != nil {
			return Value{}, err
		}
		var externalProcessCredentials externalProcessCredentials
		err = json.Unmarshal([]byte(out), &externalProcessCredentials)
		if err != nil {
			return Value{}, err
		}
		p.retrieved = true
		p.SetExpiration(externalProcessCredentials.Expiration, DefaultExpiryWindow)
		return Value{
			AccessKeyID:     externalProcessCredentials.AccessKeyID,
			SecretAccessKey: externalProcessCredentials.SecretAccessKey,
			SessionToken:    externalProcessCredentials.SessionToken,
			Expiration:      externalProcessCredentials.Expiration,
			SignerType:      SignatureV4,
		}, nil
	}
	p.retrieved = true
	return Value{
		AccessKeyID:     id.String(),
		SecretAccessKey: secret.String(),
		SessionToken:    token.String(),
		SignerType:      SignatureV4,
	}, nil
}