Documentation ¶
Index ¶
- Constants
- func GenerateCACertPool(certs []*x509.Certificate, files []string) (*tls.Config, error)
- func WithBearerAuth(rt http.RoundTripper, token string) http.RoundTripper
- func WithHeader(rt http.RoundTripper) withHeader
- type COSS3Uploader
- type COSS3UploaderConfig
- type LocalFilePathUploader
- type MarketplaceUploader
- type MarketplaceUploaderConfig
- type MarketplaceUsageResponse
- type MarketplaceUsageResponseDetails
- type MktplStatus
- type NoOpUploader
- type RedHatInsightsUploader
- type RedHatInsightsUploaderConfig
- type ReportJobError
- type Uploader
- func NewCOSS3Uploader(config *COSS3UploaderConfig) (Uploader, error)
- func NewMarketplaceUploader(config *MarketplaceUploaderConfig) (Uploader, error)
- func NewRedHatInsightsUploader(config *RedHatInsightsUploaderConfig) (Uploader, error)
- func ProvideRedHatInsightsUploader(ctx context.Context, client client.Client, log logr.Logger) (Uploader, error)
- type UploaderTarget
- type UploaderTargets
- type Uploaders
Constants ¶
View Source
const VerificationError = errors.Sentinel("verification")
Variables ¶
This section is empty.
Functions ¶
func GenerateCACertPool ¶
func WithBearerAuth ¶
func WithBearerAuth(rt http.RoundTripper, token string) http.RoundTripper
func WithHeader ¶
func WithHeader(rt http.RoundTripper) withHeader
Types ¶
type COSS3Uploader ¶
type COSS3Uploader struct { COSS3UploaderConfig // contains filtered or unexported fields }
func (*COSS3Uploader) Name ¶
func (u *COSS3Uploader) Name() string
func (*COSS3Uploader) UploadFile ¶
type COSS3UploaderConfig ¶
type COSS3UploaderConfig struct { ApiKey string `json:"apiKey" yaml:"apiKey"` ServiceInstanceID string `json:"serviceInstanceID" yaml:"serviceInstanceID"` AuthEndpoint string `json:"authEndpoint" yaml:"authEndpoint"` ServiceEndpoint string `json:"serviceEndpoint" yaml:"serviceEndpoint"` Bucket string `json:"bucket" yaml:"bucket"` }
type LocalFilePathUploader ¶
type LocalFilePathUploader struct {
LocalFilePath string
}
func (*LocalFilePathUploader) Name ¶
func (u *LocalFilePathUploader) Name() string
func (*LocalFilePathUploader) UploadFile ¶
type MarketplaceUploader ¶
type MarketplaceUploader struct { MarketplaceUploaderConfig // contains filtered or unexported fields }
func (*MarketplaceUploader) Name ¶
func (u *MarketplaceUploader) Name() string
func (*MarketplaceUploader) UploadFile ¶
type MarketplaceUsageResponse ¶
type MarketplaceUsageResponse struct { RequestID string `json:"requestId,omitempty"` Status MktplStatus `json:"status,omitempty"` Message string `json:"message,omitempty"` ErrorCode string `json:"errorCode,omitempty"` Details *MarketplaceUsageResponseDetails `json:"details,omitempty"` }
type MktplStatus ¶
type MktplStatus = string
type NoOpUploader ¶
type NoOpUploader struct{}
func (*NoOpUploader) Name ¶
func (u *NoOpUploader) Name() string
func (*NoOpUploader) UploadFile ¶
type RedHatInsightsUploader ¶
type RedHatInsightsUploader struct { RedHatInsightsUploaderConfig // contains filtered or unexported fields }
func (*RedHatInsightsUploader) Name ¶
func (u *RedHatInsightsUploader) Name() string
func (*RedHatInsightsUploader) UploadFile ¶
type ReportJobError ¶
func (*ReportJobError) Error ¶
func (re *ReportJobError) Error() string
func (*ReportJobError) Unwrap ¶
func (re *ReportJobError) Unwrap() error
type Uploader ¶
type Uploader interface { UploaderTarget UploadFile(ctx context.Context, fileName string, reader io.Reader) (id string, err error) }
func NewCOSS3Uploader ¶
func NewCOSS3Uploader( config *COSS3UploaderConfig, ) (Uploader, error)
func NewMarketplaceUploader ¶
func NewMarketplaceUploader( config *MarketplaceUploaderConfig, ) (Uploader, error)
func NewRedHatInsightsUploader ¶
func NewRedHatInsightsUploader( config *RedHatInsightsUploaderConfig, ) (Uploader, error)
type UploaderTarget ¶
type UploaderTarget interface {
Name() string
}
var ( UploaderTargetRedHatInsights UploaderTarget = &RedHatInsightsUploader{} UploaderTargetNoOp UploaderTarget = &NoOpUploader{} UploaderTargetLocalPath UploaderTarget = &LocalFilePathUploader{} UploaderTargetCOSS3 UploaderTarget = &COSS3Uploader{} UploaderTargetMarketplace UploaderTarget = &MarketplaceUploader{} UploaderTargetDataService UploaderTarget = &dataservice.DataService{} )
func MustParseUploaderTarget ¶
func MustParseUploaderTarget(s string) UploaderTarget
type UploaderTargets ¶
type UploaderTargets []UploaderTarget
Click to show internal directories.
Click to hide internal directories.