hashicorp

package
v1.0.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Arch        string `json:"arch"`
	Os          string `json:"os"`
	Unsupported bool   `json:"unsupported"`
	URL         string `json:"url"`
}

type Client

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

Client is a client for interacting with the HashiCorp Releases API

func NewClient

func NewClient(client *http.Client) *Client

NewClient creates a new client for interacting with the HashiCorp Releases API

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context, product, version string) (*Release, error)

GetVersion returns a specific release for a product from the HashiCorp Releases API

func (*Client) ListProducts

func (c *Client) ListProducts(ctx context.Context) (Products, error)

ListProducts returns a list of products available from the HashiCorp Releases API

func (*Client) ListReleases

func (c *Client) ListReleases(ctx context.Context, product string, opts *ListReleasesOptions) ([]*Release, error)

ListReleases returns a list of releases for a product from the HashiCorp Releases API

type ListReleasesOptions

type ListReleasesOptions struct {
	PreReleases  bool
	LicenseClass string
}

ListReleasesOptions are options for listing releases

type Products

type Products []string

type Release

type Release struct {
	Builds                     []*Build  `json:"builds"`
	DockerNameTag              string    `json:"docker_name_tag"`
	IsPrerelease               bool      `json:"is_prerelease"`
	LicenseClass               string    `json:"license_class"`
	Name                       string    `json:"name"`
	Status                     Status    `json:"status"`
	TimestampCreated           time.Time `json:"timestamp_created"`
	TimestampUpdated           time.Time `json:"timestamp_updated"`
	URLBlogpost                string    `json:"url_blogpost"`
	URLChangelog               string    `json:"url_changelog"`
	URLDockerRegistryDockerhub string    `json:"url_docker_registry_dockerhub"`
	URLDockerRegistryEcr       string    `json:"url_docker_registry_ecr"`
	URLLicense                 string    `json:"url_license"`
	URLProjectWebsite          string    `json:"url_project_website"`
	URLReleaseNotes            string    `json:"url_release_notes"`
	URLShasums                 string    `json:"url_shasums"`
	URLShasumsSignatures       []string  `json:"url_shasums_signatures"`
	URLSourceRepository        string    `json:"url_source_repository"`
	Version                    string    `json:"version"`
}

type Status

type Status struct {
	Message string `json:"message"`
	State   string `json:"state"`
}

Jump to

Keyboard shortcuts

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