filename

package
v0.0.0-...-cc99f5b Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2022 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Type represents the plugin type, e.g. "terraform-provider"
	Type string
	// Version holds the parsed plugin version number
	Version semver.Version
	// OS is the operating system the plugin was built for
	OS string
	// Arch is the CPU architecture the plugin was built for
	Arch string
}

Info holds information about a plugin, deduced from from its Houston-compatible filename.

func Parse

func Parse(filename string) (Info, error)

Parse attempts to deduce information about a staged plugin from its (assumed Houston-compatible) filename, returning an error if the filename can't be parsed.

func (*Info) Filename

func (info *Info) Filename(extension string) string

Filename generates a Houston-compatible filename for the Info block, with a given file extension (NB: the extension is expected to include the leading dot).

Jump to

Keyboard shortcuts

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