common

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginAllK8sState

func GetPluginAllK8sState(nameSpace string, anFilter, labelFilter map[string]string) (statemanager.ResourceState, error)

Types

type Repo

type Repo struct {
	Owner             string `validate:"required_without=Org" mapstructure:"owner"`
	Org               string `validate:"required_without=Owner" mapstructure:"org"`
	Repo              string `validate:"required" mapstructure:"repo"`
	Branch            string `mapstructure:"branch"`
	PathWithNamespace string
	RepoType          string `validate:"oneof=gitlab github" mapstructure:"repoType"`
	// This is config for gitlab
	BaseURL    string `validate:"omitempty,url" mapstructure:"baseURL"`
	Visibility string `validate:"omitempty,oneof=public private internal" mapstructure:"visibility"`
}

Repo is the repo info of github or gitlab

func NewRepoFromURL added in v0.9.0

func NewRepoFromURL(repoURL, branch string) (*Repo, error)

NewRepoFromURL build repo struct from scm url

func (*Repo) BuildRepoInfo added in v0.9.0

func (d *Repo) BuildRepoInfo() *git.RepoInfo

func (*Repo) BuildRepoRenderConfig added in v0.9.0

func (d *Repo) BuildRepoRenderConfig() map[string]interface{}

BuildRepoRenderConfig will generate template render variables

func (*Repo) BuildURL added in v0.9.0

func (d *Repo) BuildURL() string

BuildURL return url build from repo struct

func (*Repo) CreateAndRenderLocalRepo added in v0.9.0

func (d *Repo) CreateAndRenderLocalRepo(appName string, vars map[string]interface{}) (git.GitFileContentMap, error)

CreateAndRenderLocalRepo will download repo from source repo and render it locally

Jump to

Keyboard shortcuts

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