function_url

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// If auth_type is not set we'll default to "NONE", allowing public access to the function URL
	DefaultFunctionUrlAuthType = lambda.FunctionUrlAuthTypeNone
	// If principal is not set we'll allow any authenticated AWS user to invoke the function URL
	DefaultPrincipal = "*"
)
View Source
var File_waypoint_builtin_aws_lambda_function_url_plugin_proto protoreflect.FileDescriptor
View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Releaser{}),
}

Options are the SDK options to use for instantiation for the plugin.

Functions

This section is empty.

Types

type IAMPolicy

type IAMPolicy struct {
	Version   string `json:"Version"`
	ID        string `json:"Id"`
	Statement []struct {
		Sid    string `json:"Sid"`
		Effect string `json:"Effect"`
		// Principal can be either a string, like "*", or a struct
		// like { "AWS": "arn:aws:iam::123456789012:root" }
		Principal interface{} `json:"Principal"`
		Action    string      `json:"Action"`
		Resource  string      `json:"Resource"`
		Condition struct {
			StringEquals struct {
				LambdaFunctionURLAuthType string `json:"lambda:FunctionUrlAuthType"`
			} `json:"StringEquals"`
		} `json:"Condition"`
	} `json:"Statement"`
}

Lambda GetPolicy() returns a JSON string of its IAM policy, so we need to unmarshal it into this struct in order to use it.

See https://github.com/aws/aws-sdk-go/issues/127 and https://github.com/aws/aws-sdk-go-v2/issues/225

type Release

type Release struct {

	// The function's public url
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// The AWS region the function is deployed in
	Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
	// The ARN for the Lambda function itself.
	FuncArn string `protobuf:"bytes,3,opt,name=func_arn,json=funcArn,proto3" json:"func_arn,omitempty"`
	// The ARN for the version of the Lambda function this deployment uses.
	VerArn        string         `protobuf:"bytes,4,opt,name=ver_arn,json=verArn,proto3" json:"ver_arn,omitempty"`
	ResourceState *opaqueany.Any `protobuf:"bytes,5,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"`
	// contains filtered or unexported fields
}

func (*Release) Descriptor deprecated

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

Deprecated: Use Release.ProtoReflect.Descriptor instead.

func (*Release) GetFuncArn

func (x *Release) GetFuncArn() string

func (*Release) GetRegion

func (x *Release) GetRegion() string

func (*Release) GetResourceState

func (x *Release) GetResourceState() *opaqueany.Any

func (*Release) GetUrl

func (x *Release) GetUrl() string

func (*Release) GetVerArn

func (x *Release) GetVerArn() string

func (*Release) ProtoMessage

func (*Release) ProtoMessage()

func (*Release) ProtoReflect

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

func (*Release) Reset

func (x *Release) Reset()

func (*Release) String

func (x *Release) String() string

func (*Release) URL

func (r *Release) URL() string

type Releaser

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

func (*Releaser) Config

func (r *Releaser) Config() (interface{}, error)

Config implements Configurable

func (*Releaser) ConfigSet

func (r *Releaser) ConfigSet(config interface{}) error

ConfigSet is called after a configuration has been decoded we can use this to validate the config

func (*Releaser) Destroy

func (r *Releaser) Destroy(
	ctx context.Context,
	log hclog.Logger,
	release *Release,
	ui terminal.UI,
) error

func (*Releaser) DestroyFunc

func (r *Releaser) DestroyFunc() interface{}

DestroyFunc implements component.Destroyer

func (*Releaser) Documentation

func (r *Releaser) Documentation() (*docs.Documentation, error)

func (*Releaser) Release

func (r *Releaser) Release(
	ctx context.Context,
	log hclog.Logger,
	src *component.Source,
	ui terminal.UI,
	dep *lambdaplugin.Deployment,
) (*Release, error)

func (*Releaser) ReleaseFunc

func (r *Releaser) ReleaseFunc() interface{}

ReleaseFunc implements component.ReleaseManager

func (*Releaser) Status

func (r *Releaser) Status(
	ctx context.Context,
	log hclog.Logger,
	release *Release,
	ui terminal.UI,
) (*sdk.StatusReport, error)

func (*Releaser) StatusFunc

func (r *Releaser) StatusFunc() interface{}

StatusFunc implements component.Status

type ReleaserConfig

type ReleaserConfig struct {
	// "AWS_IAM" or "NONE"
	AuthType string `hcl:"auth_type,optional"`
	// Only permitted if AuthType is "AWS_IAM" otherwise defaults to "*"
	Principal string `hcl:"principal,optional"`
}

ReleaserConfig is the configuration structure for the Releaser.

type Resource

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

Resource contains the internal resource states.

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Resource_FunctionUrl

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

func (*Resource_FunctionUrl) Descriptor deprecated

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

Deprecated: Use Resource_FunctionUrl.ProtoReflect.Descriptor instead.

func (*Resource_FunctionUrl) GetUrl

func (x *Resource_FunctionUrl) GetUrl() string

func (*Resource_FunctionUrl) ProtoMessage

func (*Resource_FunctionUrl) ProtoMessage()

func (*Resource_FunctionUrl) ProtoReflect

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

func (*Resource_FunctionUrl) Reset

func (x *Resource_FunctionUrl) Reset()

func (*Resource_FunctionUrl) String

func (x *Resource_FunctionUrl) String() string

Jump to

Keyboard shortcuts

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