Help us shape the future of Go! Take the 2026 Go Developer Survey

models

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.13.0

type Action struct {
	Class                   string            `json:"_class,omitempty"`
	LastBuiltRevision       LastBuiltRevision `json:"lastBuiltRevision,omitempty"`
	MercurialRevisionNumber string            `json:"mercurialRevisionNumber"`
	RemoteUrls              []string          `json:"remoteUrls"`
	Causes                  []Cause           `json:"causes"`
}

type ApiBuildResponse

type ApiBuildResponse struct {
	Class             string    `json:"_class"`
	Number            int64     `json:"number"`
	Result            string    `json:"result"`
	Actions           []Action  `json:"actions"`
	Duration          float64   `json:"duration"`
	Timestamp         int64     `json:"timestamp"`
	DisplayName       string    `json:"fullDisplayName"`
	EstimatedDuration float64   `json:"estimatedDuration"`
	ChangeSet         ChangeSet `json:"changeSet"`
}

type ApiResponse

type ApiResponse struct {
	URL             string           `json:"url"`
	Jobs            []Job            `json:"jobs"`
	Mode            string           `json:"mode"`
	Views           []Views          `json:"views"`
	Class           string           `json:"_class"`
	NodeName        string           `json:"nodeName"`
	UseCrumbs       bool             `json:"useCrumbs"`
	Description     interface{}      `json:"description"`
	OverallLoad     OverallLoad      `json:"overallLoad"`
	PrimaryView     PrimaryView      `json:"primaryView"`
	UseSecurity     bool             `json:"useSecurity"`
	NumExecutors    int              `json:"numExecutors"`
	QuietingDown    bool             `json:"quietingDown"`
	UnlabeledLoad   UnlabeledLoad    `json:"unlabeledLoad"`
	AssignedLabels  []AssignedLabels `json:"assignedLabels"`
	SlaveAgentPort  int              `json:"slaveAgentPort"`
	NodeDescription string           `json:"nodeDescription"`
}

type AssignedLabels

type AssignedLabels struct {
	Name string `json:"name"`
}

type Branch added in v0.13.0

type Branch struct {
	Name string `json:"name"`
}

type Cause added in v0.13.0

type Cause struct {
	Class            string `json:"_class"`
	ShortDescription string `json:"shortDescription"`
	UpstreamBuild    int    `json:"upstreamBuild"`
	UpstreamProject  string `json:"upstreamProject"`
	UpstreamURL      string `json:"upstreamUrl"`
}

type ChangeSet

type ChangeSet struct {
	Class     string     `json:"_class"`
	Kind      string     `json:"kind"`
	Revisions []Revision `json:"revision"`
}

type FolderInput added in v0.12.0

type FolderInput struct {
	*helper.ListBaseNode
	Path string
}

func NewFolderInput added in v0.12.0

func NewFolderInput(path string) *FolderInput

func (*FolderInput) Data added in v0.13.0

func (f *FolderInput) Data() interface{}

type JenkinsBuild

type JenkinsBuild struct {
	common.NoPKModel
	// collected fields
	ConnectionId      uint64    `gorm:"primaryKey"`
	JobName           string    `gorm:"index;type:varchar(255)"`
	Duration          float64   // build time
	FullDisplayName   string    `gorm:"primaryKey;type:varchar(255)"` // "job name #7"
	EstimatedDuration float64   // EstimatedDuration
	Number            int64     `gorm:"index"`
	Result            string    // Result
	Timestamp         int64     // start time
	StartTime         time.Time // convered by timestamp
	Type              string    `gorm:"index;type:varchar(255)"`
	Class             string    `gorm:"index;type:varchar(255)" `
	TriggeredBy       string    `gorm:"type:varchar(255)"`
	Building          bool
	HasStages         bool
}

JenkinsBuild db entity for jenkins build

func (JenkinsBuild) TableName

func (JenkinsBuild) TableName() string

type JenkinsBuildCommit added in v0.14.0

type JenkinsBuildCommit struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	BuildName    string `gorm:"primaryKey;type:varchar(255)"`
	CommitSha    string `gorm:"primaryKey;type:varchar(255)"`
	Branch       string `gorm:"type:varchar(255)"`
	RepoUrl      string `gorm:"type:varchar(255)"`
	common.NoPKModel
}

func (JenkinsBuildCommit) TableName added in v0.14.0

func (JenkinsBuildCommit) TableName() string

type JenkinsConnection

type JenkinsConnection struct {
	helper.RestConnection `mapstructure:",squash"`
	helper.BasicAuth      `mapstructure:",squash"`
}

This object conforms to what the frontend currently sends.

func (JenkinsConnection) TableName added in v0.12.0

func (JenkinsConnection) TableName() string

type JenkinsJob

type JenkinsJob struct {
	JenkinsJobProps
	common.NoPKModel
}

JenkinsJob db entity for jenkins job

func (JenkinsJob) TableName

func (JenkinsJob) TableName() string

type JenkinsJobDag added in v0.13.0

type JenkinsJobDag struct {
	ConnetionId   uint64 `gorm:"primaryKey"`
	UpstreamJob   string `gorm:"primaryKey;type:varchar(255)"`
	DownstreamJob string `gorm:"primaryKey;type:varchar(255)"`
	common.NoPKModel
}

func (JenkinsJobDag) TableName added in v0.13.0

func (JenkinsJobDag) TableName() string

type JenkinsJobProps

type JenkinsJobProps struct {
	// collected fields
	ConnectionId uint64 `gorm:"primaryKey"`
	Name         string `gorm:"primaryKey;type:varchar(255)"`
	Path         string `gorm:"primaryKey;type:varchar(511)"`
	Class        string `gorm:"type:varchar(255)"`
	Color        string `gorm:"type:varchar(255)"`
	Base         string `gorm:"type:varchar(255)"`
}

JenkinsJobProps current used jenkins job props

type JenkinsPipeline added in v0.13.0

type JenkinsPipeline struct {
	common.NoPKModel
	// collected fields
	ConnectionId uint64 `gorm:"primaryKey"`
	DurationSec  uint64
	Name         string    `gorm:"type:varchar(255);primaryKey"`
	Result       string    // Result
	Status       string    // Result
	Timestamp    int64     // start time
	CreatedDate  time.Time // convered by timestamp
	CommitSha    string    `gorm:"primaryKey;type:varchar(255)"`
	Type         string    `gorm:"index;type:varchar(255)"`
	Building     bool
	Repo         string `gorm:"type:varchar(255);index"`
	FinishedDate *time.Time
}

func (JenkinsPipeline) TableName added in v0.13.0

func (JenkinsPipeline) TableName() string

type JenkinsResponse

type JenkinsResponse struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	JenkinsConnection
}

type JenkinsStage added in v0.13.0

type JenkinsStage struct {
	common.NoPKModel
	ConnectionId        uint64 `gorm:"primaryKey"`
	ID                  string `json:"id" gorm:"primaryKey;type:varchar(255)"`
	Name                string `json:"name" gorm:"type:varchar(255)"`
	ExecNode            string `json:"execNode" gorm:"type:varchar(255)"`
	Status              string `json:"status" gorm:"type:varchar(255)"`
	StartTimeMillis     int64  `json:"startTimeMillis"`
	DurationMillis      int    `json:"durationMillis"`
	PauseDurationMillis int    `json:"pauseDurationMillis"`
	Type                string `gorm:"index;type:varchar(255)"`
	BuildName           string `gorm:"primaryKey;type:varchar(255)"`
}

func (JenkinsStage) TableName added in v0.13.0

func (JenkinsStage) TableName() string

type JenkinsTask added in v0.13.0

type JenkinsTask struct {
	domainlayer.DomainEntity
	Name         string `gorm:"type:varchar(255)"`
	PipelineId   string `gorm:"index;type:varchar(255)"`
	Result       string `gorm:"type:varchar(100)"`
	Status       string `gorm:"type:varchar(100)"`
	Type         string `gorm:"type:varchar(100);comment: to indicate this is CI or CD"`
	DurationSec  uint64
	StatedDate   time.Time
	FinishedDate time.Time
}

func (JenkinsTask) TableName added in v0.13.0

func (JenkinsTask) TableName() string

type Job

type Job struct {
	URL              string    `json:"url"`
	Name             string    `json:"name"`
	Color            string    `json:"color"`
	Class            string    `json:"_class"`
	Jobs             *[]Job    `json:"jobs"`
	UpstreamProjects []Project `json:"upstreamProjects"`
}

type LastBuiltRevision

type LastBuiltRevision struct {
	SHA1     string   `json:"SHA1"`
	Branches []Branch `json:"branch"`
}

type OverallLoad

type OverallLoad struct {
}

type PrimaryView

type PrimaryView struct {
	URL   string `json:"url"`
	Name  string `json:"name"`
	Class string `json:"_class"`
}

type Project added in v0.13.0

type Project struct {
	Class string `json:"_class"`
	Name  string `json:"name"`
}

type Revision

type Revision struct {
	Module   string
	Revision int
}

type Stage added in v0.13.0

type Stage struct {
	Links struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
	} `json:"_links"`
	ID                  string `json:"id"`
	Name                string `json:"name"`
	ExecNode            string `json:"execNode"`
	Status              string `json:"status"`
	StartTimeMillis     int64  `json:"startTimeMillis"`
	DurationMillis      int    `json:"durationMillis"`
	PauseDurationMillis int    `json:"pauseDurationMillis"`
}

type TestConnectionRequest

type TestConnectionRequest struct {
	Endpoint string `json:"endpoint" validate:"required"`
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
	Proxy    string `json:"proxy"`
}

type TransformationRules added in v0.14.0

type TransformationRules struct {
	DeploymentPattern string `mapstructure:"deploymentPattern" json:"deploymentPattern"`
}

type UnlabeledLoad

type UnlabeledLoad struct {
	Class string `json:"_class"`
}

type Views

type Views struct {
	URL   string `json:"url"`
	Name  string `json:"name"`
	Class string `json:"_class"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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