s3

package
v0.0.0-...-d11cad2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Name          string        `json:"name"`
	OwnerIdentity OwnerIdentity `json:"ownerIdentity"`
	Arn           string        `json:"arn"`
}

type Config

type Config struct {
	Prefix               string
	Bucket               string
	Region               string
	StorageNotifications string
}

type NotificationEntry

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

type NotificationReceiver

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

server is used to implement notification.

func NewNotificationReceiver

func NewNotificationReceiver() *NotificationReceiver

func (*NotificationReceiver) GetQueue

func (*NotificationReceiver) SendNotification

type Notifications

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

func NewNotifications

func NewNotifications(config Config) *Notifications

func (*Notifications) RunSQSQueue

func (n *Notifications) RunSQSQueue(queueURL string)

func (*Notifications) SendNotificationToPeers

func (n *Notifications) SendNotificationToPeers(req pbN.NotificationRequest, peerAddresses []Peer, timeout int) error

func (*Notifications) StartQueue

func (n *Notifications) StartQueue() error

type Object

type Object struct {
	Key       string `json:"key"`
	Size      int    `json:"size"`
	ETag      string `json:"eTag"`
	Sequencer string `json:"sequencer"`
}

type OwnerIdentity

type OwnerIdentity struct {
	PrincipalID string `json:"principalId"`
}

type Peer

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

type Records

type Records struct {
	EventVersion      string            `json:"eventVersion"`
	EventSource       string            `json:"eventSource"`
	AwsRegion         string            `json:"awsRegion"`
	EventTime         time.Time         `json:"eventTime"`
	EventName         string            `json:"eventName"`
	UserIdentity      UserIdentity      `json:"userIdentity"`
	RequestParameters RequestParameters `json:"requestParameters"`
	ResponseElements  ResponseElements  `json:"responseElements"`
	S3                S3                `json:"s3"`
}

type RequestParameters

type RequestParameters struct {
	SourceIPAddress string `json:"sourceIPAddress"`
}

type ResponseElements

type ResponseElements struct {
	XAmzRequestID string `json:"x-amz-request-id"`
	XAmzID2       string `json:"x-amz-id-2"`
}

type S3

type S3 struct {
	S3SchemaVersion string `json:"s3SchemaVersion"`
	ConfigurationID string `json:"configurationId"`
	Bucket          Bucket `json:"bucket"`
	Object          Object `json:"object"`
}

type S3NotificationBody

type S3NotificationBody struct {
	Records []Records `json:"Records"`
}

type S3Storage

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

func NewS3Storage

func NewS3Storage(config Config) (*S3Storage, error)

func (*S3Storage) CountCachedJwtRulesByCondition

func (l *S3Storage) CountCachedJwtRulesByCondition(condition api.RuleConditions, jwtProvider string) int

func (*S3Storage) CountCachedObjectByCondition

func (s *S3Storage) CountCachedObjectByCondition(condition api.RuleConditions, actions []api.RuleActions) int

func (*S3Storage) CreateAccountKey

func (s *S3Storage) CreateAccountKey() error

func (*S3Storage) CreateKey

func (s *S3Storage) CreateKey(name string) error

func (*S3Storage) DeleteCachedObject

func (s *S3Storage) DeleteCachedObject(filename string) error

func (*S3Storage) GetCachedObjectName

func (s *S3Storage) GetCachedObjectName(filename string) ([]*api.Object, error)

func (*S3Storage) GetCachedRule

func (s *S3Storage) GetCachedRule(name string) *api.Object

func (*S3Storage) GetCert

func (s *S3Storage) GetCert(name string) (string, error)

func (*S3Storage) GetCertBundle

func (s *S3Storage) GetCertBundle(name string) (string, error)

func (*S3Storage) GetError

func (s *S3Storage) GetError(name string) error

func (*S3Storage) GetObject

func (s *S3Storage) GetObject(filename string) ([]api.Object, error)

func (*S3Storage) GetPrivateAccountkey

func (s *S3Storage) GetPrivateAccountkey() (*rsa.PrivateKey, error)

func (*S3Storage) GetPrivateKey

func (s *S3Storage) GetPrivateKey(name string) (*rsa.PrivateKey, error)

func (*S3Storage) GetPrivateKeyPem

func (s *S3Storage) GetPrivateKeyPem(name string) (string, error)

func (*S3Storage) GetPublicAccountkey

func (s *S3Storage) GetPublicAccountkey() (*rsa.PublicKey, error)

func (*S3Storage) ListCerts

func (s *S3Storage) ListCerts() (map[string]string, error)

func (*S3Storage) ListObjects

func (s *S3Storage) ListObjects() ([]api.Object, error)

func (*S3Storage) SetLogLevel

func (l *S3Storage) SetLogLevel(loglevel string)

func (*S3Storage) SetStoragePath

func (l *S3Storage) SetStoragePath(prefix string)

* SetStoragePath allows you to set a new path

func (*S3Storage) WriteCert

func (s *S3Storage) WriteCert(name string, cert []byte) error

func (*S3Storage) WriteCertBundle

func (s *S3Storage) WriteCertBundle(name string, certs []byte) error

func (*S3Storage) WriteChallenge

func (s *S3Storage) WriteChallenge(name string, data []byte) error

type UserIdentity

type UserIdentity struct {
	PrincipalID string `json:"principalId"`
}

Jump to

Keyboard shortcuts

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