github.com/argoproj/argo-events@v1.9.1/pkg/apis/common/s3.go (about)

     1  /*
     2  Copyright 2018 BlackRock, Inc.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8  	http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package common
    18  
    19  import (
    20  	corev1 "k8s.io/api/core/v1"
    21  )
    22  
    23  // S3Artifact contains information about an S3 connection and bucket
    24  type S3Artifact struct {
    25  	Endpoint  string                    `json:"endpoint" protobuf:"bytes,1,opt,name=endpoint"`
    26  	Bucket    *S3Bucket                 `json:"bucket" protobuf:"bytes,2,opt,name=bucket"`
    27  	Region    string                    `json:"region,omitempty" protobuf:"bytes,3,opt,name=region"`
    28  	Insecure  bool                      `json:"insecure,omitempty" protobuf:"varint,4,opt,name=insecure"`
    29  	AccessKey *corev1.SecretKeySelector `json:"accessKey" protobuf:"bytes,5,opt,name=accessKey"`
    30  	SecretKey *corev1.SecretKeySelector `json:"secretKey" protobuf:"bytes,6,opt,name=secretKey"`
    31  
    32  	Events   []string          `json:"events,omitempty" protobuf:"bytes,7,rep,name=events"`
    33  	Filter   *S3Filter         `json:"filter,omitempty" protobuf:"bytes,8,opt,name=filter"`
    34  	Metadata map[string]string `json:"metadata,omitempty" protobuf:"bytes,9,opt,name=metadata"`
    35  
    36  	CACertificate *corev1.SecretKeySelector `json:"caCertificate,omitempty" protobuf:"bytes,10,opt,name=caCertificate"`
    37  }
    38  
    39  // S3Bucket contains information to describe an S3 Bucket
    40  type S3Bucket struct {
    41  	Key  string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`
    42  	Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
    43  }
    44  
    45  // S3Filter represents filters to apply to bucket notifications for specifying constraints on objects
    46  type S3Filter struct {
    47  	Prefix string `json:"prefix" protobuf:"bytes,1,opt,name=prefix"`
    48  	Suffix string `json:"suffix" protobuf:"bytes,2,opt,name=suffix"`
    49  }