Documentation ¶
Index ¶
- type GCPCloudStorageConfig
- type GCPConfigService
- func (ss *GCPConfigService) GetBucketAccess(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
- func (ss *GCPConfigService) GetGCPConnection(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
- func (ss *GCPConfigService) Response(Title, SuccessMsg, ErrorMsg, ResolutionMsg string, Passed bool) *models.Checks
- type GCPUtils
- type GCPUtilsImpl
- func (au *GCPUtilsImpl) BucketAttributes(ctx context.Context, bucket *storage.BucketHandle) error
- func (au *GCPUtilsImpl) DeleteObject(ctx context.Context, obj *storage.ObjectHandle) error
- func (au *GCPUtilsImpl) ListObjects(ctx context.Context, bucket *storage.BucketHandle, query *storage.Query) error
- func (au *GCPUtilsImpl) NewSessionWithOptions(ctx context.Context, gsa *models.GcpServiceAccount) (*storage.Client, error)
- func (au *GCPUtilsImpl) NewUploader(ctx context.Context, uploadObject *storage.ObjectHandle) error
- type MockGCPCloudStorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCPCloudStorageConfig ¶
type GCPCloudStorageConfig interface { GetGCPConnection(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks GetBucketAccess(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks }
func NewGCPCloudStorageConfig ¶
func NewGCPCloudStorageConfig(logger logger.Logger) GCPCloudStorageConfig
type GCPConfigService ¶
type GCPConfigService struct { Logger logger.Logger Req *models.GCPCloudStorageConfigRequest GCPUtils GCPUtils }
func (*GCPConfigService) GetBucketAccess ¶
func (ss *GCPConfigService) GetBucketAccess(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
func (*GCPConfigService) GetGCPConnection ¶
func (ss *GCPConfigService) GetGCPConnection(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
type GCPUtils ¶
type GCPUtils interface { NewSessionWithOptions(ctx context.Context, gsa *models.GcpServiceAccount) (*storage.Client, error) DeleteObject(ctx context.Context, obj *storage.ObjectHandle) error ListObjects(ctx context.Context, bucket *storage.BucketHandle, query *storage.Query) error NewUploader(ctx context.Context, obj *storage.ObjectHandle) error BucketAttributes(ctx context.Context, bucket *storage.BucketHandle) error }
type GCPUtilsImpl ¶
func NewGCPUtils ¶
func NewGCPUtils(logger logger.Logger) *GCPUtilsImpl
func (*GCPUtilsImpl) BucketAttributes ¶
func (au *GCPUtilsImpl) BucketAttributes(ctx context.Context, bucket *storage.BucketHandle) error
func (*GCPUtilsImpl) DeleteObject ¶
func (au *GCPUtilsImpl) DeleteObject(ctx context.Context, obj *storage.ObjectHandle) error
func (*GCPUtilsImpl) ListObjects ¶
func (au *GCPUtilsImpl) ListObjects(ctx context.Context, bucket *storage.BucketHandle, query *storage.Query) error
func (*GCPUtilsImpl) NewSessionWithOptions ¶
func (au *GCPUtilsImpl) NewSessionWithOptions(ctx context.Context, gsa *models.GcpServiceAccount) (*storage.Client, error)
func (*GCPUtilsImpl) NewUploader ¶
func (au *GCPUtilsImpl) NewUploader(ctx context.Context, uploadObject *storage.ObjectHandle) error
type MockGCPCloudStorageConfig ¶
type MockGCPCloudStorageConfig struct { GetGCPConnectionFunc func(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks GetBucketAccessFunc func(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks }
func (*MockGCPCloudStorageConfig) GetBucketAccess ¶
func (msc *MockGCPCloudStorageConfig) GetBucketAccess(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
func (*MockGCPCloudStorageConfig) GetGCPConnection ¶
func (msc *MockGCPCloudStorageConfig) GetGCPConnection(ctx context.Context, req *models.GCPCloudStorageConfigRequest) *models.Checks
Click to show internal directories.
Click to hide internal directories.