sgcloudendpoints

package
v0.280.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage added in v0.138.0

func BuildImage(ctx context.Context, project, region, repo, service, configID string) (string, error)

BuildImage builds a container image with a baked-in Cloud Endpoints service configuration.

func BuildProtoDescriptor added in v0.138.0

func BuildProtoDescriptor(ctx context.Context, inputDir, outputFile string) error

BuildProtoDescriptor builds a Cloud Endpoints-compatible proto descriptor from the provided Buf module input dir.

func Deploy added in v0.145.0

func Deploy(ctx context.Context, opts DeployOptions) (err error)

func DeployConfig added in v0.138.0

func DeployConfig(ctx context.Context, project string, configFiles ...string) (string, error)

DeployConfig deploys the provided config files to Cloud Endpoints and returns the resulting config revision.

func GetServiceConfig added in v0.138.0

func GetServiceConfig(ctx context.Context, service, configID string) (string, error)

GetServiceConfig fetches a full service config from Cloud Endpoints.

func Validate added in v0.145.0

func Validate(ctx context.Context, opts ValidateOptions) (err error)

Validate a Cloud Endpoints deployment from a Buf proto module and an endpoints config.

func ValidateConfig added in v0.138.0

func ValidateConfig(ctx context.Context, project string, configFiles ...string) error

ValidateConfig validates the provided config files with Cloud Endpoints.

Types

type DeployOptions added in v0.145.0

type DeployOptions struct {
	// ProjectID is the ID of the GCP project to deploy to.
	ProjectID string
	// Region is the GCP region to deploy to.
	Region string
	// ArtifactRegistry is the name of the artifact registry to push the deployed image to.
	ArtifactRegistry string
	// BufModulePath is the path to the Buf module to deploy.
	BufModulePath string
	// EndpointsConfigPath is the path to the endpoints config to deploy.
	EndpointsConfigPath string
	// ServiceConfigPath is the path to the Knative YAML service config to deploy.
	//
	// The service config will be executed as a Go template, where the following variables are available:
	//
	//  - Image: The container image to deploy
	ServiceConfigPath string
}

type ValidateOptions added in v0.145.0

type ValidateOptions struct {
	// ProjectID is the ID of the GCP project to validate in.
	ProjectID string
	// BufModulePath is the path to the Buf module to validate.
	BufModulePath string
	// EndpointsConfigPath is the path to the endpoints config to validate.
	EndpointsConfigPath string
}

Jump to

Keyboard shortcuts

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