module

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package module contains the provider backend interface and all necessary types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Versions(*VersionsRequest) (*VersionsResponse, error)
	Download(*DownloadRequest) (*DownloadResponse, error)
}

Backend is the interface for module backends https://www.terraform.io/docs/internals/module-registry-protocol.html

type DownloadRequest

type DownloadRequest struct {
	Namespace string
	Name      string
	Provider  string
	Version   string
}

DownloadRequest implements the download request for a specific module version

type DownloadResponse

type DownloadResponse struct {
	URL url.URL
}

DownloadResponse implements the download response of a specific module version

type Module

type Module struct {
	Versions string `json:"versions"`
}

Module implements the available module versions

type Version

type Version struct {
	Version string `json:"version"`
}

Version implements a specific version

type VersionsRequest

type VersionsRequest struct {
	Namespace string
	Name      string
	Provider  string
}

VersionsRequest implements the versions request for available module versions

type VersionsResponse

type VersionsResponse struct {
	Modules []Module `json:"modules"`
}

VersionsResponse implements the versions response of available module version

Jump to

Keyboard shortcuts

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