Documentation ¶
Index ¶
- Variables
- func AddFile(c context.Context, api S3BucketAPI, input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
- func BucketExists(err error) bool
- func CreateBucket(p *Platform, client *s3.Client) error
- func DeleteBucket(c context.Context, api S3BucketAPI, input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
- func DeleteItem(c context.Context, api S3BucketAPI, input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
- func DetectMimeType(fname string, buffer []byte) string
- func EmptyBucket(c context.Context, client *s3.Client, bucket string) error
- func EnableWebHosting(c context.Context, api S3BucketAPI, input *s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
- func GetAcl(c context.Context, api S3BucketAPI, input *s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
- func ListItems(c context.Context, api S3BucketAPI, input *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
- func MakeBucket(c context.Context, api S3BucketAPI, input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
- func PutBucketPolicy(b string, client *s3.Client) error
- func PutBucketWebsite(b string, client *s3.Client) error
- func PutObjects(b, buildDir, subPath string, client *s3.Client, errors *[]string) []string
- func SetPublicBucketPolicy(c context.Context, api S3BucketAPI, input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
- type Deployment
- type Platform
- type PlatformConfig
- type S3BucketAPI
Constants ¶
This section is empty.
Variables ¶
View Source
var File_platform_output_proto protoreflect.FileDescriptor
Functions ¶
func AddFile ¶
func AddFile(c context.Context, api S3BucketAPI, input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
func BucketExists ¶
func DeleteBucket ¶
func DeleteBucket(c context.Context, api S3BucketAPI, input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
func DeleteItem ¶
func DeleteItem(c context.Context, api S3BucketAPI, input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
func DetectMimeType ¶
func EnableWebHosting ¶
func EnableWebHosting(c context.Context, api S3BucketAPI, input *s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
func GetAcl ¶
func GetAcl(c context.Context, api S3BucketAPI, input *s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
func ListItems ¶
func ListItems(c context.Context, api S3BucketAPI, input *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
func MakeBucket ¶
func MakeBucket(c context.Context, api S3BucketAPI, input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
MakeBucket creates an Amazon S3 bucket. Inputs:
c is the context of the method call, which includes the AWS Region api is the interface that defines the method call input defines the input arguments to the service call.
Output:
If success, a CreateBucketOutput object containing the result of the service call and nil. Otherwise, nil and an error from the call to CreateBucket.
func PutObjects ¶
PutObjects recursively checks for files in build path and uploads to specified s3 bucket. The errors slice keeps track of errors found during upload.
func SetPublicBucketPolicy ¶
func SetPublicBucketPolicy(c context.Context, api S3BucketAPI, input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
Types ¶
type Deployment ¶
type Deployment struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` // contains filtered or unexported fields }
You can customise this message to change the fields for the output value from your Deployment
func (*Deployment) Descriptor
deprecated
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetBucket ¶
func (x *Deployment) GetBucket() string
func (*Deployment) GetRegion ¶
func (x *Deployment) GetRegion() string
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶
func (x *Deployment) ProtoReflect() protoreflect.Message
func (*Deployment) Reset ¶
func (x *Deployment) Reset()
func (*Deployment) String ¶
func (x *Deployment) String() string
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) DestroyFunc ¶
func (p *Platform) DestroyFunc() interface{}
Implement the Destroyer interface
type PlatformConfig ¶
type S3BucketAPI ¶
type S3BucketAPI interface { CreateBucket(ctx context.Context, params *s3.CreateBucketInput, optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error) PutBucketPolicy(ctx context.Context, params *s3.PutBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.PutBucketPolicyOutput, error) PutBucketWebsite(ctx context.Context, params *s3.PutBucketWebsiteInput, optFns ...func(*s3.Options)) (*s3.PutBucketWebsiteOutput, error) PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error) GetBucketAcl(ctx context.Context, params *s3.GetBucketAclInput, optFns ...func(*s3.Options)) (*s3.GetBucketAclOutput, error) ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error) DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) DeleteBucket(ctx context.Context, params *s3.DeleteBucketInput, optFns ...func(*s3.Options)) (*s3.DeleteBucketOutput, error) }
S3BucketAPI defines the interface for the CreateBucket function.
Click to show internal directories.
Click to hide internal directories.