backend

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 27 Imported by: 6

Documentation

Index

Constants

View Source
const BackendKeyAzureRM = "azurerm"
View Source
const BackendKeyFile = ""
View Source
const BackendKeyGS = "gs"
View Source
const BackendKeyHTTP = "http"
View Source
const BackendKeyHTTPS = "https"
View Source
const BackendKeyS3 = "s3"
View Source
const BackendKeyTFCloud = "tfcloud"

Variables

This section is empty.

Functions

func GetSupportedBackends

func GetSupportedBackends() []string

func IsSupported

func IsSupported(backend string) bool

func NewTFCloudConfigReader

func NewTFCloudConfigReader(reader io.ReadCloser) *tfCloudConfigReader

Types

type AzureRMBackend added in v0.21.0

type AzureRMBackend struct {
	// contains filtered or unexported fields
}

func NewAzureRMReader added in v0.21.0

func NewAzureRMReader(path string, opts options.AzureRMBackendOptions) (*AzureRMBackend, error)

func (*AzureRMBackend) Close added in v0.21.0

func (s *AzureRMBackend) Close() error

func (*AzureRMBackend) Read added in v0.21.0

func (s *AzureRMBackend) Read(p []byte) (int, error)

type Backend

type Backend io.ReadCloser

func GetBackend

func GetBackend(config config.SupplierConfig, opts *Options) (Backend, error)

func NewFileReader

func NewFileReader(path string) (Backend, error)

type GSBackend

type GSBackend struct {
	// contains filtered or unexported fields
}

func NewGSReader

func NewGSReader(path string) (*GSBackend, error)

func (*GSBackend) Close

func (s *GSBackend) Close() error

func (*GSBackend) Read

func (s *GSBackend) Read(p []byte) (int, error)

type HTTPBackend

type HTTPBackend struct {
	// contains filtered or unexported fields
}

func NewHTTPReader

func NewHTTPReader(client pkghttp.HTTPClient, rawURL string, opts *Options) (*HTTPBackend, error)

func (*HTTPBackend) Close

func (h *HTTPBackend) Close() error

func (*HTTPBackend) Read

func (h *HTTPBackend) Read(p []byte) (n int, err error)

type MockReaderMock

type MockReaderMock struct {
	mock.Mock
}

MockReaderMock is an autogenerated mock type for the ReaderMock type

func (*MockReaderMock) Close

func (_m *MockReaderMock) Close() error

Close provides a mock function with given fields:

func (*MockReaderMock) Read

func (_m *MockReaderMock) Read(p []byte) (int, error)

Read provides a mock function with given fields: p

type Options

type Options struct {
	Headers         map[string]string
	TFCloudToken    string
	TFCloudEndpoint string
	options.AzureRMBackendOptions
}

type S3Backend

type S3Backend struct {
	S3Client s3iface.S3API
	// contains filtered or unexported fields
}

func NewS3Reader

func NewS3Reader(path string) (*S3Backend, error)

func (*S3Backend) Close

func (s *S3Backend) Close() error

func (*S3Backend) Read

func (s *S3Backend) Read(p []byte) (n int, err error)

type TFCloudAttributes

type TFCloudAttributes struct {
	HostedStateDownloadUrl string `json:"hosted-state-download-url"`
}

type TFCloudBackend

type TFCloudBackend struct {
	// contains filtered or unexported fields
}

func NewTFCloudReader

func NewTFCloudReader(workspacePath string, opts *Options) *TFCloudBackend

func (*TFCloudBackend) Close

func (t *TFCloudBackend) Close() error

func (*TFCloudBackend) Read

func (t *TFCloudBackend) Read(p []byte) (n int, err error)

type TFCloudBody

type TFCloudBody struct {
	Data TFCloudData `json:"data"`
}

type TFCloudData

type TFCloudData struct {
	Attributes TFCloudAttributes `json:"attributes"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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