internal

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigHelperContext added in v1.9.1

type ConfigHelperContext struct {
	CWD string

	ProjectConfPath string // project configuration file path
	GlobalConfPath  string // global configuration file path
}

type IConfigHelper added in v1.9.1

type IConfigHelper interface {

	// Preload loads configuration from file system. If the configuration
	// is not found, return error.
	// NOTE: this method also refill the context of configuration helper.
	Preload() error

	// Context returns the context of configuration helper.
	Context() *ConfigHelperContext

	// Global returns the global configuration, if the merge is true,
	// it will merge the project configuration into global configuration.
	Global() (*types.Config, error)

	// Project returns the configuration of current project, if the merge is true,
	// it will merge the global configuration into project configuration.
	Project(merge bool) (*types.Config, error)

	// Save saves configuration to file system. If the file is not exist,
	// create it. If the file is existed, override it.
	// NOTE: the target is the file path.
	Save(config *types.Config, global bool) (string, error)
	// contains filtered or unexported methods
}

func NewConfigHelper added in v1.9.1

func NewConfigHelper(helperContext *ConfigHelperContext) IConfigHelper

type IDash

type IDash interface {
	// FeatureDetail get feature detail
	FeatureDetail(featureBranchName string) ([]byte, error)

	// MilestoneOverview get milestone detail
	MilestoneOverview(milestoneName, branchFilter string) ([]byte, error)

	// ProjectDetail display project detail, includes: project web URL
	ProjectDetail(module string) ([]byte, error)
}

IDash is used to display useful data of current development stage, and also to analyze user developing data.

func NewDash

func NewDash(ctx *types.FlowContext, ch IConfigHelper) IDash

type IFeature added in v1.9.1

type IFeature interface {
	// FeatureBegin open a milestone and related to a feature branch,
	// then CLI would automate fetch origin branches and pull them to local.
	// Of course, flow would save data in local storage.
	FeatureBegin(opc *types.OpFeatureContext, title, desc string) error
	// FeatureDebugging open a MergeRequest of feature branch and types.DevBranch branch.
	FeatureDebugging(opc *types.OpFeatureContext) error
	// FeatureTest open a MergeRequest of feature branch and types.TestBranch branch.
	FeatureTest(opc *types.OpFeatureContext) error
	// FeatureRelease open a MergeRequest of feature branch and types.MasterBranch branch.
	FeatureRelease(opc *types.OpFeatureContext) error

	// FeatureResolveConflict will check out a new branch from target branch,
	// then create a merge request from current feature branch to the new branch.
	// newBranch = "resolve-conflict/featureBranchName-to-master"
	FeatureResolveConflict(opc *types.OpFeatureContext, targetBranch types.BranchTyp) error

	// FeatureBeginIssue checkout a issue branch from feature branch, also open a merge request
	// which is from issue branch to feature branch.
	FeatureBeginIssue(opc *types.OpFeatureContext, title, desc string) error
	// FeatureFinishIssue open the WebURL of merge request which is from issue branch to feature branch.
	FeatureFinishIssue(opc *types.OpFeatureContext, issueBranchName string) error

	// Checkout to branch related to current feature, feature branch or issue branches.
	// default is to check out feature branch. It would list all branches if --list is set.
	// It would interact with user to choose which branch to check out if --issue is set.
	Checkout(opc *types.OpFeatureContext, listAll bool, issueID int)
}

type IFlow

type IFlow interface {
	IFeature
	IHotfix
	ISync
}

IFlow to control branches, MRs, milestones and issues.

func NewFlow

func NewFlow(ctx *types.FlowContext, ch IConfigHelper) IFlow

type IHotfix added in v1.9.1

type IHotfix interface {
	// HotfixBegin checkout a hotfix branch from types.MasterBranch, also open a merge request
	// which is from hotfix branch to types.MasterBranch.
	HotfixBegin(opc *types.OpHotfixContext, title, desc string) error
	// HotfixFinish open the WebURL of merge request which is from hotfix branch to types.MasterBranch.
	HotfixFinish(opc *types.OpHotfixContext, hotfixBranchName string) error
}

type ISync added in v1.9.1

type ISync interface {
	// SyncProject synchronize project information from remote gitlab server.
	SyncProject(isDelete bool) error
	// SyncMilestone synchronize remote repository milestone and related issues / merge requests to local.
	SyncMilestone(milestoneID int, interact bool) error
}

Directories

Path Synopsis
Package conf implements the configuration of the application.
Package conf implements the configuration of the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳