s3

package
v0.0.0-...-5562d03 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	S3BucketName         string `json:"s3_bucket_name" validate:"required,min=3,max=63" required:"true"`
	AWSAccessKey         string `json:"aws_access_key" validate:"omitempty,min=16,max=128"`
	AWSSecretKey         string `json:"aws_secret_key" validate:"omitempty,min=16,max=128"`
	S3FolderName         string `json:"s3_folder_name" validate:"required,min=1,max=128" required:"true"`
	AWSRegion            string `` /* 361-byte string literal not displayed */
	UseIAMRole           string `json:"use_iam_role" validate:"required,oneof=true false"`
	AWSAccountID         string `json:"aws_account_id" validate:"required,min=10,max=12"`
	TargetAccountRoleARN string `json:"target_account_role_arn" validate:"omitempty,startswith=arn,min=8"`
}

type S3

type S3 struct {
	Config           Config                  `json:"config"`
	IntegrationType  string                  `json:"integration_type"`
	NotificationType string                  `json:"notification_type"`
	Filters          reporters.FieldsFilters `json:"filters"`
	Message          string                  `json:"message"`
	Buffer           *bytes.Buffer
}

func New

func New(ctx context.Context, b []byte) (*S3, error)

func (S3) IsValidCredential

func (s S3) IsValidCredential(ctx context.Context) (bool, error)

func (S3) SendNotification

func (s S3) SendNotification(ctx context.Context, message string, extras map[string]interface{}) error

func (S3) ValidateConfig

func (s S3) ValidateConfig(validate *validator.Validate) error

Jump to

Keyboard shortcuts

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