branchrule

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchRule

type BranchRule struct {
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *BranchRule

func (*BranchRule) CheckRuleValid

func (branchRule *BranchRule) CheckRuleValid(newBranchRule *model.BranchRule) error

func (*BranchRule) Count

func (branchRule *BranchRule) Count(scopeType apistructs.ScopeType) (int64, error)

func (*BranchRule) Create

func (branchRule *BranchRule) Create(request apistructs.CreateBranchRuleRequest) (*apistructs.BranchRule, error)

func (*BranchRule) Delete

func (branchRule *BranchRule) Delete(id int64) (*apistructs.BranchRule, error)

func (*BranchRule) Get

func (branchRule *BranchRule) Get(ID int64) (*apistructs.BranchRule, error)

func (*BranchRule) GetAllProjectRulesMap

func (branchRule *BranchRule) GetAllProjectRulesMap() (map[int64][]*apistructs.BranchRule, error)

func (*BranchRule) GetAllValidBranchWorkspaces

func (branchRule *BranchRule) GetAllValidBranchWorkspaces(appID int64, userID string) ([]*apistructs.ValidBranch, error)

func (*BranchRule) InitAppRules

func (branchRule *BranchRule) InitAppRules(appID int64) error

func (*BranchRule) InitAppRulesWithData

func (branchRule *BranchRule) InitAppRulesWithData(appID int64, rules []*apistructs.BranchRule) error

func (*BranchRule) InitProjectRules

func (branchRule *BranchRule) InitProjectRules(projectID int64) error

func (*BranchRule) Query

func (branchRule *BranchRule) Query(scopeType apistructs.ScopeType, scopeID int64) ([]*apistructs.BranchRule, error)

func (*BranchRule) Update

func (branchRule *BranchRule) Update(request apistructs.UpdateBranchRuleRequest) (*apistructs.BranchRule, error)

type Option

type Option func(*BranchRule)

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

Jump to

Keyboard shortcuts

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