svc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrGitCommandNotFound = 1
	ErrGitExec            = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	Owner  string
	Repo   string
	Branch string
	Tag    string
	PrNum  string
}

func GitInfo

func GitInfo() *Git

func GitInfoFromEnv

func GitInfoFromEnv() (*Git, error)

func SetGitInfo

func SetGitInfo() (*Git, error)

func (*Git) FullRepo

func (g *Git) FullRepo() string

type GitCommand

type GitCommand interface {
	Exists() bool
	RemoteURL() (*string, error)
	Branch() (*string, error)
	Tag() (*string, error)
	PrNumber() (*string, error)
}

type GitCommander

type GitCommander struct{}

func (*GitCommander) Branch

func (g *GitCommander) Branch() (*string, error)

func (*GitCommander) Exists

func (g *GitCommander) Exists() bool

func (*GitCommander) PrNumber

func (g *GitCommander) PrNumber() (*string, error)

func (*GitCommander) RemoteURL

func (g *GitCommander) RemoteURL() (*string, error)

func (*GitCommander) Tag

func (g *GitCommander) Tag() (*string, error)

type GitError

type GitError struct {
	Code    int
	Message string
}

CustomError is a basic custom error type.

func (*GitError) Error

func (e *GitError) Error() string

Jump to

Keyboard shortcuts

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