Documentation ¶
Index ¶
- Constants
- type IMockHttpClient
- type IOSS3BackupService
- type IOpenSearchclient
- type IOpensearchOperations
- type MockOSOperations
- func (mco *MockOSOperations) CreateSnapshot(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string, ...) (bool, error)
- func (mco *MockOSOperations) CreateSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, req SnapshotRepoRequestS3, repo string) (bool, error)
- func (mco *MockOSOperations) CreateTestIndex(client *elastic.Client, ctx *fiber.Ctx, index string) (bool, error)
- func (mco *MockOSOperations) DeleteTestIndex(client *elastic.Client, ctx *fiber.Ctx, index string) (bool, error)
- func (mco *MockOSOperations) DeleteTestSnapshot(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string) (bool, error)
- func (mco *MockOSOperations) DeleteTestSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, repoName string) (bool, error)
- func (mco *MockOSOperations) GetSnapshotStatus(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string) (string, error)
- type MockOSS3BackupService
- type MockOpensearchClient
- type OSS3BackupService
- type OpenSearchclient
- type OpensearchOperations
- func (os *OpensearchOperations) CreateSnapshot(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string, ...) (bool, error)
- func (os *OpensearchOperations) CreateSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, req SnapshotRepoRequestS3, ...) (bool, error)
- func (os *OpensearchOperations) CreateTestIndex(client *elastic.Client, ctx *fiber.Ctx, index string) (bool, error)
- func (os *OpensearchOperations) DeleteTestIndex(client *elastic.Client, ctx *fiber.Ctx, index string) (bool, error)
- func (os *OpensearchOperations) DeleteTestSnapshot(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string) (bool, error)
- func (os *OpensearchOperations) DeleteTestSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, repoName string) (bool, error)
- func (os *OpensearchOperations) GetSnapshotStatus(client *elastic.Client, ctx *fiber.Ctx, repoName string, snapshotName string) (string, error)
- type SnapshotRepoRequest
- type SnapshotRepoRequestS3
- type SnapshotRequest
- type SnapshotStatus
- type TestMockFunc
Constants ¶
View Source
const TestIndexMapping = `` /* 154-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMockHttpClient ¶
type IMockHttpClient struct {
// contains filtered or unexported fields
}
func MockHttpClient ¶
func MockHttpClient(responseMock string) *IMockHttpClient
type IOSS3BackupService ¶
type IOSS3BackupService interface {
OSS3BackupVerify(models.S3BackupDetails, *fiber.Ctx) (models.S3BackupManagedResponse, error)
}
type IOpenSearchclient ¶
type IOpenSearchclient interface {
CreateAWSClient(models.S3BackupDetails, string) (*elastic.Client, error)
}
func SetupMockOpensearchClient ¶
func SetupMockOpensearchClient(responseMock string) IOpenSearchclient
type IOpensearchOperations ¶
type IOpensearchOperations interface { CreateTestIndex(*elastic.Client, *fiber.Ctx, string) (bool, error) CreateSnapshotRepo(*elastic.Client, *fiber.Ctx, SnapshotRepoRequestS3, string) (bool, error) CreateSnapshot(*elastic.Client, *fiber.Ctx, string, string, string) (bool, error) GetSnapshotStatus(*elastic.Client, *fiber.Ctx, string, string) (string, error) DeleteTestSnapshot(*elastic.Client, *fiber.Ctx, string, string) (bool, error) DeleteTestSnapshotRepo(*elastic.Client, *fiber.Ctx, string) (bool, error) DeleteTestIndex(*elastic.Client, *fiber.Ctx, string) (bool, error) }
func SetupMockOSOperations ¶
func SetupMockOSOperations(resp []TestMockFunc) IOpensearchOperations
type MockOSOperations ¶
type MockOSOperations struct { CreateTestIndexFunc func(*elastic.Client, *fiber.Ctx, string) (bool, error) CreateSnapshotRepoFunc func(*elastic.Client, *fiber.Ctx, SnapshotRepoRequestS3, string) (bool, error) CreateSnapshotFunc func(*elastic.Client, *fiber.Ctx, string, string, string) (bool, error) GetSnapshotStatusFunc func(*elastic.Client, *fiber.Ctx, string, string) (string, error) DeleteTestSnapshotFunc func(*elastic.Client, *fiber.Ctx, string, string) (bool, error) DeleteTestSnapshotRepoFunc func(*elastic.Client, *fiber.Ctx, string) (bool, error) DeleteTestIndexFunc func(*elastic.Client, *fiber.Ctx, string) (bool, error) }
func (*MockOSOperations) CreateSnapshot ¶
func (*MockOSOperations) CreateSnapshotRepo ¶
func (mco *MockOSOperations) CreateSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, req SnapshotRepoRequestS3, repo string) (bool, error)
func (*MockOSOperations) CreateTestIndex ¶
func (*MockOSOperations) DeleteTestIndex ¶
func (*MockOSOperations) DeleteTestSnapshot ¶
func (*MockOSOperations) DeleteTestSnapshotRepo ¶
func (*MockOSOperations) GetSnapshotStatus ¶
type MockOSS3BackupService ¶
type MockOSS3BackupService struct {
OSS3BackupVerifyFunc func(models.S3BackupDetails, *fiber.Ctx) (models.S3BackupManagedResponse, error)
}
func (*MockOSS3BackupService) OSS3BackupVerify ¶
func (mos *MockOSS3BackupService) OSS3BackupVerify(request models.S3BackupDetails, ctx *fiber.Ctx) (models.S3BackupManagedResponse, error)
type MockOpensearchClient ¶
type MockOpensearchClient struct {
CreateAWSClientFunc func(models.S3BackupDetails, string) (*elastic.Client, error)
}
func (*MockOpensearchClient) CreateAWSClient ¶
func (osc *MockOpensearchClient) CreateAWSClient(req models.S3BackupDetails, url string) (*elastic.Client, error)
type OSS3BackupService ¶
type OSS3BackupService struct { OSClient IOpenSearchclient OSOperations IOpensearchOperations Log logger.Logger }
func NewOSS3BackupService ¶
func NewOSS3BackupService(log logger.Logger) *OSS3BackupService
func (*OSS3BackupService) OSS3BackupVerify ¶
func (ss *OSS3BackupService) OSS3BackupVerify(request models.S3BackupDetails, ctx *fiber.Ctx) (models.S3BackupManagedResponse, error)
type OpenSearchclient ¶
type OpenSearchclient struct{}
func NewOpenSearchclient ¶
func NewOpenSearchclient() *OpenSearchclient
func (*OpenSearchclient) CreateAWSClient ¶
func (os *OpenSearchclient) CreateAWSClient(request models.S3BackupDetails, url string) (*elastic.Client, error)
type OpensearchOperations ¶
func NewOpensearchOperations ¶
func NewOpensearchOperations(log logger.Logger) *OpensearchOperations
func (*OpensearchOperations) CreateSnapshot ¶
func (*OpensearchOperations) CreateSnapshotRepo ¶
func (os *OpensearchOperations) CreateSnapshotRepo(client *elastic.Client, ctx *fiber.Ctx, req SnapshotRepoRequestS3, repoName string) (bool, error)
func (*OpensearchOperations) CreateTestIndex ¶
func (*OpensearchOperations) DeleteTestIndex ¶
func (*OpensearchOperations) DeleteTestSnapshot ¶
func (*OpensearchOperations) DeleteTestSnapshotRepo ¶
func (*OpensearchOperations) GetSnapshotStatus ¶
type SnapshotRepoRequest ¶
type SnapshotRepoRequestS3 ¶
type SnapshotRequest ¶
type SnapshotStatus ¶
type SnapshotStatus struct {
Snapshots []snapshotStatus `json:"snapshots"`
}
type TestMockFunc ¶
Click to show internal directories.
Click to hide internal directories.