dsgithub

package module
v0.0.0-...-8164bca Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Github

type Github struct {
	Repo   string `json:"repo" yaml:"repo"`
	Branch string `json:"branch" yaml:"branch"`
}

Github contains the details of a github repo for the purpose of downloading

func NewGithub

func NewGithub(repo string) Github

NewGithub generates Github from a url that might contain branch information

func (Github) Clone

func (g Github) Clone(path string) error

Clone performs a git clone to the directory of our choosing

func (Github) RepoPath

func (g Github) RepoPath(path string) string

RepoPath Returns the path that the github content will be cached at

type Meta

type Meta struct {
	DeployStack deploystack.Config
	Terraform   gcloudtf.Blocks `json:"terraform" yaml:"terraform"`
	Github      Github          `json:"github" yaml:"github"`
	LocalPath   string          `json:"localpath" yaml:"localpath"`
}

Meta is a datastructure that combines the Deploystack, github and Terraform bits of metadata about a stack.

func NewMeta

func NewMeta(repo, path string) (Meta, error)

NewMeta downloads a github repo and parses the DeployStack and Terraform information from the stack.

func NewMetaFromLocal

func NewMetaFromLocal(path string) (Meta, error)

NewMetaFromLocal allows project to point at local directories for info as well as pulling down from github

func (Meta) ShortName

func (d Meta) ShortName() string

ShortName retrieves the shortname of whatever we are calling this stack

func (Meta) ShortNameUnderscore

func (d Meta) ShortNameUnderscore() string

ShortNameUnderscore retrieves the shortname of whatever we are calling this stack replacing hyphens with underscores

Jump to

Keyboard shortcuts

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