storage

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ResourceTypeBucket = "storageBucket"

ResourceTypeBucket lists the Cloud Storage buckets in the project, so the get/delete pickers can offer the existing buckets instead of free text.

Variables

This section is empty.

Functions

func ListBucketResources

func ListBucketResources(ctx context.Context, client Client) ([]core.IntegrationResource, error)

ListBucketResources lists Cloud Storage buckets for the bucket dropdown.

func SetClientFactory

func SetClientFactory(fn func(httpCtx core.HTTPContext, integration core.IntegrationContext) (Client, error))

Types

type Bucket

type Bucket struct {
	Kind             string            `json:"kind"`
	ID               string            `json:"id"`
	Name             string            `json:"name"`
	SelfLink         string            `json:"selfLink"`
	ProjectNumber    string            `json:"projectNumber"`
	Location         string            `json:"location"`
	LocationType     string            `json:"locationType"`
	StorageClass     string            `json:"storageClass"`
	TimeCreated      string            `json:"timeCreated"`
	Updated          string            `json:"updated"`
	Metageneration   string            `json:"metageneration"`
	Labels           map[string]string `json:"labels"`
	Versioning       *bucketVersioning `json:"versioning"`
	IamConfiguration *iamConfiguration `json:"iamConfiguration"`
	Etag             string            `json:"etag"`
}

Bucket models the subset of a Cloud Storage bucket resource the components use.

func ListBuckets

func ListBuckets(ctx context.Context, client Client, project string) ([]Bucket, error)

ListBuckets lists the Cloud Storage buckets in the project, following pagination so projects with more buckets than one page are fully listed.

type BucketNodeMetadata

type BucketNodeMetadata struct {
	Bucket string `json:"bucket,omitempty" mapstructure:"bucket"`
}

BucketNodeMetadata is the node metadata shared by the bucket components so the collapsed node can show what it targets.

type Client

type Client interface {
	GetURL(ctx context.Context, fullURL string) ([]byte, error)
	PostURL(ctx context.Context, fullURL string, body any) ([]byte, error)
	DeleteURL(ctx context.Context, fullURL string) ([]byte, error)
	ProjectID() string
}

Client is the interface used by the Cloud Storage components.

type CreateBucket

type CreateBucket struct{}

func (*CreateBucket) Cancel

func (c *CreateBucket) Cancel(ctx core.ExecutionContext) error

func (*CreateBucket) Cleanup

func (c *CreateBucket) Cleanup(ctx core.SetupContext) error

func (*CreateBucket) Color

func (c *CreateBucket) Color() string

func (*CreateBucket) Configuration

func (c *CreateBucket) Configuration() []configuration.Field

func (*CreateBucket) Description

func (c *CreateBucket) Description() string

func (*CreateBucket) Documentation

func (c *CreateBucket) Documentation() string

func (*CreateBucket) ExampleOutput

func (c *CreateBucket) ExampleOutput() map[string]any

func (*CreateBucket) Execute

func (c *CreateBucket) Execute(ctx core.ExecutionContext) error

func (*CreateBucket) HandleHook

func (c *CreateBucket) HandleHook(ctx core.ActionHookContext) error

func (*CreateBucket) HandleWebhook

func (*CreateBucket) Hooks

func (c *CreateBucket) Hooks() []core.Hook

func (*CreateBucket) Icon

func (c *CreateBucket) Icon() string

func (*CreateBucket) Label

func (c *CreateBucket) Label() string

func (*CreateBucket) Name

func (c *CreateBucket) Name() string

func (*CreateBucket) OutputChannels

func (c *CreateBucket) OutputChannels(configuration any) []core.OutputChannel

func (*CreateBucket) ProcessQueueItem

func (c *CreateBucket) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateBucket) Setup

func (c *CreateBucket) Setup(ctx core.SetupContext) error

type CreateBucketSpec

type CreateBucketSpec struct {
	Name                     string       `json:"name" mapstructure:"name"`
	Location                 string       `json:"location" mapstructure:"location"`
	StorageClass             string       `json:"storageClass" mapstructure:"storageClass"`
	UniformBucketLevelAccess *bool        `json:"uniformBucketLevelAccess" mapstructure:"uniformBucketLevelAccess"`
	Versioning               *bool        `json:"versioning" mapstructure:"versioning"`
	Labels                   []labelEntry `json:"labels" mapstructure:"labels"`
}

type DeleteBucket

type DeleteBucket struct{}

func (*DeleteBucket) Cancel

func (d *DeleteBucket) Cancel(ctx core.ExecutionContext) error

func (*DeleteBucket) Cleanup

func (d *DeleteBucket) Cleanup(ctx core.SetupContext) error

func (*DeleteBucket) Color

func (d *DeleteBucket) Color() string

func (*DeleteBucket) Configuration

func (d *DeleteBucket) Configuration() []configuration.Field

func (*DeleteBucket) Description

func (d *DeleteBucket) Description() string

func (*DeleteBucket) Documentation

func (d *DeleteBucket) Documentation() string

func (*DeleteBucket) ExampleOutput

func (d *DeleteBucket) ExampleOutput() map[string]any

func (*DeleteBucket) Execute

func (d *DeleteBucket) Execute(ctx core.ExecutionContext) error

func (*DeleteBucket) HandleHook

func (d *DeleteBucket) HandleHook(ctx core.ActionHookContext) error

func (*DeleteBucket) HandleWebhook

func (*DeleteBucket) Hooks

func (d *DeleteBucket) Hooks() []core.Hook

func (*DeleteBucket) Icon

func (d *DeleteBucket) Icon() string

func (*DeleteBucket) Label

func (d *DeleteBucket) Label() string

func (*DeleteBucket) Name

func (d *DeleteBucket) Name() string

func (*DeleteBucket) OutputChannels

func (d *DeleteBucket) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteBucket) ProcessQueueItem

func (d *DeleteBucket) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteBucket) Setup

func (d *DeleteBucket) Setup(ctx core.SetupContext) error

type DeleteBucketSpec

type DeleteBucketSpec struct {
	Bucket string `json:"bucket" mapstructure:"bucket"`
}

type GetBucket

type GetBucket struct{}

func (*GetBucket) Cancel

func (g *GetBucket) Cancel(ctx core.ExecutionContext) error

func (*GetBucket) Cleanup

func (g *GetBucket) Cleanup(ctx core.SetupContext) error

func (*GetBucket) Color

func (g *GetBucket) Color() string

func (*GetBucket) Configuration

func (g *GetBucket) Configuration() []configuration.Field

func (*GetBucket) Description

func (g *GetBucket) Description() string

func (*GetBucket) Documentation

func (g *GetBucket) Documentation() string

func (*GetBucket) ExampleOutput

func (g *GetBucket) ExampleOutput() map[string]any

func (*GetBucket) Execute

func (g *GetBucket) Execute(ctx core.ExecutionContext) error

func (*GetBucket) HandleHook

func (g *GetBucket) HandleHook(ctx core.ActionHookContext) error

func (*GetBucket) HandleWebhook

func (*GetBucket) Hooks

func (g *GetBucket) Hooks() []core.Hook

func (*GetBucket) Icon

func (g *GetBucket) Icon() string

func (*GetBucket) Label

func (g *GetBucket) Label() string

func (*GetBucket) Name

func (g *GetBucket) Name() string

func (*GetBucket) OutputChannels

func (g *GetBucket) OutputChannels(configuration any) []core.OutputChannel

func (*GetBucket) ProcessQueueItem

func (g *GetBucket) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetBucket) Setup

func (g *GetBucket) Setup(ctx core.SetupContext) error

type GetBucketSpec

type GetBucketSpec struct {
	Bucket string `json:"bucket" mapstructure:"bucket"`
}

Jump to

Keyboard shortcuts

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