Documentation ¶
Index ¶
Constants ¶
const ( // SecuritySourceBackground is used when security is set from the compute instance level SecuritySourceBackground = "background" // SecuritySourceFile is used when security is set by JWT config from a JSON file SecuritySourceFile = "file" )
Variables ¶
This section is empty.
Functions ¶
func InitFetchers ¶
InitFetchers initializes fetchers from config
Types ¶
type AzureStorageFetcher ¶
type AzureStorageFetcher struct {
// contains filtered or unexported fields
}
AzureStorageFetcher implements Fetcher interface for Azure Storage blobs
func NewAzureStorageFetcher ¶
func NewAzureStorageFetcher(accountName, accountKey, containerName string) *AzureStorageFetcher
NewAzureStorageFetcher creates a new Azure Storage fetcher instance
func (*AzureStorageFetcher) Fetch ¶
func (f *AzureStorageFetcher) Fetch(ctx context.Context, path string) (io.ReadCloser, error)
Fetch downloads a blob from Azure Storage
type CloudflareR2Fetcher ¶
type CloudflareR2Fetcher struct { Name string FetcherType string // contains filtered or unexported fields }
CloudflareR2Fetcher implements Fetcher interface for Cloudflare R2
func NewCloudflareR2Fetcher ¶
func NewCloudflareR2Fetcher(cfg map[string]interface{}) *CloudflareR2Fetcher
NewCloudflareR2Fetcher creates a new Cloudflare R2 fetcher instance
func (*CloudflareR2Fetcher) GetFetcherType ¶
func (fetcher *CloudflareR2Fetcher) GetFetcherType() string
GetFetcherType returns the type of this fetcher to be used in the 'type' properties when defining fetchers
func (*CloudflareR2Fetcher) GetName ¶
func (fetcher *CloudflareR2Fetcher) GetName() string
GetName returns the name assigned to this fetcher that can be used in the 'paths' section
type DigitalOceanSpacesFetcher ¶
type DigitalOceanSpacesFetcher struct { Name string // contains filtered or unexported fields }
DigitalOceanSpacesFetcher implements Fetcher interface for DigitalOcean Spaces
func NewDigitalOceanSpacesFetcher ¶
func NewDigitalOceanSpacesFetcher(cfg map[string]interface{}) *DigitalOceanSpacesFetcher
NewDigitalOceanSpacesFetcher creates a new DigitalOcean Spaces fetcher instance
func (*DigitalOceanSpacesFetcher) GetFetcherType ¶
func (f *DigitalOceanSpacesFetcher) GetFetcherType() string
GetFetcherType returns the type of this fetcher
func (*DigitalOceanSpacesFetcher) GetName ¶
func (f *DigitalOceanSpacesFetcher) GetName() string
GetName returns the name assigned to this fetcher
type Fetcher ¶
type Fetcher interface { GetName() string GetFetcherType() string Fetch(ctx echo.Context, url string) (responseBody io.Reader, contentType string, err error) }
Fetcher interface handles fetching content from different sources
func GetFetcherByName ¶
GetFetcherByName returns a fetcher by its configured name
func GetFetcherByPath ¶
GetFetcherByPath returns the fetcher specified by its path
func GetFetcherByType ¶
GetFetcherByType returns the fetcher specified by its type
type GoogleStroageFetcher ¶
type GoogleStroageFetcher struct { Name string FetcherType string Bucket string Path string ProjectID string SecuritySource string ServiceAccountJSONFile string }
GoogleStroageFetcher fetches content from http/https sources
URL Format used: gs://bucketName/path/file
func NewGoogleStroageFetcher ¶
func NewGoogleStroageFetcher(cfg map[string]interface{}) *GoogleStroageFetcher
NewGoogleStroageFetcher creates a new fetcher that support Google Storage buckets
func (*GoogleStroageFetcher) GetFetcherType ¶
func (fetcher *GoogleStroageFetcher) GetFetcherType() string
GetFetcherType returns the type of this fetcher to be used in the 'type' properties when defining fetchers
func (*GoogleStroageFetcher) GetName ¶
func (fetcher *GoogleStroageFetcher) GetName() string
GetName returns the name assigned to this fetcher that can be used in the 'paths' section
type HTTPFetcher ¶
type HTTPFetcher struct { Name string FetcherType string UserName string Password string Secure bool RestrictHosts []string RestrictPaths []string }
HTTPFetcher fetches content from http/https sources
func NewHTTPFetcher ¶
func NewHTTPFetcher(cfg map[string]interface{}) *HTTPFetcher
NewHTTPFetcher creates a new fetcher that support http/https
func (*HTTPFetcher) GetFetcherType ¶
func (fetcher *HTTPFetcher) GetFetcherType() string
GetFetcherType returns the type of this fetcher to be used in the 'type' properties when defining fetchers
func (*HTTPFetcher) GetName ¶
func (fetcher *HTTPFetcher) GetName() string
GetName returns the name assigned to this fetcher that can be used in the 'paths' section
type LocalFetcher ¶
LocalFetcher fetches content from http/https sources
func NewLocalFetcher ¶
func NewLocalFetcher(cfg map[string]interface{}) *LocalFetcher
NewLocalFetcher creates a new fetcher that support http/https
func (*LocalFetcher) GetFetcherType ¶
func (fetcher *LocalFetcher) GetFetcherType() string
GetFetcherType returns the type of this fetcher to be used in the 'type' properties when defining fetchers
func (*LocalFetcher) GetName ¶
func (fetcher *LocalFetcher) GetName() string
GetName returns the name assigned to this fetcher that can be used in the 'paths' section
type S3Fetcher ¶
type S3Fetcher struct { Name string FetcherType string Region string AccessKeyID string SecretAccessKey string }
S3Fetcher fetches content from an s3 bucket
func NewS3Fetcher ¶
NewS3Fetcher creates a new fetcher that support s3 bucket
func (*S3Fetcher) Fetch ¶
Fetch returns content from the local machine
It supports the following S3 URL format: - path style: s3://s3-aws-region.amazonaws.com/bucket/path/file - path style without region: s3://s3.amazonaws.com/bucket/path/file - default region must be configured in the configuration The bucket and path will be extracted from the URL.
If you are accessing an S3 file that is accessible via anonymous direct HTTP/S consider using the http fetcher.
func (*S3Fetcher) GetFetcherType ¶
GetFetcherType returns the type of this fetcher to be used in the 'type' properties when defining fetchers