storage_vault

package
v1.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoundTripper added in v1.0.10

func RoundTripper(upstream http.RoundTripper) http.RoundTripper

func Transport added in v1.0.10

func Transport(opts TransportOptions) (http.RoundTripper, error)

Transport returns a new http.RoundTripper with default settings applied.

Types

type Credential

type Credential struct {
	AwsAccessKeyId     string `json:"aws_access_key_id,omitempty"`
	AwsSecretAccessKey string `json:"aws_secret_access_key,omitempty"`
	AwsLocation        string `json:"aws_location,omitempty"`
	Token              string `json:"token,omitempty"`
	Region             string `json:"region,omitempty"`
}

type StorageVault

type StorageVault interface {
	// HeadObject a boolean value whether object name existing in storage.
	HeadObject(key string) (bool, string, error)

	// PutObject stores the data to the storage backend.
	PutObject(key string, data []byte) error

	// GetObject downloads the object by name in storage.
	GetObject(key string) ([]byte, error)

	// SetCredential sets a new credential with backend credential not constant.
	RefreshCredential(credential Credential) error

	// ID return id of storage vault
	ID() (string, string)

	// Type
	Type() Type
}

storageVault ...

type TransportOptions added in v1.0.10

type TransportOptions struct {
	Connect          time.Duration
	ConnKeepAlive    time.Duration
	ExpectContinue   time.Duration
	IdleConn         time.Duration
	MaxAllIdleConns  int
	MaxHostIdleConns int
	ResponseHeader   time.Duration
	TLSHandshake     time.Duration
}

TransportOptions collects various options which can be set for an HTTP based transport.

type Type

type Type struct {
	StorageVaultType string
	CredentialType   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL