cbctl

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cloudbuild wraps the upstream cloudbuild package in a simplified interface. All code MUST be correct by inspection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trigger

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

Trigger wraps the cloudbuild API into a simple interface.

func NewTrigger

func NewTrigger(s *cloudbuild.Service) *Trigger

NewTrigger creates a new Trigger instance.

func (*Trigger) Create

func (t *Trigger) Create(ctx context.Context, project string, bt *cloudbuild.BuildTrigger) (*cloudbuild.BuildTrigger, error)

func (*Trigger) Get

func (t *Trigger) Get(ctx context.Context, project string, name string) (*cloudbuild.BuildTrigger, error)

Get searches all build triggers in a given project looking for one with a name matching the passed name parameter. If one is found it returns the corresponding BuildTrigger object, else an error.

func (*Trigger) List

func (t *Trigger) List(ctx context.Context, project string, visit func(tr *cloudbuild.ListBuildTriggersResponse) error) error

func (*Trigger) Run

func (t *Trigger) Run(ctx context.Context, project string, triggerId string, src *cloudbuild.RepoSource) (*cloudbuild.Operation, error)

Jump to

Keyboard shortcuts

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