db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchPolicies

type BranchPolicies []BranchPolicy

type BranchPolicy

type BranchPolicy struct {
	Branch     string  `json:"branch"`
	BranchType string  `json:"branchType"`
	Policy     *Policy `json:"policy"`
}

func (*BranchPolicy) Convert

func (b *BranchPolicy) Convert() *pb.BranchPolicy

type Client

type Client struct {
	*gorm.DB
}

func (*Client) CreateDevFlowRule

func (db *Client) CreateDevFlowRule(f *DevFlowRule) error

func (*Client) DeleteDevFlowRuleByProjectID

func (db *Client) DeleteDevFlowRuleByProjectID(projectID uint64) error

func (*Client) GetDevFlowRule

func (db *Client) GetDevFlowRule(id string) (f *DevFlowRule, err error)

func (*Client) GetDevFlowRuleByProjectID

func (db *Client) GetDevFlowRuleByProjectID(proID uint64) (fs *DevFlowRule, err error)

func (*Client) UpdateDevFlowRule

func (db *Client) UpdateDevFlowRule(f *DevFlowRule) error

type DevFlowRule

type DevFlowRule struct {
	Model
	Scope
	Operator

	Flows          JSON
	BranchPolicies JSON
}

func (*DevFlowRule) Convert

func (r *DevFlowRule) Convert() (*pb.DevFlowRule, error)

func (DevFlowRule) TableName

func (DevFlowRule) TableName() string

type Flow

type Flow struct {
	Name         string `json:"name"`
	TargetBranch string `json:"targetBranch"`
	Artifact     string `json:"artifact"`
	Environment  string `json:"environment"`
}

func (*Flow) Convert

func (f *Flow) Convert() *pb.Flow

type Flows

type Flows []Flow

type JSON

type JSON json.RawMessage

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

func (JSON) String

func (j JSON) String() string

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

type Model

type Model struct {
	ID        fields.UUID `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt soft_delete.DeletedAt
}

type Operator

type Operator struct {
	Creator string
	Updater string
}

type Policy

type Policy struct {
	SourceBranch  string        `json:"sourceBranch"`
	CurrentBranch string        `json:"currentBranch"`
	TempBranch    string        `json:"tempBranch"`
	TargetBranch  *TargetBranch `json:"targetBranch"`
}

type Scope

type Scope struct {
	OrgID       uint64
	OrgName     string
	ProjectID   uint64
	ProjectName string
}

type TargetBranch

type TargetBranch struct {
	MergeRequest string `json:"mergeRequest"`
	CherryPick   string `json:"cherryPick"`
}

Jump to

Keyboard shortcuts

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