util

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Copyright © 2020 The k3d Author(s)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTags added in v1.2.0

func DefaultTags(name string) pulumi.StringMap

DefaultTags

func ExecPlugin

func ExecPlugin(ctx context.Context, path string, args []string, env []string) error

ExecPlugin executes a found plugin

func FindPlugin

func FindPlugin(name string) (string, bool)

FindPlugin tries to find the plugin executable on the filesystem

func GerConfigFileName

func GerConfigFileName(configFile string) (configFilePath string)

func GetEnv

func GetEnv(ctx *pulumi.Context, key string, fallback string) string

GetEnv searches for the requested key in the pulumi context and provides either the value of the key or the fallback. https://www.retgits.com/2020/01/how-to-create-a-vpc-in-aws-using-pulumi-and-golang/

func HandlePlugin

func HandlePlugin(ctx context.Context, args []string) (bool, error)

HandlePlugin takes care of finding and executing a plugin based on the longest prefix

func ListSecurityGroup

func ListSecurityGroup(sg interfaces.SecurityGroupArgs) (sgList []interfaces.PortSecurityGroupArgs)

ListSecurityGroup подготовка cписка групп безопасности

func ToPulumiStringArray

func ToPulumiStringArray(a []string) pulumi.StringArrayInput

ToPulumiStringArray Conver string array to pulumi input string array

Types

type GithubRelease

type GithubRelease struct {
	Slug   string
	Name   string
	Client *http.Client
}

func NewGithubRelease

func NewGithubRelease(slug, exe string) *GithubRelease

func (*GithubRelease) DownloadURL

func (rel *GithubRelease) DownloadURL() string

func (*GithubRelease) Executable

func (rel *GithubRelease) Executable() (exe string)

func (*GithubRelease) LatestURL

func (rel *GithubRelease) LatestURL() string

func (*GithubRelease) PeekLatestRelease

func (rel *GithubRelease) PeekLatestRelease() (latest string, err error)

func (*GithubRelease) ReplaceCurrentRelease

func (rel *GithubRelease) ReplaceCurrentRelease(latest string) (err error)

assumes not v-prefixed assumes never re-tagging releases assumes only releasing newer tags

Jump to

Keyboard shortcuts

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