gangway

package
v0.0.0-...-b21d1cf Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 27 Imported by: 5

Documentation

Index

Constants

View Source
const (
	HEADER_API_CONSUMER_TYPE = "x-endpoint-api-consumer-type"
	HEADER_API_CONSUMER_ID   = "x-endpoint-api-consumer-number"
	CONTEXT_TIMEOUT          = 10 * time.Minute
	LIST_TIMEOUT             = 60
)
View Source
const (
	Prow_CreateJobExecution_FullMethodName  = "/Prow/CreateJobExecution"
	Prow_GetJobExecution_FullMethodName     = "/Prow/GetJobExecution"
	Prow_ListJobExecutions_FullMethodName   = "/Prow/ListJobExecutions"
	Prow_BulkJobStatusChange_FullMethodName = "/Prow/BulkJobStatusChange"
)

Variables

View Source
var (
	JobExecutionStatus_name = map[int32]string{
		0: "JOB_EXECUTION_STATUS_UNSPECIFIED",
		1: "TRIGGERED",
		2: "PENDING",
		3: "SUCCESS",
		4: "FAILURE",
		5: "ABORTED",
		6: "ERROR",
	}
	JobExecutionStatus_value = map[string]int32{
		"JOB_EXECUTION_STATUS_UNSPECIFIED": 0,
		"TRIGGERED":                        1,
		"PENDING":                          2,
		"SUCCESS":                          3,
		"FAILURE":                          4,
		"ABORTED":                          5,
		"ERROR":                            6,
	}
)

Enum value maps for JobExecutionStatus.

View Source
var (
	JobExecutionType_name = map[int32]string{
		0: "JOB_EXECUTION_TYPE_UNSPECIFIED",
		1: "PERIODIC",
		2: "POSTSUBMIT",
		3: "PRESUBMIT",
		4: "BATCH",
	}
	JobExecutionType_value = map[string]int32{
		"JOB_EXECUTION_TYPE_UNSPECIFIED": 0,
		"PERIODIC":                       1,
		"POSTSUBMIT":                     2,
		"PRESUBMIT":                      3,
		"BATCH":                          4,
	}
)

Enum value maps for JobExecutionType.

View Source
var File_gangway_proto protoreflect.FileDescriptor
View Source
var Prow_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Prow",
	HandlerType: (*ProwServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateJobExecution",
			Handler:    _Prow_CreateJobExecution_Handler,
		},
		{
			MethodName: "GetJobExecution",
			Handler:    _Prow_GetJobExecution_Handler,
		},
		{
			MethodName: "ListJobExecutions",
			Handler:    _Prow_ListJobExecutions_Handler,
		},
		{
			MethodName: "BulkJobStatusChange",
			Handler:    _Prow_BulkJobStatusChange_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gangway.proto",
}

Prow_ServiceDesc is the grpc.ServiceDesc for Prow service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func ClientAuthorized

func ClientAuthorized(allowedApiClient *config.AllowedApiClient, prowJobCR prowcrd.ProwJob) bool

ClientAuthorized checks whether or not a client can run a Prow job based on the job's identifier (is this client allowed to run jobs meant for the given identifier?). This needs to traverse the config to determine whether the allowlist (allowed_api_clients) allows it.

func RegisterProwServer

func RegisterProwServer(s grpc.ServiceRegistrar, srv ProwServer)

func ToCrdRefs

func ToCrdRefs(gitRefs *Refs) (*prowcrd.Refs, error)

FIXME: Add roundtrip tests to ensure that the conversion between gitRefs and refs is lossless.

Types

type BulkJobStatusChangeRequest

type BulkJobStatusChangeRequest struct {
	JobStatusChange *JobStatusChange       `protobuf:"bytes,1,opt,name=job_status_change,json=jobStatusChange,proto3" json:"job_status_change,omitempty"`
	Cluster         string                 `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"`
	StartedBefore   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_before,json=startedBefore,proto3" json:"started_before,omitempty"`
	StartedAfter    *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started_after,json=startedAfter,proto3" json:"started_after,omitempty"`
	JobType         JobExecutionType       `protobuf:"varint,5,opt,name=job_type,json=jobType,proto3,enum=JobExecutionType" json:"job_type,omitempty"`
	Refs            *Refs                  `protobuf:"bytes,6,opt,name=refs,proto3" json:"refs,omitempty"`
	// contains filtered or unexported fields
}

func (*BulkJobStatusChangeRequest) Descriptor deprecated

func (*BulkJobStatusChangeRequest) Descriptor() ([]byte, []int)

Deprecated: Use BulkJobStatusChangeRequest.ProtoReflect.Descriptor instead.

func (*BulkJobStatusChangeRequest) GetCluster

func (x *BulkJobStatusChangeRequest) GetCluster() string

func (*BulkJobStatusChangeRequest) GetJobStatusChange

func (x *BulkJobStatusChangeRequest) GetJobStatusChange() *JobStatusChange

func (*BulkJobStatusChangeRequest) GetJobType

func (*BulkJobStatusChangeRequest) GetRefs

func (x *BulkJobStatusChangeRequest) GetRefs() *Refs

func (*BulkJobStatusChangeRequest) GetStartedAfter

func (x *BulkJobStatusChangeRequest) GetStartedAfter() *timestamppb.Timestamp

func (*BulkJobStatusChangeRequest) GetStartedBefore

func (x *BulkJobStatusChangeRequest) GetStartedBefore() *timestamppb.Timestamp

func (*BulkJobStatusChangeRequest) ProtoMessage

func (*BulkJobStatusChangeRequest) ProtoMessage()

func (*BulkJobStatusChangeRequest) ProtoReflect

func (*BulkJobStatusChangeRequest) Reset

func (x *BulkJobStatusChangeRequest) Reset()

func (*BulkJobStatusChangeRequest) String

func (x *BulkJobStatusChangeRequest) String() string

func (*BulkJobStatusChangeRequest) Validate

func (bjscr *BulkJobStatusChangeRequest) Validate() error

type CreateJobExecutionRequest

type CreateJobExecutionRequest struct {
	JobName          string           `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
	JobExecutionType JobExecutionType `` /* 134-byte string literal not displayed */
	Refs             *Refs            `protobuf:"bytes,3,opt,name=refs,proto3" json:"refs,omitempty"`
	PodSpecOptions   *PodSpecOptions  `protobuf:"bytes,4,opt,name=pod_spec_options,json=podSpecOptions,proto3" json:"pod_spec_options,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateJobExecutionRequest) Descriptor deprecated

func (*CreateJobExecutionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateJobExecutionRequest.ProtoReflect.Descriptor instead.

func (*CreateJobExecutionRequest) GetJobExecutionType

func (x *CreateJobExecutionRequest) GetJobExecutionType() JobExecutionType

func (*CreateJobExecutionRequest) GetJobName

func (x *CreateJobExecutionRequest) GetJobName() string

func (*CreateJobExecutionRequest) GetPodSpecOptions

func (x *CreateJobExecutionRequest) GetPodSpecOptions() *PodSpecOptions

func (*CreateJobExecutionRequest) GetRefs

func (x *CreateJobExecutionRequest) GetRefs() *Refs

func (*CreateJobExecutionRequest) ProtoMessage

func (*CreateJobExecutionRequest) ProtoMessage()

func (*CreateJobExecutionRequest) ProtoReflect

func (*CreateJobExecutionRequest) Reset

func (x *CreateJobExecutionRequest) Reset()

func (*CreateJobExecutionRequest) String

func (x *CreateJobExecutionRequest) String() string

func (*CreateJobExecutionRequest) Validate

func (cjer *CreateJobExecutionRequest) Validate() error

type Gangway

type Gangway struct {
	UnimplementedProwServer
	ConfigAgent        *config.Agent
	ProwJobClient      ProwJobClient
	InRepoConfigGetter config.InRepoConfigGetter
}

func (*Gangway) BulkJobStatusChange

func (gw *Gangway) BulkJobStatusChange(ctx context.Context, request *BulkJobStatusChangeRequest) (*emptypb.Empty, error)

func (*Gangway) CreateJobExecution

func (gw *Gangway) CreateJobExecution(ctx context.Context, cjer *CreateJobExecutionRequest) (*JobExecution, error)

CreateJobExecution triggers a new Prow job.

func (*Gangway) GetJobExecution

func (gw *Gangway) GetJobExecution(ctx context.Context, gjer *GetJobExecutionRequest) (*JobExecution, error)

GetJobExecution returns a Prow job execution. It currently does this by looking at all of the existing Prow Job CR (custom resource) objects to find a match, and then does a translation from the CR into our JobExecution type. In the future this function will also perform a lookup in GCS or some other more permanent location as a fallback.

func (*Gangway) ListJobExecutions

func (gw *Gangway) ListJobExecutions(ctx context.Context, ljer *ListJobExecutionsRequest) (*JobExecutions, error)

ListJobExecutions returns a list of Prow job execution. It currently does this by looking at all of the existing Prow Job CR (custom resource) objects to find matching entries, and then does a translation from the CR into our JobExecution type. In the future this function will also perform a lookup in GCS or some other more permanent location as a fallback.

type GetJobExecutionRequest

type GetJobExecutionRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Look up a single Prow Job execution.

func (*GetJobExecutionRequest) Descriptor deprecated

func (*GetJobExecutionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetJobExecutionRequest.ProtoReflect.Descriptor instead.

func (*GetJobExecutionRequest) GetId

func (x *GetJobExecutionRequest) GetId() string

func (*GetJobExecutionRequest) ProtoMessage

func (*GetJobExecutionRequest) ProtoMessage()

func (*GetJobExecutionRequest) ProtoReflect

func (x *GetJobExecutionRequest) ProtoReflect() protoreflect.Message

func (*GetJobExecutionRequest) Reset

func (x *GetJobExecutionRequest) Reset()

func (*GetJobExecutionRequest) String

func (x *GetJobExecutionRequest) String() string

type JobExecution

type JobExecution struct {
	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	JobName        string                 `protobuf:"bytes,2,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
	JobType        JobExecutionType       `protobuf:"varint,3,opt,name=job_type,json=jobType,proto3,enum=JobExecutionType" json:"job_type,omitempty"`
	JobStatus      JobExecutionStatus     `protobuf:"varint,4,opt,name=job_status,json=jobStatus,proto3,enum=JobExecutionStatus" json:"job_status,omitempty"`
	Refs           *Refs                  `protobuf:"bytes,5,opt,name=refs,proto3" json:"refs,omitempty"`
	PodSpecOptions *PodSpecOptions        `protobuf:"bytes,6,opt,name=pod_spec_options,json=podSpecOptions,proto3" json:"pod_spec_options,omitempty"`
	GcsPath        string                 `protobuf:"bytes,7,opt,name=gcs_path,json=gcsPath,proto3" json:"gcs_path,omitempty"`
	CreateTime     *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	CompletionTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"`
	// contains filtered or unexported fields
}

func HandleProwJob

func HandleProwJob(l *logrus.Entry,
	reporterFunc ReporterFunc,
	cjer *CreateJobExecutionRequest,
	pjc ProwJobClient,
	mainConfig prowCfgClient,
	ircg config.InRepoConfigGetter,
	allowedApiClient *config.AllowedApiClient,
	requireTenantID bool,
	allowedClusters []string) (*JobExecution, error)

func (*JobExecution) Descriptor deprecated

func (*JobExecution) Descriptor() ([]byte, []int)

Deprecated: Use JobExecution.ProtoReflect.Descriptor instead.

func (*JobExecution) GetCompletionTime

func (x *JobExecution) GetCompletionTime() *timestamppb.Timestamp

func (*JobExecution) GetCreateTime

func (x *JobExecution) GetCreateTime() *timestamppb.Timestamp

func (*JobExecution) GetGcsPath

func (x *JobExecution) GetGcsPath() string

func (*JobExecution) GetId

func (x *JobExecution) GetId() string

func (*JobExecution) GetJobName

func (x *JobExecution) GetJobName() string

func (*JobExecution) GetJobStatus

func (x *JobExecution) GetJobStatus() JobExecutionStatus

func (*JobExecution) GetJobType

func (x *JobExecution) GetJobType() JobExecutionType

func (*JobExecution) GetPodSpecOptions

func (x *JobExecution) GetPodSpecOptions() *PodSpecOptions

func (*JobExecution) GetRefs

func (x *JobExecution) GetRefs() *Refs

func (*JobExecution) ProtoMessage

func (*JobExecution) ProtoMessage()

func (*JobExecution) ProtoReflect

func (x *JobExecution) ProtoReflect() protoreflect.Message

func (*JobExecution) Reset

func (x *JobExecution) Reset()

func (*JobExecution) String

func (x *JobExecution) String() string

type JobExecutionStatus

type JobExecutionStatus int32

JobExecutionStatus is a 1:1 translation of the existing "ProwJobState" type in prow/apis/prowjobs/v1/types.go.

const (
	JobExecutionStatus_JOB_EXECUTION_STATUS_UNSPECIFIED JobExecutionStatus = 0
	JobExecutionStatus_TRIGGERED                        JobExecutionStatus = 1
	JobExecutionStatus_PENDING                          JobExecutionStatus = 2
	JobExecutionStatus_SUCCESS                          JobExecutionStatus = 3
	JobExecutionStatus_FAILURE                          JobExecutionStatus = 4
	JobExecutionStatus_ABORTED                          JobExecutionStatus = 5
	JobExecutionStatus_ERROR                            JobExecutionStatus = 6
)

func TranslateProwJobStatus

func TranslateProwJobStatus(prowJobStatus *prowcrd.ProwJobStatus) JobExecutionStatus

Translate ProwJobStatus.State in the Prow Job CR into a JobExecutionStatus.

func (JobExecutionStatus) Descriptor

func (JobExecutionStatus) Enum

func (JobExecutionStatus) EnumDescriptor deprecated

func (JobExecutionStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use JobExecutionStatus.Descriptor instead.

func (JobExecutionStatus) Number

func (JobExecutionStatus) String

func (x JobExecutionStatus) String() string

func (JobExecutionStatus) Type

type JobExecutionType

type JobExecutionType int32

JobExecutionType is a 1:1 translation of the existing "ProwJobType" type in prow/apis/prowjobs/v1/types.go.

const (
	JobExecutionType_JOB_EXECUTION_TYPE_UNSPECIFIED JobExecutionType = 0
	JobExecutionType_PERIODIC                       JobExecutionType = 1
	JobExecutionType_POSTSUBMIT                     JobExecutionType = 2
	JobExecutionType_PRESUBMIT                      JobExecutionType = 3
	JobExecutionType_BATCH                          JobExecutionType = 4
)

func TranslateProwJobType

func TranslateProwJobType(prowJobType prowcrd.ProwJobType) JobExecutionType

Translate ProwjobType into JobExecutionType

func (JobExecutionType) Descriptor

func (JobExecutionType) Enum

func (JobExecutionType) EnumDescriptor deprecated

func (JobExecutionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use JobExecutionType.Descriptor instead.

func (JobExecutionType) Number

func (JobExecutionType) String

func (x JobExecutionType) String() string

func (JobExecutionType) Type

type JobExecutions

type JobExecutions struct {
	JobExecution []*JobExecution `protobuf:"bytes,1,rep,name=job_execution,json=jobExecution,proto3" json:"job_execution,omitempty"`
	// contains filtered or unexported fields
}

func (*JobExecutions) Descriptor deprecated

func (*JobExecutions) Descriptor() ([]byte, []int)

Deprecated: Use JobExecutions.ProtoReflect.Descriptor instead.

func (*JobExecutions) GetJobExecution

func (x *JobExecutions) GetJobExecution() []*JobExecution

func (*JobExecutions) ProtoMessage

func (*JobExecutions) ProtoMessage()

func (*JobExecutions) ProtoReflect

func (x *JobExecutions) ProtoReflect() protoreflect.Message

func (*JobExecutions) Reset

func (x *JobExecutions) Reset()

func (*JobExecutions) String

func (x *JobExecutions) String() string

type JobStatusChange

type JobStatusChange struct {
	Current JobExecutionStatus `protobuf:"varint,1,opt,name=current,proto3,enum=JobExecutionStatus" json:"current,omitempty"`
	Desired JobExecutionStatus `protobuf:"varint,2,opt,name=desired,proto3,enum=JobExecutionStatus" json:"desired,omitempty"`
	// contains filtered or unexported fields
}

func (*JobStatusChange) Descriptor deprecated

func (*JobStatusChange) Descriptor() ([]byte, []int)

Deprecated: Use JobStatusChange.ProtoReflect.Descriptor instead.

func (*JobStatusChange) GetCurrent

func (x *JobStatusChange) GetCurrent() JobExecutionStatus

func (*JobStatusChange) GetDesired

func (x *JobStatusChange) GetDesired() JobExecutionStatus

func (*JobStatusChange) ProtoMessage

func (*JobStatusChange) ProtoMessage()

func (*JobStatusChange) ProtoReflect

func (x *JobStatusChange) ProtoReflect() protoreflect.Message

func (*JobStatusChange) Reset

func (x *JobStatusChange) Reset()

func (*JobStatusChange) String

func (x *JobStatusChange) String() string

type ListJobExecutionsRequest

type ListJobExecutionsRequest struct {
	JobName string             `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`         // Mapped to URL query parameter `job_name`.
	Status  JobExecutionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=JobExecutionStatus" json:"status,omitempty"` // Mapped to URL query parameter `status`.
	// contains filtered or unexported fields
}

Look up all Prow Job executions that match all fields given here.

func (*ListJobExecutionsRequest) Descriptor deprecated

func (*ListJobExecutionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListJobExecutionsRequest.ProtoReflect.Descriptor instead.

func (*ListJobExecutionsRequest) GetJobName

func (x *ListJobExecutionsRequest) GetJobName() string

func (*ListJobExecutionsRequest) GetStatus

func (*ListJobExecutionsRequest) ProtoMessage

func (*ListJobExecutionsRequest) ProtoMessage()

func (*ListJobExecutionsRequest) ProtoReflect

func (x *ListJobExecutionsRequest) ProtoReflect() protoreflect.Message

func (*ListJobExecutionsRequest) Reset

func (x *ListJobExecutionsRequest) Reset()

func (*ListJobExecutionsRequest) String

func (x *ListJobExecutionsRequest) String() string

type PodSpecOptions

type PodSpecOptions struct {
	Envs        map[string]string `` /* 149-byte string literal not displayed */
	Labels      map[string]string `` /* 153-byte string literal not displayed */
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PodSpecOptions) Descriptor deprecated

func (*PodSpecOptions) Descriptor() ([]byte, []int)

Deprecated: Use PodSpecOptions.ProtoReflect.Descriptor instead.

func (*PodSpecOptions) GetAnnotations

func (x *PodSpecOptions) GetAnnotations() map[string]string

func (*PodSpecOptions) GetEnvs

func (x *PodSpecOptions) GetEnvs() map[string]string

func (*PodSpecOptions) GetLabels

func (x *PodSpecOptions) GetLabels() map[string]string

func (*PodSpecOptions) ProtoMessage

func (*PodSpecOptions) ProtoMessage()

func (*PodSpecOptions) ProtoReflect

func (x *PodSpecOptions) ProtoReflect() protoreflect.Message

func (*PodSpecOptions) Reset

func (x *PodSpecOptions) Reset()

func (*PodSpecOptions) String

func (x *PodSpecOptions) String() string

type ProwCfgAdapter

type ProwCfgAdapter struct {
	*config.Config
}

func (*ProwCfgAdapter) GetScheduler

func (c *ProwCfgAdapter) GetScheduler() config.Scheduler

type ProwClient

type ProwClient interface {
	// FIXME: In the future we can just return a unique token (only), in the same
	// way that GCB returns immediately with the globally-unique BuildId. That is,
	// in the future the response will be a union of either the full JobExecution
	// message or a single JobExecutionToken (string). See
	// https://docs.google.com/document/d/1v77jp1Nb5C2C2-PdV02SGViO9CyZ9SvNxCPOHyIUQeo/edit#bookmark=id.q68srxklvpt4.
	CreateJobExecution(ctx context.Context, in *CreateJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error)
	GetJobExecution(ctx context.Context, in *GetJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error)
	ListJobExecutions(ctx context.Context, in *ListJobExecutionsRequest, opts ...grpc.CallOption) (*JobExecutions, error)
	BulkJobStatusChange(ctx context.Context, in *BulkJobStatusChangeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ProwClient is the client API for Prow service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewProwClient

func NewProwClient(cc grpc.ClientConnInterface) ProwClient

type ProwJobClient

ProwJobClient describes a Kubernetes client for the Prow Job CR. Unlike a general-purpose client, it only expects 4 methods, Create(), Get(), List() and Update().

type ProwServer

type ProwServer interface {
	// FIXME: In the future we can just return a unique token (only), in the same
	// way that GCB returns immediately with the globally-unique BuildId. That is,
	// in the future the response will be a union of either the full JobExecution
	// message or a single JobExecutionToken (string). See
	// https://docs.google.com/document/d/1v77jp1Nb5C2C2-PdV02SGViO9CyZ9SvNxCPOHyIUQeo/edit#bookmark=id.q68srxklvpt4.
	CreateJobExecution(context.Context, *CreateJobExecutionRequest) (*JobExecution, error)
	GetJobExecution(context.Context, *GetJobExecutionRequest) (*JobExecution, error)
	ListJobExecutions(context.Context, *ListJobExecutionsRequest) (*JobExecutions, error)
	BulkJobStatusChange(context.Context, *BulkJobStatusChangeRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ProwServer is the server API for Prow service. All implementations must embed UnimplementedProwServer for forward compatibility

type Pull

type Pull struct {
	Number     int32  `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	Author     string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
	Sha        string `protobuf:"bytes,3,opt,name=sha,proto3" json:"sha,omitempty"`
	Title      string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Ref        string `protobuf:"bytes,5,opt,name=ref,proto3" json:"ref,omitempty"`
	Link       string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"`
	CommitLink string `protobuf:"bytes,7,opt,name=commit_link,json=commitLink,proto3" json:"commit_link,omitempty"`
	AuthorLink string `protobuf:"bytes,8,opt,name=author_link,json=authorLink,proto3" json:"author_link,omitempty"`
	// contains filtered or unexported fields
}

Pull is a direct, 1:1 translation of the existing "Pull" struct defined in prow/apis/prowjobs/v1/types.go.

func (*Pull) Descriptor deprecated

func (*Pull) Descriptor() ([]byte, []int)

Deprecated: Use Pull.ProtoReflect.Descriptor instead.

func (*Pull) GetAuthor

func (x *Pull) GetAuthor() string
func (x *Pull) GetAuthorLink() string
func (x *Pull) GetCommitLink() string
func (x *Pull) GetLink() string

func (*Pull) GetNumber

func (x *Pull) GetNumber() int32

func (*Pull) GetRef

func (x *Pull) GetRef() string

func (*Pull) GetSha

func (x *Pull) GetSha() string

func (*Pull) GetTitle

func (x *Pull) GetTitle() string

func (*Pull) ProtoMessage

func (*Pull) ProtoMessage()

func (*Pull) ProtoReflect

func (x *Pull) ProtoReflect() protoreflect.Message

func (*Pull) Reset

func (x *Pull) Reset()

func (*Pull) String

func (x *Pull) String() string

func (*Pull) Validate

func (pull *Pull) Validate() error

type Refs

type Refs struct {
	Org            string  `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"`
	Repo           string  `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	RepoLink       string  `protobuf:"bytes,3,opt,name=repo_link,json=repoLink,proto3" json:"repo_link,omitempty"`
	BaseRef        string  `protobuf:"bytes,4,opt,name=base_ref,json=baseRef,proto3" json:"base_ref,omitempty"`
	BaseSha        string  `protobuf:"bytes,5,opt,name=base_sha,json=baseSha,proto3" json:"base_sha,omitempty"`
	BaseLink       string  `protobuf:"bytes,6,opt,name=base_link,json=baseLink,proto3" json:"base_link,omitempty"`
	Pulls          []*Pull `protobuf:"bytes,7,rep,name=pulls,proto3" json:"pulls,omitempty"`
	PathAlias      string  `protobuf:"bytes,8,opt,name=path_alias,json=pathAlias,proto3" json:"path_alias,omitempty"`
	WorkDir        bool    `protobuf:"varint,9,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"`
	CloneUri       string  `protobuf:"bytes,10,opt,name=clone_uri,json=cloneUri,proto3" json:"clone_uri,omitempty"`
	SkipSubmodules bool    `protobuf:"varint,11,opt,name=skip_submodules,json=skipSubmodules,proto3" json:"skip_submodules,omitempty"`
	CloneDepth     int32   `protobuf:"varint,12,opt,name=clone_depth,json=cloneDepth,proto3" json:"clone_depth,omitempty"`
	SkipFetchHead  bool    `protobuf:"varint,13,opt,name=skip_fetch_head,json=skipFetchHead,proto3" json:"skip_fetch_head,omitempty"`
	// contains filtered or unexported fields
}

Refs is a direct, 1:1 translation of the existing "Refs" struct defined in prow/apis/prowjobs/v1/types.go.

func FromCrdRefs

func FromCrdRefs(refs *prowcrd.Refs) (*Refs, error)

func (*Refs) Descriptor deprecated

func (*Refs) Descriptor() ([]byte, []int)

Deprecated: Use Refs.ProtoReflect.Descriptor instead.

func (x *Refs) GetBaseLink() string

func (*Refs) GetBaseRef

func (x *Refs) GetBaseRef() string

func (*Refs) GetBaseSha

func (x *Refs) GetBaseSha() string

func (*Refs) GetCloneDepth

func (x *Refs) GetCloneDepth() int32

func (*Refs) GetCloneUri

func (x *Refs) GetCloneUri() string

func (*Refs) GetOrg

func (x *Refs) GetOrg() string

func (*Refs) GetPathAlias

func (x *Refs) GetPathAlias() string

func (*Refs) GetPulls

func (x *Refs) GetPulls() []*Pull

func (*Refs) GetRepo

func (x *Refs) GetRepo() string
func (x *Refs) GetRepoLink() string

func (*Refs) GetSkipFetchHead

func (x *Refs) GetSkipFetchHead() bool

func (*Refs) GetSkipSubmodules

func (x *Refs) GetSkipSubmodules() bool

func (*Refs) GetWorkDir

func (x *Refs) GetWorkDir() bool

func (*Refs) ProtoMessage

func (*Refs) ProtoMessage()

func (*Refs) ProtoReflect

func (x *Refs) ProtoReflect() protoreflect.Message

func (*Refs) Reset

func (x *Refs) Reset()

func (*Refs) String

func (x *Refs) String() string

func (*Refs) Validate

func (gitRefs *Refs) Validate() error

type ReporterFunc

type ReporterFunc func(pj *prowcrd.ProwJob, state prowcrd.ProwJobState, err error)

type UnimplementedProwServer

type UnimplementedProwServer struct {
}

UnimplementedProwServer must be embedded to have forward compatible implementations.

func (UnimplementedProwServer) BulkJobStatusChange

func (UnimplementedProwServer) CreateJobExecution

func (UnimplementedProwServer) GetJobExecution

func (UnimplementedProwServer) ListJobExecutions

type UnsafeProwServer

type UnsafeProwServer interface {
	// contains filtered or unexported methods
}

UnsafeProwServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProwServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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