backend

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const BackendKeyFile = ""
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 added in v0.15.0

func NewTFCloudConfigReader(reader io.ReadCloser) *tfCloudConfigReader

Types

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 HTTPBackend added in v0.12.0

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

func NewHTTPReader added in v0.12.0

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

func (*HTTPBackend) Close added in v0.12.0

func (h *HTTPBackend) Close() error

func (*HTTPBackend) Read added in v0.12.0

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

type MockReaderMock added in v0.12.0

type MockReaderMock struct {
	mock.Mock
}

MockReaderMock is an autogenerated mock type for the ReaderMock type

func (*MockReaderMock) Close added in v0.12.0

func (_m *MockReaderMock) Close() error

Close provides a mock function with given fields:

func (*MockReaderMock) Read added in v0.12.0

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

Read provides a mock function with given fields: p

type Options added in v0.12.0

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

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 added in v0.12.0

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

type TFCloudBackend added in v0.15.0

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

func NewTFCloudReader added in v0.12.0

func NewTFCloudReader(client pkghttp.HTTPClient, workspaceId string, opts *Options) (*TFCloudBackend, error)

func (*TFCloudBackend) Close added in v0.15.0

func (t *TFCloudBackend) Close() error

func (*TFCloudBackend) Read added in v0.15.0

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

type TFCloudBody added in v0.12.0

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

type TFCloudData added in v0.12.0

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

Jump to

Keyboard shortcuts

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